@lacneu/atrium 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -124,41 +124,41 @@ You can add a description to the \`${Nx}\` by passing a \`${Lx}\` component as a
|
|
|
124
124
|
|
|
125
125
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Nx}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
126
126
|
|
|
127
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return N.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},Wx=Ax,Gx=jx,Kx=Mx,qx=Px,Jx=Bx,Yx=Hx,Xx=Ix,Zx=Rx;function Qx(e){let t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function $x(e){let[t,n]=N.useState(void 0);return Gy(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var eS=`Checkbox`,[tS,Doe]=Uy(eS),[nS,rS]=tS(eS);function iS(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=Ky({prop:n,defaultProp:i??!1,onChange:c,caller:eS}),[m,h]=N.useState(null),[g,_]=N.useState(null),v=N.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:pS(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,I.jsx)(nS,{scope:t,...b,children:fS(d)?d(b):r})}var aS=`CheckboxTrigger`,oS=N.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=rS(aS,e),h=yy(i,u),g=N.useRef(c);return N.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,I.jsx)(Oy.button,{type:`button`,role:`checkbox`,"aria-checked":pS(c)?`mixed`:c,"aria-required":l,"data-state":mS(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:K(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:K(n,e=>{d(e=>pS(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});oS.displayName=aS;var sS=N.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,I.jsx)(iS,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(oS,{...d,ref:t,__scopeCheckbox:n}),e&&(0,I.jsx)(dS,{__scopeCheckbox:n})]})})});sS.displayName=eS;var cS=`CheckboxIndicator`,lS=N.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=rS(cS,n);return(0,I.jsx)(qy,{present:r||pS(a.checked)||a.checked===!0,children:(0,I.jsx)(Oy.span,{"data-state":mS(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});lS.displayName=cS;var uS=`CheckboxBubbleInput`,dS=N.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=rS(uS,e),m=yy(n,p),h=Qx(a),g=$x(r);N.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=pS(a),n.call(e,pS(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=N.useRef(pS(a)?!1:a);return(0,I.jsx)(Oy.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});dS.displayName=uS;function fS(e){return typeof e==`function`}function pS(e){return e===`indeterminate`}function mS(e){return pS(e)?`indeterminate`:e?`checked`:`unchecked`}var hS=[`top`,`right`,`bottom`,`left`],gS=Math.min,_S=Math.max,vS=Math.round,yS=Math.floor,bS=e=>({x:e,y:e}),Ooe={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function xS(e,t,n){return _S(e,gS(t,n))}function SS(e,t){return typeof e==`function`?e(t):e}function CS(e){return e.split(`-`)[0]}function wS(e){return e.split(`-`)[1]}function TS(e){return e===`x`?`y`:`x`}function ES(e){return e===`y`?`height`:`width`}function DS(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function OS(e){return TS(DS(e))}function koe(e,t,n){n===void 0&&(n=!1);let r=wS(e),i=OS(e),a=ES(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=MS(o)),[o,MS(o)]}function Aoe(e){let t=MS(e);return[kS(e),t,kS(t)]}function kS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var AS=[`left`,`right`],jS=[`right`,`left`],joe=[`top`,`bottom`],Moe=[`bottom`,`top`];function Noe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?jS:AS:t?AS:jS;case`left`:case`right`:return t?joe:Moe;default:return[]}}function Poe(e,t,n,r){let i=wS(e),a=Noe(CS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(kS)))),a}function MS(e){let t=CS(e);return Ooe[t]+e.slice(t.length)}function Foe(e){return{top:0,right:0,bottom:0,left:0,...e}}function NS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Foe(e)}function PS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function FS(e,t,n){let{reference:r,floating:i}=e,a=DS(t),o=OS(t),s=ES(o),c=CS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(wS(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Ioe(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=SS(t,e),p=NS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=PS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=PS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Loe=50,Roe=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Ioe},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=FS(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Loe&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=FS(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},zoe=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=SS(e,t)||{};if(l==null)return{};let d=NS(u),f={x:n,y:r},p=OS(i),m=ES(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=gS(d[_],T),D=gS(d[v],T),O=E,ee=C-h[m]-D,te=C/2-h[m]/2+w,k=xS(O,te,ee),A=!c.arrow&&wS(i)!=null&&te!==k&&a.reference[m]/2-(te<O?E:D)-h[m]/2<0,j=A?te<O?te-O:te-ee:0;return{[p]:f[p]+j,data:{[p]:k,centerOffset:te-k-j,...A&&{alignmentOffset:j}},reset:A}}}),Boe=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=SS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=CS(r),_=DS(o),v=CS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[MS(o)]:Aoe(o)),x=p!==`none`;!d&&x&&b.push(...Poe(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=koe(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==DS(t))||T.every(e=>DS(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=DS(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function IS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LS(e){return hS.some(t=>e[t]>=0)}var Voe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=SS(e,t);switch(i){case`referenceHidden`:{let e=IS(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:LS(e)}}}case`escaped`:{let e=IS(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:LS(e)}}}default:return{}}}}},RS=new Set([`left`,`top`]);async function Hoe(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=CS(n),s=wS(n),c=DS(n)===`y`,l=RS.has(o)?-1:1,u=a&&c?-1:1,d=SS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Uoe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Hoe(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Woe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=SS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=DS(CS(i)),p=TS(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=xS(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=xS(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Goe=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=SS(e,t),u={x:n,y:r},d=DS(i),f=TS(d),p=u[f],m=u[d],h=SS(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=RS.has(CS(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Koe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=SS(e,t),u=await o.detectOverflow(t,l),d=CS(i),f=wS(i),p=DS(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=gS(h-u[g],v),x=gS(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=_S(u.left,0),t=_S(u.right,0),n=_S(u.top,0),r=_S(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:_S(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:_S(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function zS(){return typeof window<`u`}function BS(e){return US(e)?(e.nodeName||``).toLowerCase():`#document`}function VS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function HS(e){return((US(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function US(e){return zS()?e instanceof Node||e instanceof VS(e).Node:!1}function WS(e){return zS()?e instanceof Element||e instanceof VS(e).Element:!1}function GS(e){return zS()?e instanceof HTMLElement||e instanceof VS(e).HTMLElement:!1}function KS(e){return!zS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof VS(e).ShadowRoot}function qS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=eC(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function qoe(e){return/^(table|td|th)$/.test(BS(e))}function JS(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Joe=/transform|translate|scale|rotate|perspective|filter/,Yoe=/paint|layout|strict|content/,YS=e=>!!e&&e!==`none`,XS;function ZS(e){let t=WS(e)?eC(e):e;return YS(t.transform)||YS(t.translate)||YS(t.scale)||YS(t.rotate)||YS(t.perspective)||!QS()&&(YS(t.backdropFilter)||YS(t.filter))||Joe.test(t.willChange||``)||Yoe.test(t.contain||``)}function Xoe(e){let t=nC(e);for(;GS(t)&&!$S(t);){if(ZS(t))return t;if(JS(t))return null;t=nC(t)}return null}function QS(){return XS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),XS}function $S(e){return/^(html|body|#document)$/.test(BS(e))}function eC(e){return VS(e).getComputedStyle(e)}function tC(e){return WS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nC(e){if(BS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||KS(e)&&e.host||HS(e);return KS(t)?t.host:t}function rC(e){let t=nC(e);return $S(t)?e.ownerDocument?e.ownerDocument.body:e.body:GS(t)&&qS(t)?t:rC(t)}function iC(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=rC(e),i=r===e.ownerDocument?.body,a=VS(r);if(i){let e=aC(a);return t.concat(a,a.visualViewport||[],qS(r)?r:[],e&&n?iC(e):[])}else return t.concat(r,iC(r,[],n))}function aC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oC(e){let t=eC(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=GS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=vS(n)!==a||vS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function sC(e){return WS(e)?e:e.contextElement}function cC(e){let t=sC(e);if(!GS(t))return bS(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=oC(t),o=(a?vS(n.width):n.width)/r,s=(a?vS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Zoe=bS(0);function lC(e){let t=VS(e);return!QS()||!t.visualViewport?Zoe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qoe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==VS(e)?!1:t}function uC(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=sC(e),o=bS(1);t&&(r?WS(r)&&(o=cC(r)):o=cC(e));let s=Qoe(a,n,r)?lC(a):bS(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=VS(a),t=r&&WS(r)?VS(r):r,n=e,i=aC(n);for(;i&&r&&t!==n;){let e=cC(i),t=i.getBoundingClientRect(),r=eC(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=VS(i),i=aC(n)}}return PS({width:u,height:d,x:c,y:l})}function dC(e,t){let n=tC(e).scrollLeft;return t?t.left+n:uC(HS(e)).left+n}function fC(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-dC(e,n),y:n.top+t.scrollTop}}function $oe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=HS(r),s=t?JS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=bS(1),u=bS(0),d=GS(r);if((d||!d&&!a)&&((BS(r)!==`body`||qS(o))&&(c=tC(r)),d)){let e=uC(r);l=cC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?fC(o,c):bS(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ese(e){return Array.from(e.getClientRects())}function tse(e){let t=HS(e),n=tC(e),r=e.ownerDocument.body,i=_S(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_S(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+dC(e),s=-n.scrollTop;return eC(r).direction===`rtl`&&(o+=_S(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var pC=25;function nse(e,t){let n=VS(e),r=HS(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=QS();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=dC(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=pC&&(a-=o)}else l<=pC&&(a+=l);return{width:a,height:o,x:s,y:c}}function rse(e,t){let n=uC(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=GS(e)?cC(e):bS(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mC(e,t,n){let r;if(t===`viewport`)r=nse(e,n);else if(t===`document`)r=tse(HS(e));else if(WS(t))r=rse(t,n);else{let n=lC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return PS(r)}function hC(e,t){let n=nC(e);return n===t||!WS(n)||$S(n)?!1:eC(n).position===`fixed`||hC(n,t)}function ise(e,t){let n=t.get(e);if(n)return n;let r=iC(e,[],!1).filter(e=>WS(e)&&BS(e)!==`body`),i=null,a=eC(e).position===`fixed`,o=a?nC(e):e;for(;WS(o)&&!$S(o);){let t=eC(o),n=ZS(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||qS(o)&&!n&&hC(e,o))?r=r.filter(e=>e!==o):i=t,o=nC(o)}return t.set(e,r),r}function ase(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?JS(t)?[]:ise(t,this._c):[].concat(n),r],o=mC(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=mC(t,a[e],i);s=_S(n.top,s),c=gS(n.right,c),l=gS(n.bottom,l),u=_S(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ose(e){let{width:t,height:n}=oC(e);return{width:t,height:n}}function sse(e,t,n){let r=GS(t),i=HS(t),a=n===`fixed`,o=uC(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=bS(0);function l(){c.x=dC(i)}if(r||!r&&!a)if((BS(t)!==`body`||qS(i))&&(s=tC(t)),r){let e=uC(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?fC(i,s):bS(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function gC(e){return eC(e).position===`static`}function _C(e,t){if(!GS(e)||eC(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return HS(e)===n&&(n=n.ownerDocument.body),n}function vC(e,t){let n=VS(e);if(JS(e))return n;if(!GS(e)){let t=nC(e);for(;t&&!$S(t);){if(WS(t)&&!gC(t))return t;t=nC(t)}return n}let r=_C(e,t);for(;r&&qoe(r)&&gC(r);)r=_C(r,t);return r&&$S(r)&&gC(r)&&!ZS(r)?n:r||Xoe(e)||n}var cse=async function(e){let t=this.getOffsetParent||vC,n=this.getDimensions,r=await n(e.floating);return{reference:sse(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lse(e){return eC(e).direction===`rtl`}var use={convertOffsetParentRelativeRectToViewportRelativeRect:$oe,getDocumentElement:HS,getClippingRect:ase,getOffsetParent:vC,getElementRects:cse,getClientRects:ese,getDimensions:ose,getScale:cC,isElement:WS,isRTL:lse};function yC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dse(e,t){let n=null,r,i=HS(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=yS(d),h=yS(i.clientWidth-(u+f)),g=yS(i.clientHeight-(d+p)),_=yS(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:_S(0,gS(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!yC(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function fse(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=sC(e),u=i||a?[...l?iC(l):[],...t?iC(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?dse(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?uC(e):null;c&&g();function g(){let t=uC(e);h&&!yC(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var pse=Uoe,mse=Woe,hse=Boe,gse=Koe,_se=Voe,bC=zoe,vse=Goe,yse=(e,t,n)=>{let r=new Map,i={platform:use,...n},a={...i.platform,_c:r};return Roe(e,t,{...i,platform:a})},xC=typeof document<`u`?N.useLayoutEffect:function(){};function SC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!SC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!SC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function CC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wC(e,t){let n=CC(e);return Math.round(t*n)/n}function TC(e){let t=N.useRef(e);return xC(()=>{t.current=e}),t}function bse(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=N.useState(r);SC(f,r)||p(r);let[m,h]=N.useState(null),[g,_]=N.useState(null),v=N.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=N.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=N.useRef(null),C=N.useRef(null),w=N.useRef(u),T=c!=null,E=TC(c),D=TC(i),O=TC(l),ee=N.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),yse(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};te.current&&!SC(w.current,t)&&(w.current=t,ls.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);xC(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=N.useRef(!1);xC(()=>(te.current=!0,()=>{te.current=!1}),[]),xC(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,ee);ee()}},[b,x,ee,E,T]);let k=N.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),A=N.useMemo(()=>({reference:b,floating:x}),[b,x]),j=N.useMemo(()=>{let e={position:n,left:0,top:0};if(!A.floating)return e;let t=wC(A.floating,u.x),r=wC(A.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...CC(A.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,A.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:ee,refs:k,elements:A,floatingStyles:j}),[u,ee,k,A,j])}var xse=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:bC({element:r.current,padding:i}).fn(n):r?bC({element:r,padding:i}).fn(n):{}}}},Sse=(e,t)=>{let n=pse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cse=(e,t)=>{let n=mse(e);return{name:n.name,fn:n.fn,options:[e,t]}},wse=(e,t)=>({fn:vse(e).fn,options:[e,t]}),Tse=(e,t)=>{let n=hse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ese=(e,t)=>{let n=gse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dse=(e,t)=>{let n=_se(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ose=(e,t)=>{let n=xse(e);return{name:n.name,fn:n.fn,options:[e,t]}},kse=`Arrow`,EC=N.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,I.jsx)(Oy.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,I.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});EC.displayName=kse;var Ase=EC,DC=`Popper`,[OC,kC]=Uy(DC),[jse,AC]=OC(DC),jC=e=>{let{__scopePopper:t,children:n}=e,[r,i]=N.useState(null),[a,o]=N.useState(void 0);return(0,I.jsx)(jse,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};jC.displayName=DC;var MC=`PopperAnchor`,NC=N.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=AC(MC,n),o=N.useRef(null),s=a.onAnchorChange,c=yy(t,N.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=N.useRef(null);N.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&RC(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,I.jsx)(Oy.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});NC.displayName=MC;var PC=`PopperContent`,[Mse,Nse]=OC(PC),FC=N.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l,collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=AC(PC,n),[_,v]=N.useState(null),y=yy(t,e=>v(e)),[b,x]=N.useState(null),S=$x(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=l?Array.isArray(l)?l:[l]:void 0,O=D!==void 0&&D.length>0,ee={padding:E,boundary:D?.filter(Fse),altBoundary:O},{refs:te,floatingStyles:k,placement:A,isPositioned:j,middlewareData:ne}=bse({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>fse(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Sse({mainAxis:i+w,alignmentAxis:o}),c&&Cse({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?wse():void 0,...ee}),c&&Tse({...ee}),Ese({...ee,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Ose({element:b,padding:s}),Ise({arrowWidth:C,arrowHeight:w}),f&&Dse({strategy:`referenceHidden`,...ee})]}),re=g.setPlacementState;Gy(()=>(re(A),()=>{re(void 0)}),[A,re]);let[M,ie]=RC(A),ae=Py(m);Gy(()=>{j&&ae?.()},[j,ae]);let oe=ne.arrow?.x,se=ne.arrow?.y,ce=ne.arrow?.centerOffset!==0,[le,ue]=N.useState();return Gy(()=>{_&&ue(window.getComputedStyle(_).zIndex)},[_]),(0,I.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...k,transform:j?k.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:le,"--radix-popper-transform-origin":[ne.transformOrigin?.x,ne.transformOrigin?.y].join(` `),...ne.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,I.jsx)(Mse,{scope:n,placedSide:M,placedAlign:ie,onArrowChange:x,arrowX:oe,arrowY:se,shouldHideArrow:ce,children:(0,I.jsx)(Oy.div,{"data-side":M,"data-align":ie,...h,ref:y,style:{...h.style,animation:j?void 0:`none`}})})})});FC.displayName=PC;var IC=`PopperArrow`,Pse={top:`bottom`,right:`left`,bottom:`top`,left:`right`},LC=N.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Nse(IC,n),a=Pse[i.placedSide];return(0,I.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,I.jsx)(Ase,{...r,ref:t,style:{...r.style,display:`block`}})})});LC.displayName=IC;function Fse(e){return e!==null}var Ise=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=RC(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function RC(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var zC=jC,BC=NC,VC=FC,HC=LC,UC=`rovingFocusGroup.onEntryFocus`,Lse={bubbles:!1,cancelable:!0},WC=`RovingFocusGroup`,[GC,KC,Rse]=Wy(WC),[zse,qC]=Uy(WC,[Rse]),[Bse,Vse]=zse(WC),JC=N.forwardRef((e,t)=>(0,I.jsx)(GC.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(GC.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Hse,{...e,ref:t})})}));JC.displayName=WC;var Hse=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=N.useRef(null),p=yy(t,f),m=Zy(a),[h,g]=Ky({prop:o,defaultProp:s??null,onChange:c,caller:WC}),[_,v]=N.useState(!1),y=Py(l),b=KC(n),x=N.useRef(!1),[S,C]=N.useState(0);return N.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(UC,y),()=>e.removeEventListener(UC,y)},[y]),(0,I.jsx)(Bse,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:N.useCallback(e=>g(e),[g]),onItemShiftTab:N.useCallback(()=>v(!0),[]),onFocusableItemAdd:N.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:N.useCallback(()=>C(e=>e-1),[]),children:(0,I.jsx)(Oy.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:K(e.onMouseDown,()=>{x.current=!0}),onFocus:K(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(UC,Lse);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);ZC([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:K(e.onBlur,()=>v(!1))})})}),YC=`RovingFocusGroupItem`,XC=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Xy(),l=a||c,u=Vse(YC,n),d=u.currentTabStopId===l,f=KC(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return N.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,I.jsx)(GC.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(Oy.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:K(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:K(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:K(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Gse(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Kse(n,r+1):n.slice(r+1)}setTimeout(()=>ZC(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});XC.displayName=YC;var Use={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Wse(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Gse(e,t,n){let r=Wse(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Use[r]}function ZC(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Kse(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var QC=JC,$C=XC,ew=[`Enter`,` `],qse=[`ArrowDown`,`PageUp`,`Home`],tw=[`ArrowUp`,`PageDown`,`End`],Jse=[...qse,...tw],Yse={ltr:[...ew,`ArrowRight`],rtl:[...ew,`ArrowLeft`]},Xse={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},nw=`Menu`,[rw,Zse,Qse]=Wy(nw),[iw,aw]=Uy(nw,[Qse,kC,qC]),ow=kC(),sw=qC(),[cw,lw]=iw(nw),[$se,uw]=iw(nw),dw=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=ow(t),[c,l]=N.useState(null),u=N.useRef(!1),d=Py(a),f=Zy(i);return N.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,I.jsx)(zC,{...s,children:(0,I.jsx)(cw,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,I.jsx)($se,{scope:t,onClose:N.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};dw.displayName=nw;var ece=`MenuAnchor`,fw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=ow(n);return(0,I.jsx)(BC,{...i,...r,ref:t})});fw.displayName=ece;var pw=`MenuPortal`,[tce,mw]=iw(pw,{forceMount:void 0}),hw=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=lw(pw,t);return(0,I.jsx)(tce,{scope:t,forceMount:n,children:(0,I.jsx)(qy,{present:n||a.open,children:(0,I.jsx)(pb,{asChild:!0,container:i,children:r})})})};hw.displayName=pw;var gw=`MenuContent`,[nce,_w]=iw(gw),vw=N.forwardRef((e,t)=>{let n=mw(gw,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=lw(gw,e.__scopeMenu),o=uw(gw,e.__scopeMenu);return(0,I.jsx)(rw.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(qy,{present:r||a.open,children:(0,I.jsx)(rw.Slot,{scope:e.__scopeMenu,children:o.modal?(0,I.jsx)(rce,{...i,ref:t}):(0,I.jsx)(ice,{...i,ref:t})})})})}),rce=N.forwardRef((e,t)=>{let n=lw(gw,e.__scopeMenu),r=N.useRef(null),i=yy(t,r);return N.useEffect(()=>{let e=r.current;if(e)return Xb(e)},[]),(0,I.jsx)(yw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ice=N.forwardRef((e,t)=>{let n=lw(gw,e.__scopeMenu);return(0,I.jsx)(yw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ace=Sy(`MenuContent.ScrollLock`),yw=N.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=lw(gw,n),_=uw(gw,n),v=ow(n),y=sw(n),b=Zse(n),[x,S]=N.useState(null),C=N.useRef(null),w=yy(t,C,g.onContentChange),T=N.useRef(0),E=N.useRef(``),D=N.useRef(0),O=N.useRef(null),ee=N.useRef(`right`),te=N.useRef(0),k=m?Wb:N.Fragment,A=m?{as:ace,allowPinchZoom:!0}:void 0,j=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=vce(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};N.useEffect(()=>()=>window.clearTimeout(T.current),[]),gb();let ne=N.useCallback(e=>ee.current===O.current?.side&&bce(e,O.current?.area),[]);return(0,I.jsx)(nce,{scope:n,searchRef:E,onItemEnter:N.useCallback(e=>{ne(e)&&e.preventDefault()},[ne]),onItemLeave:N.useCallback(e=>{ne(e)||(C.current?.focus(),S(null))},[ne]),onTriggerLeave:N.useCallback(e=>{ne(e)&&e.preventDefault()},[ne]),pointerGraceTimerRef:D,onPointerGraceIntentChange:N.useCallback(e=>{O.current=e},[]),children:(0,I.jsx)(k,{...A,children:(0,I.jsx)(sb,{asChild:!0,trapped:i,onMountAutoFocus:K(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,I.jsx)(tb,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,I.jsx)(QC,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:K(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,I.jsx)(VC,{role:`menu`,"aria-orientation":`vertical`,"data-state":Hw(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:K(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&j(e.key));let i=C.current;if(e.target!==i||!Jse.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);tw.includes(e.key)&&a.reverse(),gce(a)}),onBlur:K(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:K(e.onPointerMove,Gw(e=>{let t=e.target,n=te.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ee.current=e.clientX>te.current?`right`:`left`,te.current=e.clientX)}))})})})})})})});vw.displayName=gw;var oce=`MenuGroup`,bw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Oy.div,{role:`group`,...r,ref:t})});bw.displayName=oce;var sce=`MenuLabel`,xw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Oy.div,{...r,ref:t})});xw.displayName=sce;var Sw=`MenuItem`,Cw=`menu.itemSelect`,ww=N.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=N.useRef(null),o=uw(Sw,e.__scopeMenu),s=_w(Sw,e.__scopeMenu),c=yy(t,a),l=N.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Cw,{bubbles:!0,cancelable:!0});e.addEventListener(Cw,e=>r?.(e),{once:!0}),ky(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,I.jsx)(Tw,{...i,ref:c,disabled:n,onClick:K(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:K(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:K(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||ew.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ww.displayName=Sw;var Tw=N.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=_w(Sw,n),s=sw(n),c=N.useRef(null),l=yy(t,c),[u,d]=N.useState(!1),[f,p]=N.useState(``);return N.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,I.jsx)(rw.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,I.jsx)($C,{asChild:!0,...s,focusable:!r,children:(0,I.jsx)(Oy.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:K(e.onPointerMove,Gw(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Gw(e=>o.onItemLeave(e))),onFocus:K(e.onFocus,()=>d(!0)),onBlur:K(e.onBlur,()=>d(!1))})})})}),cce=`MenuCheckboxItem`,Ew=N.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,I.jsx)(Mw,{scope:e.__scopeMenu,checked:n,children:(0,I.jsx)(ww,{role:`menuitemcheckbox`,"aria-checked":Uw(n)?`mixed`:n,...i,ref:t,"data-state":Ww(n),onSelect:K(i.onSelect,()=>r?.(Uw(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ew.displayName=cce;var Dw=`MenuRadioGroup`,[lce,uce]=iw(Dw,{value:void 0,onValueChange:()=>{}}),Ow=N.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Py(r);return(0,I.jsx)(lce,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,I.jsx)(bw,{...i,ref:t})})});Ow.displayName=Dw;var kw=`MenuRadioItem`,Aw=N.forwardRef((e,t)=>{let{value:n,...r}=e,i=uce(kw,e.__scopeMenu),a=n===i.value;return(0,I.jsx)(Mw,{scope:e.__scopeMenu,checked:a,children:(0,I.jsx)(ww,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Ww(a),onSelect:K(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Aw.displayName=kw;var jw=`MenuItemIndicator`,[Mw,dce]=iw(jw,{checked:!1}),Nw=N.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=dce(jw,n);return(0,I.jsx)(qy,{present:r||Uw(a.checked)||a.checked===!0,children:(0,I.jsx)(Oy.span,{...i,ref:t,"data-state":Ww(a.checked)})})});Nw.displayName=jw;var fce=`MenuSeparator`,Pw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Oy.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Pw.displayName=fce;var pce=`MenuArrow`,Fw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=ow(n);return(0,I.jsx)(HC,{...i,...r,ref:t})});Fw.displayName=pce;var Iw=`MenuSub`,[mce,Lw]=iw(Iw),hce=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=lw(Iw,t),o=ow(t),[s,c]=N.useState(null),[l,u]=N.useState(null),d=Py(i);return N.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,I.jsx)(zC,{...o,children:(0,I.jsx)(cw,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,I.jsx)(mce,{scope:t,contentId:Xy(),triggerId:Xy(),trigger:s,onTriggerChange:c,children:n})})})};hce.displayName=Iw;var Rw=`MenuSubTrigger`,zw=N.forwardRef((e,t)=>{let n=lw(Rw,e.__scopeMenu),r=uw(Rw,e.__scopeMenu),i=Lw(Rw,e.__scopeMenu),a=_w(Rw,e.__scopeMenu),o=N.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=N.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return N.useEffect(()=>u,[u]),N.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,I.jsx)(fw,{asChild:!0,...l,children:(0,I.jsx)(Tw,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Hw(n.open),...e,ref:vy(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Gw(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:K(e.onPointerLeave,Gw(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Yse[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});zw.displayName=Rw;var Bw=`MenuSubContent`,Vw=N.forwardRef((e,t)=>{let n=mw(gw,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=lw(gw,e.__scopeMenu),s=uw(gw,e.__scopeMenu),c=Lw(Bw,e.__scopeMenu),l=N.useRef(null),u=yy(t,l);return(0,I.jsx)(rw.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(qy,{present:r||o.open,children:(0,I.jsx)(rw.Slot,{scope:e.__scopeMenu,children:(0,I.jsx)(yw,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:K(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Xse[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Vw.displayName=Bw;function Hw(e){return e?`open`:`closed`}function Uw(e){return e===`indeterminate`}function Ww(e){return Uw(e)?`indeterminate`:e?`checked`:`unchecked`}function gce(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function _ce(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function vce(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=_ce(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function yce(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function bce(e,t){return t?yce({x:e.clientX,y:e.clientY},t):!1}function Gw(e){return t=>t.pointerType===`mouse`?e(t):void 0}var xce=dw,Sce=fw,Cce=hw,wce=vw,Tce=bw,Ece=xw,Dce=ww,Oce=Ew,kce=Ow,Ace=Aw,jce=Nw,Mce=Pw,Nce=Fw,Pce=zw,Fce=Vw,Kw=`DropdownMenu`,[Ice,Lce]=Uy(Kw,[aw]),qw=aw(),[Rce,Jw]=Ice(Kw),Yw=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=qw(t),l=N.useRef(null),[u,d]=Ky({prop:i,defaultProp:a??!1,onChange:o,caller:Kw});return(0,I.jsx)(Rce,{scope:t,triggerId:Xy(),triggerRef:l,contentId:Xy(),open:u,onOpenChange:d,onOpenToggle:N.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,I.jsx)(xce,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Yw.displayName=Kw;var Xw=`DropdownMenuTrigger`,Zw=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Jw(Xw,n),o=qw(n);return(0,I.jsx)(Sce,{asChild:!0,...o,children:(0,I.jsx)(Oy.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:vy(t,a.triggerRef),onPointerDown:K(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:K(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Zw.displayName=Xw;var zce=`DropdownMenuPortal`,Qw=e=>{let{__scopeDropdownMenu:t,...n}=e,r=qw(t);return(0,I.jsx)(Cce,{...r,...n})};Qw.displayName=zce;var $w=`DropdownMenuContent`,eT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Jw($w,n),a=qw(n),o=N.useRef(!1);return(0,I.jsx)(wce,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:K(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});eT.displayName=$w;var Bce=`DropdownMenuGroup`,Vce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Tce,{...i,...r,ref:t})});Vce.displayName=Bce;var Hce=`DropdownMenuLabel`,tT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Ece,{...i,...r,ref:t})});tT.displayName=Hce;var Uce=`DropdownMenuItem`,nT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Dce,{...i,...r,ref:t})});nT.displayName=Uce;var Wce=`DropdownMenuCheckboxItem`,Gce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Oce,{...i,...r,ref:t})});Gce.displayName=Wce;var Kce=`DropdownMenuRadioGroup`,rT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(kce,{...i,...r,ref:t})});rT.displayName=Kce;var qce=`DropdownMenuRadioItem`,iT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Ace,{...i,...r,ref:t})});iT.displayName=qce;var Jce=`DropdownMenuItemIndicator`,aT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(jce,{...i,...r,ref:t})});aT.displayName=Jce;var Yce=`DropdownMenuSeparator`,oT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Mce,{...i,...r,ref:t})});oT.displayName=Yce;var Xce=`DropdownMenuArrow`,Zce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Nce,{...i,...r,ref:t})});Zce.displayName=Xce;var Qce=`DropdownMenuSubTrigger`,$ce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Pce,{...i,...r,ref:t})});$ce.displayName=Qce;var ele=`DropdownMenuSubContent`,tle=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Fce,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});tle.displayName=ele;var nle=Yw,rle=Zw,ile=Qw,ale=eT,ole=tT,sle=nT,cle=rT,lle=iT,ule=aT,dle=oT;function sT(e,[t,n]){return Math.min(n,Math.max(t,e))}var cT=`Popover`,[lT,fle]=Uy(cT,[kC]),uT=kC(),[ple,dT]=lT(cT),fT=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=uT(t),c=N.useRef(null),[l,u]=N.useState(!1),[d,f]=Ky({prop:r,defaultProp:i??!1,onChange:a,caller:cT});return(0,I.jsx)(zC,{...s,children:(0,I.jsx)(ple,{scope:t,contentId:Xy(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:N.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:N.useCallback(()=>u(!0),[]),onCustomAnchorRemove:N.useCallback(()=>u(!1),[]),modal:o,children:n})})};fT.displayName=cT;var pT=`PopoverAnchor`,mle=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=dT(pT,n),a=uT(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return N.useEffect(()=>(o(),()=>s()),[o,s]),(0,I.jsx)(BC,{...a,...r,ref:t})});mle.displayName=pT;var mT=`PopoverTrigger`,hT=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=dT(mT,n),a=uT(n),o=yy(t,i.triggerRef),s=(0,I.jsx)(Oy.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":ST(i.open),...r,ref:o,onClick:K(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,I.jsx)(BC,{asChild:!0,...a,children:s})});hT.displayName=mT;var gT=`PopoverPortal`,[hle,gle]=lT(gT,{forceMount:void 0}),_T=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=dT(gT,t);return(0,I.jsx)(hle,{scope:t,forceMount:n,children:(0,I.jsx)(qy,{present:n||a.open,children:(0,I.jsx)(pb,{asChild:!0,container:i,children:r})})})};_T.displayName=gT;var vT=`PopoverContent`,yT=N.forwardRef((e,t)=>{let n=gle(vT,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=dT(vT,e.__scopePopover);return(0,I.jsx)(qy,{present:r||a.open,children:a.modal?(0,I.jsx)(vle,{...i,ref:t}):(0,I.jsx)(yle,{...i,ref:t})})});yT.displayName=vT;var _le=Sy(`PopoverContent.RemoveScroll`),vle=N.forwardRef((e,t)=>{let n=dT(vT,e.__scopePopover),r=N.useRef(null),i=yy(t,r),a=N.useRef(!1);return N.useEffect(()=>{let e=r.current;if(e)return Xb(e)},[]),(0,I.jsx)(Wb,{as:_le,allowPinchZoom:!0,children:(0,I.jsx)(bT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),yle=N.forwardRef((e,t)=>{let n=dT(vT,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return(0,I.jsx)(bT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),bT=N.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=dT(vT,n),p=uT(n);return gb(),(0,I.jsx)(sb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(tb,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,I.jsx)(VC,{"data-state":ST(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),xT=`PopoverClose`,ble=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=dT(xT,n);return(0,I.jsx)(Oy.button,{type:`button`,...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})});ble.displayName=xT;var xle=`PopoverArrow`,Sle=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=uT(n);return(0,I.jsx)(HC,{...i,...r,ref:t})});Sle.displayName=xle;function ST(e){return e?`open`:`closed`}var CT=fT,wT=hT,TT=_T,ET=yT,Cle=[` `,`Enter`,`ArrowUp`,`ArrowDown`],wle=[` `,`Enter`],DT=`Select`,[OT,kT,Tle]=Wy(DT),[AT,Ele]=Uy(DT,[Tle,kC]),jT=kC(),[Dle,MT]=AT(DT),[Ole,kle]=AT(DT),Ale=`SelectProvider`;function NT(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=jT(t),[_,v]=N.useState(null),[y,b]=N.useState(null),[x,S]=N.useState(!1),C=Zy(l),[w,T]=Ky({prop:r,defaultProp:i??!1,onChange:a,caller:DT}),[E,D]=Ky({prop:o,defaultProp:s,onChange:c,caller:DT}),O=N.useRef(null),ee=_?!!m||!!_.closest(`form`):!0,[te,k]=N.useState(new Set),A=Xy(),j=Array.from(te).map(e=>e.props.value).join(`;`),ne=N.useCallback(e=>{k(t=>new Set(t).add(e))},[]),re=N.useCallback(e=>{k(t=>{let n=new Set(t);return n.delete(e),n})},[]),M={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:A,value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:te,nativeSelectKey:j,isFormControl:ee};return(0,I.jsx)(zC,{...g,children:(0,I.jsx)(Dle,{scope:t,...M,children:(0,I.jsx)(OT.Provider,{scope:t,children:(0,I.jsx)(Ole,{scope:t,onNativeOptionAdd:ne,onNativeOptionRemove:re,children:qle(h)?h(M):n})})})})}NT.displayName=Ale;var PT=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,I.jsx)(NT,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,I.jsxs)(I.Fragment,{children:[n,e?(0,I.jsx)(gE,{__scopeSelect:t}):null]})})};PT.displayName=DT;var FT=`SelectTrigger`,IT=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=jT(n),o=MT(FT,n),s=o.disabled||r,c=yy(t,o.onTriggerChange),l=kT(n),u=N.useRef(`touch`),[d,f,p]=vE(e=>{let t=l().filter(e=>!e.disabled),n=yE(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,I.jsx)(BC,{asChild:!0,...a,children:(0,I.jsx)(Oy.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":_E(o.value)?``:void 0,...i,ref:c,onClick:K(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:K(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:K(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Cle.includes(e.key)&&(m(),e.preventDefault())})})})});IT.displayName=FT;var LT=`SelectValue`,RT=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=MT(LT,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=yy(t,c.onValueNodeChange);Gy(()=>{l(u)},[l,u]);let f=_E(c.value);return(0,I.jsx)(Oy.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,I.jsx)(N.Fragment,{children:f?o:a},f?`placeholder`:`value`)})});RT.displayName=LT;var jle=`SelectIcon`,zT=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,I.jsx)(Oy.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});zT.displayName=jle;var BT=`SelectPortal`,[Mle,Nle]=AT(BT,{forceMount:void 0}),VT=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,I.jsx)(Mle,{scope:e.__scopeSelect,forceMount:n,children:(0,I.jsx)(pb,{asChild:!0,...r})})};VT.displayName=BT;var HT=`SelectContent`,UT=N.forwardRef((e,t)=>{let n=Nle(HT,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=MT(HT,e.__scopeSelect),[o,s]=N.useState();return Gy(()=>{s(new DocumentFragment)},[]),(0,I.jsx)(qy,{present:r||a.open,children:({present:e})=>e?(0,I.jsx)(JT,{...i,ref:t}):(0,I.jsx)(WT,{...i,fragment:o})})});UT.displayName=HT;var WT=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?ls.createPortal((0,I.jsx)(KT,{scope:n,children:(0,I.jsx)(OT.Slot,{scope:n,children:(0,I.jsx)(`div`,{ref:t,children:r})})}),i):null});WT.displayName=`SelectContentFragment`;var GT=10,[KT,qT]=AT(HT),Ple=`SelectContentImpl`,Fle=Sy(`SelectContent.RemoveScroll`),JT=N.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=MT(HT,n),[y,b]=N.useState(null),[x,S]=N.useState(null),C=yy(t,e=>b(e)),[w,T]=N.useState(null),[E,D]=N.useState(null),O=kT(n),[ee,te]=N.useState(!1),k=N.useRef(!1);N.useEffect(()=>{if(y)return Xb(y)},[y]),gb();let A=N.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),j=N.useCallback(()=>A([w,y]),[A,w,y]);N.useEffect(()=>{ee&&j()},[ee,j]);let{onOpenChange:ne,triggerPointerDownPosRef:re}=v;N.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||ne(!1),document.removeEventListener(`pointermove`,t),re.current=null};return re.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,ne,re]),N.useEffect(()=>{let e=()=>ne(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ne]);let[M,ie]=vE(e=>{let t=O().filter(e=>!e.disabled),n=yE(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ae=N.useCallback((e,t,n)=>{let r=!k.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(k.current=!0))},[v.value]),oe=N.useCallback(()=>y?.focus(),[y]),se=N.useCallback((e,t,n)=>{let r=!k.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),ce=r===`popper`?XT:YT,le=ce===XT?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,I.jsx)(KT,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ae,selectedItem:w,onItemLeave:oe,itemTextRefCallback:se,focusSelectedItem:j,selectedItemText:E,position:r,isPositioned:ee,searchRef:M,children:(0,I.jsx)(Wb,{as:Fle,allowPinchZoom:!0,children:(0,I.jsx)(sb,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:K(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,I.jsx)(tb,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,I.jsx)(ce,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...le,onPlaced:()=>te(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:K(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ie(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>A(t)),e.preventDefault()}})})})})})})});JT.displayName=Ple;var Ile=`SelectItemAlignedPosition`,YT=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=MT(HT,n),o=qT(HT,n),[s,c]=N.useState(null),[l,u]=N.useState(null),d=yy(t,e=>u(e)),f=kT(n),p=N.useRef(!1),m=N.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=N.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-GT,d=sT(a,[GT,Math.max(GT,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-GT,d=sT(a,[GT,Math.max(GT,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-GT*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-GT,D=c-E,O=g.offsetHeight/2,ee=g.offsetTop+O,te=m+v+ee,k=x-te;if(te<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=te+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+k;s.style.height=t+`px`,h.scrollTop=te-E+h.offsetTop}s.style.margin=`${GT}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Gy(()=>y(),[y]);let[b,x]=N.useState();return Gy(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,I.jsx)(Rle,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:N.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,I.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,I.jsx)(Oy.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});YT.displayName=Ile;var Lle=`SelectPopperPosition`,XT=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=GT,...a}=e,o=jT(n);return(0,I.jsx)(VC,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});XT.displayName=Lle;var[Rle,ZT]=AT(HT,{}),QT=`SelectViewport`,$T=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=qT(QT,n),o=ZT(QT,n),s=yy(t,a.onViewportChange),c=N.useRef(0);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,I.jsx)(OT.Slot,{scope:n,children:(0,I.jsx)(Oy.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:K(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-GT*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});$T.displayName=QT;var eE=`SelectGroup`,[zle,Ble]=AT(eE),Vle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Xy();return(0,I.jsx)(zle,{scope:n,id:i,children:(0,I.jsx)(Oy.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Vle.displayName=eE;var tE=`SelectLabel`,Hle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ble(tE,n);return(0,I.jsx)(Oy.div,{id:i.id,...r,ref:t})});Hle.displayName=tE;var nE=`SelectItem`,[Ule,rE]=AT(nE),iE=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=MT(nE,n),c=qT(nE,n),l=s.value===r,[u,d]=N.useState(a??``),[f,p]=N.useState(!1),m=yy(t,e=>c.itemRefCallback?.(e,r,i)),h=Xy(),g=N.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,I.jsx)(Ule,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:N.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,I.jsx)(OT.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,I.jsx)(Oy.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:K(o.onFocus,()=>p(!0)),onBlur:K(o.onBlur,()=>p(!1)),onClick:K(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:K(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:K(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:K(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:K(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(wle.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});iE.displayName=nE;var aE=`SelectItemText`,oE=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=MT(aE,n),s=qT(aE,n),c=rE(aE,n),l=kle(aE,n),[u,d]=N.useState(null),f=yy(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=N.useMemo(()=>(0,I.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Gy(()=>(h(m),()=>g(m)),[h,g,m]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Oy.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ls.createPortal(a.children,o.valueNode):null]})});oE.displayName=aE;var sE=`SelectItemIndicator`,cE=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return rE(sE,n).isSelected?(0,I.jsx)(Oy.span,{"aria-hidden":!0,...r,ref:t}):null});cE.displayName=sE;var lE=`SelectScrollUpButton`,uE=N.forwardRef((e,t)=>{let n=qT(lE,e.__scopeSelect),r=ZT(lE,e.__scopeSelect),[i,a]=N.useState(!1),o=yy(t,r.onScrollButtonChange);return Gy(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,I.jsx)(pE,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});uE.displayName=lE;var dE=`SelectScrollDownButton`,fE=N.forwardRef((e,t)=>{let n=qT(dE,e.__scopeSelect),r=ZT(dE,e.__scopeSelect),[i,a]=N.useState(!1),o=yy(t,r.onScrollButtonChange);return Gy(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,I.jsx)(pE,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});fE.displayName=dE;var pE=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=qT(`SelectScrollButton`,n),o=N.useRef(null),s=kT(n),c=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>c(),[c]),Gy(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,I.jsx)(Oy.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:K(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:K(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:K(i.onPointerLeave,()=>{c()})})}),Wle=`SelectSeparator`,Gle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,I.jsx)(Oy.div,{"aria-hidden":!0,...r,ref:t})});Gle.displayName=Wle;var mE=`SelectArrow`,Kle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=jT(n);return qT(mE,n).position===`popper`?(0,I.jsx)(HC,{...i,...r,ref:t}):null});Kle.displayName=mE;var hE=`SelectBubbleInput`,gE=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=MT(hE,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=N.useRef(null),m=yy(n,p),h=i??``,g=Qx(h);return N.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,I.jsxs)(Oy.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Vy,...t.style},ref:m,defaultValue:h,children:[_E(i)?(0,I.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});gE.displayName=hE;function qle(e){return typeof e==`function`}function _E(e){return e===``||e===void 0}function vE(e){let t=Py(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function yE(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Jle(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Jle(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bE=`Tabs`,[Yle,Xle]=Uy(bE,[qC]),xE=qC(),[Zle,SE]=Yle(bE),CE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Zy(s),[d,f]=Ky({prop:r,onChange:i,defaultProp:a??``,caller:bE});return(0,I.jsx)(Zle,{scope:n,baseId:Xy(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,I.jsx)(Oy.div,{dir:u,"data-orientation":o,...l,ref:t})})});CE.displayName=bE;var wE=`TabsList`,TE=N.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=SE(wE,n),o=xE(n);return(0,I.jsx)(QC,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,I.jsx)(Oy.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});TE.displayName=wE;var EE=`TabsTrigger`,DE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=SE(EE,n),s=xE(n),c=AE(o.baseId,r),l=jE(o.baseId,r),u=r===o.value;return(0,I.jsx)($C,{asChild:!0,...s,focusable:!i,active:u,children:(0,I.jsx)(Oy.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:K(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:K(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});DE.displayName=EE;var OE=`TabsContent`,kE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=SE(OE,n),c=AE(s.baseId,r),l=jE(s.baseId,r),u=r===s.value,d=N.useRef(u);return N.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,I.jsx)(qy,{present:i||u,children:({present:n})=>(0,I.jsx)(Oy.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});kE.displayName=OE;function AE(e,t){return`${e}-trigger-${t}`}function jE(e,t){return`${e}-content-${t}`}var Qle=CE,$le=TE,eue=DE,tue=kE,[ME,nue]=Uy(`Tooltip`,[kC]),NE=kC(),PE=`TooltipProvider`,rue=700,FE=`tooltip.open`,[iue,IE]=ME(PE),LE=e=>{let{__scopeTooltip:t,delayDuration:n=rue,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=N.useRef(!0),s=N.useRef(!1),c=N.useRef(0);return N.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,I.jsx)(iue,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:N.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:N.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:N.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};LE.displayName=PE;var RE=`Tooltip`,[aue,zE]=ME(RE),BE=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=IE(RE,e.__scopeTooltip),l=NE(t),[u,d]=N.useState(null),f=Xy(),p=N.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=N.useRef(!1),[_,v]=Ky({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(FE))):c.onClose(),a?.(e)},caller:RE}),y=N.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=N.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=N.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=N.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return N.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,I.jsx)(zC,{...l,children:(0,I.jsx)(aue,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:N.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:N.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};BE.displayName=RE;var VE=`TooltipTrigger`,HE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=zE(VE,n),a=IE(VE,n),o=NE(n),s=yy(t,N.useRef(null),i.onTriggerChange),c=N.useRef(!1),l=N.useRef(!1),u=N.useCallback(()=>c.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,I.jsx)(BC,{asChild:!0,...o,children:(0,I.jsx)(Oy.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:K(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:K(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:K(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:K(e.onBlur,i.onClose),onClick:K(e.onClick,i.onClose)})})});HE.displayName=VE;var UE=`TooltipPortal`,[oue,sue]=ME(UE,{forceMount:void 0}),WE=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=zE(UE,t);return(0,I.jsx)(oue,{scope:t,forceMount:n,children:(0,I.jsx)(qy,{present:n||a.open,children:(0,I.jsx)(pb,{asChild:!0,container:i,children:r})})})};WE.displayName=UE;var GE=`TooltipContent`,KE=N.forwardRef((e,t)=>{let n=sue(GE,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=zE(GE,e.__scopeTooltip);return(0,I.jsx)(qy,{present:r||o.open,children:o.disableHoverableContent?(0,I.jsx)(qE,{side:i,...a,ref:t}):(0,I.jsx)(cue,{side:i,...a,ref:t})})}),cue=N.forwardRef((e,t)=>{let n=zE(GE,e.__scopeTooltip),r=IE(GE,e.__scopeTooltip),i=N.useRef(null),a=yy(t,i),[o,s]=N.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=N.useCallback(()=>{s(null),d(!1)},[d]),p=N.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=pue(r,fue(r,n.getBoundingClientRect())),a=mue(t.getBoundingClientRect());s(gue([...i,...a])),d(!0)},[d]);return N.useEffect(()=>()=>f(),[f]),N.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),N.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!hue(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,I.jsx)(qE,{...e,ref:a})}),[lue,uue]=ME(RE,{isInside:!1}),due=Ty(`TooltipContent`),qE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=zE(GE,n),l=NE(n),{onClose:u}=c;return N.useEffect(()=>(document.addEventListener(FE,u),()=>document.removeEventListener(FE,u)),[u]),N.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,I.jsx)(tb,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,I.jsxs)(VC,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,I.jsx)(due,{children:r}),(0,I.jsx)(lue,{scope:n,isInside:!0,children:(0,I.jsx)(Jie,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});KE.displayName=GE;var JE=`TooltipArrow`,YE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=NE(n);return uue(JE,n).isInside?null:(0,I.jsx)(HC,{...i,...r,ref:t})});YE.displayName=JE;function fue(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function pue(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mue(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function hue(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function gue(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),_ue(t)}function _ue(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vue=LE,yue=BE,bue=HE,xue=WE,Sue=KE,Cue=YE,XE=(0,H.forwardRef)((e,t)=>(0,I.jsx)(Ay.div,{...e,ref:t}));XE.displayName=`AttachmentPrimitive.Root`;var ZE=(0,H.forwardRef)((e,t)=>{let n=G(e=>{let t=e.attachment.name.split(`.`);return t.length>1?t.pop():``});return(0,I.jsxs)(Ay.div,{...e,ref:t,children:[`.`,n]})});ZE.displayName=`AttachmentPrimitive.unstable_Thumb`;var QE=()=>(0,I.jsx)(I.Fragment,{children:G(e=>e.attachment.name)});QE.displayName=`AttachmentPrimitive.Name`;var wue=Ny(`AttachmentPrimitive.Remove`,()=>{let e=Dg();return W(()=>{e.attachment().remove()},[e])}),$E=xy({Name:()=>QE,Remove:()=>wue,Root:()=>XE,unstable_Thumb:()=>ZE}),Tue=e=>G(t=>{let{role:n,attachments:r,parts:i,branchCount:a,isLast:o,speech:s,isCopied:c,isHovering:l}=t.message;return!(e.hasBranches===!0&&a<2||e.user&&n!==`user`||e.assistant&&n!==`assistant`||e.system&&n!==`system`||e.lastOrHover===!0&&!l&&!o||e.last!==void 0&&e.last!==o||e.copied===!0&&!c||e.copied===!1&&c||e.speaking===!0&&s==null||e.speaking===!1&&s!=null||e.hasAttachments===!0&&(n!==`user`||!r?.length)||e.hasAttachments===!1&&n===`user`&&r?.length||e.hasContent===!0&&i.length===0||e.hasContent===!1&&i.length>0||e.submittedFeedback!==void 0&&(t.message.metadata.submittedFeedback?.type??null)!==e.submittedFeedback)}),eD=({children:e,...t})=>Tue(t)?e:null;eD.displayName=`MessagePrimitive.If`;var tD=(0,H.createContext)(null),nD=()=>Eh(tD),Eue=({children:e})=>{let t=xh(new Map),n=xh([]),r=W(()=>{let e=Array.from(t.current.entries());e.sort((e,t)=>t[1]-e[1]),n.current=e.map(([e])=>e)},[]),i=W((e,n)=>{let i=n?.priority??0;return t.current.set(e,i),r(),()=>{t.current.delete(e),r()}},[r]),a=W(()=>n.current,[]),o=U(()=>({register:i,getPlugins:a}),[i,a]);return(0,I.jsx)(tD.Provider,{value:o,children:e})},rD=(0,H.createContext)(null),iD=(0,H.createContext)(null),aD=()=>{let e=Eh(rD);if(!e)throw Error(`useTriggerPopoverRootContext must be used within ComposerPrimitive.TriggerPopoverRoot`);return e},oD=()=>Eh(rD),Due=()=>{let e=Eh(iD);if(!e)throw Error(`useTriggerPopoverAriaPublish must be used within ComposerPrimitive.TriggerPopoverRoot`);return e},Oue=()=>{let e=aD();return(0,H.useSyncExternalStore)(e.subscribe,e.getTriggers,e.getTriggers)},kue=new Map,sD=()=>()=>{},cD=()=>kue,Aue=()=>{let e=oD();return(0,H.useSyncExternalStore)(e?e.subscribe:sD,e?e.getTriggers:cD,e?e.getTriggers:cD)},lD=()=>null,jue=()=>{let e=oD();return(0,H.useSyncExternalStore)(e?e.subscribeAria:sD,e?e.getActiveAria:lD,e?e.getActiveAria:lD)};function uD(){let e=xh(new Set);return{notify:W(()=>{for(let t of e.current)t()},[]),subscribe:W(t=>(e.current.add(t),()=>{e.current.delete(t)}),[])}}var dD=({children:e})=>{let t=xh(new Map),n=xh(new Set),{notify:r,subscribe:i}=uD(),a=W(e=>{let{char:i}=e;if(t.current.has(i))return()=>{};let a=new Map(t.current);a.set(i,e),t.current=a,r();for(let t of n.current)t.added(e);return()=>{let e=new Map(t.current);e.delete(i),t.current=e,r();for(let e of n.current)e.removed(i)}},[r]),o=W(()=>t.current,[]),s=W(e=>(n.current.add(e),()=>{n.current.delete(e)}),[]),c=xh(null),l=xh(null),{notify:u,subscribe:d}=uD(),f=W((e,t)=>{if(t===null){if(l.current!==e)return;c.current=null,l.current=null,u();return}let n=c.current;l.current===e&&n!==null&&n.popoverId===t.popoverId&&n.highlightedItemId===t.highlightedItemId||(c.current=t,l.current=e,u())},[u]),p=W(()=>c.current,[]),m=U(()=>({register:a,getTriggers:o,subscribe:i,subscribeLifecycle:s,getActiveAria:p,subscribeAria:d}),[a,o,i,s,p,d]),h=U(()=>({setActiveAria:f}),[f]);return(0,I.jsx)(rD.Provider,{value:m,children:(0,I.jsx)(iD.Provider,{value:h,children:e})})},fD=({children:e})=>nD()?(0,I.jsx)(dD,{children:e}):(0,I.jsx)(Eue,{children:(0,I.jsx)(dD,{children:e})});fD.displayName=`ComposerPrimitive.TriggerPopoverRoot`;var pD=/\s/u;function Mue(e,t,n){let r=e.slice(0,n);for(let e=r.length-1;e>=0;e--){let n=r[e];if(pD.test(n))return null;if(r.startsWith(t,e)){if(e>0&&!pD.test(r[e-1]))continue;return{query:r.slice(e+t.length),offset:e}}}return null}var Nue=Oh(function({text:e,triggerChar:t}){let[n,r]=bh(e.length),i=U(()=>Mue(e,t,Math.min(n,e.length)),[n,e,t]);return{trigger:i,query:i?.query??``,setCursorPosition:r}});function Pue(e){return`type`in e}var Fue=Oh(function({navigableList:e,isSearchMode:t,activeCategoryId:n,query:r,popoverId:i,open:a,selectItem:o,selectCategory:s,goBack:c,close:l}){let[u,d]=bh(0);Sh(()=>{d(0)},[e]),Sh(()=>{d(0)},[t,n]);let f=wh(t=>{t<0||t>=e.length||t!==u&&d(t)}),p=wh(t=>{if(!a)return!1;switch(t.key){case`ArrowDown`:return t.preventDefault(),d(t=>{let n=e.length;return n===0?0:t<n-1?t+1:0}),!0;case`ArrowUp`:return t.preventDefault(),d(t=>{let n=e.length;return n===0?0:t>0?t-1:n-1}),!0;case`Enter`:case`Tab`:{if(t.shiftKey)return!1;t.preventDefault();let n=e[u];return n&&(Pue(n)?o(n):s(n.id)),!0}case`Escape`:return t.preventDefault(),l(),!0;case`Backspace`:return n&&r===``?(t.preventDefault(),c(),!0):!1;default:return!1}}),m=e[u];return{highlightedIndex:u,highlightedItemId:a&&m?`${i}-option-${m.id}`:void 0,highlightIndex:f,handleKeyDown:p}});function mD(e,t){return e.id.toLowerCase().includes(t)||e.label.toLowerCase().includes(t)||(e.description?.toLowerCase().includes(t)??!1)}var Iue=Oh(function({adapter:e,query:t,open:n}){let[r,i]=bh(null);Sh(()=>{n||i(null)},[n]);let a=U(()=>!n||!e?[]:e.categories(),[n,e]),o=n?r:null,s=U(()=>!o||!e?[]:e.categoryItems(o),[o,e]),c=U(()=>{if(!n||!e||o||!t&&a.length>0)return null;if(e.search)return e.search(t);let r=[],i=t.toLowerCase();for(let t of a)for(let n of e.categoryItems(t.id))mD(n,i)&&r.push(n);return r},[n,e,t,o,a]),l=c!==null,u=U(()=>{if(l)return[];if(!t)return a;let e=t.toLowerCase();return a.filter(t=>t.label.toLowerCase().includes(e))},[a,t,l]),d=U(()=>{if(l)return c??[];if(!t)return s;let e=t.toLowerCase();return s.filter(t=>mD(t,e))},[s,t,l,c]);return{categories:u,items:d,isSearchMode:l,activeCategoryId:o,navigableList:U(()=>l?c??[]:o?d:u,[l,c,o,d,u]),selectCategory:wh(e=>{i(e)}),goBack:wh(()=>{i(null)})}}),Lue=Oh(function({behavior:e,trigger:t,aui:n,triggerChar:r,setCursorPosition:i,onSelected:a}){let o=xh(null),s=wh(e=>(o.current=e,()=>{o.current===e&&(o.current=null)}));return{selectItem:wh(i=>{if(!t||!e)return;if(o.current?.(i)){a();return}let s=n.composer().getState().text,c=s.slice(0,t.offset),l=s.slice(t.offset+r.length+t.query.length),u=()=>{let t=e.formatter.serialize(i);n.composer().setText(c+t+(l.startsWith(` `)?l:` ${l}`))};e.kind===`directive`?(u(),e.onInserted?.(i)):(e.removeOnExecute?n.composer().setText(c+(l.startsWith(` `)?l.slice(1):l)):u(),e.onExecute(i)),a()}),close:wh(()=>{a(),t&&i(t.offset)}),registerSelectItemOverride:s}}),Rue=Oh(function({adapter:e,text:t,triggerChar:n,behavior:r,aui:i,popoverId:a}){let o=Uh(Nue({text:t,triggerChar:n})),s=o.trigger!==null&&e!==void 0&&r!==void 0,c=Uh(Iue({adapter:e,query:o.query,open:s})),l=wh(()=>{c.goBack()}),u=Uh(Lue({behavior:r,trigger:o.trigger,aui:i,triggerChar:n,setCursorPosition:o.setCursorPosition,onSelected:l})),d=Uh(Fue({navigableList:c.navigableList,isSearchMode:c.isSearchMode,activeCategoryId:c.activeCategoryId,query:o.query,popoverId:a,open:s,selectItem:u.selectItem,selectCategory:c.selectCategory,goBack:c.goBack,close:u.close}));return{open:s,query:o.query,activeCategoryId:c.activeCategoryId,categories:c.categories,items:c.items,highlightedIndex:d.highlightedIndex,isSearchMode:c.isSearchMode,popoverId:a,highlightedItemId:d.highlightedItemId,selectCategory:c.selectCategory,goBack:c.goBack,selectItem:u.selectItem,close:u.close,highlightIndex:d.highlightIndex,handleKeyDown:d.handleKeyDown,setCursorPosition:o.setCursorPosition,registerSelectItemOverride:u.registerSelectItemOverride}}),hD=(0,H.createContext)(null),gD=()=>{let e=Eh(hD);if(!e)throw Error(`useTriggerPopoverScopeContext must be used within ComposerPrimitive.TriggerPopover`);return e},zue=()=>Eh(hD),_D=(0,H.createContext)(null),vD=()=>{let e=Eh(_D);if(!e)throw Error(`TriggerPopover.Directive / TriggerPopover.Action must be rendered inside ComposerPrimitive.TriggerPopover`);return e},yD=(0,H.forwardRef)(({char:e,adapter:t,"aria-label":n,children:r,...i},a)=>{let o=Dg(),s=G(e=>e.composer.text),c=(0,H.useId)(),l=xh(null),[u,d]=bh(null),f=xh(0),p=W(e=>(f.current+=1,l.current=e,d(e),()=>{f.current=Math.max(0,f.current-1),l.current===e&&(l.current=null,d(null))}),[e]),m=U(()=>({register:p}),[p]),h=Uh(Rue({adapter:t,text:s,triggerChar:e,behavior:u??void 0,aui:o,popoverId:c})),g=xh(h);g.current=h;let _=aD();Sh(()=>_.register({char:e,...u?{behavior:u}:{},resource:g.current}),[_,e,u]);let v=nD();Sh(()=>{if(v)return v.register(g.current)},[v]);let y=u!==null&&h.open,b=Due();return Sh(()=>{if(y)return()=>{b.setActiveAria(e,null)}},[b,e,y]),Sh(()=>{y&&b.setActiveAria(e,{popoverId:c,highlightedItemId:h.highlightedItemId})},[b,e,c,y,h.highlightedItemId]),(0,I.jsx)(_D.Provider,{value:m,children:(0,I.jsx)(hD.Provider,{value:h,children:y?(0,I.jsx)(Ay.div,{role:`listbox`,id:c,"aria-label":n??`Suggestions`,"aria-activedescendant":h.highlightedItemId,"data-state":`open`,...i,ref:a,children:r}):r})})});yD.displayName=`ComposerPrimitive.TriggerPopover`;var bD=()=>{let{disabled:e,send:t}=Qre(),n=W(()=>t(),[t]);return e?null:n},Bue=Ny(`ComposerPrimitive.Send`,bD),xD=(0,H.forwardRef)(({onSubmit:e,...t},n)=>{let r=bD(),i=e=>{e.preventDefault(),r&&r()};return(0,I.jsx)(Ay.form,{...t,ref:n,onSubmit:K(e,i)})});xD.displayName=`ComposerPrimitive.Root`;var SD=e=>{let t=Py(e),n=cy(e=>e.onScrollToBottom);Sh(()=>n(t),[n,t])},Vue=()=>!1,Hue=()=>{},Uue=e=>(0,H.useSyncExternalStore)(W(t=>{if(typeof window>`u`||e===null)return Hue;let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),W(()=>typeof window>`u`||e===null?!1:window.matchMedia(e).matches,[e]),Vue);function CD(){return CD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CD.apply(null,arguments)}function Wue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Gue=N.useLayoutEffect,Kue=function(e){var t=N.useRef(e);return Gue(function(){t.current=e}),t},wD=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},que=function(e,t){var n=N.useRef();return N.useCallback(function(r){e.current=r,n.current&&wD(n.current,null),n.current=t,t&&wD(t,r)},[t])},TD={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},ED=function(e){Object.keys(TD).forEach(function(t){e.style.setProperty(t,TD[t],`important`)})},DD=null,OD=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function Jue(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),DD||(DD=document.createElement(`textarea`),DD.setAttribute(`tabindex`,`-1`),DD.setAttribute(`aria-hidden`,`true`),ED(DD)),DD.parentNode===null&&document.body.appendChild(DD);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;DD.style[t]=o[t]}),ED(DD),DD.value=t;var c=OD(DD,e);DD.value=t,c=OD(DD,e),DD.value=`x`;var l=DD.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var kD=function(){},Yue=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},Xue=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Zue=!!document.documentElement.currentStyle,Que=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=Yue(Xue,t),r=n.boxSizing;return r===``?null:(Zue&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function AD(e,t,n){var r=Kue(n);N.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var $ue=function(e,t){AD(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},ede=function(e){AD(window,`resize`,e)},tde=function(e){AD(document.fonts,`loadingdone`,e)},nde=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],rde=N.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?kD:a,s=e.onHeightChange,c=s===void 0?kD:s,l=Wue(e,nde),u=l.value!==void 0,d=N.useRef(null),f=que(d,t),p=N.useRef(0),m=N.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Que(e);if(t){m.current=t;var a=Jue(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return N.useLayoutEffect(h),$ue(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),ede(h),tde(h),N.createElement(`textarea`,CD({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),ide=`(pointer: coarse) and (not (any-pointer: fine))`,jD=(0,H.forwardRef)(({autoFocus:e=!1,asChild:t,render:n,disabled:r,onChange:i,onKeyDown:a,onPaste:o,onSelect:s,submitOnEnter:c,submitMode:l,cancelOnEscape:u=!0,unstable_focusOnRunStart:d=!0,unstable_focusOnScrollToBottom:f=!0,unstable_focusOnThreadSwitched:p=!0,unstable_insertNewlineOnTouchEnter:m=!1,addAttachmentOnPaste:h=!0,...g},_)=>{let v=Dg(),y=nD(),b=jue(),x=l??(c===!1?`none`:`enter`),S=Uue(m?ide:null),C=m&&S&&x===`enter`?`none`:x,w=G(e=>e.composer.isEditing?e.composer.text:``),T=G(e=>e.thread.isDisabled||e.composer.dictation?.inputDisabled)||r,E=xh(null),D=yy(_,E),O=xh(!1);Fy(e=>{if(!E.current?.contains(e.target))return;if(y){for(let t of y.getPlugins())if(t.handleKeyDown(e))return}if(!u)return;let t=v.composer();t.getState().canCancel&&(t.cancel(),e.preventDefault())});let ee=e=>{if(!T&&!e.nativeEvent.isComposing){if(y){for(let t of y.getPlugins())if(t.handleKeyDown(e))return}if(e.key===`Enter`){let t=v.thread().getState(),n=t.capabilities.queue;if(e.shiftKey&&(e.ctrlKey||e.metaKey)&&n&&x!==`none`&&v.composer().getState().canSend){e.preventDefault(),v.composer().send({steer:!0});return}if(e.shiftKey||t.isRunning&&!n)return;let r=!1;C===`ctrlEnter`?r=e.ctrlKey||e.metaKey:C===`enter`&&(r=!0),r&&(e.preventDefault(),E.current?.closest(`form`)?.requestSubmit())}}},te=async e=>{if(!h)return;let t=v.thread().getState().capabilities,n=Array.from(e.clipboardData?.files||[]);if(t.attachments&&n.length>0)try{e.preventDefault(),await Promise.all(n.map(e=>v.composer().addAttachment(e)))}catch(e){console.error(`Error adding attachment:`,e)}},k=e&&!T,A=W(()=>{let e=E.current;!e||!k||(e.focus({preventScroll:!0}),e.setSelectionRange(e.value.length,e.value.length))},[k]);Sh(()=>A(),[A]),SD(()=>{v.composer().getState().type===`thread`&&f&&A()}),Sh(()=>{if(!(v.composer().getState().type!==`thread`||!d))return v.on(`thread.runStart`,A)},[d,A,v]),Sh(()=>{if(!(v.composer().getState().type!==`thread`||!p))return v.on(`threadListItem.switchedTo`,A)},[p,A,v]);let j=b?{"aria-controls":b.popoverId,"aria-expanded":!0,"aria-haspopup":`listbox`,"aria-activedescendant":b.highlightedItemId}:{},ne={name:`input`,value:w,...g,...j,ref:D,disabled:T,onChange:K(i,e=>{if(!v.composer().getState().isEditing)return;let t=e.nativeEvent.isComposing===!0;O.current&&!t&&(O.current=!1);let n=t||O.current;if(Mh(()=>{v.composer().setText(e.target.value)}),n)return;let r=e.target.selectionStart??e.target.value.length;if(y)for(let e of y.getPlugins())e.setCursorPosition(r)}),onKeyDown:K(a,ee),onCompositionStart:K(g.onCompositionStart,()=>{O.current=!0}),onCompositionEnd:K(g.onCompositionEnd,e=>{if(O.current=!1,!v.composer().getState().isEditing)return;let t=e.target;Mh(()=>{v.composer().setText(t.value)});let n=t.selectionStart??t.value.length;if(y)for(let e of y.getPlugins())e.setCursorPosition(n)}),onSelect:K(s,e=>{if(O.current)return;let t=e.target,n=t.selectionStart??t.value.length;if(y)for(let e of y.getPlugins())e.setCursorPosition(n)}),onPaste:K(o,te)};if(n&&(0,H.isValidElement)(n)){let e=g.children===void 0?n.props.children:g.children;return(0,I.jsx)(Cy,{...ne,children:(0,H.cloneElement)(n,void 0,e)})}return(0,I.jsx)(t?Cy:rde,{...ne})});jD.displayName=`ComposerPrimitive.Input`;var ade=Ny(`ComposerPrimitive.Cancel`,()=>{let{disabled:e,cancel:t}=$re();return e?null:t}),ode=Ny(`ComposerPrimitive.AddAttachment`,({multiple:e=!0}={})=>{let{disabled:t,addAttachment:n}=tie(),r=Dg(),i=W(()=>{let t=document.createElement(`input`);t.type=`file`,t.multiple=e,t.hidden=!0;let i=r.composer().getState().attachmentAccept;i!==`*`&&(t.accept=i),document.body.appendChild(t),t.onchange=e=>{let r=e.target.files;if(r){for(let e of r)n(e);document.body.removeChild(t)}},t.oncancel=()=>{(!t.files||t.files.length===0)&&document.body.removeChild(t)},t.click()},[r,e,n]);return t?null:i},[`multiple`]),MD=(0,H.forwardRef)(({disabled:e,asChild:t=!1,render:n,children:r,...i},a)=>{let[o,s]=bh(!1),c=Dg(),l=W(t=>{e||(t.preventDefault(),s(!0))},[e]),u=W(t=>{e||(t.preventDefault(),o||s(!0))},[e,o]),d=W(t=>{if(e)return;t.preventDefault();let n=t.relatedTarget;n&&t.currentTarget.contains(n)||s(!1)},[e]),f=W(async t=>{if(e)return;t.preventDefault(),s(!1);let n=Array.from(t.dataTransfer.files);await Promise.all(n.map(async e=>{try{await c.composer().addAttachment(e)}catch(e){console.error(`Failed to add attachment:`,e)}}))},[e,c]),p={...o?{"data-dragging":`true`}:null,...i,onDragEnterCapture:K(i.onDragEnterCapture,l),onDragOverCapture:K(i.onDragOverCapture,u),onDragLeaveCapture:K(i.onDragLeaveCapture,d),onDropCapture:K(i.onDropCapture,f),ref:a};if(n&&(0,H.isValidElement)(n)){let e=r===void 0?n.props.children:r;return(0,I.jsx)(Cy,{...p,children:(0,H.cloneElement)(n,void 0,e)})}return(0,I.jsx)(t?Cy:`div`,{...p,children:r})});MD.displayName=`ComposerPrimitive.AttachmentDropzone`;var sde=Ny(`ComposerPrimitive.Dictate`,()=>{let{disabled:e,startDictation:t}=eie();return e?null:t}),cde=Ny(`ComposerPrimitive.StopDictation`,()=>{let e=Dg(),t=G(e=>e.composer.dictation!=null),n=W(()=>{e.composer().stopDictation()},[e]);return t?n:null}),ND=(0,H.forwardRef)(({children:e,...t},n)=>{let r=G(e=>e.composer.dictation?.transcript);return r?(0,I.jsx)(Ay.span,{...t,ref:n,children:e??r}):null});ND.displayName=`ComposerPrimitive.DictationTranscript`;var PD=(0,H.forwardRef)((e,t)=>G(e=>e.composer.quote)?(0,I.jsx)(Ay.div,{...e,ref:t}):null);PD.displayName=`ComposerPrimitive.Quote`;var FD=(0,H.forwardRef)(({children:e,...t},n)=>{let r=G(e=>e.composer.quote?.text);return r?(0,I.jsx)(Ay.span,{...t,ref:n,children:e??r}):null});FD.displayName=`ComposerPrimitive.QuoteText`;var ID=(0,H.forwardRef)(({onClick:e,...t},n)=>{let r=Dg(),i=W(()=>{r.composer().setQuote(void 0)},[r]);return(0,I.jsx)(Ay.button,{type:`button`,...t,ref:n,onClick:K(e,i)})});ID.displayName=`ComposerPrimitive.QuoteDismiss`;var LD=(0,H.forwardRef)(({children:e,"aria-label":t,...n},r)=>{let{categories:i,activeCategoryId:a,isSearchMode:o,open:s}=gD();return!s||a||o?null:(0,I.jsx)(Ay.div,{role:`group`,"aria-label":t??`Categories`,...n,ref:r,children:e(i)})});LD.displayName=`ComposerPrimitive.TriggerPopoverCategories`;var RD=(0,H.forwardRef)(({categoryId:e,onClick:t,onMouseMove:n,...r},i)=>{let{selectCategory:a,highlightIndex:o,categories:s,highlightedIndex:c,activeCategoryId:l,isSearchMode:u,popoverId:d}=gD(),f=W(()=>{a(e)},[a,e]),p=s.findIndex(t=>t.id===e),m=!l&&!u&&p===c,h=W(()=>{o(p)},[o,p]);return(0,I.jsx)(Ay.button,{type:`button`,role:`option`,id:`${d}-option-${e}`,"aria-selected":m,"data-highlighted":m?``:void 0,...r,ref:i,onClick:K(t,f),onMouseMove:K(n,h)})});RD.displayName=`ComposerPrimitive.TriggerPopoverCategoryItem`;var zD=(0,H.forwardRef)(({children:e,"aria-label":t,...n},r)=>{let{items:i,activeCategoryId:a,isSearchMode:o,open:s}=gD();return!s||!a&&!o?null:(0,I.jsx)(Ay.div,{role:`group`,"aria-label":t??`Items`,...n,ref:r,children:e(i)})});zD.displayName=`ComposerPrimitive.TriggerPopoverItems`;var BD=(0,H.forwardRef)(({item:e,index:t,onClick:n,onMouseMove:r,...i},a)=>{let{selectItem:o,highlightIndex:s,items:c,highlightedIndex:l,activeCategoryId:u,isSearchMode:d,popoverId:f}=gD(),p=W(()=>{o(e)},[o,e]),m=t??c.findIndex(t=>t.id===e.id),h=(d||u!==null)&&m===l,g=W(()=>{s(m)},[s,m]);return(0,I.jsx)(Ay.button,{type:`button`,role:`option`,id:`${f}-option-${e.id}`,"aria-selected":h,"data-highlighted":h?``:void 0,...i,ref:a,onClick:K(n,p),onMouseMove:K(r,g)})});BD.displayName=`ComposerPrimitive.TriggerPopoverItem`;var VD=(0,H.forwardRef)(({onClick:e,...t},n)=>{let{activeCategoryId:r,isSearchMode:i,goBack:a,open:o}=gD();return!o||!r||i?null:(0,I.jsx)(Ay.button,{type:`button`,...t,ref:n,onClick:K(e,a)})});VD.displayName=`ComposerPrimitive.TriggerPopoverBack`;var HD=({formatter:e,onExecute:t,removeOnExecute:n})=>{let{register:r}=vD(),i=xh(t);return i.current=t,Sh(()=>r({kind:`action`,formatter:e??ay,onExecute:e=>i.current(e),...n===void 0?{}:{removeOnExecute:n}}),[r,e,n]),null};HD.displayName=`ComposerPrimitive.TriggerPopoverAction`;var UD=({formatter:e,onInserted:t})=>{let{register:n}=vD(),r=xh(t);return r.current=t,Sh(()=>n({kind:`directive`,formatter:e??ay,onInserted:e=>r.current?.(e)}),[n,e]),null};UD.displayName=`ComposerPrimitive.TriggerPopoverDirective`;var lde=Object.assign(yD,{Directive:UD,Action:HD}),WD=xy({AddAttachment:()=>ode,AttachmentByIndex:()=>Yv,AttachmentDropzone:()=>MD,Attachments:()=>Zv,Cancel:()=>ade,Dictate:()=>sde,DictationTranscript:()=>ND,If:()=>iy,Input:()=>jD,Queue:()=>Qv,Quote:()=>PD,QuoteDismiss:()=>ID,QuoteText:()=>FD,Root:()=>xD,Send:()=>Bue,StopDictation:()=>cde,Unstable_TriggerPopover:()=>lde,Unstable_TriggerPopoverBack:()=>VD,Unstable_TriggerPopoverCategories:()=>LD,Unstable_TriggerPopoverCategoryItem:()=>RD,Unstable_TriggerPopoverItem:()=>BD,Unstable_TriggerPopoverItems:()=>zD,Unstable_TriggerPopoverRoot:()=>fD,unstable_useTriggerPopoverRootContext:()=>aD,unstable_useTriggerPopoverRootContextOptional:()=>oD,unstable_useTriggerPopoverScopeContext:()=>gD,unstable_useTriggerPopoverScopeContextOptional:()=>zue,unstable_useTriggerPopoverTriggers:()=>Oue,unstable_useTriggerPopoverTriggersOptional:()=>Aue}),GD=()=>G(e=>{if(e.part.type!==`text`&&e.part.type!==`reasoning`)throw Error(`MessagePartText can only be used inside text or reasoning message parts.`);return e.part}),ude=()=>G(e=>{if(e.part.type!==`image`)throw Error(`MessagePartImage can only be used inside image message parts.`);return e.part}),KD=(0,H.createContext)(null),dde=e=>({useSmoothStatus:zg(()=>e)}),fde=({children:e})=>{let t=qD({optional:!0}),n=Dg(),[r]=bh(()=>dde(n.part().getState().status));return t?e:(0,I.jsx)(KD.Provider,{value:r,children:e})},pde=e=>{let t=(0,H.forwardRef)((t,n)=>(0,I.jsx)(fde,{children:(0,I.jsx)(e,{...t,ref:n})}));return t.displayName=e.displayName,t};function qD(e){let t=Eh(KD);if(!e?.optional&&!t)throw Error(`This component must be used within a SmoothContextProvider.`);return t}var{useSmoothStatus:mde,useSmoothStatusStore:hde}=oy(qD,`useSmoothStatus`),gde=class{currentText;setText;animationFrameId=null;lastUpdateTime=Date.now();targetText=``;constructor(e,t){this.currentText=e,this.setText=t}start(){this.animationFrameId===null&&(this.lastUpdateTime=Date.now(),this.animate())}stop(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}animate=()=>{let e=Date.now(),t=e-this.lastUpdateTime,n=this.targetText.length-this.currentText.length,r=Math.min(5,250/n),i=0;for(;t>=r&&i<n;)i++,t-=r;i===n?this.animationFrameId=null:this.animationFrameId=requestAnimationFrame(this.animate),i!==0&&(this.currentText=this.targetText.slice(0,this.currentText.length+i),this.lastUpdateTime=e-t,this.setText(this.currentText))}},JD=Object.freeze({type:`running`}),YD=(e,t=!1)=>{let{text:n}=e,[r,i]=bh(e.status.type===`running`?``:n),a=Dg(),o=G(()=>a.part()),[s,c]=bh(o);(o!==s||!n.startsWith(r))&&(c(o),i(e.status.type===`running`?``:n));let l=hde({optional:!0}),u=Py(t=>{if(i(t),l){let n=r!==t||e.status.type===`running`?JD:e.status;dy(l).setState(n,!0)}});Sh(()=>{if(l){let i=t&&(r!==n||e.status.type===`running`)?JD:e.status;dy(l).setState(i,!0)}},[l,t,n,r,e.status]);let[d]=bh(new gde(r,u)),f=xh(o);return Sh(()=>{if(!t){d.stop();return}let r=f.current!==o;if(f.current=o,r||!n.startsWith(d.targetText)){e.status.type===`running`?(d.currentText=``,d.targetText=n,d.start()):(d.currentText=n,d.targetText=n,d.stop());return}d.targetText=n,d.start()},[d,t,n,e.status.type,o]),Sh(()=>()=>{d.stop()},[d]),U(()=>t?{type:`text`,text:r,status:n===r?e.status:JD}:e,[t,r,e,n])},XD=(0,H.forwardRef)(({smooth:e=!0,component:t=`span`,...n},r)=>{let{text:i,status:a}=YD(GD(),e);return(0,I.jsx)(t,{"data-status":a.type,...n,ref:r,children:i})});XD.displayName=`MessagePartPrimitive.Text`;var ZD=(0,H.forwardRef)((e,t)=>{let{image:n}=ude();return(0,I.jsx)(Ay.img,{src:n,...e,ref:t})});ZD.displayName=`MessagePartPrimitive.Image`;var QD=e=>{let t=xh(void 0);return W(n=>{t.current&&=(t.current(),void 0),n&&(t.current=e(n))},[e])},$D=(e,t)=>{let n=e.trim().match(/^(\d+(?:\.\d+)?|\.\d+)(em|px|rem)$/);if(!n)return 1/0;let r=Number(n[1]),i=n[2];return i===`px`?r:i===`em`?r*(parseFloat(getComputedStyle(t).fontSize)||16):i===`rem`?r*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16):1/0},_de=e=>e.dataset.messageId,vde=()=>{let e=document.createElement(`div`);return e.dataset.auiTopAnchorReserve=``,e.style.height=`0px`,e.style.flexShrink=`0`,e.style.pointerEvents=`none`,e.setAttribute(`aria-hidden`,`true`),e},eO=(e,t)=>{let n=`${t}px`;return e.style.height===n?!1:(e.style.height=n,!0)},yde=e=>{let t=window.devicePixelRatio||1;return Math.round(e*t)/t},tO=()=>{let e=Dg(),t=G(()=>e.message());return QD(W(e=>{let n=()=>{t.setIsHovering(!0)},r=()=>{t.setIsHovering(!1)};return e.addEventListener(`mouseenter`,n),e.addEventListener(`mouseleave`,r),e.matches(`:hover`)&&queueMicrotask(()=>t.setIsHovering(!0)),()=>{e.removeEventListener(`mouseenter`,n),e.removeEventListener(`mouseleave`,r),t.setIsHovering(!1)}},[t]))},bde=()=>{let e=cy(e=>e.topAnchorTurn?.anchorId);return G(t=>t.message.role===`user`&&t.message.index>0&&t.message.index===t.thread.messages.length-2&&t.thread.messages.at(-1)?.role===`assistant`&&(t.message.id===e||t.thread.isRunning))},xde=()=>{let e=cy(e=>e.topAnchorTurn?.targetId);return G(t=>t.message.isLast&&t.message.role===`assistant`&&t.message.index>=1&&t.thread.messages.at(t.message.index-1)?.role===`user`&&(t.message.id===e||t.thread.isRunning))},Sde=(e,t)=>QD(W(n=>{if(e)return t.getState().registerAnchorElement(n)},[e,t])),Cde=({active:e,threadViewportStore:t})=>QD(W(n=>{if(!e)return;let r=t.getState(),i=r.topAnchorMessageClamp;return r.registerAnchorTargetElement(n,{tallerThan:$D(i.tallerThan,n),visibleHeight:$D(i.visibleHeight,n)})},[e,t])),wde=({forwardedRef:e,...t})=>{let n=yy(e,tO()),r=G(e=>e.message.id);return(0,I.jsx)(Ay.div,{...t,ref:n,"data-message-id":r})},Tde=({forwardedRef:e,threadViewportStore:t,...n})=>{let r=tO(),i=bde(),a=xde(),o=yy(e,r,Sde(i,t),Cde({active:a,threadViewportStore:t})),s=G(e=>e.message.id);return(0,I.jsx)(Ay.div,{...n,ref:o,"data-message-id":s,"data-aui-top-anchor-user":i?``:void 0,"data-aui-top-anchor-target":a?``:void 0})},nO=(0,H.forwardRef)((e,t)=>{let n=ly();return n.getState().turnAnchor===`top`?(0,I.jsx)(Tde,{...e,forwardedRef:t,threadViewportStore:n}):(0,I.jsx)(wde,{...e,forwardedRef:t})});nO.displayName=`MessagePrimitive.Root`;var rO={...jv,Text:()=>(0,I.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,I.jsx)(XD,{}),(0,I.jsx)($v,{children:(0,I.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Image:()=>(0,I.jsx)(ZD,{})},iO=e=>{if(`children`in e)return(0,I.jsx)(Rv,{children:e.children});let{components:t,...n}=e;return(0,I.jsx)(Rv,{components:t?{Text:t.Text??rO.Text,Image:t.Image??rO.Image,Reasoning:t.Reasoning??jv.Reasoning,Source:t.Source??jv.Source,File:t.File??jv.File,Unstable_Audio:t.Unstable_Audio??jv.Unstable_Audio,...`ChainOfThought`in t?{ChainOfThought:t.ChainOfThought}:{tools:t.tools,data:t.data,ToolGroup:t.ToolGroup??jv.ToolGroup,ReasoningGroup:t.ReasoningGroup??jv.ReasoningGroup},Empty:t.Empty,Quote:t.Quote,generativeUI:t.generativeUI}:rO,...n})};iO.displayName=`MessagePrimitive.Parts`;var aO=({children:e})=>uie()===void 0?null:e;aO.displayName=`MessagePrimitive.Error`;var Ede=e=>{let t=new Map;for(let n=0;n<e.length;n++){let r=e[n]?.parentId??`__ungrouped_${n}`,i=t.get(r)??[];i.push(n),t.set(r,i)}let n=[];for(let[e,r]of t){let t=e.startsWith(`__ungrouped_`)?void 0:e;n.push({groupKey:t,indices:r})}return n},Dde=e=>{let t=G(e=>e.message.parts);return U(()=>t.length===0?[]:e(t),[t,e])},Ode=({Fallback:e,...t})=>{let n=G(n=>{let r=n.tools.tools[t.toolName]??e;return Array.isArray(r)?r[0]??e:r});return n?(0,I.jsx)(n,{...t}):null},kde=({Fallback:e,...t})=>{let n=G(n=>{let r=n.dataRenderers.renderers[t.name]??e;return Array.isArray(r)?r[0]??e:r});return n?(0,I.jsx)(n,{...t}):null},oO={Text:()=>(0,I.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,I.jsx)(XD,{}),(0,I.jsx)($v,{children:(0,I.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Reasoning:()=>null,Source:()=>null,Image:()=>(0,I.jsx)(ZD,{}),File:()=>null,Unstable_Audio:()=>null,Group:({children:e})=>e},Ade=({components:{Text:e=oO.Text,Reasoning:t=oO.Reasoning,Image:n=oO.Image,Source:r=oO.Source,File:i=oO.File,Unstable_Audio:a=oO.Unstable_Audio,tools:o={},data:s}={}})=>{let c=Dg(),l=G(e=>e.part),u=l.type;if(u===`tool-call`){let e=c.part().addToolResult,t=c.part().resumeToolCall,n=c.part().respondToToolApproval;if(`Override`in o)return(0,I.jsx)(o.Override,{...l,addResult:e,resume:t,respondToApproval:n});let r=o.by_name?.[l.toolName]??o.Fallback;return(0,I.jsx)(Ode,{...l,Fallback:r,addResult:e,resume:t,respondToApproval:n})}if(l.status?.type===`requires-action`)throw Error(`Encountered unexpected requires-action status`);switch(u){case`text`:return(0,I.jsx)(e,{...l});case`reasoning`:return(0,I.jsx)(t,{...l});case`source`:return(0,I.jsx)(r,{...l});case`image`:return(0,I.jsx)(n,{...l});case`file`:return(0,I.jsx)(i,{...l});case`audio`:return(0,I.jsx)(a,{...l});case`data`:{let e=s?.by_name?.[l.name]??s?.Fallback;return(0,I.jsx)(kde,{...l,Fallback:e})}default:return console.warn(`Unknown message part type: ${u}`),null}},jde=(0,H.memo)(({partIndex:e,components:t})=>(0,I.jsx)(o_,{index:e,children:(0,I.jsx)(Ade,{components:t})}),(e,t)=>e.partIndex===t.partIndex&&e.components?.Text===t.components?.Text&&e.components?.Reasoning===t.components?.Reasoning&&e.components?.Source===t.components?.Source&&e.components?.Image===t.components?.Image&&e.components?.File===t.components?.File&&e.components?.Unstable_Audio===t.components?.Unstable_Audio&&e.components?.tools===t.components?.tools&&e.components?.data===t.components?.data&&e.components?.Group===t.components?.Group),Mde=({status:e,component:t})=>(0,I.jsx)(s_,{text:``,isRunning:e.type===`running`,children:(0,I.jsx)(t,{type:`text`,text:``,status:e})}),Nde=Object.freeze({type:`complete`}),Pde=(0,H.memo)(({components:e})=>{let t=G(e=>e.message.status??Nde);return e?.Empty?(0,I.jsx)(e.Empty,{status:t}):(0,I.jsx)(Mde,{status:t,component:e?.Text??oO.Text})},(e,t)=>e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),sO=({groupingFunction:e,components:t})=>{let n=G(e=>e.message.parts.length),r=Dde(e);return(0,I.jsx)(I.Fragment,{children:U(()=>n===0?(0,I.jsx)(Pde,{components:t}):r.map((e,n)=>(0,I.jsx)(t?.Group??oO.Group,{groupKey:e.groupKey,indices:e.indices,children:e.indices.map(e=>(0,I.jsx)(jde,{partIndex:e,components:t},e))},`group-${n}-${e.groupKey??`ungrouped`}`)),[r,t,n])})};sO.displayName=`MessagePrimitive.Unstable_PartsGrouped`;var cO=({components:e,...t})=>(0,I.jsx)(sO,{...t,components:e,groupingFunction:Ede});cO.displayName=`MessagePrimitive.Unstable_PartsGroupedByParentId`;var lO=xy({AttachmentByIndex:()=>Gv,Attachments:()=>qv,Content:()=>iO,Error:()=>aO,GenerativeUI:()=>wv,GroupedParts:()=>Hv,If:()=>eD,PartByIndex:()=>Mv,Parts:()=>iO,Quote:()=>Uv,Root:()=>nO,Unstable_PartsGrouped:()=>sO,Unstable_PartsGroupedByParentId:()=>cO}),Fde=e=>{let t=Py(e);return QD(W(e=>{let n=new ResizeObserver(()=>{t()}),r=new MutationObserver(e=>{e.some(e=>e.type!==`attributes`||e.attributeName!==`style`)&&t()});return n.observe(e),r.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),()=>{n.disconnect(),r.disconnect()}},[t]))},Ide=({autoScroll:e,scrollToBottomOnRunStart:t=!0,scrollToBottomOnInitialize:n=!0,scrollToBottomOnThreadSwitch:r=!0})=>{let i=xh(null),a=G(e=>e.thread.messages.length>0),o=xh(!1),s=xh(null),c=ly();e===void 0&&(e=c.getState().turnAnchor!==`top`);let l=xh(0),u=xh(0),d=xh(0),f=xh(0),p=xh(null),m=W(e=>{let t=i.current;t&&(p.current=e,t.scrollTo({top:t.scrollHeight,behavior:e}))},[]),h=W(e=>{p.current=e,s.current!==null&&cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{s.current=null,m(e)})},[m]);Ch(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]);let g=W(()=>{let e=c.getState();return e.turnAnchor===`top`&&e.element.viewport===i.current&&e.element.anchor!==null},[c]),_=()=>{let e=i.current;if(!e)return;let t=c.getState().isAtBottom,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<=1||e.scrollHeight<=e.clientHeight;!n&&l.current<e.scrollTop||(n?e.scrollHeight>e.clientHeight+1&&(p.current=null):l.current>e.scrollTop&&u.current===e.scrollHeight&&(p.current=null),(n||p.current===null)&&n!==t&&dy(c).setState({isAtBottom:n})),l.current=e.scrollTop,u.current=e.scrollHeight},v=Fde(()=>{let t=i.current;if(!t)return;let{scrollHeight:n,clientHeight:r}=t;if(n===d.current&&r===f.current)return;d.current=n,f.current=r;let a=p.current;a&&g()?p.current=null:a?m(a):e&&c.getState().isAtBottom&&m(`instant`),_()}),y=QD(e=>(e.addEventListener(`scroll`,_),()=>{e.removeEventListener(`scroll`,_)}));return Ch(()=>{if(n){if(!a){o.current=!1;return}o.current||(o.current=!0,p.current===null&&h(`instant`))}},[a,h,n]),SD(({behavior:e})=>{m(e)}),Ag(`thread.runStart`,()=>{t&&c.getState().turnAnchor!==`top`&&h(`auto`)}),Ag(`threadListItem.switchedTo`,()=>{r&&h(`instant`)}),yy(v,y,i)},uO=(0,H.forwardRef)((e,t)=>(0,I.jsx)(Ay.div,{...e,ref:t}));uO.displayName=`ThreadPrimitive.Root`;var dO=({children:e})=>G(e=>e.thread.isEmpty)?e:null;dO.displayName=`ThreadPrimitive.Empty`;var Lde=e=>G(t=>!(e.empty===!0&&!t.thread.isEmpty||e.empty===!1&&t.thread.isEmpty||e.running===!0&&!t.thread.isRunning||e.running===!1&&t.thread.isRunning||e.disabled===!0&&!t.thread.isDisabled||e.disabled===!1&&t.thread.isDisabled)),fO=({children:e,...t})=>Lde(t)?e:null;fO.displayName=`ThreadPrimitive.If`;var pO=(e,t)=>QD(W(n=>{if(!e)return;let r=e(),i=()=>{let e=t?t(n):n.offsetHeight;r.setHeight(e)},a=new ResizeObserver(i);return a.observe(n),i(),()=>{a.disconnect(),r.unregister()}},[e,t])),mO=e=>{let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t},Rde=(e,t)=>{let n=0,r=e;for(;r&&r!==t;)n+=r.offsetTop,r=r.offsetParent;return r===t?n:mO(e)-mO(t)},hO=({viewport:e,anchor:t,tallerThan:n,visibleHeight:r})=>{let i=Rde(t,e),a=t.offsetHeight;return i+Math.max(0,a-(a<=n?a:r))},zde=({scrollHeight:e,...t})=>{let{viewport:n}=t,r=hO(t)+n.clientHeight;return Math.max(0,r-e)},Bde=({viewport:e,reserve:t,...n})=>zde({viewport:e,...n,scrollHeight:e.scrollHeight-t.offsetHeight}),Vde=e=>{let t=new ResizeObserver(e),n=new MutationObserver(e),r=null,i=null,a=null,o=()=>{t.disconnect(),n.disconnect(),r=null,i=null,a=null};return{target:(e,s,c)=>{r===e&&i===s&&a===c||(o(),t.observe(e),t.observe(s),t.observe(c),n.observe(c,{childList:!0,subtree:!0,characterData:!0}),r=e,i=s,a=c)},disconnect:o}},Hde=e=>{let t=null;return{schedule:()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))},cancel:()=>{t!==null&&(cancelAnimationFrame(t),t=null)}}},Ude=e=>{let t=null,n;function r(){let r=e.getState(),{viewport:o,anchor:s,target:c}=r.element,l=r.targetConfig;if(r.turnAnchor!==`top`||!o||!s||!c||!l){a.disconnect(),t&&(eO(t,0),t.remove());return}if(t??=vde(),(t.parentElement!==c.parentElement||t.previousElementSibling!==c)&&c.after(t),a.target(o,s,c),eO(t,Bde({viewport:o,anchor:s,reserve:t,...l}))){i.schedule();return}let u=_de(s);if(u!==void 0&&n===u)return;let d=yde(hO({viewport:o,anchor:s,...l}));Math.abs(o.scrollTop-d)>1&&o.scrollTo({top:d,behavior:`smooth`}),u!==void 0&&(n=u)}let i=Hde(r),a=Vde(i.schedule);i.schedule();let o=e.subscribe(i.schedule);return()=>{i.cancel(),o(),a.disconnect(),t?.remove()}},Wde=e=>{let t=ly();Ch(()=>{if(e)return Ude(t)},[e,t])},gO=({isRunning:e,messages:t})=>{if(!e)return null;let n=t.at(-1),r=t.at(-2);return r?.role!==`user`||n?.role!==`assistant`?null:{anchorId:r.id,targetId:n.id}},Gde=e=>gO(e)?.anchorId,Kde=e=>gO(e)?.targetId,qde=()=>pO(cy(e=>e.registerViewport),W(e=>e.clientHeight,[])),Jde=()=>QD(cy(e=>e.registerViewportElement)),Yde=e=>{let t=ly(),n=G(t=>{if(e)return Gde(t.thread)}),r=G(t=>{if(e)return Kde(t.thread)}),i=U(()=>!n||!r?null:{anchorId:n,targetId:r},[n,r]);Ch(()=>{if(!i)return;let e=t.getState(),n=e.topAnchorTurn;n?.anchorId===i.anchorId&&n.targetId===i.targetId||e.setTopAnchorTurn(i)},[i,t]);let a=W(()=>{t.getState().setTopAnchorTurn(null)},[t]);Ag(`thread.initialize`,a),Ag(`threadListItem.switchedTo`,a)},_O=(0,H.forwardRef)(({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:n,scrollToBottomOnThreadSwitch:r,children:i,...a},o)=>{let s=Ide({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:n,scrollToBottomOnThreadSwitch:r}),c=qde(),l=Jde(),u=ly().getState().turnAnchor===`top`;Yde(u),Wde(u);let d=yy(o,s,c,l);return(0,I.jsx)(Ay.div,{...a,ref:d,children:i})});_O.displayName=`ThreadPrimitive.ViewportScrollable`;var vO=(0,H.forwardRef)(({turnAnchor:e,topAnchorMessageClamp:t,...n},r)=>(0,I.jsx)(fy,{options:{turnAnchor:e,topAnchorMessageClamp:t},children:(0,I.jsx)(_O,{...n,ref:r})}));vO.displayName=`ThreadPrimitive.Viewport`;var yO=(0,H.forwardRef)((e,t)=>{let n=yy(t,pO(cy(e=>e.registerContentInset),W(e=>{let t=parseFloat(getComputedStyle(e).marginTop)||0;return e.offsetHeight+t},[])));return(0,I.jsx)(Ay.div,{...e,ref:n})});yO.displayName=`ThreadPrimitive.ViewportFooter`;var Xde=Ny(`ThreadPrimitive.ScrollToBottom`,({behavior:e}={})=>{let t=cy(e=>e.isAtBottom),n=ly(),r=W(()=>{n.getState().scrollToBottom({behavior:e})},[n,e]);return t?null:r},[`behavior`]),Zde=Ny(`ThreadPrimitive.Suggestion`,({prompt:e,send:t,clearComposer:n,autoSend:r,method:i})=>{let{disabled:a,trigger:o}=lie({prompt:e,send:t??r??!1,clearComposer:n});return a?null:o},[`prompt`,`send`,`clearComposer`,`autoSend`,`method`]),bO=xy({Empty:()=>dO,If:()=>fO,MessageByIndex:()=>vv,Messages:()=>Sre,Root:()=>uO,ScrollToBottom:()=>Xde,Suggestion:()=>Zde,SuggestionByIndex:()=>ty,Suggestions:()=>Xre,Viewport:()=>vO,ViewportFooter:()=>yO,ViewportProvider:()=>fy}),Qde=xy({AssistantRuntimeImpl:()=>A_,BaseAssistantRuntimeCore:()=>j_,CompositeContextProvider:()=>Gh,DefaultThreadComposerRuntimeCore:()=>X_,MessageRepository:()=>H_,ThreadRuntimeImpl:()=>E_,fromThreadMessageLike:()=>z_,generateId:()=>F_,getAutoStatus:()=>L_,splitLocalRuntimeOptions:()=>die,useComposerInputPluginRegistryOptional:()=>nD,useSmooth:()=>YD,useSmoothStatus:()=>mde,withSmoothContextProvider:()=>pde}),xO=typeof window<`u`&&window.location?window.location.hostname:``,SO=e=>`oc.brand.${e}`;function $de(e){if(typeof e!=`object`||!e||Array.isArray(e)||!(`tokens`in e))return!1;let t=e.tokens;if(t===null)return!0;if(typeof t!=`object`)return!1;let n=t.colors;return typeof n==`object`&&!!n&&`light`in n&&`dark`in n}function efe(e){try{let t=localStorage.getItem(SO(e));if(!t)return null;let n=JSON.parse(t);return $de(n)?n:null}catch{return null}}function tfe(e,t){try{localStorage.setItem(SO(e),JSON.stringify(t))}catch{}}var nfe=`background.foreground.card.card-foreground.popover.popover-foreground.primary.primary-foreground.secondary.secondary-foreground.muted.muted-foreground.accent.accent-foreground.destructive.destructive-foreground.border.input.ring.chart-1.chart-2.chart-3.chart-4.chart-5.sidebar.sidebar-foreground.sidebar-primary.sidebar-primary-foreground.sidebar-accent.sidebar-accent-foreground.sidebar-border.sidebar-ring`.split(`.`),CO=[{key:`ocean`,name:`Ocean`,tokens:{colors:{light:{background:`oklch(0.985 0.012 230)`,foreground:`oklch(0.22 0.04 245)`,card:`oklch(0.995 0.008 230)`,"card-foreground":`oklch(0.22 0.04 245)`,popover:`oklch(0.995 0.008 230)`,"popover-foreground":`oklch(0.22 0.04 245)`,primary:`oklch(0.55 0.13 235)`,"primary-foreground":`oklch(0.99 0.01 230)`,secondary:`oklch(0.93 0.03 220)`,"secondary-foreground":`oklch(0.28 0.05 240)`,muted:`oklch(0.94 0.02 225)`,"muted-foreground":`oklch(0.5 0.04 235)`,accent:`oklch(0.9 0.05 200)`,"accent-foreground":`oklch(0.28 0.06 230)`,border:`oklch(0.88 0.03 225)`,input:`oklch(0.88 0.03 225)`,ring:`oklch(0.55 0.13 235)`,"chart-1":`oklch(0.6 0.13 235)`,"chart-2":`oklch(0.65 0.12 200)`,"chart-3":`oklch(0.55 0.1 260)`,"chart-4":`oklch(0.7 0.11 180)`,"chart-5":`oklch(0.5 0.12 215)`,sidebar:`oklch(0.96 0.02 228)`,"sidebar-foreground":`oklch(0.24 0.04 245)`,"sidebar-primary":`oklch(0.55 0.13 235)`,"sidebar-primary-foreground":`oklch(0.99 0.01 230)`,"sidebar-accent":`oklch(0.9 0.05 200)`,"sidebar-accent-foreground":`oklch(0.28 0.06 230)`,"sidebar-border":`oklch(0.87 0.03 225)`,"sidebar-ring":`oklch(0.55 0.13 235)`},dark:{background:`oklch(0.2 0.03 245)`,foreground:`oklch(0.95 0.02 225)`,card:`oklch(0.25 0.04 245)`,"card-foreground":`oklch(0.95 0.02 225)`,popover:`oklch(0.25 0.04 245)`,"popover-foreground":`oklch(0.95 0.02 225)`,primary:`oklch(0.7 0.12 230)`,"primary-foreground":`oklch(0.18 0.04 245)`,secondary:`oklch(0.3 0.04 240)`,"secondary-foreground":`oklch(0.95 0.02 225)`,muted:`oklch(0.3 0.03 242)`,"muted-foreground":`oklch(0.72 0.04 228)`,accent:`oklch(0.4 0.07 210)`,"accent-foreground":`oklch(0.96 0.02 220)`,border:`oklch(0.35 0.03 242)`,input:`oklch(0.35 0.03 242)`,ring:`oklch(0.7 0.12 230)`,"chart-1":`oklch(0.7 0.13 230)`,"chart-2":`oklch(0.72 0.12 195)`,"chart-3":`oklch(0.65 0.11 260)`,"chart-4":`oklch(0.76 0.1 180)`,"chart-5":`oklch(0.62 0.12 215)`,sidebar:`oklch(0.23 0.04 246)`,"sidebar-foreground":`oklch(0.95 0.02 225)`,"sidebar-primary":`oklch(0.7 0.12 230)`,"sidebar-primary-foreground":`oklch(0.18 0.04 245)`,"sidebar-accent":`oklch(0.4 0.07 210)`,"sidebar-accent-foreground":`oklch(0.96 0.02 220)`,"sidebar-border":`oklch(0.34 0.03 242)`,"sidebar-ring":`oklch(0.7 0.12 230)`}},radius:`0.75rem`,fontSans:`ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif`}},{key:`forest`,name:`Forest`,tokens:{colors:{light:{background:`oklch(0.985 0.012 130)`,foreground:`oklch(0.24 0.04 145)`,card:`oklch(0.995 0.008 130)`,"card-foreground":`oklch(0.24 0.04 145)`,popover:`oklch(0.995 0.008 130)`,"popover-foreground":`oklch(0.24 0.04 145)`,primary:`oklch(0.52 0.12 150)`,"primary-foreground":`oklch(0.99 0.01 130)`,secondary:`oklch(0.93 0.04 130)`,"secondary-foreground":`oklch(0.3 0.05 150)`,muted:`oklch(0.94 0.03 135)`,"muted-foreground":`oklch(0.5 0.04 145)`,accent:`oklch(0.9 0.06 115)`,"accent-foreground":`oklch(0.3 0.06 150)`,border:`oklch(0.88 0.03 135)`,input:`oklch(0.88 0.03 135)`,ring:`oklch(0.52 0.12 150)`,"chart-1":`oklch(0.58 0.13 150)`,"chart-2":`oklch(0.68 0.12 120)`,"chart-3":`oklch(0.6 0.11 95)`,"chart-4":`oklch(0.55 0.1 175)`,"chart-5":`oklch(0.5 0.12 140)`,sidebar:`oklch(0.96 0.02 132)`,"sidebar-foreground":`oklch(0.26 0.04 145)`,"sidebar-primary":`oklch(0.52 0.12 150)`,"sidebar-primary-foreground":`oklch(0.99 0.01 130)`,"sidebar-accent":`oklch(0.9 0.06 115)`,"sidebar-accent-foreground":`oklch(0.3 0.06 150)`,"sidebar-border":`oklch(0.87 0.03 135)`,"sidebar-ring":`oklch(0.52 0.12 150)`},dark:{background:`oklch(0.2 0.03 150)`,foreground:`oklch(0.95 0.02 130)`,card:`oklch(0.25 0.04 150)`,"card-foreground":`oklch(0.95 0.02 130)`,popover:`oklch(0.25 0.04 150)`,"popover-foreground":`oklch(0.95 0.02 130)`,primary:`oklch(0.68 0.13 145)`,"primary-foreground":`oklch(0.18 0.04 150)`,secondary:`oklch(0.3 0.04 148)`,"secondary-foreground":`oklch(0.95 0.02 130)`,muted:`oklch(0.3 0.03 150)`,"muted-foreground":`oklch(0.72 0.04 135)`,accent:`oklch(0.4 0.07 120)`,"accent-foreground":`oklch(0.96 0.02 125)`,border:`oklch(0.35 0.03 148)`,input:`oklch(0.35 0.03 148)`,ring:`oklch(0.68 0.13 145)`,"chart-1":`oklch(0.68 0.14 148)`,"chart-2":`oklch(0.74 0.12 120)`,"chart-3":`oklch(0.68 0.11 95)`,"chart-4":`oklch(0.62 0.1 175)`,"chart-5":`oklch(0.6 0.12 140)`,sidebar:`oklch(0.23 0.04 150)`,"sidebar-foreground":`oklch(0.95 0.02 130)`,"sidebar-primary":`oklch(0.68 0.13 145)`,"sidebar-primary-foreground":`oklch(0.18 0.04 150)`,"sidebar-accent":`oklch(0.4 0.07 120)`,"sidebar-accent-foreground":`oklch(0.96 0.02 125)`,"sidebar-border":`oklch(0.34 0.03 148)`,"sidebar-ring":`oklch(0.68 0.13 145)`}},radius:`0.375rem`,fontSans:`Georgia, Cambria, 'Times New Roman', Times, serif`}},{key:`dusk`,name:`Dusk`,tokens:{colors:{light:{background:`oklch(0.985 0.012 300)`,foreground:`oklch(0.24 0.05 300)`,card:`oklch(0.995 0.008 300)`,"card-foreground":`oklch(0.24 0.05 300)`,popover:`oklch(0.995 0.008 300)`,"popover-foreground":`oklch(0.24 0.05 300)`,primary:`oklch(0.55 0.16 300)`,"primary-foreground":`oklch(0.99 0.01 300)`,secondary:`oklch(0.93 0.04 310)`,"secondary-foreground":`oklch(0.3 0.06 300)`,muted:`oklch(0.94 0.03 305)`,"muted-foreground":`oklch(0.5 0.05 300)`,accent:`oklch(0.9 0.07 70)`,"accent-foreground":`oklch(0.32 0.08 60)`,border:`oklch(0.88 0.03 305)`,input:`oklch(0.88 0.03 305)`,ring:`oklch(0.55 0.16 300)`,"chart-1":`oklch(0.58 0.17 300)`,"chart-2":`oklch(0.7 0.15 70)`,"chart-3":`oklch(0.55 0.15 330)`,"chart-4":`oklch(0.65 0.14 35)`,"chart-5":`oklch(0.5 0.16 280)`,sidebar:`oklch(0.96 0.02 303)`,"sidebar-foreground":`oklch(0.26 0.05 300)`,"sidebar-primary":`oklch(0.55 0.16 300)`,"sidebar-primary-foreground":`oklch(0.99 0.01 300)`,"sidebar-accent":`oklch(0.9 0.07 70)`,"sidebar-accent-foreground":`oklch(0.32 0.08 60)`,"sidebar-border":`oklch(0.87 0.03 305)`,"sidebar-ring":`oklch(0.55 0.16 300)`},dark:{background:`oklch(0.2 0.04 300)`,foreground:`oklch(0.95 0.02 305)`,card:`oklch(0.25 0.05 300)`,"card-foreground":`oklch(0.95 0.02 305)`,popover:`oklch(0.25 0.05 300)`,"popover-foreground":`oklch(0.95 0.02 305)`,primary:`oklch(0.72 0.15 300)`,"primary-foreground":`oklch(0.18 0.04 300)`,secondary:`oklch(0.3 0.05 305)`,"secondary-foreground":`oklch(0.95 0.02 305)`,muted:`oklch(0.3 0.04 303)`,"muted-foreground":`oklch(0.72 0.05 305)`,accent:`oklch(0.45 0.1 65)`,"accent-foreground":`oklch(0.96 0.02 70)`,border:`oklch(0.35 0.04 303)`,input:`oklch(0.35 0.04 303)`,ring:`oklch(0.72 0.15 300)`,"chart-1":`oklch(0.72 0.16 300)`,"chart-2":`oklch(0.78 0.14 70)`,"chart-3":`oklch(0.68 0.15 330)`,"chart-4":`oklch(0.72 0.13 35)`,"chart-5":`oklch(0.64 0.16 280)`,sidebar:`oklch(0.23 0.05 300)`,"sidebar-foreground":`oklch(0.95 0.02 305)`,"sidebar-primary":`oklch(0.72 0.15 300)`,"sidebar-primary-foreground":`oklch(0.18 0.04 300)`,"sidebar-accent":`oklch(0.45 0.1 65)`,"sidebar-accent-foreground":`oklch(0.96 0.02 70)`,"sidebar-border":`oklch(0.34 0.04 303)`,"sidebar-ring":`oklch(0.72 0.15 300)`}},radius:`1rem`,fontSans:`ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace`}}];new Set(CO.map(e=>e.key));function wO(e){let t=e??localStorage.getItem(`oc.theme`)??`system`,n=()=>t===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t,[r,i]=(0,N.useState)(n);return(0,N.useEffect)(()=>{if(i(n()),t!==`system`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>i(e.matches?`dark`:`light`);return e.addEventListener(`change`,r),()=>e.removeEventListener(`change`,r)},[t]),r}function rfe(e,t){let n=document.documentElement.style,r=e?.colors?.[t];for(let e of nfe){let t=r?.[e];t===void 0?n.removeProperty(`--`+e):n.setProperty(`--`+e,t)}e?.radius===void 0?n.removeProperty(`--radius`):n.setProperty(`--radius`,e.radius),e?.fontSans===void 0?n.removeProperty(`--ui-font-sans`):n.setProperty(`--ui-font-sans`,e.fontSans),e?.fontMono===void 0?n.removeProperty(`--ui-font-mono`):n.setProperty(`--ui-font-mono`,e.fontMono)}function TO(e,t){(0,N.useEffect)(()=>{rfe(e??null,t)},[e,t])}var EO=new Map,DO={active:!1,percent:0,count:0},OO=new Set;function kO(){let e=0,t=0;for(let n of EO.values())e+=n.loaded,t+=n.total;let n=EO.size;DO={active:n>0,percent:t>0?Math.min(100,Math.round(e/t*100)):0,count:n};for(let e of OO)e()}var AO={subscribe(e){return OO.add(e),()=>OO.delete(e)},getSnapshot(){return DO},report(e,t,n){EO.set(e,{loaded:t,total:n}),kO()},clear(e){EO.delete(e)&&kO()}};function jO(e,t){return(t===`dark`?e?.logoDarkUrl:e?.logoLightUrl)??(t===`dark`?e?.logoLightUrl:e?.logoDarkUrl)??null}function MO(e){if(!e)return null;let t=/oklch\(\s*([0-9]*\.?[0-9]+)(%?)/i.exec(e);if(!t)return null;let n=parseFloat(t[1]);return Number.isFinite(n)?t[2]===`%`?n/100:n:null}function ife(e,t,n){let r=MO(e),i=MO(t);return r===null||i===null?n:i>r?`dark`:`light`}function afe(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?`?`:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[1][0]).toUpperCase()}function NO({className:e}){return(0,I.jsxs)(`svg`,{className:e,viewBox:`0 0 64 64`,fill:`none`,"aria-hidden":`true`,children:[(0,I.jsx)(`path`,{d:`M25 15H15V49H25`,stroke:`currentColor`,strokeWidth:`6.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,I.jsx)(`path`,{d:`M39 15H49V49H39`,stroke:`currentColor`,strokeWidth:`6.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,I.jsx)(`polyline`,{points:`20 33 26 33 29 25 33 41 37 29 41 33 44 33`,stroke:`currentColor`,strokeWidth:`3.4`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var ofe={},PO=[`fr`,`en`],sfe=`PARAGLIDE_LOCALE`,FO=[`localStorage`,`baseLocale`],IO=[],LO,RO;function cfe(e){if(IO.length===0)return;let t=typeof e==`string`?e:e.href;if(LO===t)return RO;let n=new URL(t,`http://dummy.com`),r;for(let e of IO)if(new ofe(e.match,n.href).exec(n.href)){r=e;break}return LO=t,RO=r,r}function zO(e){let t=cfe(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:FO}var BO=void 0;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var VO=!1,q=()=>{if(BO){let e=BO?.getStore()?.locale;if(e)return e}let e=FO;typeof window<`u`&&window.location?.href&&(e=zO(window.location.href));let t=lfe(e,typeof window<`u`?window.location?.href:void 0);if(t)return VO||(VO=!0,HO(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found`)};function lfe(e,t){let n;for(let t of e){if(t===`baseLocale`)n=`fr`;else if(t===`localStorage`)n=localStorage.getItem(`PARAGLIDE_LOCALE`)??void 0;else if(GO(t)&&WO.has(t)){let e=WO.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return dfe(t)}}let e=UO(n);if(e)return e}}var ufe=e=>{e?window.location.href=e:window.location.reload()},HO=(e,t)=>{let n={reload:!0,...t},r;try{r=q()}catch{}let i=[],a=FO;typeof window<`u`&&window.location?.href&&(a=zO(window.location.href));for(let t of a)if(t===`baseLocale`)continue;else if(t===`localStorage`&&typeof window<`u`)localStorage.setItem(sfe,e);else if(GO(t)&&WO.has(t)){let n=WO.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let o=()=>{n.reload&&window.location&&e!==r&&ufe(void 0)};if(i.length)return Promise.all(i).then(()=>{o()});o()};function UO(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of PO)if(e.toLowerCase()===t)return e}function dfe(e){let t=UO(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${PO.join(`, `)}`)}var WO=new Map;function GO(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}var ffe=e=>`Fichier trop volumineux (${e?.size} Mo, max ${e?.max} Mo). Réduisez-le (p. ex. compressez les images) et réessayez.`,pfe=e=>`File too large (${e?.size} MB, max ${e?.max} MB). Reduce it (e.g. compress images) and try again.`,mfe=((e,t={})=>(t.locale??q())===`fr`?ffe(e):pfe(e)),hfe=()=>`Chargement…`,gfe=()=>`Loading…`,KO=((e={},t={})=>(t.locale??q())===`fr`?hfe(e):gfe(e)),_fe=()=>`Thème`,qO=()=>`Theme`,JO=((e={},t={})=>(t.locale??q())===`fr`?_fe(e):qO(e)),YO=()=>`Clair`,XO=()=>`Light`,ZO=((e={},t={})=>(t.locale??q())===`fr`?YO(e):XO(e)),QO=()=>`Sombre`,$O=()=>`Dark`,ek=((e={},t={})=>(t.locale??q())===`fr`?QO(e):$O(e)),tk=()=>`Système`,nk=()=>`System`,rk=((e={},t={})=>(t.locale??q())===`fr`?tk(e):nk(e)),ik=()=>`Défaut de l’app`,ak=()=>`App default`,ok=((e={},t={})=>(t.locale??q())===`fr`?ik(e):ak(e)),sk=()=>`Se déconnecter`,ck=()=>`Sign out`,lk=((e={},t={})=>(t.locale??q())===`fr`?sk(e):ck(e)),uk=()=>`Préférences`,dk=()=>`Preferences`,fk=((e={},t={})=>(t.locale??q())===`fr`?uk(e):dk(e)),pk=()=>`Nom affiché`,mk=()=>`Display name`,hk=((e={},t={})=>(t.locale??q())===`fr`?pk(e):mk(e)),gk=()=>`Le nom et prénom affichés dans la liste des utilisateurs et le menu de compte. Vous pouvez le modifier à tout moment.`,_k=()=>`The name shown in the user list and the account menu. You can change it at any time.`,vk=((e={},t={})=>(t.locale??q())===`fr`?gk(e):_k(e)),yk=()=>`Votre nom et prénom`,bk=()=>`Your name`,xk=((e={},t={})=>(t.locale??q())===`fr`?yk(e):bk(e)),Sk=()=>`Laissez vide pour n’afficher que votre email.`,Ck=()=>`Leave empty to show only your email.`,wk=((e={},t={})=>(t.locale??q())===`fr`?Sk(e):Ck(e)),Tk=()=>`Nom affiché mis à jour.`,Ek=()=>`Display name updated.`,Dk=((e={},t={})=>(t.locale??q())===`fr`?Tk(e):Ek(e)),Ok=()=>`Échec de la mise à jour du nom`,kk=()=>`Failed to update the name`,Ak=((e={},t={})=>(t.locale??q())===`fr`?Ok(e):kk(e)),jk=()=>`Langue`,Mk=()=>`Language`,Nk=((e={},t={})=>(t.locale??q())===`fr`?jk(e):Mk(e)),Pk=()=>`Choisissez la langue de l’interface. « Défaut de l’app » suit le réglage de l’administrateur.`,Fk=()=>`Choose the interface language. “App default” follows the administrator setting.`,Ik=((e={},t={})=>(t.locale??q())===`fr`?Pk(e):Fk(e)),Lk=()=>`Le changement de langue recharge la page une fois.`,Rk=()=>`Changing the language reloads the page once.`,zk=((e={},t={})=>(t.locale??q())===`fr`?Lk(e):Rk(e)),Bk=()=>`Interface`,Vk=()=>`Interface`,Hk=((e={},t={})=>(t.locale??q())===`fr`?Bk(e):Vk(e)),Uk=()=>`Activez ou masquez des éléments d’interface. Les options grisées sont verrouillées par l’administrateur.`,Wk=()=>`Enable or hide interface elements. Greyed options are locked by the administrator.`,Gk=((e={},t={})=>(t.locale??q())===`fr`?Uk(e):Wk(e)),Kk=()=>`Français`,qk=()=>`French`,Jk=((e={},t={})=>(t.locale??q())===`fr`?Kk(e):qk(e)),Yk=()=>`Anglais`,Xk=()=>`English`,Zk=((e={},t={})=>(t.locale??q())===`fr`?Yk(e):Xk(e)),Qk=()=>`Fichiers`,$k=()=>`Files`,eA=((e={},t={})=>(t.locale??q())===`fr`?Qk(e):$k(e)),tA=()=>`Tous les fichiers échangés dans vos conversations (envoyés et reçus).`,nA=()=>`Every file exchanged across your conversations (sent and received).`,rA=((e={},t={})=>(t.locale??q())===`fr`?tA(e):nA(e)),iA=()=>`Sens`,aA=()=>`Direction`,oA=((e={},t={})=>(t.locale??q())===`fr`?iA(e):aA(e)),sA=()=>`Tous les sens`,cA=()=>`All directions`,lA=((e={},t={})=>(t.locale??q())===`fr`?sA(e):cA(e)),uA=()=>`Envoyé`,dA=()=>`Sent`,fA=((e={},t={})=>(t.locale??q())===`fr`?uA(e):dA(e)),pA=()=>`Reçu`,mA=()=>`Received`,hA=((e={},t={})=>(t.locale??q())===`fr`?pA(e):mA(e)),gA=()=>`Conversation`,_A=()=>`Conversation`,vA=((e={},t={})=>(t.locale??q())===`fr`?gA(e):_A(e)),yA=()=>`Toutes les conversations`,bA=()=>`All conversations`,xA=((e={},t={})=>(t.locale??q())===`fr`?yA(e):bA(e)),SA=()=>`Bridge`,CA=()=>`Bridge`,wA=((e={},t={})=>(t.locale??q())===`fr`?SA(e):CA(e)),TA=()=>`Tous les bridges`,EA=()=>`All bridges`,DA=((e={},t={})=>(t.locale??q())===`fr`?TA(e):EA(e)),OA=()=>`Type`,kA=()=>`Type`,AA=((e={},t={})=>(t.locale??q())===`fr`?OA(e):kA(e)),jA=()=>`Tous les types`,MA=()=>`All types`,NA=((e={},t={})=>(t.locale??q())===`fr`?jA(e):MA(e)),PA=()=>`Image`,FA=()=>`Image`,IA=((e={},t={})=>(t.locale??q())===`fr`?PA(e):FA(e)),LA=()=>`Audio`,RA=()=>`Audio`,zA=((e={},t={})=>(t.locale??q())===`fr`?LA(e):RA(e)),BA=()=>`Vidéo`,VA=()=>`Video`,HA=((e={},t={})=>(t.locale??q())===`fr`?BA(e):VA(e)),UA=()=>`PDF`,WA=()=>`PDF`,GA=((e={},t={})=>(t.locale??q())===`fr`?UA(e):WA(e)),KA=()=>`Document`,qA=()=>`Document`,JA=((e={},t={})=>(t.locale??q())===`fr`?KA(e):qA(e)),YA=()=>`Archive`,XA=()=>`Archive`,ZA=((e={},t={})=>(t.locale??q())===`fr`?YA(e):XA(e)),QA=()=>`Autre`,$A=()=>`Other`,ej=((e={},t={})=>(t.locale??q())===`fr`?QA(e):$A(e)),tj=()=>`Nom`,nj=()=>`Name`,rj=((e={},t={})=>(t.locale??q())===`fr`?tj(e):nj(e)),ij=()=>`Type`,aj=()=>`Type`,oj=((e={},t={})=>(t.locale??q())===`fr`?ij(e):aj(e)),sj=()=>`Sens`,cj=()=>`Direction`,lj=((e={},t={})=>(t.locale??q())===`fr`?sj(e):cj(e)),uj=()=>`Conversation`,dj=()=>`Conversation`,fj=((e={},t={})=>(t.locale??q())===`fr`?uj(e):dj(e)),pj=()=>`Date`,mj=()=>`Date`,hj=((e={},t={})=>(t.locale??q())===`fr`?pj(e):mj(e)),gj=()=>`Action`,_j=()=>`Action`,vj=((e={},t={})=>(t.locale??q())===`fr`?gj(e):_j(e)),yj=()=>`Télécharger`,bj=()=>`Download`,xj=((e={},t={})=>(t.locale??q())===`fr`?yj(e):bj(e)),Sj=()=>`Réinitialiser`,Cj=()=>`Reset`,wj=((e={},t={})=>(t.locale??q())===`fr`?Sj(e):Cj(e)),Tj=()=>`Actions`,Ej=()=>`Actions`,Dj=((e={},t={})=>(t.locale??q())===`fr`?Tj(e):Ej(e)),Oj=()=>`Supprimer`,kj=()=>`Delete`,Aj=((e={},t={})=>(t.locale??q())===`fr`?Oj(e):kj(e)),jj=()=>`Fichier supprimé`,Mj=()=>`File removed`,Nj=((e={},t={})=>(t.locale??q())===`fr`?jj(e):Mj(e)),Pj=()=>`Échec de la suppression du fichier`,Fj=()=>`Could not remove the file`,Ij=((e={},t={})=>(t.locale??q())===`fr`?Pj(e):Fj(e)),Lj=()=>`Supprimer ce fichier ?`,Rj=()=>`Remove this file?`,zj=((e={},t={})=>(t.locale??q())===`fr`?Lj(e):Rj(e)),Bj=()=>`Il sera retiré de vos fichiers. La conversation où il a été échangé n'est pas modifiée.`,Vj=()=>`It will be removed from your files. The conversation where it was exchanged is unchanged.`,Hj=((e={},t={})=>(t.locale??q())===`fr`?Bj(e):Vj(e)),Uj=()=>`Indisponible`,Wj=()=>`Unavailable`,Gj=((e={},t={})=>(t.locale??q())===`fr`?Uj(e):Wj(e)),Kj=()=>`Aucun fichier pour le moment.`,qj=()=>`No files yet.`,Jj=((e={},t={})=>(t.locale??q())===`fr`?Kj(e):qj(e)),Yj=()=>`Aucun fichier ne correspond aux filtres.`,Xj=()=>`No files match the filters.`,Zj=((e={},t={})=>(t.locale??q())===`fr`?Yj(e):Xj(e)),Qj=e=>`Affichage des ${e?.cap} fichiers les plus récents.`,$j=e=>`Showing the ${e?.cap} most recent files.`,eM=((e,t={})=>(t.locale??q())===`fr`?Qj(e):$j(e)),tM=()=>`Apparence`,nM=()=>`Appearance`,rM=((e={},t={})=>(t.locale??q())===`fr`?tM(e):nM(e)),iM=()=>`Thème par défaut de l’application`,aM=()=>`Default app theme`,oM=((e={},t={})=>(t.locale??q())===`fr`?iM(e):aM(e)),sM=()=>`Appliqué aux utilisateurs sans préférence personnelle.`,cM=()=>`Applied to users without a personal preference.`,lM=((e={},t={})=>(t.locale??q())===`fr`?sM(e):cM(e)),uM=()=>`Langue par défaut de l’application`,dM=()=>`Default app language`,fM=((e={},t={})=>(t.locale??q())===`fr`?uM(e):dM(e)),pM=()=>`Langue des nouveaux utilisateurs qui n’ont pas encore choisi la leur.`,mM=()=>`Language for new users who haven’t picked their own yet.`,hM=((e={},t={})=>(t.locale??q())===`fr`?pM(e):mM(e)),gM=()=>`Si vous n’avez pas défini votre propre langue, changer ce défaut rechargera votre vue.`,_M=()=>`If you haven’t set your own language, changing this default will reload your view.`,vM=((e={},t={})=>(t.locale??q())===`fr`?gM(e):_M(e)),yM=()=>`Référence des composants (design)`,bM=()=>`Component reference (design)`,xM=((e={},t={})=>(t.locale??q())===`fr`?yM(e):bM(e)),SM=()=>`Administration de l’apparence`,CM=()=>`Appearance administration`,wM=((e={},t={})=>(t.locale??q())===`fr`?SM(e):CM(e)),TM=()=>`Réservé aux administrateurs. S’applique à toute l’organisation.`,EM=()=>`Admins only. Applies to the whole organization.`,DM=((e={},t={})=>(t.locale??q())===`fr`?TM(e):EM(e)),OM=()=>`Ma charte graphique`,kM=()=>`My graphic chart`,AM=((e={},t={})=>(t.locale??q())===`fr`?OM(e):kM(e)),jM=()=>`Choisissez la palette appliquée à votre interface, en clair comme en sombre.`,MM=()=>`Pick the palette applied to your interface, in light and dark.`,NM=((e={},t={})=>(t.locale??q())===`fr`?jM(e):MM(e)),PM=()=>`Défaut de l’application`,FM=()=>`Application default`,IM=((e={},t={})=>(t.locale??q())===`fr`?PM(e):FM(e)),LM=()=>`Suit le défaut de l’application.`,RM=()=>`Follows the application default.`,zM=((e={},t={})=>(t.locale??q())===`fr`?LM(e):RM(e)),BM=()=>`Commune`,VM=()=>`Common`,HM=((e={},t={})=>(t.locale??q())===`fr`?BM(e):VM(e)),UM=()=>`La vôtre`,WM=()=>`Yours`,GM=((e={},t={})=>(t.locale??q())===`fr`?UM(e):WM(e)),KM=e=>`Via le groupe ${e?.group}`,qM=e=>`Via group ${e?.group}`,JM=((e,t={})=>(t.locale??q())===`fr`?KM(e):qM(e)),YM=()=>`Aucune charte disponible pour le moment.`,XM=()=>`No chart available yet.`,ZM=((e={},t={})=>(t.locale??q())===`fr`?YM(e):XM(e)),QM=()=>`Charte par défaut de l’application`,$M=()=>`Application default chart`,eN=((e={},t={})=>(t.locale??q())===`fr`?QM(e):$M(e)),tN=()=>`Appliquée aux utilisateurs sans charte personnelle.`,nN=()=>`Applied to users without a personal chart.`,rN=((e={},t={})=>(t.locale??q())===`fr`?tN(e):nN(e)),iN=()=>`Pools de chartes par groupe`,aN=()=>`Group chart pools`,oN=((e={},t={})=>(t.locale??q())===`fr`?iN(e):aN(e)),sN=()=>`Définissez le pool de chaque charte : les groupes qui PEUVENT la proposer. Un gestionnaire de groupe choisit ensuite dans son pool (onglet Groupes). Une charte reste commune tant qu’aucun groupe ne l’a sélectionnée.`,cN=()=>`Define each chart's pool: the groups that MAY offer it. A group manager then selects from its pool (Groups tab). A chart stays common until a group actually selects it.`,lN=((e={},t={})=>(t.locale??q())===`fr`?sN(e):cN(e)),uN=()=>`Charte par domaine`,dN=()=>`Chart by domain`,fN=((e={},t={})=>(t.locale??q())===`fr`?uN(e):dN(e)),pN=()=>`Associez un domaine à une charte publique (intégrée ou commune) : elle devient la charte par défaut sur cet hôte, page de connexion comprise.`,mN=()=>`Map a domain to a public chart (builtin or common): it becomes the default chart on that host, including the login page.`,hN=((e={},t={})=>(t.locale??q())===`fr`?pN(e):mN(e)),gN=()=>`Commune`,_N=()=>`Common`,vN=((e={},t={})=>(t.locale??q())===`fr`?gN(e):_N(e)),yN=()=>`Restreinte`,bN=()=>`Restricted`,xN=((e={},t={})=>(t.locale??q())===`fr`?yN(e):bN(e)),SN=()=>`Défaut`,CN=()=>`Default`,wN=((e={},t={})=>(t.locale??q())===`fr`?SN(e):CN(e)),TN=()=>`Aucun groupe à associer.`,EN=()=>`No group to attach.`,DN=((e={},t={})=>(t.locale??q())===`fr`?TN(e):EN(e)),ON=()=>`Disponible aux groupes (pool)`,kN=()=>`Available to groups (pool)`,AN=((e={},t={})=>(t.locale??q())===`fr`?ON(e):kN(e)),jN=()=>`Ajouter au pool d'un groupe…`,MN=()=>`Add to a group's pool…`,NN=((e={},t={})=>(t.locale??q())===`fr`?jN(e):MN(e)),PN=e=>`Retirer ${e?.group} du pool`,FN=e=>`Remove ${e?.group} from the pool`,IN=((e,t={})=>(t.locale??q())===`fr`?PN(e):FN(e)),LN=()=>`Importer une charte`,RN=()=>`Import a chart`,zN=((e={},t={})=>(t.locale??q())===`fr`?LN(e):RN(e)),BN=()=>`Collez le JSON d’une charte (ou choisissez un fichier .json) pour créer votre charte personnelle. Les couleurs doivent être au format oklch ; les valeurs sont validées et nettoyées côté serveur.`,VN=()=>`Paste a chart's JSON (or pick a .json file) to create your personal chart. Colors must be in oklch format; values are validated and sanitized server-side.`,HN=((e={},t={})=>(t.locale??q())===`fr`?BN(e):VN(e)),UN=()=>`Nom de la charte`,WN=()=>`Chart name`,GN=((e={},t={})=>(t.locale??q())===`fr`?UN(e):WN(e)),KN=()=>`Ma charte`,qN=()=>`My chart`,JN=((e={},t={})=>(t.locale??q())===`fr`?KN(e):qN(e)),YN=()=>`JSON des tokens`,XN=()=>`Tokens JSON`,ZN=((e={},t={})=>(t.locale??q())===`fr`?YN(e):XN(e)),QN=()=>`Collez ici le JSON des tokens (colors.light / colors.dark en oklch, radius, fontSans, fontMono)…`,$N=()=>`Paste the tokens JSON here (colors.light / colors.dark in oklch, radius, fontSans, fontMono)…`,eP=((e={},t={})=>(t.locale??q())===`fr`?QN(e):$N(e)),tP=()=>`Charger un fichier .json`,nP=()=>`Load a .json file`,rP=((e={},t={})=>(t.locale??q())===`fr`?tP(e):nP(e)),iP=()=>`Importer`,aP=()=>`Import`,oP=((e={},t={})=>(t.locale??q())===`fr`?iP(e):aP(e)),sP=()=>`JSON invalide : impossible d’analyser le contenu.`,cP=()=>`Invalid JSON: could not parse the content.`,lP=((e={},t={})=>(t.locale??q())===`fr`?sP(e):cP(e)),uP=()=>`Charte importée.`,dP=()=>`Chart imported.`,fP=((e={},t={})=>(t.locale??q())===`fr`?uP(e):dP(e)),pP=()=>`Indiquez un nom de charte.`,mP=()=>`Please provide a chart name.`,hP=((e={},t={})=>(t.locale??q())===`fr`?pP(e):mP(e)),gP=()=>`Mes chartes`,_P=()=>`My charts`,vP=((e={},t={})=>(t.locale??q())===`fr`?gP(e):_P(e)),yP=()=>`Les chartes que vous avez importées. Vous pouvez les renommer, modifier leurs tokens, les associer à vos groupes ou les supprimer.`,bP=()=>`The charts you have imported. You can rename them, edit their tokens, associate them with your groups, or delete them.`,xP=((e={},t={})=>(t.locale??q())===`fr`?yP(e):bP(e)),SP=()=>`Vous n’avez pas encore importé de charte.`,CP=()=>`You haven't imported any chart yet.`,wP=((e={},t={})=>(t.locale??q())===`fr`?SP(e):CP(e)),TP=()=>`Modifier`,EP=()=>`Edit`,DP=((e={},t={})=>(t.locale??q())===`fr`?TP(e):EP(e)),OP=()=>`Supprimer`,kP=()=>`Delete`,AP=((e={},t={})=>(t.locale??q())===`fr`?OP(e):kP(e)),jP=()=>`Logo de marque`,MP=()=>`Brand logo`,NP=((e={},t={})=>(t.locale??q())===`fr`?jP(e):MP(e)),PP=()=>`Mode clair`,FP=()=>`Light mode`,IP=((e={},t={})=>(t.locale??q())===`fr`?PP(e):FP(e)),LP=()=>`Mode sombre`,RP=()=>`Dark mode`,zP=((e={},t={})=>(t.locale??q())===`fr`?LP(e):RP(e)),BP=()=>`Téléverser`,VP=()=>`Upload`,HP=((e={},t={})=>(t.locale??q())===`fr`?BP(e):VP(e)),UP=()=>`Remplacer`,WP=()=>`Replace`,GP=((e={},t={})=>(t.locale??q())===`fr`?UP(e):WP(e)),KP=()=>`Retirer`,qP=()=>`Remove`,JP=((e={},t={})=>(t.locale??q())===`fr`?KP(e):qP(e)),YP=()=>`Générer depuis l’autre mode`,XP=()=>`Generate from the other mode`,ZP=((e={},t={})=>(t.locale??q())===`fr`?YP(e):XP(e)),QP=()=>`Traitement…`,$P=()=>`Processing…`,eF=((e={},t={})=>(t.locale??q())===`fr`?QP(e):$P(e)),tF=()=>`Le fichier doit être une image.`,nF=()=>`The file must be an image.`,rF=((e={},t={})=>(t.locale??q())===`fr`?tF(e):nF(e)),iF=()=>`Image trop volumineuse (max 12 Mo).`,aF=()=>`Image too large (max 12 MB).`,oF=((e={},t={})=>(t.locale??q())===`fr`?iF(e):aF(e)),sF=()=>`Format d’image non pris en charge.`,cF=()=>`Unsupported image format.`,lF=((e={},t={})=>(t.locale??q())===`fr`?sF(e):cF(e)),uF=()=>`Traitement de l’image impossible.`,dF=()=>`Could not process the image.`,fF=((e={},t={})=>(t.locale??q())===`fr`?uF(e):dF(e)),pF=()=>`Encodage de l’image impossible.`,mF=()=>`Could not encode the image.`,hF=((e={},t={})=>(t.locale??q())===`fr`?pF(e):mF(e)),gF=()=>`Domaines (admin)`,_F=()=>`Domains (admin)`,vF=((e={},t={})=>(t.locale??q())===`fr`?gF(e):_F(e)),yF=()=>`Quand Atrium est ouvert sur ce domaine, cette charte s’applique par défaut (page de connexion incluse). Ex. chat.acme.com ou *.acme.com.`,bF=()=>`When Atrium is opened on this domain, this chart applies by default (including the login page). E.g. chat.acme.com or *.acme.com.`,xF=((e={},t={})=>(t.locale??q())===`fr`?yF(e):bF(e)),SF=()=>`chat.acme.com ou *.acme.com`,CF=()=>`chat.acme.com or *.acme.com`,wF=((e={},t={})=>(t.locale??q())===`fr`?SF(e):CF(e)),TF=()=>`Ajouter`,EF=()=>`Add`,DF=((e={},t={})=>(t.locale??q())===`fr`?TF(e):EF(e)),OF=()=>`Aucun domaine.`,kF=()=>`No domain.`,AF=((e={},t={})=>(t.locale??q())===`fr`?OF(e):kF(e)),jF=e=>`Retirer ${e?.domain}`,MF=e=>`Remove ${e?.domain}`,NF=((e,t={})=>(t.locale??q())===`fr`?jF(e):MF(e)),PF=()=>`Enregistrer`,FF=()=>`Save`,IF=((e={},t={})=>(t.locale??q())===`fr`?PF(e):FF(e)),LF=()=>`Annuler`,RF=()=>`Cancel`,zF=((e={},t={})=>(t.locale??q())===`fr`?LF(e):RF(e)),BF=()=>`Nom`,VF=()=>`Name`,HF=((e={},t={})=>(t.locale??q())===`fr`?BF(e):VF(e)),UF=()=>`Tokens (JSON)`,WF=()=>`Tokens (JSON)`,GF=((e={},t={})=>(t.locale??q())===`fr`?UF(e):WF(e)),KF=()=>`Supprimer définitivement cette charte ?`,qF=()=>`Permanently delete this chart?`,JF=((e={},t={})=>(t.locale??q())===`fr`?KF(e):qF(e)),YF=()=>`Chartes personnalisées`,XF=()=>`Custom charts`,ZF=((e={},t={})=>(t.locale??q())===`fr`?YF(e):XF(e)),QF=()=>`Gérez les chartes importées par les utilisateurs : promouvoir en commune (offerte à tous) ou supprimer.`,$F=()=>`Manage charts imported by users: promote to common (offered to everyone) or delete.`,eI=((e={},t={})=>(t.locale??q())===`fr`?QF(e):$F(e)),tI=e=>`Propriétaire : ${e?.owner}`,nI=e=>`Owner: ${e?.owner}`,rI=((e,t={})=>(t.locale??q())===`fr`?tI(e):nI(e)),iI=()=>`Personnelle`,aI=()=>`Personal`,oI=((e={},t={})=>(t.locale??q())===`fr`?iI(e):aI(e)),sI=()=>`Commune`,cI=()=>`Common`,lI=((e={},t={})=>(t.locale??q())===`fr`?sI(e):cI(e)),uI=()=>`Promouvoir en commune`,dI=()=>`Promote to common`,fI=((e={},t={})=>(t.locale??q())===`fr`?uI(e):dI(e)),pI=()=>`Supprimer`,mI=()=>`Delete`,hI=((e={},t={})=>(t.locale??q())===`fr`?pI(e):mI(e)),gI=()=>`Aucune charte personnalisée pour le moment.`,_I=()=>`No custom chart yet.`,vI=((e={},t={})=>(t.locale??q())===`fr`?gI(e):_I(e)),yI=()=>`Messages`,bI=()=>`Messages`,xI=((e={},t={})=>(t.locale??q())===`fr`?yI(e):bI(e)),SI=()=>`Composeur`,CI=()=>`Composer`,wI=((e={},t={})=>(t.locale??q())===`fr`?SI(e):CI(e)),TI=()=>`Barre latérale`,EI=()=>`Sidebar`,DI=((e={},t={})=>(t.locale??q())===`fr`?TI(e):EI(e)),OI=()=>`Autre`,kI=()=>`Other`,AI=((e={},t={})=>(t.locale??q())===`fr`?OI(e):kI(e)),jI=()=>`Vue source des messages`,MI=()=>`Message source view`,NI=((e={},t={})=>(t.locale??q())===`fr`?jI(e):MI(e)),PI=()=>`Le bouton </> qui montre le texte brut exact d’un message.`,FI=()=>`The </> button that shows a message’s exact raw text.`,II=((e={},t={})=>(t.locale??q())===`fr`?PI(e):FI(e)),LI=()=>`Signaler un problème`,RI=()=>`Report a problem`,zI=((e={},t={})=>(t.locale??q())===`fr`?LI(e):RI(e)),BI=()=>`Le drapeau qui envoie un signalement (feedback) sur un message.`,VI=()=>`The flag that sends feedback about a message.`,HI=((e={},t={})=>(t.locale??q())===`fr`?BI(e):VI(e)),UI=()=>`Copier les réponses de l’IA`,WI=()=>`Copy AI replies`,GI=((e={},t={})=>(t.locale??q())===`fr`?UI(e):WI(e)),KI=()=>`Copier vos messages`,qI=()=>`Copy your messages`,JI=((e={},t={})=>(t.locale??q())===`fr`?KI(e):qI(e)),YI=()=>`Supprimer un message`,XI=()=>`Delete a message`,ZI=((e={},t={})=>(t.locale??q())===`fr`?YI(e):XI(e)),QI=()=>`Activité des outils`,$I=()=>`Tool activity`,eL=((e={},t={})=>(t.locale??q())===`fr`?QI(e):$I(e)),tL=()=>`Affiche l’activité des outils et les sources dans la conversation (vue d’analyse, avec détail dépliable). Désactivé : vue épurée centrée sur le contenu — le signal « traitement en cours » reste visible.`,nL=()=>`Shows tool activity and sources in the conversation (analysis view, with expandable detail). Off: a clean, content-focused view — the “processing in progress” signal stays visible.`,rL=((e={},t={})=>(t.locale??q())===`fr`?tL(e):nL(e)),iL=()=>`Saisie vocale (micro)`,aL=()=>`Voice input (mic)`,oL=((e={},t={})=>(t.locale??q())===`fr`?iL(e):aL(e)),sL=()=>`Le bouton micro dans le composeur.`,cL=()=>`The mic button in the composer.`,lL=((e={},t={})=>(t.locale??q())===`fr`?sL(e):cL(e)),uL=()=>`Âge des conversations`,dL=()=>`Conversation age`,fL=((e={},t={})=>(t.locale??q())===`fr`?uL(e):dL(e)),pL=()=>`Afficher l’ancienneté de chaque conversation (ex. « 3j », « 2sem ») dans la liste à gauche.`,mL=()=>`Show each conversation’s age (e.g. “3d”, “2w”) in the left list.`,hL=((e={},t={})=>(t.locale??q())===`fr`?pL(e):mL(e)),gL=()=>`Bridge des conversations`,_L=()=>`Conversation bridge`,vL=((e={},t={})=>(t.locale??q())===`fr`?gL(e):_L(e)),yL=()=>`Marquer le bridge (OpenClaw / Hermes) de chaque conversation dans la liste à gauche. Apparaît uniquement si vos conversations utilisent plusieurs bridges.`,bL=()=>`Tag each conversation’s bridge (OpenClaw / Hermes) in the left list. Shown only if your conversations use more than one bridge.`,xL=((e={},t={})=>(t.locale??q())===`fr`?yL(e):bL(e)),SL=()=>`Filtrer les préférences…`,CL=()=>`Filter preferences…`,wL=((e={},t={})=>(t.locale??q())===`fr`?SL(e):CL(e)),TL=()=>`Aucune préférence ne correspond.`,EL=()=>`No preference matches.`,DL=((e={},t={})=>(t.locale??q())===`fr`?TL(e):EL(e)),OL=()=>`Non activé`,kL=()=>`Not enabled`,AL=((e={},t={})=>(t.locale??q())===`fr`?OL(e):kL(e)),jL=()=>`défaut`,ML=()=>`default`,NL=((e={},t={})=>(t.locale??q())===`fr`?jL(e):ML(e)),PL=()=>`Réinitialiser`,FL=()=>`Reset`,IL=((e={},t={})=>(t.locale??q())===`fr`?PL(e):FL(e)),LL=()=>`Gérer les défauts et verrous`,RL=()=>`Manage defaults and locks`,zL=((e={},t={})=>(t.locale??q())===`fr`?LL(e):RL(e)),BL=()=>`Défaut admin`,VL=()=>`Admin default`,HL=((e={},t={})=>(t.locale??q())===`fr`?BL(e):VL(e)),UL=()=>`Fonctionnalité activée (système)`,WL=()=>`Feature enabled (system)`,GL=((e={},t={})=>(t.locale??q())===`fr`?UL(e):WL(e)),KL=()=>`Configurez l’interface : activez les fonctionnalités système et définissez les valeurs par défaut héritées par les utilisateurs (chacun peut ensuite les redéfinir dans ses propres préférences).`,qL=()=>`Configure the interface: enable system features and set the defaults users inherit (each can then override them in their own preferences).`,JL=((e={},t={})=>(t.locale??q())===`fr`?KL(e):qL(e)),YL=()=>`Une fonctionnalité non activée ici ne peut pas être activée par les utilisateurs (option grisée).`,XL=()=>`A feature not enabled here cannot be turned on by users (greyed out).`,ZL=((e={},t={})=>(t.locale??q())===`fr`?YL(e):XL(e)),QL=()=>`Active le pipeline vocal. Tant que c’est désactivé, l’option reste grisée et non activable par les utilisateurs.`,$L=()=>`Enables the voice pipeline. While off, the option stays greyed and users can’t turn it on.`,eR=((e={},t={})=>(t.locale??q())===`fr`?QL(e):$L(e)),tR=()=>`« Hérité » = la valeur intégrée par défaut de l’application.`,nR=()=>`“Inherited” = the app’s built-in default value.`,rR=((e={},t={})=>(t.locale??q())===`fr`?tR(e):nR(e)),iR=()=>`Activé`,aR=()=>`On`,oR=((e={},t={})=>(t.locale??q())===`fr`?iR(e):aR(e)),sR=()=>`Désactivé`,cR=()=>`Off`,lR=((e={},t={})=>(t.locale??q())===`fr`?sR(e):cR(e)),uR=()=>`Hérité`,dR=()=>`Inherited`,fR=((e={},t={})=>(t.locale??q())===`fr`?uR(e):dR(e)),pR=()=>`Comptes de service pour les agents OpenClaw (auth par clé API). Le texte en clair d’une clé n’est affiché qu’une seule fois à sa création — il n’est jamais stocké ni récupérable ensuite.`,mR=()=>`Service accounts for OpenClaw agents (API key auth). A key's plaintext is shown only once at creation — it is never stored nor retrievable afterwards.`,hR=((e={},t={})=>(t.locale??q())===`fr`?pR(e):mR(e)),gR=()=>`Rechercher un compte`,_R=()=>`Search an account`,vR=((e={},t={})=>(t.locale??q())===`fr`?gR(e):_R(e)),yR=()=>`Rôle`,bR=()=>`Role`,xR=((e={},t={})=>(t.locale??q())===`fr`?yR(e):bR(e)),SR=()=>`Tous les rôles`,CR=()=>`All roles`,wR=((e={},t={})=>(t.locale??q())===`fr`?SR(e):CR(e)),TR=()=>`Tous les statuts`,ER=()=>`All statuses`,DR=((e={},t={})=>(t.locale??q())===`fr`?TR(e):ER(e)),OR=()=>`actif`,kR=()=>`active`,AR=((e={},t={})=>(t.locale??q())===`fr`?OR(e):kR(e)),jR=()=>`désactivé`,MR=()=>`disabled`,NR=((e={},t={})=>(t.locale??q())===`fr`?jR(e):MR(e)),PR=()=>`Comptes de service`,FR=()=>`Service accounts`,IR=((e={},t={})=>(t.locale??q())===`fr`?PR(e):FR(e)),LR=()=>`Ajouter un compte`,RR=()=>`Add an account`,zR=((e={},t={})=>(t.locale??q())===`fr`?LR(e):RR(e)),BR=()=>`Aucun compte de service.`,VR=()=>`No service account.`,HR=((e={},t={})=>(t.locale??q())===`fr`?BR(e):VR(e)),UR=()=>`Générer une clé API`,WR=()=>`Generate an API key`,GR=((e={},t={})=>(t.locale??q())===`fr`?UR(e):WR(e)),KR=()=>`Masquer les clés`,qR=()=>`Hide keys`,JR=((e={},t={})=>(t.locale??q())===`fr`?KR(e):qR(e)),YR=()=>`Afficher les clés`,XR=()=>`Show keys`,ZR=((e={},t={})=>(t.locale??q())===`fr`?YR(e):XR(e)),QR=()=>`Modifier`,$R=()=>`Edit`,ez=((e={},t={})=>(t.locale??q())===`fr`?QR(e):$R(e)),tz=()=>`Supprimer le compte`,nz=()=>`Delete account`,rz=((e={},t={})=>(t.locale??q())===`fr`?tz(e):nz(e)),iz=()=>`Replier`,az=()=>`Collapse`,oz=((e={},t={})=>(t.locale??q())===`fr`?iz(e):az(e)),sz=()=>`Déplier`,cz=()=>`Expand`,lz=((e={},t={})=>(t.locale??q())===`fr`?sz(e):cz(e)),uz=()=>`Nom`,dz=()=>`Name`,fz=((e={},t={})=>(t.locale??q())===`fr`?uz(e):dz(e)),pz=()=>`Rôle`,mz=()=>`Role`,hz=((e={},t={})=>(t.locale??q())===`fr`?pz(e):mz(e)),gz=()=>`Statut`,_z=()=>`Status`,vz=((e={},t={})=>(t.locale??q())===`fr`?gz(e):_z(e)),yz=()=>`Expiration de la prochaine clé`,bz=()=>`Next key expiry`,xz=((e={},t={})=>(t.locale??q())===`fr`?yz(e):bz(e)),Sz=()=>`Clés`,Cz=()=>`Keys`,wz=((e={},t={})=>(t.locale??q())===`fr`?Sz(e):Cz(e)),Tz=()=>`génération…`,Ez=()=>`generating…`,Dz=((e={},t={})=>(t.locale??q())===`fr`?Tz(e):Ez(e)),Oz=e=>`${e?.count} active(s)`,kz=e=>`${e?.count} active`,Az=((e,t={})=>(t.locale??q())===`fr`?Oz(e):kz(e)),jz=()=>`Modifier le compte de service`,Mz=()=>`Edit service account`,Nz=((e={},t={})=>(t.locale??q())===`fr`?jz(e):Mz(e)),Pz=()=>`Modifier le nom, le rôle et la description.`,Fz=()=>`Update the name, role and description.`,Iz=((e={},t={})=>(t.locale??q())===`fr`?Pz(e):Fz(e)),Lz=()=>`Enregistrer`,Rz=()=>`Save`,zz=((e={},t={})=>(t.locale??q())===`fr`?Lz(e):Rz(e)),Bz=()=>`Nouveau compte de service`,Vz=()=>`New service account`,Hz=((e={},t={})=>(t.locale??q())===`fr`?Bz(e):Vz(e)),Uz=()=>`Principal authentifié par clé API (jamais un humain).`,Wz=()=>`Principal authenticated by API key (never a human).`,Gz=((e={},t={})=>(t.locale??q())===`fr`?Uz(e):Wz(e)),Kz=()=>`Ajouter`,qz=()=>`Add`,Jz=((e={},t={})=>(t.locale??q())===`fr`?Kz(e):qz(e)),Yz=()=>`Nom`,Xz=()=>`Name`,Zz=((e={},t={})=>(t.locale??q())===`fr`?Yz(e):Xz(e)),Qz=()=>`Rôle`,$z=()=>`Role`,eB=((e={},t={})=>(t.locale??q())===`fr`?Qz(e):$z(e)),tB=()=>`Choisir un rôle`,nB=()=>`Choose a role`,rB=((e={},t={})=>(t.locale??q())===`fr`?tB(e):nB(e)),iB=()=>`Description (optionnel)`,aB=()=>`Description (optional)`,oB=((e={},t={})=>(t.locale??q())===`fr`?iB(e):aB(e)),sB=()=>`Échec de la création du compte`,cB=()=>`Failed to create the account`,lB=((e={},t={})=>(t.locale??q())===`fr`?sB(e):cB(e)),uB=()=>`Échec de la modification du compte`,dB=()=>`Failed to update the account`,fB=((e={},t={})=>(t.locale??q())===`fr`?uB(e):dB(e)),pB=()=>`Compte de service mis à jour.`,mB=()=>`Service account updated.`,hB=((e={},t={})=>(t.locale??q())===`fr`?pB(e):mB(e)),gB=()=>`Échec de la génération de la clé`,_B=()=>`Failed to generate the key`,vB=((e={},t={})=>(t.locale??q())===`fr`?gB(e):_B(e)),yB=()=>`Supprimer ce compte de service ?`,bB=()=>`Delete this service account?`,xB=((e={},t={})=>(t.locale??q())===`fr`?yB(e):bB(e)),SB=()=>`Le compte`,CB=()=>`The account`,wB=((e={},t={})=>(t.locale??q())===`fr`?SB(e):CB(e)),TB=()=>`et`,EB=()=>`and`,DB=((e={},t={})=>(t.locale??q())===`fr`?TB(e):EB(e)),OB=()=>`toutes ses clés API`,kB=()=>`all its API keys`,AB=((e={},t={})=>(t.locale??q())===`fr`?OB(e):kB(e)),jB=()=>`seront supprimés définitivement. Cette action est irréversible. Tapez le nom du compte pour confirmer.`,MB=()=>`will be permanently deleted. This action is irreversible. Type the account name to confirm.`,NB=((e={},t={})=>(t.locale??q())===`fr`?jB(e):MB(e)),PB=()=>`Supprimer`,FB=()=>`Delete`,IB=((e={},t={})=>(t.locale??q())===`fr`?PB(e):FB(e)),LB=()=>`Compte de service supprimé`,RB=()=>`Service account deleted`,zB=((e={},t={})=>(t.locale??q())===`fr`?LB(e):RB(e)),BB=()=>`Échec de la suppression du compte`,VB=()=>`Failed to delete the account`,HB=((e={},t={})=>(t.locale??q())===`fr`?BB(e):VB(e)),UB=()=>`Révoquer cette clé API ?`,WB=()=>`Revoke this API key?`,GB=((e={},t={})=>(t.locale??q())===`fr`?UB(e):WB(e)),KB=()=>`La clé`,qB=()=>`The key`,JB=((e={},t={})=>(t.locale??q())===`fr`?KB(e):qB(e)),YB=()=>`sera désactivée immédiatement et ne pourra plus authentifier de requêtes. Cette action est irréversible.`,XB=()=>`will be disabled immediately and will no longer be able to authenticate requests. This action is irreversible.`,ZB=((e={},t={})=>(t.locale??q())===`fr`?YB(e):XB(e)),QB=()=>`Révoquer`,$B=()=>`Revoke`,eV=((e={},t={})=>(t.locale??q())===`fr`?QB(e):$B(e)),tV=()=>`Échec de la révocation`,nV=()=>`Failed to revoke`,rV=((e={},t={})=>(t.locale??q())===`fr`?tV(e):nV(e)),iV=()=>`Clés de`,aV=()=>`Keys of`,oV=((e={},t={})=>(t.locale??q())===`fr`?iV(e):aV(e)),sV=()=>`Aucune clé pour ce compte.`,cV=()=>`No key for this account.`,lV=((e={},t={})=>(t.locale??q())===`fr`?sV(e):cV(e)),uV=()=>`Clé`,dV=()=>`Key`,fV=((e={},t={})=>(t.locale??q())===`fr`?uV(e):dV(e)),pV=()=>`Rôle`,mV=()=>`Role`,hV=((e={},t={})=>(t.locale??q())===`fr`?pV(e):mV(e)),gV=()=>`Créée`,_V=()=>`Created`,vV=((e={},t={})=>(t.locale??q())===`fr`?gV(e):_V(e)),yV=()=>`Dernier usage`,bV=()=>`Last used`,xV=((e={},t={})=>(t.locale??q())===`fr`?yV(e):bV(e)),SV=()=>`Expiration`,CV=()=>`Expiry`,wV=((e={},t={})=>(t.locale??q())===`fr`?SV(e):CV(e)),TV=()=>`Statut`,EV=()=>`Status`,DV=((e={},t={})=>(t.locale??q())===`fr`?TV(e):EV(e)),OV=()=>`Révocation…`,kV=()=>`Revoking…`,AV=((e={},t={})=>(t.locale??q())===`fr`?OV(e):kV(e)),jV=()=>`Révoquer`,MV=()=>`Revoke`,NV=((e={},t={})=>(t.locale??q())===`fr`?jV(e):MV(e)),PV=()=>`Clé API créée`,FV=()=>`API key created`,IV=((e={},t={})=>(t.locale??q())===`fr`?PV(e):FV(e)),LV=e=>`Pour le compte « ${e?.name} ». Copiez-la maintenant.`,RV=e=>`For the account « ${e?.name} ». Copy it now.`,zV=((e,t={})=>(t.locale??q())===`fr`?LV(e):RV(e)),BV=()=>`Stockez cette clé en lieu sûr. Vous ne la reverrez plus jamais. Pour la remplacer, il faudra la révoquer et en générer une nouvelle.`,VV=()=>`Store this key in a safe place. You will never see it again. To replace it, you will have to revoke it and generate a new one.`,HV=((e={},t={})=>(t.locale??q())===`fr`?BV(e):VV(e)),UV=()=>`Copier la clé`,WV=()=>`Copy the key`,GV=((e={},t={})=>(t.locale??q())===`fr`?UV(e):WV(e)),KV=()=>`Copié`,qV=()=>`Copied`,JV=((e={},t={})=>(t.locale??q())===`fr`?KV(e):qV(e)),YV=()=>`Copier`,XV=()=>`Copy`,ZV=((e={},t={})=>(t.locale??q())===`fr`?YV(e):XV(e)),QV=()=>`J’ai copié la clé`,$V=()=>`I have copied the key`,eH=((e={},t={})=>(t.locale??q())===`fr`?QV(e):$V(e)),tH=()=>`Jamais`,nH=()=>`Never`,rH=((e={},t={})=>(t.locale??q())===`fr`?tH(e):nH(e)),iH=()=>`30 jours`,aH=()=>`30 days`,oH=((e={},t={})=>(t.locale??q())===`fr`?iH(e):aH(e)),sH=()=>`90 jours`,cH=()=>`90 days`,lH=((e={},t={})=>(t.locale??q())===`fr`?sH(e):cH(e)),uH=()=>`Jamais`,dH=()=>`Never`,fH=((e={},t={})=>(t.locale??q())===`fr`?uH(e):dH(e)),pH=()=>`révoquée`,mH=()=>`revoked`,hH=((e={},t={})=>(t.locale??q())===`fr`?pH(e):mH(e)),gH=()=>`expirée`,_H=()=>`expired`,vH=((e={},t={})=>(t.locale??q())===`fr`?gH(e):_H(e)),yH=()=>`active`,bH=()=>`active`,xH=((e={},t={})=>(t.locale??q())===`fr`?yH(e):bH(e)),SH=()=>`Sélectionnez ou créez une conversation pour commencer.`,CH=()=>`Select or create a chat to begin.`,wH=((e={},t={})=>(t.locale??q())===`fr`?SH(e):CH(e)),TH=()=>`Conversation introuvable`,EH=()=>`Conversation not found`,DH=((e={},t={})=>(t.locale??q())===`fr`?TH(e):EH(e)),OH=()=>`Ce lien ne correspond à aucune conversation. Elle a peut-être été supprimée, ou l’adresse est incomplète.`,kH=()=>`This link does not match any conversation. It may have been deleted, or the address is incomplete.`,AH=((e={},t={})=>(t.locale??q())===`fr`?OH(e):kH(e)),jH=()=>`Nouvelle conversation`,MH=()=>`New conversation`,NH=((e={},t={})=>(t.locale??q())===`fr`?jH(e):MH(e)),PH=()=>`Derniers messages`,FH=()=>`Latest messages`,IH=((e={},t={})=>(t.locale??q())===`fr`?PH(e):FH(e)),LH=()=>`Le service de chat est momentanément indisponible. L’envoi de message est suspendu — réessayez dans un instant. Si cela persiste, contactez votre administrateur.`,RH=()=>`The chat service is temporarily unavailable. Sending messages is suspended — try again in a moment. If this persists, contact your administrator.`,zH=((e={},t={})=>(t.locale??q())===`fr`?LH(e):RH(e)),BH=()=>`Ce chat est en lecture seule : l’agent associé ne t’est plus disponible (ton accès aux agents a été modifié). Démarre un nouveau chat avec un agent disponible.`,VH=()=>`This chat is read-only: its agent is no longer available to you (your agent access was changed). Start a new chat with an available agent.`,HH=((e={},t={})=>(t.locale??q())===`fr`?BH(e):VH(e)),UH=()=>`Réponse reçue.`,WH=()=>`Reply received.`,GH=((e={},t={})=>(t.locale??q())===`fr`?UH(e):WH(e)),KH=()=>`Comment puis-je aider ?`,qH=()=>`How can I help?`,JH=((e={},t={})=>(t.locale??q())===`fr`?KH(e):qH(e)),YH=()=>`Conversation`,XH=()=>`Conversation`,ZH=((e={},t={})=>(t.locale??q())===`fr`?YH(e):XH(e)),QH=e=>`Agent de cette conversation : ${e?.name}`,$H=e=>`Agent for this conversation: ${e?.name}`,eU=((e,t={})=>(t.locale??q())===`fr`?QH(e):$H(e)),tU=()=>` (agent par défaut)`,nU=()=>` (default agent)`,rU=((e={},t={})=>(t.locale??q())===`fr`?tU(e):nU(e)),iU=()=>` — cet agent n’existe plus sur la gateway`,aU=()=>` — this agent no longer exists on the gateway`,oU=((e={},t={})=>(t.locale??q())===`fr`?iU(e):aU(e)),sU=()=>` — état non confirmé (gateway injoignable)`,cU=()=>` — state not confirmed (gateway unreachable)`,lU=((e={},t={})=>(t.locale??q())===`fr`?sU(e):cU(e)),uU=e=>`Instance : ${e?.instance}`,dU=e=>`Instance: ${e?.instance}`,fU=((e,t={})=>(t.locale??q())===`fr`?uU(e):dU(e)),pU=()=>`Modèle`,mU=()=>`Model`,hU=((e={},t={})=>(t.locale??q())===`fr`?pU(e):mU(e)),gU=e=>`Modèle · ${e?.provider}`,_U=e=>`Model · ${e?.provider}`,vU=((e,t={})=>(t.locale??q())===`fr`?gU(e):_U(e)),yU=()=>`Niveau de réflexion hérité de l’agent`,bU=()=>`Thinking level inherited from the agent`,xU=((e={},t={})=>(t.locale??q())===`fr`?yU(e):bU(e)),SU=()=>`Niveau de réflexion (spécifique à ce chat)`,CU=()=>`Thinking level (specific to this chat)`,wU=((e={},t={})=>(t.locale??q())===`fr`?SU(e):CU(e)),TU=()=>`Réflexion`,EU=()=>`Thinking`,DU=((e={},t={})=>(t.locale??q())===`fr`?TU(e):EU(e)),OU=()=>`héritée`,kU=()=>`inherited`,AU=((e={},t={})=>(t.locale??q())===`fr`?OU(e):kU(e)),jU=e=>`Contexte utilisé : ${e?.pct}% (${e?.used} / ${e?.total} tokens)`,MU=e=>`Context used: ${e?.pct}% (${e?.used} / ${e?.total} tokens)`,NU=((e,t={})=>(t.locale??q())===`fr`?jU(e):MU(e)),PU=()=>`Contexte`,FU=()=>`Context`,IU=((e={},t={})=>(t.locale??q())===`fr`?PU(e):FU(e)),LU=()=>`Exporter la conversation`,RU=()=>`Export the conversation`,zU=((e={},t={})=>(t.locale??q())===`fr`?LU(e):RU(e)),BU=()=>`Exporter`,VU=()=>`Export`,HU=((e={},t={})=>(t.locale??q())===`fr`?BU(e):VU(e)),UU=()=>`Markdown (.md)`,WU=()=>`Markdown (.md)`,GU=((e={},t={})=>(t.locale??q())===`fr`?UU(e):WU(e)),KU=()=>`JSON (.json)`,qU=()=>`JSON (.json)`,JU=((e={},t={})=>(t.locale??q())===`fr`?KU(e):qU(e)),YU=()=>`Réglages avancés (réflexion, modèle)`,XU=()=>`Advanced settings (thinking, model)`,ZU=((e={},t={})=>(t.locale??q())===`fr`?YU(e):XU(e)),QU=()=>`Avancé`,$U=()=>`Advanced`,eW=((e={},t={})=>(t.locale??q())===`fr`?QU(e):$U(e)),tW=()=>`Supprimer et régénérer cette réponse ?`,nW=()=>`Delete and regenerate this reply?`,rW=((e={},t={})=>(t.locale??q())===`fr`?tW(e):nW(e)),iW=()=>`Cette réponse sera supprimée, puis régénérée à partir de votre dernier message.`,aW=()=>`This reply will be deleted, then regenerated from your last message.`,oW=((e={},t={})=>(t.locale??q())===`fr`?iW(e):aW(e)),sW=()=>`Régénérer`,cW=()=>`Regenerate`,lW=((e={},t={})=>(t.locale??q())===`fr`?sW(e):cW(e)),uW=()=>`Annuler`,dW=()=>`Cancel`,fW=((e={},t={})=>(t.locale??q())===`fr`?uW(e):dW(e)),pW=()=>`Supprimer ce message et les suivants ?`,mW=()=>`Delete this message and the following ones?`,hW=((e={},t={})=>(t.locale??q())===`fr`?pW(e):mW(e)),gW=()=>`Ce message et tous les messages qui le suivent seront supprimés de la conversation. Cette action est irréversible.`,_W=()=>`This message and all messages following it will be deleted from the conversation. This action is irreversible.`,vW=((e={},t={})=>(t.locale??q())===`fr`?gW(e):_W(e)),yW=()=>`Supprimer`,bW=()=>`Delete`,xW=((e={},t={})=>(t.locale??q())===`fr`?yW(e):bW(e)),SW=()=>`Supprimer et régénérer la réponse`,CW=()=>`Delete and regenerate the reply`,wW=((e={},t={})=>(t.locale??q())===`fr`?SW(e):CW(e)),TW=()=>`Supprimer ce message et les suivants`,EW=()=>`Delete this message and the following ones`,DW=((e={},t={})=>(t.locale??q())===`fr`?TW(e):EW(e)),OW=()=>`Supprimer le message`,kW=()=>`Delete the message`,AW=((e={},t={})=>(t.locale??q())===`fr`?OW(e):kW(e)),jW=()=>`La suppression a échoué`,MW=()=>`Delete failed`,NW=((e={},t={})=>(t.locale??q())===`fr`?jW(e):MW(e)),PW=()=>`Sources`,FW=()=>`Sources`,IW=((e={},t={})=>(t.locale??q())===`fr`?PW(e):FW(e)),LW=()=>`1 souvenir`,RW=()=>`1 memory`,zW=((e={},t={})=>(t.locale??q())===`fr`?LW(e):RW(e)),BW=e=>`${e?.count} souvenirs`,VW=e=>`${e?.count} memories`,HW=((e,t={})=>(t.locale??q())===`fr`?BW(e):VW(e)),UW=()=>`1 document`,WW=()=>`1 document`,GW=((e={},t={})=>(t.locale??q())===`fr`?UW(e):WW(e)),KW=e=>`${e?.count} documents`,qW=e=>`${e?.count} documents`,JW=((e,t={})=>(t.locale??q())===`fr`?KW(e):qW(e)),YW=()=>`Mémoire conversationnelle`,XW=()=>`Conversational memory`,ZW=((e={},t={})=>(t.locale??q())===`fr`?YW(e):XW(e)),QW=()=>`Documents`,$W=()=>`Documents`,eG=((e={},t={})=>(t.locale??q())===`fr`?QW(e):$W(e)),tG=()=>`Contexte`,nG=()=>`Context`,rG=((e={},t={})=>(t.locale??q())===`fr`?tG(e):nG(e)),iG=()=>`1 contexte`,aG=()=>`1 context`,oG=((e={},t={})=>(t.locale??q())===`fr`?iG(e):aG(e)),sG=e=>`${e?.count} contextes`,cG=e=>`${e?.count} contexts`,lG=((e,t={})=>(t.locale??q())===`fr`?sG(e):cG(e)),uG=()=>`Contexte du graphe de connaissances`,dG=()=>`Knowledge-graph context`,fG=((e={},t={})=>(t.locale??q())===`fr`?uG(e):dG(e)),pG=e=>`score ${e?.score}`,mG=e=>`score ${e?.score}`,hG=((e,t={})=>(t.locale??q())===`fr`?pG(e):mG(e)),gG=()=>`(sans titre)`,_G=()=>`(untitled)`,vG=((e={},t={})=>(t.locale??q())===`fr`?gG(e):_G(e)),yG=()=>`Sources de la réponse`,bG=()=>`Sources of the reply`,xG=((e={},t={})=>(t.locale??q())===`fr`?yG(e):bG(e)),SG=()=>`Voir les sources de la réponse`,CG=()=>`View the sources of the reply`,wG=((e={},t={})=>(t.locale??q())===`fr`?SG(e):CG(e)),TG=()=>`Rechercher dans les sources…`,EG=()=>`Search the sources…`,DG=((e={},t={})=>(t.locale??q())===`fr`?TG(e):EG(e)),OG=()=>`Aucune source ne correspond à votre recherche.`,kG=()=>`No source matches your search.`,AG=((e={},t={})=>(t.locale??q())===`fr`?OG(e):kG(e)),jG=()=>`Tout sélectionner`,MG=()=>`Select all`,NG=((e={},t={})=>(t.locale??q())===`fr`?jG(e):MG(e)),PG=e=>`${e?.count} document(s) sélectionné(s)`,FG=e=>`${e?.count} document(s) selected`,IG=((e,t={})=>(t.locale??q())===`fr`?PG(e):FG(e)),LG=()=>`Joindre les documents`,RG=()=>`Attach the documents`,zG=((e={},t={})=>(t.locale??q())===`fr`?LG(e):RG(e)),BG=()=>`Récupère les fichiers sources des documents cochés en liens téléchargeables (slot « Source d'origine »).`,VG=()=>`Fetches the checked documents' source files as downloadable links (the "Original source" slot).`,HG=((e={},t={})=>(t.locale??q())===`fr`?BG(e):VG(e)),UG=e=>`${e?.count} document(s) joint(s) téléchargeable(s) — ouvrir le panneau Sources`,WG=e=>`${e?.count} attached document(s) available for download — open the Sources panel`,GG=((e,t={})=>(t.locale??q())===`fr`?UG(e):WG(e)),KG=()=>`Source d'origine`,qG=()=>`Original source`,JG=((e={},t={})=>(t.locale??q())===`fr`?KG(e):qG(e)),YG=()=>`Aucun agent documentaire configuré`,XG=()=>`No documentary agent configured`,ZG=((e={},t={})=>(t.locale??q())===`fr`?YG(e):XG(e)),QG=()=>`Récupération des documents en cours…`,$G=()=>`Fetching the documents…`,eK=((e={},t={})=>(t.locale??q())===`fr`?QG(e):$G(e)),tK=()=>`Récupération des documents lancée — voir le panneau Sources`,nK=()=>`Document fetch started — see the Sources panel`,rK=((e={},t={})=>(t.locale??q())===`fr`?tK(e):nK(e)),iK=()=>`Impossible de lancer la récupération des documents`,aK=()=>`Could not start the document fetch`,oK=((e={},t={})=>(t.locale??q())===`fr`?iK(e):aK(e)),sK=()=>`Récupération…`,cK=()=>`Fetching…`,lK=((e={},t={})=>(t.locale??q())===`fr`?sK(e):cK(e)),uK=()=>`Télécharger la source`,dK=()=>`Download the source`,fK=((e={},t={})=>(t.locale??q())===`fr`?uK(e):dK(e)),pK=()=>`Source introuvable`,mK=()=>`Source not found`,hK=((e={},t={})=>(t.locale??q())===`fr`?pK(e):mK(e)),gK=()=>`Voir plus`,_K=()=>`Show more`,vK=((e={},t={})=>(t.locale??q())===`fr`?gK(e):_K(e)),yK=()=>`Voir moins`,bK=()=>`Show less`,xK=((e={},t={})=>(t.locale??q())===`fr`?yK(e):bK(e)),SK=()=>`Fermer le panneau des sources`,CK=()=>`Close the sources panel`,wK=((e={},t={})=>(t.locale??q())===`fr`?SK(e):CK(e)),TK=()=>`Redimensionner le panneau des sources`,EK=()=>`Resize the sources panel`,DK=((e={},t={})=>(t.locale??q())===`fr`?TK(e):EK(e)),OK=e=>`Source · texte brut exact · ${e?.count} caractère`,kK=e=>`Source · exact raw text · ${e?.count} character`,AK=((e,t={})=>(t.locale??q())===`fr`?OK(e):kK(e)),jK=e=>`Source · texte brut exact · ${e?.count} caractères`,MK=e=>`Source · exact raw text · ${e?.count} characters`,NK=((e,t={})=>(t.locale??q())===`fr`?jK(e):MK(e)),PK=()=>`Copier la source exacte`,FK=()=>`Copy the exact source`,IK=((e={},t={})=>(t.locale??q())===`fr`?PK(e):FK(e)),LK=()=>`(aucun texte)`,RK=()=>`(no text)`,zK=((e={},t={})=>(t.locale??q())===`fr`?LK(e):RK(e)),BK=()=>`Afficher le message rendu`,VK=()=>`Show the rendered message`,HK=((e={},t={})=>(t.locale??q())===`fr`?BK(e):VK(e)),UK=()=>`Afficher la source (texte brut exact)`,WK=()=>`Show the source (exact raw text)`,GK=((e={},t={})=>(t.locale??q())===`fr`?UK(e):WK(e)),KK=()=>`Afficher la source du message`,qK=()=>`Show the message source`,JK=((e={},t={})=>(t.locale??q())===`fr`?KK(e):qK(e)),YK=()=>`Copier le message`,XK=()=>`Copy the message`,ZK=((e={},t={})=>(t.locale??q())===`fr`?YK(e):XK(e)),QK=()=>`Envoi…`,$K=()=>`Sending…`,eq=((e={},t={})=>(t.locale??q())===`fr`?QK(e):$K(e)),tq=e=>`${e?.name} traite votre message…`,nq=e=>`${e?.name} is processing your message…`,rq=((e,t={})=>(t.locale??q())===`fr`?tq(e):nq(e)),iq=e=>`L'agent ${e?.name} traite votre message…`,aq=e=>`The agent ${e?.name} is processing your message…`,oq=((e,t={})=>(t.locale??q())===`fr`?iq(e):aq(e)),sq=()=>`Copier la réponse`,cq=()=>`Copy the reply`,lq=((e={},t={})=>(t.locale??q())===`fr`?sq(e):cq(e)),uq=()=>`Chat indisponible…`,dq=()=>`Chat unavailable…`,fq=((e={},t={})=>(t.locale??q())===`fr`?uq(e):dq(e)),pq=()=>`Message OpenClaw…`,mq=()=>`Message OpenClaw…`,hq=((e={},t={})=>(t.locale??q())===`fr`?pq(e):mq(e)),gq=()=>`Joindre un fichier`,_q=()=>`Attach a file`,vq=((e={},t={})=>(t.locale??q())===`fr`?gq(e):_q(e)),yq=()=>`échec`,bq=()=>`failed`,xq=((e={},t={})=>(t.locale??q())===`fr`?yq(e):bq(e)),Sq=e=>`Téléversement du fichier… ${e?.percent}%`,Cq=e=>`Uploading file… ${e?.percent}%`,wq=((e,t={})=>(t.locale??q())===`fr`?Sq(e):Cq(e)),Tq=e=>`Téléversement de ${e?.count} fichiers… ${e?.percent}%`,Eq=e=>`Uploading ${e?.count} files… ${e?.percent}%`,Dq=((e,t={})=>(t.locale??q())===`fr`?Tq(e):Eq(e)),Oq=()=>`Retirer la pièce jointe`,kq=()=>`Remove attachment`,Aq=((e={},t={})=>(t.locale??q())===`fr`?Oq(e):kq(e)),jq=()=>`Masquer l'activité des outils et revenir à la vue épurée`,Mq=()=>`Hide tool activity and return to the clean view`,Nq=((e={},t={})=>(t.locale??q())===`fr`?jq(e):Mq(e)),Pq=()=>`Afficher l'activité des outils (traitements réalisés et en cours)`,Fq=()=>`Show tool activity (completed and in-progress processing)`,Iq=((e={},t={})=>(t.locale??q())===`fr`?Pq(e):Fq(e)),Lq=()=>`Outils`,Rq=()=>`Tools`,zq=((e={},t={})=>(t.locale??q())===`fr`?Lq(e):Rq(e)),Bq=e=>`${e?.count} appel d'outil`,Vq=e=>`${e?.count} tool call`,Hq=((e,t={})=>(t.locale??q())===`fr`?Bq(e):Vq(e)),Uq=e=>`${e?.count} appels d'outils`,Wq=e=>`${e?.count} tool calls`,Gq=((e,t={})=>(t.locale??q())===`fr`?Uq(e):Wq(e)),Kq=()=>`Terminé`,qq=()=>`Done`,Jq=((e={},t={})=>(t.locale??q())===`fr`?Kq(e):qq(e)),Yq=()=>`Échec`,Xq=()=>`Failed`,Zq=((e={},t={})=>(t.locale??q())===`fr`?Yq(e):Xq(e)),Qq=e=>`exit ${e?.code}`,$q=e=>`exit ${e?.code}`,eJ=((e,t={})=>(t.locale??q())===`fr`?Qq(e):$q(e)),tJ=e=>`${e?.ms} ms`,nJ=e=>`${e?.ms} ms`,rJ=((e,t={})=>(t.locale??q())===`fr`?tJ(e):nJ(e)),iJ=()=>`Sortie non transmise par la passerelle`,aJ=()=>`Output not transmitted by the gateway`,oJ=((e={},t={})=>(t.locale??q())===`fr`?iJ(e):aJ(e)),sJ=()=>`en cours`,cJ=()=>`running`,lJ=((e={},t={})=>(t.locale??q())===`fr`?sJ(e):cJ(e)),uJ=()=>`terminé`,dJ=()=>`done`,fJ=((e={},t={})=>(t.locale??q())===`fr`?uJ(e):dJ(e)),pJ=()=>`Afficher le détail des appels d'outils`,mJ=()=>`Show tool call details`,hJ=((e={},t={})=>(t.locale??q())===`fr`?pJ(e):mJ(e)),gJ=()=>`Masquer le détail des appels d'outils`,_J=()=>`Hide tool call details`,vJ=((e={},t={})=>(t.locale??q())===`fr`?gJ(e):_J(e)),yJ=()=>`Dictée vocale — bientôt disponible`,bJ=()=>`Voice dictation — coming soon`,xJ=((e={},t={})=>(t.locale??q())===`fr`?yJ(e):bJ(e)),SJ=()=>`Dictée vocale (bientôt disponible)`,CJ=()=>`Voice dictation (coming soon)`,wJ=((e={},t={})=>(t.locale??q())===`fr`?SJ(e):CJ(e)),TJ=()=>`Envoi indisponible (service de chat hors ligne)`,EJ=()=>`Sending unavailable (chat service offline)`,DJ=((e={},t={})=>(t.locale??q())===`fr`?TJ(e):EJ(e)),OJ=()=>`Envoyer`,kJ=()=>`Send`,AJ=((e={},t={})=>(t.locale??q())===`fr`?OJ(e):kJ(e)),jJ=()=>`Réponse en cours…`,MJ=()=>`Response in progress…`,NJ=((e={},t={})=>(t.locale??q())===`fr`?jJ(e):MJ(e)),PJ=()=>`Mettre en file (envoyé après la réponse en cours)`,FJ=()=>`Queue (sent after the current reply)`,IJ=((e={},t={})=>(t.locale??q())===`fr`?PJ(e):FJ(e)),LJ=()=>`Envoyer après la réponse en cours`,RJ=()=>`Send after the current reply`,zJ=((e={},t={})=>(t.locale??q())===`fr`?LJ(e):RJ(e)),BJ=()=>`Trop de messages en attente. Patientez la fin de la réponse en cours.`,VJ=()=>`Too many messages waiting. Wait for the current reply to finish.`,HJ=((e={},t={})=>(t.locale??q())===`fr`?BJ(e):VJ(e)),UJ=()=>`Impossible de mettre le message en file. Réessayez.`,WJ=()=>`Could not queue the message. Try again.`,GJ=((e={},t={})=>(t.locale??q())===`fr`?UJ(e):WJ(e)),KJ=()=>`Chargement…`,qJ=()=>`Loading…`,JJ=((e={},t={})=>(t.locale??q())===`fr`?KJ(e):qJ(e)),YJ=()=>`Configuration des intégrations.`,XJ=()=>`Integrations configuration.`,ZJ=((e={},t={})=>(t.locale??q())===`fr`?YJ(e):XJ(e)),QJ=()=>`Aucune clé API ici`,$J=()=>`No API key here`,eY=((e={},t={})=>(t.locale??q())===`fr`?QJ(e):$J(e)),tY=()=>`— elles vivent dans l'environnement du déploiement ; un champ vide retombe sur la variable d'environnement puis le défaut. L'indicateur « configuré » reflète la présence de la clé côté serveur.`,nY=()=>`— they live in the deployment environment; an empty field falls back to the environment variable then the default. The "configured" indicator reflects the presence of the key on the server side.`,rY=((e={},t={})=>(t.locale??q())===`fr`?tY(e):nY(e)),iY=()=>`actif`,aY=()=>`active`,oY=((e={},t={})=>(t.locale??q())===`fr`?iY(e):aY(e)),sY=()=>`en pause`,cY=()=>`paused`,lY=((e={},t={})=>(t.locale??q())===`fr`?sY(e):cY(e)),uY=()=>`clé manquante (env)`,dY=()=>`key missing (env)`,fY=((e={},t={})=>(t.locale??q())===`fr`?uY(e):dY(e)),pY=()=>`appliqué par le bridge (à venir)`,mY=()=>`applied by the bridge (coming soon)`,hY=((e={},t={})=>(t.locale??q())===`fr`?pY(e):mY(e)),gY=()=>`Export des traces. Clés : LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY (env).`,_Y=()=>`Trace export. Keys: LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY (env).`,vY=((e={},t={})=>(t.locale??q())===`fr`?gY(e):_Y(e)),yY=()=>`Export des traces. Clé : OPIK_API_KEY (env).`,bY=()=>`Trace export. Key: OPIK_API_KEY (env).`,xY=((e={},t={})=>(t.locale??q())===`fr`?yY(e):bY(e)),SY=()=>`Host`,CY=()=>`Host`,wY=((e={},t={})=>(t.locale??q())===`fr`?SY(e):CY(e)),TY=()=>`Base URL`,EY=()=>`Base URL`,DY=((e={},t={})=>(t.locale??q())===`fr`?TY(e):EY(e)),OY=()=>`Workspace`,kY=()=>`Workspace`,AY=((e={},t={})=>(t.locale??q())===`fr`?OY(e):kY(e)),jY=()=>`(défaut serveur)`,MY=()=>`(server default)`,NY=((e={},t={})=>(t.locale??q())===`fr`?jY(e):MY(e)),PY=()=>`Activé (expédition des traces)`,FY=()=>`Enabled (trace shipping)`,IY=((e={},t={})=>(t.locale??q())===`fr`?PY(e):FY(e)),LY=()=>`Synthèse vocale (TTS)`,RY=()=>`Text-to-speech (TTS)`,zY=((e={},t={})=>(t.locale??q())===`fr`?LY(e):RY(e)),BY=()=>`Lecture audio des réponses. Clé du provider via env (ex. OPENAI_API_KEY, ELEVENLABS_API_KEY).`,VY=()=>`Audio playback of replies. Provider key via env (e.g. OPENAI_API_KEY, ELEVENLABS_API_KEY).`,HY=((e={},t={})=>(t.locale??q())===`fr`?BY(e):VY(e)),UY=()=>`Mode auto`,WY=()=>`Auto mode`,GY=((e={},t={})=>(t.locale??q())===`fr`?UY(e):WY(e)),KY=()=>`Désactivé`,qY=()=>`Disabled`,JY=((e={},t={})=>(t.locale??q())===`fr`?KY(e):qY(e)),YY=()=>`Toujours`,XY=()=>`Always`,ZY=((e={},t={})=>(t.locale??q())===`fr`?YY(e):XY(e)),QY=()=>`Après un message vocal`,$Y=()=>`After a voice message`,eX=((e={},t={})=>(t.locale??q())===`fr`?QY(e):$Y(e)),tX=()=>`Sur directive [[tts:…]]`,nX=()=>`On [[tts:…]] directive`,rX=((e={},t={})=>(t.locale??q())===`fr`?tX(e):nX(e)),iX=()=>`Provider`,aX=()=>`Provider`,oX=((e={},t={})=>(t.locale??q())===`fr`?iX(e):aX(e)),sX=()=>`Microsoft (sans clé)`,cX=()=>`Microsoft (no key)`,lX=((e={},t={})=>(t.locale??q())===`fr`?sX(e):cX(e)),uX=()=>`Modèle`,dX=()=>`Model`,fX=((e={},t={})=>(t.locale??q())===`fr`?uX(e):dX(e)),pX=()=>`Voix`,mX=()=>`Voice`,hX=((e={},t={})=>(t.locale??q())===`fr`?pX(e):mX(e)),gX=()=>`speakerVoiceId / nom de voix`,_X=()=>`speakerVoiceId / voice name`,vX=((e={},t={})=>(t.locale??q())===`fr`?gX(e):_X(e)),yX=()=>`Mode conversation (Talk / STS)`,bX=()=>`Conversation mode (Talk / STS)`,xX=((e={},t={})=>(t.locale??q())===`fr`?yX(e):bX(e)),SX=()=>`OpenAI realtime : OPENAI_API_KEY présent (env). Le navigateur recevra un jeton éphémère minté côté serveur — jamais la clé brute.`,CX=()=>`OpenAI realtime: OPENAI_API_KEY present (env). The browser will receive an ephemeral token minted server-side — never the raw key.`,wX=((e={},t={})=>(t.locale??q())===`fr`?SX(e):CX(e)),TX=()=>`OpenAI realtime : OPENAI_API_KEY ABSENT (env). À définir côté déploiement pour activer gpt-realtime.`,EX=()=>`OpenAI realtime: OPENAI_API_KEY ABSENT (env). To be set on the deployment side to enable gpt-realtime.`,DX=((e={},t={})=>(t.locale??q())===`fr`?TX(e):EX(e)),OX=()=>`Activer le mode conversation`,kX=()=>`Enable conversation mode`,AX=((e={},t={})=>(t.locale??q())===`fr`?OX(e):kX(e)),jX=()=>`Provider realtime`,MX=()=>`Realtime provider`,NX=((e={},t={})=>(t.locale??q())===`fr`?jX(e):MX(e)),PX=()=>`Modèle realtime`,FX=()=>`Realtime model`,IX=((e={},t={})=>(t.locale??q())===`fr`?PX(e):FX(e)),LX=()=>`Transport`,RX=()=>`Transport`,zX=((e={},t={})=>(t.locale??q())===`fr`?LX(e):RX(e)),BX=()=>`WebRTC (navigateur)`,VX=()=>`WebRTC (browser)`,HX=((e={},t={})=>(t.locale??q())===`fr`?BX(e):VX(e)),UX=()=>`Locale`,WX=()=>`Locale`,GX=((e={},t={})=>(t.locale??q())===`fr`?UX(e):WX(e)),KX=()=>`Interrompre la lecture quand l'utilisateur parle`,qX=()=>`Interrupt playback when the user speaks`,JX=((e={},t={})=>(t.locale??q())===`fr`?KX(e):qX(e)),YX=()=>`Voice wake (mot d'activation)`,XX=()=>`Voice wake (wake word)`,ZX=((e={},t={})=>(t.locale??q())===`fr`?YX(e):XX(e)),QX=()=>`non câblable dans le navigateur`,$X=()=>`not wireable in the browser`,eZ=((e={},t={})=>(t.locale??q())===`fr`?QX(e):$X(e)),tZ=()=>`OpenClaw gère le voice-wake côté Gateway avec détection native macOS/iOS (Android = micro manuel) ; le navigateur n'est pas une plateforme supportée. Le câbler dans ce webchat nécessiterait un moteur wake-word côté client (type Porcupine) que nous bâtirions — hors de OpenClaw. Configuration des déclencheurs : RPC gateway`,nZ=()=>`OpenClaw handles voice-wake on the Gateway side with native macOS/iOS detection (Android = manual mic); the browser is not a supported platform. Wiring it into this webchat would require a client-side wake-word engine (Porcupine-style) that we would build — outside OpenClaw. Trigger configuration: gateway RPC`,rZ=((e={},t={})=>(t.locale??q())===`fr`?tZ(e):nZ(e)),iZ=()=>`Curseurs d'expédition`,aZ=()=>`Shipping cursors`,oZ=((e={},t={})=>(t.locale??q())===`fr`?iZ(e):aZ(e)),sZ=()=>`Aucun curseur — aucune trace n'a encore été expédiée.`,cZ=()=>`No cursor — no trace has been shipped yet.`,lZ=((e={},t={})=>(t.locale??q())===`fr`?sZ(e):cZ(e)),uZ=()=>`Vendeur`,dZ=()=>`Vendor`,fZ=((e={},t={})=>(t.locale??q())===`fr`?uZ(e):dZ(e)),pZ=()=>`Dernier envoi`,mZ=()=>`Last send`,hZ=((e={},t={})=>(t.locale??q())===`fr`?pZ(e):mZ(e)),gZ=()=>`Échecs consécutifs`,_Z=()=>`Consecutive failures`,vZ=((e={},t={})=>(t.locale??q())===`fr`?gZ(e):_Z(e)),yZ=()=>`Dernier statut HTTP`,bZ=()=>`Last HTTP status`,xZ=((e={},t={})=>(t.locale??q())===`fr`?yZ(e):bZ(e)),SZ=()=>`Dernière erreur`,CZ=()=>`Last error`,wZ=((e={},t={})=>(t.locale??q())===`fr`?SZ(e):CZ(e)),TZ=()=>`Mots modifiés / altérés`,EZ=()=>`Modified / altered words`,DZ=((e={},t={})=>(t.locale??q())===`fr`?TZ(e):EZ(e)),OZ=()=>`Réponse incorrecte`,kZ=()=>`Incorrect answer`,AZ=((e={},t={})=>(t.locale??q())===`fr`?OZ(e):kZ(e)),jZ=()=>`Incohérence`,MZ=()=>`Inconsistency`,NZ=((e={},t={})=>(t.locale??q())===`fr`?jZ(e):MZ(e)),PZ=()=>`Formatage`,FZ=()=>`Formatting`,IZ=((e={},t={})=>(t.locale??q())===`fr`?PZ(e):FZ(e)),LZ=()=>`Latence`,RZ=()=>`Latency`,zZ=((e={},t={})=>(t.locale??q())===`fr`?LZ(e):RZ(e)),BZ=()=>`Erreur API`,VZ=()=>`API error`,HZ=((e={},t={})=>(t.locale??q())===`fr`?BZ(e):VZ(e)),UZ=()=>`Autre`,vfe=()=>`Other`,yfe=((e={},t={})=>(t.locale??q())===`fr`?UZ(e):vfe(e)),bfe=()=>`reçu = stocké`,xfe=()=>`received = stored`,Sfe=((e={},t={})=>(t.locale??q())===`fr`?bfe(e):xfe(e)),Cfe=()=>`affichage fidèle ✓`,wfe=()=>`faithful display ✓`,Tfe=((e={},t={})=>(t.locale??q())===`fr`?Cfe(e):wfe(e)),Efe=()=>`écart ⚠`,Dfe=()=>`mismatch ⚠`,Ofe=((e={},t={})=>(t.locale??q())===`fr`?Efe(e):Dfe(e)),kfe=()=>`régénération`,Afe=()=>`regeneration`,jfe=((e={},t={})=>(t.locale??q())===`fr`?kfe(e):Afe(e)),Mfe=()=>`Commentaire du rapporteur`,Nfe=()=>`Reporter's comment`,Pfe=((e={},t={})=>(t.locale??q())===`fr`?Mfe(e):Nfe(e)),Ffe=()=>`Échange avec l'utilisateur`,Ife=()=>`Exchange with the user`,Lfe=((e={},t={})=>(t.locale??q())===`fr`?Ffe(e):Ife(e)),Rfe=()=>`Administrateur`,zfe=()=>`Administrator`,Bfe=((e={},t={})=>(t.locale??q())===`fr`?Rfe(e):zfe(e)),Vfe=()=>`Utilisateur`,Hfe=()=>`User`,Ufe=((e={},t={})=>(t.locale??q())===`fr`?Vfe(e):Hfe(e)),Wfe=()=>`Aucune réponse envoyée.`,Gfe=()=>`No reply sent.`,Kfe=((e={},t={})=>(t.locale??q())===`fr`?Wfe(e):Gfe(e)),qfe=()=>`Répondre à l'utilisateur (visible dans sa zone de notification)…`,Jfe=()=>`Reply to the user (visible in their notification area)…`,Yfe=((e={},t={})=>(t.locale??q())===`fr`?qfe(e):Jfe(e)),Xfe=()=>`Envoi…`,Zfe=()=>`Sending…`,Qfe=((e={},t={})=>(t.locale??q())===`fr`?Xfe(e):Zfe(e)),$fe=()=>`Répondre`,epe=()=>`Reply`,tpe=((e={},t={})=>(t.locale??q())===`fr`?$fe(e):epe(e)),npe=()=>`Texte stocké (serveur, autoritatif)`,rpe=()=>`Stored text (server, authoritative)`,ipe=((e={},t={})=>(t.locale??q())===`fr`?npe(e):rpe(e)),ape=()=>`(vide)`,ope=()=>`(empty)`,WZ=((e={},t={})=>(t.locale??q())===`fr`?ape(e):ope(e)),spe=()=>`Texte affiché (navigateur, au signalement)`,cpe=()=>`Displayed text (browser, at report time)`,lpe=((e={},t={})=>(t.locale??q())===`fr`?spe(e):cpe(e)),upe=()=>`Prompt générateur`,dpe=()=>`Generator prompt`,fpe=((e={},t={})=>(t.locale??q())===`fr`?upe(e):dpe(e)),ppe=e=>`Contexte figé (${e?.count} tours${e?.truncated})`,mpe=e=>`Frozen context (${e?.count} turns${e?.truncated})`,hpe=((e,t={})=>(t.locale??q())===`fr`?ppe(e):mpe(e)),gpe=()=>`, tronqué`,_pe=()=>`, truncated`,vpe=((e={},t={})=>(t.locale??q())===`fr`?gpe(e):_pe(e)),ype=()=>`Payload dispatché (outbox)`,bpe=()=>`Dispatched payload (outbox)`,xpe=((e={},t={})=>(t.locale??q())===`fr`?ype(e):bpe(e)),Spe=()=>`Extensions de correction détectées (peuvent altérer le texte)`,Cpe=()=>`Correction extensions detected (may alter the text)`,wpe=((e={},t={})=>(t.locale??q())===`fr`?Spe(e):Cpe(e)),Tpe=()=>`Environnement client`,Epe=()=>`Client environment`,Dpe=((e={},t={})=>(t.locale??q())===`fr`?Tpe(e):Epe(e)),Ope=e=>`thème ${e?.theme}`,kpe=e=>`theme ${e?.theme}`,Ape=((e,t={})=>(t.locale??q())===`fr`?Ope(e):kpe(e)),jpe=()=>`Plugins :`,Mpe=()=>`Plugins:`,Npe=((e={},t={})=>(t.locale??q())===`fr`?jpe(e):Mpe(e)),Ppe=()=>`(navigator.plugins — neutralisé/partiel dans les navigateurs modernes)`,Fpe=()=>`(navigator.plugins — neutralized/partial in modern browsers)`,Ipe=((e={},t={})=>(t.locale??q())===`fr`?Ppe(e):Fpe(e)),Lpe=()=>`Signalements « Report Feedback » enregistrés. La liste est en métadonnées ; ouvrir le détail lit le contenu figé et`,Rpe=()=>`Recorded "Report Feedback" reports. The list shows metadata; opening the detail reads the frozen content and`,zpe=((e={},t={})=>(t.locale??q())===`fr`?Lpe(e):Rpe(e)),Bpe=()=>`trace cet accès dans l'Audit`,Vpe=()=>`traces this access in the Audit`,Hpe=((e={},t={})=>(t.locale??q())===`fr`?Bpe(e):Vpe(e)),Upe=()=>`(lecture de contenu d'un autre utilisateur). Fenêtre récente bornée.`,Wpe=()=>`(reading another user's content). Bounded recent window.`,Gpe=((e={},t={})=>(t.locale??q())===`fr`?Upe(e):Wpe(e)),Kpe=()=>`Signalements`,qpe=()=>`Reports`,Jpe=((e={},t={})=>(t.locale??q())===`fr`?Kpe(e):qpe(e)),Ype=()=>`Aucun signalement pour l'instant.`,Xpe=()=>`No reports yet.`,Zpe=((e={},t={})=>(t.locale??q())===`fr`?Ype(e):Xpe(e)),Qpe=()=>`Quand`,$pe=()=>`When`,eme=((e={},t={})=>(t.locale??q())===`fr`?Qpe(e):$pe(e)),tme=()=>`Catégorie`,nme=()=>`Category`,rme=((e={},t={})=>(t.locale??q())===`fr`?tme(e):nme(e)),ime=()=>`Type`,ame=()=>`Type`,ome=((e={},t={})=>(t.locale??q())===`fr`?ime(e):ame(e)),sme=()=>`user`,cme=()=>`user`,lme=((e={},t={})=>(t.locale??q())===`fr`?sme(e):cme(e)),ume=()=>`AI`,dme=()=>`AI`,fme=((e={},t={})=>(t.locale??q())===`fr`?ume(e):dme(e)),pme=()=>`Rapporteur`,mme=()=>`Reporter`,hme=((e={},t={})=>(t.locale??q())===`fr`?pme(e):mme(e)),gme=e=>`(via ${e?.operator})`,_me=e=>`(via ${e?.operator})`,vme=((e,t={})=>(t.locale??q())===`fr`?gme(e):_me(e)),yme=()=>`Fidélité`,bme=()=>`Fidelity`,xme=((e={},t={})=>(t.locale??q())===`fr`?yme(e):bme(e)),Sme=()=>`Note`,Cme=()=>`Note`,wme=((e={},t={})=>(t.locale??q())===`fr`?Sme(e):Cme(e)),Tme=()=>`Statut`,Eme=()=>`Status`,Dme=((e={},t={})=>(t.locale??q())===`fr`?Tme(e):Eme(e)),Ome=()=>`Répondu`,kme=()=>`Answered`,Ame=((e={},t={})=>(t.locale??q())===`fr`?Ome(e):kme(e)),jme=()=>`En attente`,Mme=()=>`Pending`,Nme=((e={},t={})=>(t.locale??q())===`fr`?jme(e):Mme(e)),Pme=()=>`Clos par l'utilisateur`,Fme=()=>`Closed by user`,Ime=((e={},t={})=>(t.locale??q())===`fr`?Pme(e):Fme(e)),Lme=()=>`Raison de clôture`,Rme=()=>`Close reason`,zme=((e={},t={})=>(t.locale??q())===`fr`?Lme(e):Rme(e)),Bme=()=>`Masquer`,Vme=()=>`Hide`,Hme=((e={},t={})=>(t.locale??q())===`fr`?Bme(e):Vme(e)),Ume=()=>`Voir le détail`,Wme=()=>`View detail`,Gme=((e={},t={})=>(t.locale??q())===`fr`?Ume(e):Wme(e)),Kme=()=>`Supprimer`,qme=()=>`Delete`,Jme=((e={},t={})=>(t.locale??q())===`fr`?Kme(e):qme(e)),Yme=()=>`Supprimer ce signalement ?`,Xme=()=>`Delete this report?`,Zme=((e={},t={})=>(t.locale??q())===`fr`?Yme(e):Xme(e)),Qme=()=>`L'instantané forensique figé sera définitivement supprimé. Cette action est irréversible.`,$me=()=>`The frozen forensic snapshot will be permanently deleted. This action is irreversible.`,ehe=((e={},t={})=>(t.locale??q())===`fr`?Qme(e):$me(e)),the=()=>`Supprimer`,nhe=()=>`Delete`,rhe=((e={},t={})=>(t.locale??q())===`fr`?the(e):nhe(e)),ihe=()=>`Aucun onglet`,ahe=()=>`No tabs`,ohe=((e={},t={})=>(t.locale??q())===`fr`?ihe(e):ahe(e)),she=e=>`${e?.count} onglets`,che=e=>`${e?.count} tabs`,lhe=((e,t={})=>(t.locale??q())===`fr`?she(e):che(e)),uhe=()=>`Onglets Settings autorisés`,dhe=()=>`Allowed Settings tabs`,fhe=((e={},t={})=>(t.locale??q())===`fr`?uhe(e):dhe(e)),phe=()=>`Changement de rôle refusé`,mhe=()=>`Role change refused`,hhe=((e={},t={})=>(t.locale??q())===`fr`?phe(e):mhe(e)),ghe=()=>`Mise à jour des permissions refusée`,_he=()=>`Permission update refused`,vhe=((e={},t={})=>(t.locale??q())===`fr`?ghe(e):_he(e)),yhe=()=>`Rechercher (email, nom)`,bhe=()=>`Search (email, name)`,xhe=((e={},t={})=>(t.locale??q())===`fr`?yhe(e):bhe(e)),She=()=>`Tous les rôles`,Che=()=>`All roles`,whe=((e={},t={})=>(t.locale??q())===`fr`?She(e):Che(e)),The=()=>`Utilisateurs`,Ehe=()=>`Users`,Dhe=((e={},t={})=>(t.locale??q())===`fr`?The(e):Ehe(e)),Ohe=()=>`Aucun utilisateur.`,khe=()=>`No users.`,Ahe=((e={},t={})=>(t.locale??q())===`fr`?Ohe(e):khe(e)),jhe=()=>`Voir comme cet utilisateur`,Mhe=()=>`View as this user`,Nhe=((e={},t={})=>(t.locale??q())===`fr`?jhe(e):Mhe(e)),Phe=()=>`Supprimer l’utilisateur`,Fhe=()=>`Delete user`,Ihe=((e={},t={})=>(t.locale??q())===`fr`?Phe(e):Fhe(e)),Lhe=()=>`Supprimer cet utilisateur ?`,Rhe=()=>`Delete this user?`,zhe=((e={},t={})=>(t.locale??q())===`fr`?Lhe(e):Rhe(e)),Bhe=e=>`« ${e?.user} » et toutes ses données (conversations, fichiers, accès) seront définitivement supprimés. Cette action est irréversible.`,Vhe=e=>`“${e?.user}” and all their data (conversations, files, access) will be permanently deleted. This action cannot be undone.`,Hhe=((e,t={})=>(t.locale??q())===`fr`?Bhe(e):Vhe(e)),Uhe=()=>`SUPPRIMER`,Whe=()=>`DELETE`,Ghe=((e={},t={})=>(t.locale??q())===`fr`?Uhe(e):Whe(e)),Khe=()=>`Supprimer définitivement`,qhe=()=>`Delete permanently`,Jhe=((e={},t={})=>(t.locale??q())===`fr`?Khe(e):qhe(e)),Yhe=()=>`Suppression de l’utilisateur refusée`,Xhe=()=>`User deletion refused`,Zhe=((e={},t={})=>(t.locale??q())===`fr`?Yhe(e):Xhe(e)),Qhe=e=>`Utilisateur « ${e?.user} » supprimé.`,$he=e=>`User “${e?.user}” deleted.`,ege=((e,t={})=>(t.locale??q())===`fr`?Qhe(e):$he(e)),tge=()=>`Renommer`,nge=()=>`Rename`,rge=((e={},t={})=>(t.locale??q())===`fr`?tge(e):nge(e)),ige=()=>`Renommer l’utilisateur`,age=()=>`Rename user`,oge=((e={},t={})=>(t.locale??q())===`fr`?ige(e):age(e)),sge=e=>`Nom affiché pour « ${e?.user} »`,cge=e=>`Display name for “${e?.user}”`,lge=((e,t={})=>(t.locale??q())===`fr`?sge(e):cge(e)),uge=()=>`Nom et prénom`,dge=()=>`Name`,fge=((e={},t={})=>(t.locale??q())===`fr`?uge(e):dge(e)),pge=()=>`Nom mis à jour.`,mge=()=>`Name updated.`,hge=((e={},t={})=>(t.locale??q())===`fr`?pge(e):mge(e)),gge=()=>`Renommage refusé`,_ge=()=>`Rename refused`,vge=((e={},t={})=>(t.locale??q())===`fr`?gge(e):_ge(e)),yge=()=>`Utilisateur`,bge=()=>`User`,xge=((e={},t={})=>(t.locale??q())===`fr`?yge(e):bge(e)),Sge=()=>`Rôle`,Cge=()=>`Role`,wge=((e={},t={})=>(t.locale??q())===`fr`?Sge(e):Cge(e)),Tge=()=>`Accès Settings`,Ege=()=>`Settings access`,Dge=((e={},t={})=>(t.locale??q())===`fr`?Tge(e):Ege(e)),Oge=()=>`Tous (admin)`,kge=()=>`All (admin)`,Age=((e={},t={})=>(t.locale??q())===`fr`?Oge(e):kge(e)),jge=()=>`Agents`,Mge=()=>`Agents`,GZ=((e={},t={})=>(t.locale??q())===`fr`?jge(e):Mge(e)),Nge=()=>`Gérer les agents`,Pge=()=>`Manage agents`,KZ=((e={},t={})=>(t.locale??q())===`fr`?Nge(e):Pge(e)),Fge=()=>`Échec de l’enregistrement de l’instance`,Ige=()=>`Failed to save instance`,Lge=((e={},t={})=>(t.locale??q())===`fr`?Fge(e):Ige(e)),Rge=()=>`Les agents sont `,zge=()=>`Agents are `,Bge=((e={},t={})=>(t.locale??q())===`fr`?Rge(e):zge(e)),Vge=()=>`découverts par le bridge`,Hge=()=>`discovered by the bridge`,Uge=((e={},t={})=>(t.locale??q())===`fr`?Vge(e):Hge(e)),Wge=()=>` (jamais saisis à la main). Les identifiants gateway (token, device, clé API) se configurent par instance via « Identifiants » — chiffrés au repos.`,Gge=()=>` (never entered by hand). Gateway credentials (token, device identity, API key) are set per instance via “Credentials” — encrypted at rest.`,Kge=((e={},t={})=>(t.locale??q())===`fr`?Wge(e):Gge(e)),qge=()=>`Instances`,Jge=()=>`Instances`,Yge=((e={},t={})=>(t.locale??q())===`fr`?qge(e):Jge(e)),Xge=()=>`Ajouter une instance`,Zge=()=>`Add instance`,Qge=((e={},t={})=>(t.locale??q())===`fr`?Xge(e):Zge(e)),$ge=()=>`Aucune instance.`,e_e=()=>`No instances.`,t_e=((e={},t={})=>(t.locale??q())===`fr`?$ge(e):e_e(e)),n_e=()=>`Nom`,r_e=()=>`Name`,i_e=((e={},t={})=>(t.locale??q())===`fr`?n_e(e):r_e(e)),a_e=()=>`Bridge`,o_e=()=>`Bridge`,s_e=((e={},t={})=>(t.locale??q())===`fr`?a_e(e):o_e(e)),c_e=()=>`Gateway URL`,l_e=()=>`Gateway URL`,u_e=((e={},t={})=>(t.locale??q())===`fr`?c_e(e):l_e(e)),d_e=()=>`Affichage`,f_e=()=>`Display`,p_e=((e={},t={})=>(t.locale??q())===`fr`?d_e(e):f_e(e)),m_e=()=>`Configurer le bridge`,h_e=()=>`Configure bridge`,g_e=((e={},t={})=>(t.locale??q())===`fr`?m_e(e):h_e(e)),__e=()=>`Supprimer`,v_e=()=>`Delete`,qZ=((e={},t={})=>(t.locale??q())===`fr`?__e(e):v_e(e)),y_e=()=>`Nouvelle instance`,b_e=()=>`New instance`,x_e=((e={},t={})=>(t.locale??q())===`fr`?y_e(e):b_e(e)),S_e=()=>`Modifier`,C_e=()=>`Edit`,w_e=((e={},t={})=>(t.locale??q())===`fr`?S_e(e):C_e(e)),T_e=()=>`Modifier l'instance`,E_e=()=>`Edit instance`,D_e=((e={},t={})=>(t.locale??q())===`fr`?T_e(e):E_e(e)),O_e=()=>`Le nom est la clé de routage et ne peut pas être modifié après création.`,k_e=()=>`The name is the routing key and can't be changed after creation.`,A_e=((e={},t={})=>(t.locale??q())===`fr`?O_e(e):k_e(e)),j_e=()=>`Métadonnées non-secrètes.`,M_e=()=>`Non-secret metadata.`,N_e=((e={},t={})=>(t.locale??q())===`fr`?j_e(e):M_e(e)),P_e=()=>`Enregistrer`,F_e=()=>`Save`,JZ=((e={},t={})=>(t.locale??q())===`fr`?P_e(e):F_e(e)),I_e=()=>`Nom de l’instance (ex. main)`,L_e=()=>`Instance name (e.g. main)`,R_e=((e={},t={})=>(t.locale??q())===`fr`?I_e(e):L_e(e)),z_e=()=>`Technologie (bridge)`,B_e=()=>`Technology (bridge)`,V_e=((e={},t={})=>(t.locale??q())===`fr`?z_e(e):B_e(e)),H_e=()=>`Gateway URL (ws(s)://)`,U_e=()=>`Gateway URL (ws(s)://)`,W_e=((e={},t={})=>(t.locale??q())===`fr`?H_e(e):U_e(e)),G_e=()=>`URL du bridge`,K_e=()=>`Bridge URL`,q_e=((e={},t={})=>(t.locale??q())===`fr`?G_e(e):K_e(e)),J_e=()=>`http://bridge-host:8787 — sinon le BRIDGE_URL du déploiement`,Y_e=()=>`http://bridge-host:8787 — else the deployment BRIDGE_URL`,X_e=((e={},t={})=>(t.locale??q())===`fr`?J_e(e):Y_e(e)),Z_e=()=>`Nom affiché (optionnel)`,Q_e=()=>`Display name (optional)`,$_e=((e={},t={})=>(t.locale??q())===`fr`?Z_e(e):Q_e(e)),eve=()=>`Version de la gateway (optionnel)`,tve=()=>`Gateway version (optional)`,nve=((e={},t={})=>(t.locale??q())===`fr`?eve(e):tve(e)),rve=()=>`ex. 2026.6.5 — repli de compatibilité`,ive=()=>`e.g. 2026.6.5 — compat fallback`,ave=((e={},t={})=>(t.locale??q())===`fr`?rve(e):ive(e)),ove=()=>`URL HTTP média (optionnel)`,sve=()=>`Media HTTP URL (optional)`,cve=((e={},t={})=>(t.locale??q())===`fr`?ove(e):sve(e)),lve=()=>`Seulement si le média est servi sur un autre hôte/port`,uve=()=>`Only if media is served on another host/port`,dve=((e={},t={})=>(t.locale??q())===`fr`?lve(e):uve(e)),fve=()=>`Identifiants`,pve=()=>`Credentials`,mve=((e={},t={})=>(t.locale??q())===`fr`?fve(e):pve(e)),hve=e=>`Identifiants de la gateway — instance « ${e?.instance} »`,gve=e=>`Gateway credentials — instance « ${e?.instance} »`,_ve=((e,t={})=>(t.locale??q())===`fr`?hve(e):gve(e)),vve=()=>`Stockés chiffrés au repos. En écriture seule : une valeur n'est jamais réaffichée — définissez-la, remplacez-la ou effacez-la.`,yve=()=>`Stored encrypted at rest. Write-only: a value is never shown again — set or replace it, or clear it.`,bve=((e={},t={})=>(t.locale??q())===`fr`?vve(e):yve(e)),xve=()=>`Jeton opérateur`,Sve=()=>`Operator token`,Cve=((e={},t={})=>(t.locale??q())===`fr`?xve(e):Sve(e)),wve=()=>`Identité d'appareil (JSON Ed25519)`,Tve=()=>`Device identity (Ed25519 JSON)`,Eve=((e={},t={})=>(t.locale??q())===`fr`?wve(e):Tve(e)),Dve=()=>`Clé API`,Ove=()=>`API key`,kve=((e={},t={})=>(t.locale??q())===`fr`?Dve(e):Ove(e)),Ave=()=>`Configuré`,jve=()=>`Configured`,YZ=((e={},t={})=>(t.locale??q())===`fr`?Ave(e):jve(e)),Mve=()=>`Non défini`,Nve=()=>`Not set`,XZ=((e={},t={})=>(t.locale??q())===`fr`?Mve(e):Nve(e)),Pve=()=>`Saisir la valeur…`,Fve=()=>`Enter value…`,Ive=((e={},t={})=>(t.locale??q())===`fr`?Pve(e):Fve(e)),Lve=()=>`Remplacer la valeur…`,Rve=()=>`Replace value…`,zve=((e={},t={})=>(t.locale??q())===`fr`?Lve(e):Rve(e)),Bve=()=>`Définir`,Vve=()=>`Set`,Hve=((e={},t={})=>(t.locale??q())===`fr`?Bve(e):Vve(e)),Uve=()=>`Effacer`,Wve=()=>`Clear`,Gve=((e={},t={})=>(t.locale??q())===`fr`?Uve(e):Wve(e)),Kve=()=>`Identifiant enregistré`,qve=()=>`Credential saved`,Jve=((e={},t={})=>(t.locale??q())===`fr`?Kve(e):qve(e)),Yve=()=>`Impossible d'enregistrer l'identifiant`,Xve=()=>`Could not save the credential`,ZZ=((e={},t={})=>(t.locale??q())===`fr`?Yve(e):Xve(e)),Zve=()=>`Identifiant effacé`,Qve=()=>`Credential cleared`,$ve=((e={},t={})=>(t.locale??q())===`fr`?Zve(e):Qve(e)),eye=()=>`Générer`,tye=()=>`Generate`,nye=((e={},t={})=>(t.locale??q())===`fr`?eye(e):tye(e)),rye=()=>`Crée une identité Ed25519 côté serveur (la clé privée ne touche jamais le navigateur) et l'enregistre. Vous l'appairerez ensuite sur la gateway.`,iye=()=>`Mints an Ed25519 identity server-side (the private key never reaches the browser) and saves it. You'll then pair it on the gateway.`,aye=((e={},t={})=>(t.locale??q())===`fr`?rye(e):iye(e)),oye=()=>`Identité générée et enregistrée`,sye=()=>`Device identity generated and saved`,QZ=((e={},t={})=>(t.locale??q())===`fr`?oye(e):sye(e)),cye=()=>`Appairez cet appareil sur votre gateway avec :`,lye=()=>`Pair this device on your gateway with:`,uye=((e={},t={})=>(t.locale??q())===`fr`?cye(e):lye(e)),dye=()=>`Impossible de générer l'identité d'appareil`,fye=()=>`Could not generate the device identity`,pye=((e={},t={})=>(t.locale??q())===`fr`?dye(e):fye(e)),mye=()=>`Synchroniser maintenant`,hye=()=>`Sync now`,gye=((e={},t={})=>(t.locale??q())===`fr`?mye(e):hye(e)),_ye=()=>`Synchronisation…`,vye=()=>`Syncing…`,yye=((e={},t={})=>(t.locale??q())===`fr`?_ye(e):vye(e)),bye=()=>`Synchronisation effectuée`,xye=()=>`Synced`,Sye=((e={},t={})=>(t.locale??q())===`fr`?bye(e):xye(e)),Cye=()=>`Échec de la synchronisation`,wye=()=>`Sync failed`,Tye=((e={},t={})=>(t.locale??q())===`fr`?Cye(e):wye(e)),Eye=()=>`Aucun agent récupéré — appairez l'appareil sur la gateway (ou vérifiez la configuration de l'instance), puis re-synchronisez`,Dye=()=>`No agents retrieved — pair the device on the gateway (or check the instance configuration), then sync again`,Oye=((e={},t={})=>(t.locale??q())===`fr`?Eye(e):Dye(e)),kye=()=>`Aucun bridge ne sert cette instance — définissez son « Bridge URL » dans Settings → Agents → Instances.`,Aye=()=>`No bridge serves this instance — set its “Bridge URL” in Settings → Agents → Instances.`,jye=((e={},t={})=>(t.locale??q())===`fr`?kye(e):Aye(e)),Mye=()=>`Configuration Convex incomplète : BRIDGE_SHARED_SECRET manquant sur le déploiement.`,Nye=()=>`Convex deployment is misconfigured: BRIDGE_SHARED_SECRET is missing.`,Pye=((e={},t={})=>(t.locale??q())===`fr`?Mye(e):Nye(e)),Fye=()=>`Bridge injoignable — vérifiez qu'il tourne et que son URL est correcte.`,Iye=()=>`Bridge unreachable — check it is running and its URL is correct.`,Lye=((e={},t={})=>(t.locale??q())===`fr`?Fye(e):Iye(e)),Rye=()=>`Le bridge a rejeté l'authentification — BRIDGE_SHARED_SECRET désynchronisé entre Convex et le bridge.`,zye=()=>`The bridge rejected authentication — BRIDGE_SHARED_SECRET is out of sync between Convex and the bridge.`,Bye=((e={},t={})=>(t.locale??q())===`fr`?Rye(e):zye(e)),Vye=()=>`Le bridge ne sert pas cette instance — son secret doit figurer dans BRIDGE_INSTANCE_SECRETS et ses identifiants doivent être valides.`,Hye=()=>`The bridge does not serve this instance — its secret must be in BRIDGE_INSTANCE_SECRETS and its credentials must be valid.`,Uye=((e={},t={})=>(t.locale??q())===`fr`?Vye(e):Hye(e)),Wye=()=>`Force le bridge à prendre en compte les identifiants et à récupérer les agents depuis la gateway maintenant (sinon ~2 min via le cron). Déclenche aussi l'appairage si l'appareil n'est pas encore appairé.`,Gye=()=>`Forces the bridge to take the credentials into account and fetch the agents from the gateway now (otherwise ~2 min via the cron). Also triggers pairing if the device is not yet paired.`,Kye=((e={},t={})=>(t.locale??q())===`fr`?Wye(e):Gye(e)),qye=()=>`Secret du bridge (bridge → Convex)`,Jye=()=>`Bridge secret (bridge → Convex)`,Yye=((e={},t={})=>(t.locale??q())===`fr`?qye(e):Jye(e)),Xye=()=>`Authentifie CE bridge auprès de Convex et le lie à cette instance, afin que le bridge ne puisse lire que les secrets de cette gateway. À définir dans l'environnement du bridge. Affiché une seule fois à la génération.`,Zye=()=>`Authenticates THIS bridge to Convex and ties it to this instance, so the bridge can only ever read this gateway's secrets. Set it in the bridge's environment. Shown once at generation.`,Qye=((e={},t={})=>(t.locale??q())===`fr`?Xye(e):Zye(e)),$ye=()=>`Générer`,ebe=()=>`Generate`,tbe=((e={},t={})=>(t.locale??q())===`fr`?$ye(e):ebe(e)),nbe=()=>`Régénérer`,rbe=()=>`Regenerate`,ibe=((e={},t={})=>(t.locale??q())===`fr`?nbe(e):rbe(e)),abe=()=>`Révoquer`,obe=()=>`Revoke`,sbe=((e={},t={})=>(t.locale??q())===`fr`?abe(e):obe(e)),cbe=()=>`Secret du bridge révoqué`,lbe=()=>`Bridge secret revoked`,ube=((e={},t={})=>(t.locale??q())===`fr`?cbe(e):lbe(e)),dbe=()=>`Impossible de générer le secret du bridge`,fbe=()=>`Could not generate the bridge secret`,$Z=((e={},t={})=>(t.locale??q())===`fr`?dbe(e):fbe(e)),pbe=()=>`Copiez ce secret maintenant — il ne sera plus jamais affiché. Placez-le dans la variable d'environnement du bridge.`,mbe=()=>`Copy this secret now — it is never shown again. Put it in the bridge's environment variable.`,hbe=((e={},t={})=>(t.locale??q())===`fr`?pbe(e):mbe(e)),gbe=()=>`J'ai copié le secret`,_be=()=>`I've copied the secret`,eQ=((e={},t={})=>(t.locale??q())===`fr`?gbe(e):_be(e)),vbe=e=>`Agents — instance « ${e?.name} »`,ybe=e=>`Agents — instance « ${e?.name} »`,bbe=((e,t={})=>(t.locale??q())===`fr`?vbe(e):ybe(e)),xbe=()=>`Les agents sont découverts par le bridge. Coche ceux à rendre disponibles en aval (assignables aux groupes/users), et choisis un défaut. Un agent désactivé reste listé mais grisé.`,Sbe=()=>`Agents are discovered by the bridge. Tick the ones to make available downstream (assignable to groups/users), and pick one default. A disabled agent stays listed but greyed.`,Cbe=((e={},t={})=>(t.locale??q())===`fr`?xbe(e):Sbe(e)),wbe=()=>`Impossible de mettre à jour l’agent`,Tbe=()=>`Could not update the agent`,tQ=((e={},t={})=>(t.locale??q())===`fr`?wbe(e):Tbe(e)),Ebe=()=>`Types`,Dbe=()=>`Types`,Obe=((e={},t={})=>(t.locale??q())===`fr`?Ebe(e):Dbe(e)),kbe=()=>`Gérer`,Abe=()=>`Manage`,jbe=((e={},t={})=>(t.locale??q())===`fr`?kbe(e):Abe(e)),Mbe=()=>`Types de l'agent`,Nbe=()=>`Agent types`,Pbe=((e={},t={})=>(t.locale??q())===`fr`?Mbe(e):Nbe(e)),Fbe=()=>`Un agent peut avoir plusieurs types. Chaque type indique à Atrium comment l'agent peut être utilisé.`,Ibe=()=>`An agent may hold several types. Each type tells Atrium how the agent can be used.`,Lbe=((e={},t={})=>(t.locale??q())===`fr`?Fbe(e):Ibe(e)),Rbe=()=>`Conversationnel`,zbe=()=>`Conversational`,Bbe=((e={},t={})=>(t.locale??q())===`fr`?Rbe(e):zbe(e)),Vbe=()=>`Agent de chat standard — répond aux messages des utilisateurs dans une conversation.`,Hbe=()=>`Standard chat agent — answers users' messages in a conversation.`,Ube=((e={},t={})=>(t.locale??q())===`fr`?Vbe(e):Hbe(e)),Wbe=()=>`Source documentaire`,Gbe=()=>`Documentary source`,Kbe=((e={},t={})=>(t.locale??q())===`fr`?Wbe(e):Gbe(e)),qbe=()=>`Agent spécialisé appelé par une action Atrium dédiée pour exploiter une source documentaire — pas de chat direct.`,Jbe=()=>`Specialised agent invoked by a dedicated Atrium action to exploit a documentary source — not used for direct chat.`,Ybe=((e={},t={})=>(t.locale??q())===`fr`?qbe(e):Jbe(e)),Xbe=()=>`Définir par défaut`,Zbe=()=>`Set as default`,Qbe=((e={},t={})=>(t.locale??q())===`fr`?Xbe(e):Zbe(e)),$be=()=>`Retirer`,exe=()=>`Remove`,txe=((e={},t={})=>(t.locale??q())===`fr`?$be(e):exe(e)),nxe=e=>`Retirer ${e?.name} ?`,rxe=e=>`Remove ${e?.name}?`,ixe=((e,t={})=>(t.locale??q())===`fr`?nxe(e):rxe(e)),axe=()=>`Cet agent n’existe plus sur le gateway. Le retirer le supprime aussi de la liste d’agents de chaque groupe et utilisateur. Action irréversible.`,oxe=()=>`This agent no longer exists on the gateway. Removing it also removes it from every group's and user's agent list. This cannot be undone.`,sxe=((e={},t={})=>(t.locale??q())===`fr`?axe(e):oxe(e)),cxe=()=>`Retirer`,lxe=()=>`Remove`,uxe=((e={},t={})=>(t.locale??q())===`fr`?cxe(e):lxe(e)),dxe=()=>`Agent retiré`,fxe=()=>`Agent removed`,pxe=((e={},t={})=>(t.locale??q())===`fr`?dxe(e):fxe(e)),mxe=()=>`Chargement…`,hxe=()=>`Loading…`,gxe=((e={},t={})=>(t.locale??q())===`fr`?mxe(e):hxe(e)),_xe=()=>`Jamais sondé.`,vxe=()=>`Never polled.`,yxe=((e={},t={})=>(t.locale??q())===`fr`?_xe(e):vxe(e)),bxe=()=>`Découverte OK.`,xxe=()=>`Discovery OK.`,Sxe=((e={},t={})=>(t.locale??q())===`fr`?bxe(e):xxe(e)),Cxe=e=>`Hors-ligne (${e?.error}) — dernier bon résultat servi.`,wxe=e=>`Offline (${e?.error}) — last good result served.`,Txe=((e,t={})=>(t.locale??q())===`fr`?Cxe(e):wxe(e)),Exe=()=>`Aucun agent découvert.`,Dxe=()=>`No agent discovered.`,Oxe=((e={},t={})=>(t.locale??q())===`fr`?Exe(e):Dxe(e)),kxe=()=>`défaut`,Axe=()=>`default`,nQ=((e={},t={})=>(t.locale??q())===`fr`?kxe(e):Axe(e)),jxe=()=>`supprimé`,Mxe=()=>`removed`,Nxe=((e={},t={})=>(t.locale??q())===`fr`?jxe(e):Mxe(e)),Pxe=()=>`Trace des actions effectuées sous usurpation d’identité : qui a réellement agi (acteur réel) et au nom de quel utilisateur. Le contenu des messages n’est jamais enregistré.`,Fxe=()=>`Trace of actions performed under impersonation: who really acted (real actor) and on behalf of which user. Message content is never recorded.`,Ixe=((e={},t={})=>(t.locale??q())===`fr`?Pxe(e):Fxe(e)),Lxe=()=>`Fenêtre récente bornée — une plage antérieure peut être partielle.`,Rxe=()=>`Bounded recent window — an earlier range may be partial.`,zxe=((e={},t={})=>(t.locale??q())===`fr`?Lxe(e):Rxe(e)),Bxe=()=>`Rechercher (action, acteur, ressource)`,Vxe=()=>`Search (action, actor, resource)`,Hxe=((e={},t={})=>(t.locale??q())===`fr`?Bxe(e):Vxe(e)),Uxe=()=>`Action`,Wxe=()=>`Action`,rQ=((e={},t={})=>(t.locale??q())===`fr`?Uxe(e):Wxe(e)),Gxe=()=>`Toutes les actions`,Kxe=()=>`All actions`,qxe=((e={},t={})=>(t.locale??q())===`fr`?Gxe(e):Kxe(e)),Jxe=()=>`Usurpation : toutes`,Yxe=()=>`Impersonation: all`,Xxe=((e={},t={})=>(t.locale??q())===`fr`?Jxe(e):Yxe(e)),Zxe=()=>`Sous usurpation`,Qxe=()=>`Under impersonation`,$xe=((e={},t={})=>(t.locale??q())===`fr`?Zxe(e):Qxe(e)),eSe=()=>`Sans usurpation`,tSe=()=>`Without impersonation`,nSe=((e={},t={})=>(t.locale??q())===`fr`?eSe(e):tSe(e)),rSe=()=>`Ressource`,iSe=()=>`Resource`,iQ=((e={},t={})=>(t.locale??q())===`fr`?rSe(e):iSe(e)),aSe=()=>`Toutes les ressources`,oSe=()=>`All resources`,sSe=((e={},t={})=>(t.locale??q())===`fr`?aSe(e):oSe(e)),cSe=()=>`Audit`,lSe=()=>`Audit`,uSe=((e={},t={})=>(t.locale??q())===`fr`?cSe(e):lSe(e)),dSe=()=>`Aucune action tracée pour l’instant.`,fSe=()=>`No action traced yet.`,pSe=((e={},t={})=>(t.locale??q())===`fr`?dSe(e):fSe(e)),mSe=()=>`Quand`,hSe=()=>`When`,gSe=((e={},t={})=>(t.locale??q())===`fr`?mSe(e):hSe(e)),_Se=()=>`Acteur réel`,vSe=()=>`Real actor`,ySe=((e={},t={})=>(t.locale??q())===`fr`?_Se(e):vSe(e)),bSe=()=>`Au nom de`,xSe=()=>`On behalf of`,SSe=((e={},t={})=>(t.locale??q())===`fr`?bSe(e):xSe(e)),CSe=()=>`Traces`,wSe=()=>`Traces`,TSe=((e={},t={})=>(t.locale??q())===`fr`?CSe(e):wSe(e)),ESe=()=>`KPI`,DSe=()=>`KPI`,OSe=((e={},t={})=>(t.locale??q())===`fr`?ESe(e):DSe(e)),kSe=()=>`OpenClaw / Anomalies`,ASe=()=>`OpenClaw / Anomalies`,jSe=((e={},t={})=>(t.locale??q())===`fr`?kSe(e):ASe(e)),MSe=()=>`Chats`,NSe=()=>`Chats`,PSe=((e={},t={})=>(t.locale??q())===`fr`?MSe(e):NSe(e)),FSe=()=>`Admin`,ISe=()=>`Admin`,LSe=((e={},t={})=>(t.locale??q())===`fr`?FSe(e):ISe(e)),RSe=()=>`Lire`,zSe=()=>`Read`,aQ=((e={},t={})=>(t.locale??q())===`fr`?RSe(e):zSe(e)),BSe=()=>`Contenu`,VSe=()=>`Content`,HSe=((e={},t={})=>(t.locale??q())===`fr`?BSe(e):VSe(e)),USe=()=>`Écrire`,WSe=()=>`Write`,oQ=((e={},t={})=>(t.locale??q())===`fr`?USe(e):WSe(e)),GSe=()=>`Requête`,KSe=()=>`Query`,qSe=((e={},t={})=>(t.locale??q())===`fr`?GSe(e):KSe(e)),JSe=()=>`Anomalies`,YSe=()=>`Anomalies`,XSe=((e={},t={})=>(t.locale??q())===`fr`?JSe(e):YSe(e)),ZSe=()=>`Signaler`,QSe=()=>`Report`,$Se=((e={},t={})=>(t.locale??q())===`fr`?ZSe(e):QSe(e)),eCe=()=>`Gérer`,tCe=()=>`Manage`,nCe=((e={},t={})=>(t.locale??q())===`fr`?eCe(e):tCe(e)),rCe=()=>`Auto-correction`,iCe=()=>`Self-heal`,aCe=((e={},t={})=>(t.locale??q())===`fr`?rCe(e):iCe(e)),oCe=e=>`${e?.key} — accès au contenu brut (PHI), à accorder avec prudence`,sCe=e=>`${e?.key} — access to raw content (PHI), grant with caution`,cCe=((e,t={})=>(t.locale??q())===`fr`?oCe(e):sCe(e)),lCe=()=>`Échec de l’initialisation des rôles`,uCe=()=>`Failed to initialize roles`,dCe=((e={},t={})=>(t.locale??q())===`fr`?lCe(e):uCe(e)),fCe=e=>`Modifier le rôle intégré « ${e?.name} » ?`,pCe=e=>`Edit the built-in role “${e?.name}”?`,mCe=((e,t={})=>(t.locale??q())===`fr`?fCe(e):pCe(e)),hCe=()=>`Les rôles intégrés sont la base du modèle de permissions. Les modifier peut affecter les comptes existants. Continuer ?`,gCe=()=>`Built-in roles are the foundation of the permission model. Editing them may affect existing accounts. Continue?`,_Ce=((e={},t={})=>(t.locale??q())===`fr`?hCe(e):gCe(e)),vCe=()=>`Modifier`,yCe=()=>`Edit`,bCe=((e={},t={})=>(t.locale??q())===`fr`?vCe(e):yCe(e)),xCe=()=>`Échec de la mise à jour des permissions`,SCe=()=>`Failed to update permissions`,CCe=((e={},t={})=>(t.locale??q())===`fr`?xCe(e):SCe(e)),wCe=()=>`Échec de la création du rôle`,TCe=()=>`Failed to create role`,ECe=((e={},t={})=>(t.locale??q())===`fr`?wCe(e):TCe(e)),DCe=()=>`Matrice de permissions. Lignes = rôles (intégrés + personnalisés), colonnes = clés de permission. Le rôle`,OCe=()=>`Permission matrix. Rows = roles (built-in + custom), columns = permission keys. The`,kCe=((e={},t={})=>(t.locale??q())===`fr`?DCe(e):OCe(e)),ACe=()=>`détient le joker « * » (toutes les permissions) et est verrouillé. La colonne`,jCe=()=>`role holds the “*” wildcard (all permissions) and is locked. The`,MCe=((e={},t={})=>(t.locale??q())===`fr`?ACe(e):jCe(e)),NCe=()=>`donne accès au contenu brut (PHI) — à n’accorder qu’à bon escient.`,PCe=()=>`column grants access to raw content (PHI) — grant only when justified.`,FCe=((e={},t={})=>(t.locale??q())===`fr`?NCe(e):PCe(e)),ICe=()=>`Rôles`,LCe=()=>`Roles`,RCe=((e={},t={})=>(t.locale??q())===`fr`?ICe(e):LCe(e)),zCe=()=>`Ajouter un rôle`,BCe=()=>`Add a role`,VCe=((e={},t={})=>(t.locale??q())===`fr`?zCe(e):BCe(e)),HCe=()=>`Chargement…`,UCe=()=>`Loading…`,WCe=((e={},t={})=>(t.locale??q())===`fr`?HCe(e):UCe(e)),GCe=()=>`Initialisation des rôles…`,KCe=()=>`Initializing roles…`,qCe=((e={},t={})=>(t.locale??q())===`fr`?GCe(e):KCe(e)),JCe=()=>`Rôle`,YCe=()=>`Role`,XCe=((e={},t={})=>(t.locale??q())===`fr`?JCe(e):YCe(e)),ZCe=()=>`intégré`,QCe=()=>`built-in`,$Ce=((e={},t={})=>(t.locale??q())===`fr`?ZCe(e):QCe(e)),ewe=()=>`personnalisé`,twe=()=>`custom`,nwe=((e={},t={})=>(t.locale??q())===`fr`?ewe(e):twe(e)),rwe=()=>`Authentifié mais pas encore approuvé — l’accès est bloqué tant qu’un administrateur n’a pas validé le compte.`,iwe=()=>`Authenticated but not yet approved — access is blocked until an admin approves the account.`,awe=((e={},t={})=>(t.locale??q())===`fr`?rwe(e):iwe(e)),owe=()=>`Personne approuvée, avec accès au chat.`,swe=()=>`Approved person with chat access.`,cwe=((e={},t={})=>(t.locale??q())===`fr`?owe(e):swe(e)),lwe=()=>`Accès total (superset) : gère les utilisateurs, rôles, agents, instances et l’observabilité.`,uwe=()=>`Full access (superset): manages users, roles, agents, instances and observability.`,dwe=((e={},t={})=>(t.locale??q())===`fr`?lwe(e):uwe(e)),fwe=()=>`Compte de service en LECTURE SEULE pour superviser : voit les traces, KPI, anomalies et l’état du bridge/version via l’API. Ne peut rien écrire ni déclencher.`,pwe=()=>`READ-ONLY service account for monitoring: views traces, KPIs, anomalies and bridge/version status through the API. Cannot write or trigger anything.`,mwe=((e={},t={})=>(t.locale??q())===`fr`?fwe(e):pwe(e)),hwe=()=>`Compte de service pour un agent OpenClaw lui-même : tout ce que voit l’observateur, PLUS interroger OpenClaw et SIGNALER des anomalies (écriture — ex. heartbeat / auto-réparation). À utiliser pour un agent automatisé, pas pour un humain qui consulte les tableaux de bord.`,gwe=()=>`Service account for an OpenClaw agent itself: the observer's read access PLUS querying OpenClaw and REPORTING anomalies (write — e.g. heartbeat / self-repair). Use it for an automated agent, not a human watching dashboards.`,_we=((e={},t={})=>(t.locale??q())===`fr`?hwe(e):gwe(e)),vwe=()=>`Accordé via « * » (toutes les permissions)`,ywe=()=>`Granted via “*” (all permissions)`,bwe=((e={},t={})=>(t.locale??q())===`fr`?vwe(e):ywe(e)),xwe=()=>`Écriture en cours…`,Swe=()=>`Writing…`,Cwe=((e={},t={})=>(t.locale??q())===`fr`?xwe(e):Swe(e)),wwe=()=>`Nouveau rôle`,Twe=()=>`New role`,Ewe=((e={},t={})=>(t.locale??q())===`fr`?wwe(e):Twe(e)),Dwe=()=>`Rôle personnalisé. Ajustez les permissions dans la matrice après création.`,Owe=()=>`Custom role. Adjust the permissions in the matrix after creation.`,kwe=((e={},t={})=>(t.locale??q())===`fr`?Dwe(e):Owe(e)),Awe=()=>`Créer`,jwe=()=>`Create`,Mwe=((e={},t={})=>(t.locale??q())===`fr`?Awe(e):jwe(e)),Nwe=()=>`Clé (identifiant stable)`,Pwe=()=>`Key (stable identifier)`,Fwe=((e={},t={})=>(t.locale??q())===`fr`?Nwe(e):Pwe(e)),Iwe=()=>`ex. analyst`,Lwe=()=>`e.g. analyst`,Rwe=((e={},t={})=>(t.locale??q())===`fr`?Iwe(e):Lwe(e)),zwe=()=>`Nom affiché`,Bwe=()=>`Display name`,Vwe=((e={},t={})=>(t.locale??q())===`fr`?zwe(e):Bwe(e)),Hwe=()=>`Description (optionnel)`,Uwe=()=>`Description (optional)`,Wwe=((e={},t={})=>(t.locale??q())===`fr`?Hwe(e):Uwe(e)),Gwe=()=>`Ouvertes`,Kwe=()=>`Open`,qwe=((e={},t={})=>(t.locale??q())===`fr`?Gwe(e):Kwe(e)),Jwe=()=>`En sourdine`,Ywe=()=>`Muted`,Xwe=((e={},t={})=>(t.locale??q())===`fr`?Jwe(e):Ywe(e)),Zwe=()=>`Résolues`,Qwe=()=>`Resolved`,$we=((e={},t={})=>(t.locale??q())===`fr`?Zwe(e):Qwe(e)),eTe=()=>`Résoudre cette anomalie ?`,tTe=()=>`Resolve this anomaly?`,nTe=((e={},t={})=>(t.locale??q())===`fr`?eTe(e):tTe(e)),rTe=()=>`L’anomalie`,iTe=()=>`The anomaly`,aTe=((e={},t={})=>(t.locale??q())===`fr`?rTe(e):iTe(e)),oTe=()=>`sera marquée comme`,sTe=()=>`will be marked as`,cTe=((e={},t={})=>(t.locale??q())===`fr`?oTe(e):sTe(e)),lTe=()=>`résolue`,uTe=()=>`resolved`,dTe=((e={},t={})=>(t.locale??q())===`fr`?lTe(e):uTe(e)),fTe=()=>`Elle sortira du décompte des anomalies ouvertes (signal de self-repair OpenClaw).`,pTe=()=>`It will be removed from the open anomalies count (OpenClaw self-repair signal).`,mTe=((e={},t={})=>(t.locale??q())===`fr`?fTe(e):pTe(e)),hTe=()=>`Résoudre`,gTe=()=>`Resolve`,_Te=((e={},t={})=>(t.locale??q())===`fr`?hTe(e):gTe(e)),vTe=()=>`Anomalie résolue`,yTe=()=>`Anomaly resolved`,bTe=((e={},t={})=>(t.locale??q())===`fr`?vTe(e):yTe(e)),xTe=()=>`Échec de la résolution`,STe=()=>`Resolution failed`,CTe=((e={},t={})=>(t.locale??q())===`fr`?xTe(e):STe(e)),wTe=()=>`Anomalie acquittée`,TTe=()=>`Anomaly acknowledged`,ETe=((e={},t={})=>(t.locale??q())===`fr`?wTe(e):TTe(e)),DTe=()=>`Échec de l’acquittement`,OTe=()=>`Acknowledgement failed`,kTe=((e={},t={})=>(t.locale??q())===`fr`?DTe(e):OTe(e)),ATe=()=>`Anomalies détectées (cron) ou signalées par les agents OpenClaw. Données non-PHI uniquement (type, sévérité, message, corrélation).`,jTe=()=>`Anomalies detected (cron) or reported by OpenClaw agents. Non-PHI data only (type, severity, message, correlation).`,MTe=((e={},t={})=>(t.locale??q())===`fr`?ATe(e):jTe(e)),NTe=()=>`Ouverte`,PTe=()=>`Open`,FTe=((e={},t={})=>(t.locale??q())===`fr`?NTe(e):PTe(e)),ITe=()=>`= active, elle alerte et compte dans le heartbeat.`,LTe=()=>`= active, it alerts and counts in the heartbeat.`,RTe=((e={},t={})=>(t.locale??q())===`fr`?ITe(e):LTe(e)),zTe=()=>`En sourdine`,BTe=()=>`Muted`,VTe=((e={},t={})=>(t.locale??q())===`fr`?zTe(e):BTe(e)),HTe=()=>`= vue, plus d'alerte, mais pas forcément corrigée (les admins sont notifiés des nouvelles anomalies).`,UTe=()=>`= seen, no more alerts, but not necessarily fixed (admins are notified of new anomalies).`,WTe=((e={},t={})=>(t.locale??q())===`fr`?HTe(e):UTe(e)),GTe=()=>`Résolue`,KTe=()=>`Resolved`,qTe=((e={},t={})=>(t.locale??q())===`fr`?GTe(e):KTe(e)),JTe=()=>`= le problème est réglé (le détecteur résout automatiquement quand la condition cesse). Les deux la sortent du décompte heartbeat.`,YTe=()=>`= the problem is fixed (the detector resolves automatically when the condition clears). Both remove it from the heartbeat count.`,XTe=((e={},t={})=>(t.locale??q())===`fr`?JTe(e):YTe(e)),ZTe=()=>`La plage temporelle filtre la fenêtre récente — une plage antérieure peut être partielle.`,QTe=()=>`The time range filters the recent window — an earlier range may be partial.`,$Te=((e={},t={})=>(t.locale??q())===`fr`?ZTe(e):QTe(e)),eEe=()=>`Rechercher (message, type, corrélation)`,tEe=()=>`Search (message, type, correlation)`,nEe=((e={},t={})=>(t.locale??q())===`fr`?eEe(e):tEe(e)),rEe=()=>`Tous les statuts`,iEe=()=>`All statuses`,aEe=((e={},t={})=>(t.locale??q())===`fr`?rEe(e):iEe(e)),oEe=()=>`Sévérité`,sEe=()=>`Severity`,sQ=((e={},t={})=>(t.locale??q())===`fr`?oEe(e):sEe(e)),cEe=()=>`Toutes sévérités`,lEe=()=>`All severities`,uEe=((e={},t={})=>(t.locale??q())===`fr`?cEe(e):lEe(e)),dEe=()=>`Source`,fEe=()=>`Source`,cQ=((e={},t={})=>(t.locale??q())===`fr`?dEe(e):fEe(e)),pEe=()=>`Toutes sources`,mEe=()=>`All sources`,hEe=((e={},t={})=>(t.locale??q())===`fr`?pEe(e):mEe(e)),gEe=()=>`Type`,_Ee=()=>`Type`,lQ=((e={},t={})=>(t.locale??q())===`fr`?gEe(e):_Ee(e)),vEe=()=>`Tous les types`,yEe=()=>`All types`,bEe=((e={},t={})=>(t.locale??q())===`fr`?vEe(e):yEe(e)),xEe=()=>`Anomalies`,SEe=()=>`Anomalies`,CEe=((e={},t={})=>(t.locale??q())===`fr`?xEe(e):SEe(e)),wEe=()=>`Aucune anomalie ouverte. 🎉`,TEe=()=>`No open anomalies. 🎉`,EEe=((e={},t={})=>(t.locale??q())===`fr`?wEe(e):TEe(e)),DEe=()=>`Aucune anomalie enregistrée.`,OEe=()=>`No anomalies recorded.`,kEe=((e={},t={})=>(t.locale??q())===`fr`?DEe(e):OEe(e)),AEe=()=>`Résoudre (corrigé)`,jEe=()=>`Resolve (fixed)`,MEe=((e={},t={})=>(t.locale??q())===`fr`?AEe(e):jEe(e)),NEe=()=>`Marquer comme vue (sourdine)`,PEe=()=>`Mark as seen (mute)`,FEe=((e={},t={})=>(t.locale??q())===`fr`?NEe(e):PEe(e)),IEe=()=>`Quand`,LEe=()=>`When`,REe=((e={},t={})=>(t.locale??q())===`fr`?IEe(e):LEe(e)),zEe=()=>`Statut`,BEe=()=>`Status`,VEe=((e={},t={})=>(t.locale??q())===`fr`?zEe(e):BEe(e)),HEe=()=>`Message`,UEe=()=>`Message`,WEe=((e={},t={})=>(t.locale??q())===`fr`?HEe(e):UEe(e)),GEe=()=>`Cause & correctif`,KEe=()=>`Cause & fix`,qEe=((e={},t={})=>(t.locale??q())===`fr`?GEe(e):KEe(e)),JEe=()=>`Corrélation`,YEe=()=>`Correlation`,XEe=((e={},t={})=>(t.locale??q())===`fr`?JEe(e):YEe(e)),ZEe=()=>`Voir la trace`,QEe=()=>`View trace`,$Ee=((e={},t={})=>(t.locale??q())===`fr`?ZEe(e):QEe(e)),eDe=()=>`ouverte`,tDe=()=>`open`,nDe=((e={},t={})=>(t.locale??q())===`fr`?eDe(e):tDe(e)),rDe=()=>`en sourdine`,iDe=()=>`muted`,aDe=((e={},t={})=>(t.locale??q())===`fr`?rDe(e):iDe(e)),oDe=()=>`résolue`,sDe=()=>`resolved`,cDe=((e={},t={})=>(t.locale??q())===`fr`?oDe(e):sDe(e)),lDe=()=>`Réponse incorrecte`,uDe=()=>`Incorrect response`,dDe=((e={},t={})=>(t.locale??q())===`fr`?lDe(e):uDe(e)),fDe=()=>`Incohérence`,pDe=()=>`Inconsistency`,mDe=((e={},t={})=>(t.locale??q())===`fr`?fDe(e):pDe(e)),hDe=()=>`Mots / orthographe erronés`,gDe=()=>`Wrong words / spelling`,_De=((e={},t={})=>(t.locale??q())===`fr`?hDe(e):gDe(e)),vDe=()=>`Formatage`,yDe=()=>`Formatting`,bDe=((e={},t={})=>(t.locale??q())===`fr`?vDe(e):yDe(e)),xDe=()=>`Latence`,SDe=()=>`Latency`,CDe=((e={},t={})=>(t.locale??q())===`fr`?xDe(e):SDe(e)),wDe=()=>`Erreur API`,TDe=()=>`API error`,EDe=((e={},t={})=>(t.locale??q())===`fr`?wDe(e):TDe(e)),DDe=()=>`Autre`,ODe=()=>`Other`,uQ=((e={},t={})=>(t.locale??q())===`fr`?DDe(e):ODe(e)),kDe=()=>`Mots modifiés à l'envoi`,ADe=()=>`Words altered on send`,jDe=((e={},t={})=>(t.locale??q())===`fr`?kDe(e):ADe(e)),MDe=()=>`Caractères / mise en forme altérés`,NDe=()=>`Characters / formatting altered`,PDe=((e={},t={})=>(t.locale??q())===`fr`?MDe(e):NDe(e)),FDe=()=>`Signaler un problème`,IDe=()=>`Report an issue`,LDe=((e={},t={})=>(t.locale??q())===`fr`?FDe(e):IDe(e)),RDe=()=>`Merci. Un instantané complet de ce message a été figé pour analyse.`,zDe=()=>`Thank you. A complete snapshot of this message has been frozen for analysis.`,BDe=((e={},t={})=>(t.locale??q())===`fr`?RDe(e):zDe(e)),VDe=()=>`Signalez un problème avec votre message tel qu'il a été envoyé. Un instantané forensique exact est enregistré.`,HDe=()=>`Report an issue with your message as it was sent. An exact forensic snapshot is recorded.`,UDe=((e={},t={})=>(t.locale??q())===`fr`?VDe(e):HDe(e)),WDe=()=>`Signalez un problème avec cette réponse. Un instantané forensique exact est enregistré au moment de l'envoi.`,GDe=()=>`Report an issue with this response. An exact forensic snapshot is recorded at send time.`,KDe=((e={},t={})=>(t.locale??q())===`fr`?WDe(e):GDe(e)),qDe=()=>`✓ Le texte affiché (vue source) correspond exactement, caractère pour caractère, au texte stocké côté serveur. La comparaison est figée comme preuve.`,JDe=()=>`✓ The displayed text (source view) matches exactly, character for character, the text stored on the server. The comparison is frozen as evidence.`,YDe=((e={},t={})=>(t.locale??q())===`fr`?qDe(e):JDe(e)),XDe=()=>`⚠ Écart détecté entre le texte affiché (vue source) et le texte stocké. L'instantané a figé les deux versions.`,ZDe=()=>`⚠ Discrepancy detected between the displayed text (source view) and the stored text. The snapshot has frozen both versions.`,QDe=((e={},t={})=>(t.locale??q())===`fr`?XDe(e):ZDe(e)),$De=()=>`Instantané enregistré. Pour vérifier que l'affichage n'altère aucun caractère, ouvrez la vue source (</>) sur ce message puis signalez à nouveau : la comparaison portera alors sur le texte réellement affiché par le navigateur.`,eOe=()=>`Snapshot recorded. To verify that the display does not alter any character, open the source view (</>) on this message then report again: the comparison will then be on the text actually rendered by the browser.`,tOe=((e={},t={})=>(t.locale??q())===`fr`?$De(e):eOe(e)),nOe=()=>`Catégorie`,rOe=()=>`Category`,iOe=((e={},t={})=>(t.locale??q())===`fr`?nOe(e):rOe(e)),aOe=()=>`Choisir une catégorie`,oOe=()=>`Choose a category`,sOe=((e={},t={})=>(t.locale??q())===`fr`?aOe(e):oOe(e)),cOe=()=>`Commentaire`,lOe=()=>`Comment`,uOe=((e={},t={})=>(t.locale??q())===`fr`?cOe(e):lOe(e)),dOe=()=>`Décrivez le problème…`,fOe=()=>`Describe the issue…`,pOe=((e={},t={})=>(t.locale??q())===`fr`?dOe(e):fOe(e)),mOe=()=>`Fermer`,hOe=()=>`Close`,gOe=((e={},t={})=>(t.locale??q())===`fr`?mOe(e):hOe(e)),_Oe=()=>`Annuler`,vOe=()=>`Cancel`,yOe=((e={},t={})=>(t.locale??q())===`fr`?_Oe(e):vOe(e)),bOe=()=>`Envoi…`,xOe=()=>`Sending…`,SOe=((e={},t={})=>(t.locale??q())===`fr`?bOe(e):xOe(e)),COe=()=>`Envoyer`,wOe=()=>`Send`,TOe=((e={},t={})=>(t.locale??q())===`fr`?COe(e):wOe(e)),EOe=()=>`Problème signalé`,DOe=()=>`Issue reported`,OOe=((e={},t={})=>(t.locale??q())===`fr`?EOe(e):DOe(e)),kOe=()=>`Signaler un problème`,AOe=()=>`Report an issue`,jOe=((e={},t={})=>(t.locale??q())===`fr`?kOe(e):AOe(e)),MOe=()=>`Signaler un problème avec ce message`,NOe=()=>`Report an issue with this message`,POe=((e={},t={})=>(t.locale??q())===`fr`?MOe(e):NOe(e)),FOe=()=>`Événements récents (fenêtre bornée, plus récents d’abord). Toutes les traces sont des métadonnées `,IOe=()=>`Recent events (bounded window, newest first). All traces are redacted metadata `,LOe=((e={},t={})=>(t.locale??q())===`fr`?FOe(e):IOe(e)),ROe=()=>`expurgées`,zOe=()=>`redacted`,BOe=((e={},t={})=>(t.locale??q())===`fr`?ROe(e):zOe(e)),VOe=()=>` : aucun contenu de message, pièce jointe ou jeton n’est stocké — uniquement des longueurs, codes et indicateurs.`,HOe=()=>`: no message content, attachment or token is stored — only lengths, codes and flags.`,UOe=((e={},t={})=>(t.locale??q())===`fr`?VOe(e):HOe(e)),WOe=()=>`La plage temporelle filtre la fenêtre récente — une plage antérieure peut être partielle.`,GOe=()=>`The time range filters the recent window — an older range may be partial.`,KOe=((e={},t={})=>(t.locale??q())===`fr`?WOe(e):GOe(e)),qOe=()=>`Rechercher (kind, principal, rôle, route, correlationId)`,JOe=()=>`Search (kind, principal, role, route, correlationId)`,YOe=((e={},t={})=>(t.locale??q())===`fr`?qOe(e):JOe(e)),XOe=()=>`Statut`,ZOe=()=>`Status`,QOe=((e={},t={})=>(t.locale??q())===`fr`?XOe(e):ZOe(e)),$Oe=()=>`Tous statuts`,eke=()=>`All statuses`,tke=((e={},t={})=>(t.locale??q())===`fr`?$Oe(e):eke(e)),nke=()=>`Principal`,rke=()=>`Principal`,ike=((e={},t={})=>(t.locale??q())===`fr`?nke(e):rke(e)),ake=()=>`Tous principaux`,oke=()=>`All principals`,ske=((e={},t={})=>(t.locale??q())===`fr`?ake(e):oke(e)),cke=()=>`Direction`,lke=()=>`Direction`,uke=((e={},t={})=>(t.locale??q())===`fr`?cke(e):lke(e)),dke=()=>`Toutes directions`,fke=()=>`All directions`,pke=((e={},t={})=>(t.locale??q())===`fr`?dke(e):fke(e)),mke=()=>`Rôle`,hke=()=>`Role`,gke=((e={},t={})=>(t.locale??q())===`fr`?mke(e):hke(e)),_ke=()=>`Tous les rôles`,vke=()=>`All roles`,yke=((e={},t={})=>(t.locale??q())===`fr`?_ke(e):vke(e)),bke=()=>`Tous les kinds`,xke=()=>`All kinds`,Ske=((e={},t={})=>(t.locale??q())===`fr`?bke(e):xke(e)),Cke=()=>`tous les kinds`,wke=()=>`all kinds`,Tke=((e={},t={})=>(t.locale??q())===`fr`?Cke(e):wke(e)),Eke=e=>`${e?.count} lignes`,Dke=e=>`${e?.count} rows`,Oke=((e,t={})=>(t.locale??q())===`fr`?Eke(e):Dke(e)),kke=()=>`Effacer le filtre de corrélation`,Ake=()=>`Clear correlation filter`,jke=((e={},t={})=>(t.locale??q())===`fr`?kke(e):Ake(e)),Mke=()=>`filtre: correlationId=`,Nke=()=>`filter: correlationId=`,Pke=((e={},t={})=>(t.locale??q())===`fr`?Mke(e):Nke(e)),Fke=()=>`Effacer`,Ike=()=>`Clear`,Lke=((e={},t={})=>(t.locale??q())===`fr`?Fke(e):Ike(e)),Rke=()=>`Traces`,zke=()=>`Traces`,Bke=((e={},t={})=>(t.locale??q())===`fr`?Rke(e):zke(e)),Vke=()=>`Aucun événement pour cette corrélation dans la fenêtre.`,Hke=()=>`No event for this correlation in the window.`,Uke=((e={},t={})=>(t.locale??q())===`fr`?Vke(e):Hke(e)),Wke=()=>`Aucun événement tracé pour l’instant.`,Gke=()=>`No traced event yet.`,Kke=((e={},t={})=>(t.locale??q())===`fr`?Wke(e):Gke(e)),qke=()=>`Quand`,Jke=()=>`When`,Yke=((e={},t={})=>(t.locale??q())===`fr`?qke(e):Jke(e)),Xke=()=>`Kind`,Zke=()=>`Kind`,Qke=((e={},t={})=>(t.locale??q())===`fr`?Xke(e):Zke(e)),$ke=()=>`Résultat`,eAe=()=>`Result`,tAe=((e={},t={})=>(t.locale??q())===`fr`?$ke(e):eAe(e)),nAe=()=>`ok`,rAe=()=>`ok`,iAe=((e={},t={})=>(t.locale??q())===`fr`?nAe(e):rAe(e)),aAe=()=>`Direction`,oAe=()=>`Direction`,sAe=((e={},t={})=>(t.locale??q())===`fr`?aAe(e):oAe(e)),cAe=()=>`Principal`,lAe=()=>`Principal`,uAe=((e={},t={})=>(t.locale??q())===`fr`?cAe(e):lAe(e)),dAe=()=>`Rôle`,fAe=()=>`Role`,pAe=((e={},t={})=>(t.locale??q())===`fr`?dAe(e):fAe(e)),mAe=()=>`Route`,hAe=()=>`Route`,gAe=((e={},t={})=>(t.locale??q())===`fr`?mAe(e):hAe(e)),_Ae=()=>`Statut`,vAe=()=>`Status`,yAe=((e={},t={})=>(t.locale??q())===`fr`?_Ae(e):vAe(e)),bAe=()=>`Latence`,xAe=()=>`Latency`,SAe=((e={},t={})=>(t.locale??q())===`fr`?bAe(e):xAe(e)),CAe=()=>`Corrélation`,wAe=()=>`Correlation`,TAe=((e={},t={})=>(t.locale??q())===`fr`?CAe(e):wAe(e)),EAe=()=>`Suivre ce tour (filtrer par correlationId)`,DAe=()=>`Follow this turn (filter by correlationId)`,OAe=((e={},t={})=>(t.locale??q())===`fr`?EAe(e):DAe(e)),kAe=()=>`Meta`,AAe=()=>`Meta`,jAe=((e={},t={})=>(t.locale??q())===`fr`?kAe(e):AAe(e)),MAe=()=>`Voir`,NAe=()=>`View`,PAe=((e={},t={})=>(t.locale??q())===`fr`?MAe(e):NAe(e)),FAe=()=>`Meta ·`,IAe=()=>`Meta ·`,LAe=((e={},t={})=>(t.locale??q())===`fr`?FAe(e):IAe(e)),RAe=()=>`expurgé`,zAe=()=>`redacted`,BAe=((e={},t={})=>(t.locale??q())===`fr`?RAe(e):zAe(e)),VAe=()=>`Métadonnées non-PHI uniquement (longueurs, codes, indicateurs). Aucun contenu de message n’est stocké.`,HAe=()=>`Non-PHI metadata only (lengths, codes, flags). No message content is stored.`,UAe=((e={},t={})=>(t.locale??q())===`fr`?VAe(e):HAe(e)),WAe=()=>`Chargement…`,GAe=()=>`Loading…`,dQ=((e={},t={})=>(t.locale??q())===`fr`?WAe(e):GAe(e)),KAe=()=>`Connexion refusée. Le domaine de ce compte n’est pas autorisé.`,qAe=()=>`Sign-in refused. This account’s email domain is not allowed.`,JAe=((e={},t={})=>(t.locale??q())===`fr`?KAe(e):qAe(e)),YAe=()=>`Bon retour`,XAe=()=>`Welcome back`,ZAe=((e={},t={})=>(t.locale??q())===`fr`?YAe(e):XAe(e)),QAe=()=>`Connectez-vous pour continuer`,$Ae=()=>`Sign in to continue`,eje=((e={},t={})=>(t.locale??q())===`fr`?QAe(e):$Ae(e)),tje=()=>`Se connecter avec Google`,nje=()=>`Sign in with Google`,rje=((e={},t={})=>(t.locale??q())===`fr`?tje(e):nje(e)),ije=()=>`Aucun mode de connexion configuré.`,aje=()=>`No sign-in method configured.`,oje=((e={},t={})=>(t.locale??q())===`fr`?ije(e):aje(e)),sje=()=>`Continuer (dev, sans compte)`,cje=()=>`Continue (dev, no account)`,lje=((e={},t={})=>(t.locale??q())===`fr`?sje(e):cje(e)),uje=()=>`Compte`,dje=()=>`Account`,fje=((e={},t={})=>(t.locale??q())===`fr`?uje(e):dje(e)),pje=()=>`En attente d’approbation`,mje=()=>`Awaiting approval`,hje=((e={},t={})=>(t.locale??q())===`fr`?pje(e):mje(e)),gje=()=>`Ton compte est créé mais doit être approuvé par un administrateur avant d’accéder au chat.`,_je=()=>`Your account has been created but must be approved by an administrator before you can access the chat.`,vje=((e={},t={})=>(t.locale??q())===`fr`?gje(e):_je(e)),yje=()=>`Vous explorez l’application en tant que`,bje=()=>`You are exploring the application as`,xje=((e={},t={})=>(t.locale??q())===`fr`?yje(e):bje(e)),Sje=()=>`. Toute action est exécutée et tracée en votre nom (`,Cje=()=>`. Every action is executed and traced in your name (`,wje=((e={},t={})=>(t.locale??q())===`fr`?Sje(e):Cje(e)),Tje=()=>`).`,Eje=()=>`).`,Dje=((e={},t={})=>(t.locale??q())===`fr`?Tje(e):Eje(e)),Oje=()=>`Quitter`,kje=()=>`Exit`,Aje=((e={},t={})=>(t.locale??q())===`fr`?Oje(e):kje(e)),jje=()=>`Afficher la barre latérale`,Mje=()=>`Show sidebar`,Nje=((e={},t={})=>(t.locale??q())===`fr`?jje(e):Mje(e)),Pje=()=>`Réduire la barre latérale`,Fje=()=>`Collapse sidebar`,Ije=((e={},t={})=>(t.locale??q())===`fr`?Pje(e):Fje(e)),Lje=()=>`Paramètres`,Rje=()=>`Settings`,zje=((e={},t={})=>(t.locale??q())===`fr`?Lje(e):Rje(e)),Bje=()=>`Redimensionner la barre latérale`,Vje=()=>`Resize sidebar`,Hje=((e={},t={})=>(t.locale??q())===`fr`?Bje(e):Vje(e)),Uje=()=>`Accès non autorisé`,Wje=()=>`Access denied`,Gje=((e={},t={})=>(t.locale??q())===`fr`?Uje(e):Wje(e)),Kje=()=>`Vous n’avez pas la permission de consulter cet onglet. Choisissez un onglet disponible dans le menu, ou contactez votre administrateur.`,qje=()=>`You do not have permission to view this tab. Choose an available tab from the menu, or contact your administrator.`,Jje=((e={},t={})=>(t.locale??q())===`fr`?Kje(e):qje(e)),Yje=()=>`Une erreur est survenue`,Xje=()=>`Something went wrong`,Zje=((e={},t={})=>(t.locale??q())===`fr`?Yje(e):Xje(e)),Qje=()=>`Cette page n’a pas pu être affichée. Réessayez, ou revenez à l’accueil. Si le problème persiste, contactez votre administrateur.`,$je=()=>`This page could not be displayed. Try again, or return home. If the problem persists, contact your administrator.`,eMe=((e={},t={})=>(t.locale??q())===`fr`?Qje(e):$je(e)),tMe=()=>`Réessayer`,nMe=()=>`Retry`,rMe=((e={},t={})=>(t.locale??q())===`fr`?tMe(e):nMe(e)),iMe=()=>`Accueil`,aMe=()=>`Home`,fQ=((e={},t={})=>(t.locale??q())===`fr`?iMe(e):aMe(e)),oMe=()=>`Page introuvable`,sMe=()=>`Page not found`,cMe=((e={},t={})=>(t.locale??q())===`fr`?oMe(e):sMe(e)),lMe=()=>`Cette adresse ne correspond à aucune page de l’application.`,uMe=()=>`This address does not match any page in the application.`,dMe=((e={},t={})=>(t.locale??q())===`fr`?lMe(e):uMe(e)),fMe=e=>`Agents de ${e?.user}`,pMe=e=>`${e?.user}'s agents`,mMe=((e,t={})=>(t.locale??q())===`fr`?fMe(e):pMe(e)),hMe=()=>`Associez les agents découverts (par instance) et désignez l'agent par défaut. Au moins un agent est requis pour créer des conversations.`,gMe=()=>`Assign the discovered agents (per instance) and designate the default agent. At least one agent is required to create conversations.`,_Me=((e={},t={})=>(t.locale??q())===`fr`?hMe(e):gMe(e)),vMe=()=>`Agents des groupes du membre. Cochez pour restreindre à une sélection ; sans coche, le membre voit tous ces agents.`,yMe=()=>`The member's group agents. Check to restrict to a selection; with none checked, the member sees all of them.`,bMe=((e={},t={})=>(t.locale??q())===`fr`?vMe(e):yMe(e)),xMe=()=>`Le membre n'appartient à aucun groupe : il voit tous les agents. Cochez pour restreindre à une sélection.`,SMe=()=>`The member belongs to no group, so they see every agent. Check to restrict to a selection.`,CMe=((e={},t={})=>(t.locale??q())===`fr`?xMe(e):SMe(e)),wMe=()=>`Chargement…`,TMe=()=>`Loading…`,EMe=((e={},t={})=>(t.locale??q())===`fr`?wMe(e):TMe(e)),DMe=()=>`Mise à jour de l'accès refusée`,OMe=()=>`Access update denied`,kMe=((e={},t={})=>(t.locale??q())===`fr`?DMe(e):OMe(e)),AMe=()=>`Définition de l'agent par défaut refusée`,jMe=()=>`Setting the default agent was denied`,MMe=((e={},t={})=>(t.locale??q())===`fr`?AMe(e):jMe(e)),NMe=()=>`Aucun agent découvert.`,PMe=()=>`No agent discovered.`,FMe=((e={},t={})=>(t.locale??q())===`fr`?NMe(e):PMe(e)),IMe=e=>`Assigner ${e?.name}`,LMe=e=>`Assign ${e?.name}`,RMe=((e,t={})=>(t.locale??q())===`fr`?IMe(e):LMe(e)),zMe=()=>`supprimé`,BMe=()=>`removed`,VMe=((e={},t={})=>(t.locale??q())===`fr`?zMe(e):BMe(e)),HMe=()=>`hors groupe`,UMe=()=>`outside group`,WMe=((e={},t={})=>(t.locale??q())===`fr`?HMe(e):UMe(e)),GMe=()=>`Agent par défaut`,KMe=()=>`Default agent`,pQ=((e={},t={})=>(t.locale??q())===`fr`?GMe(e):KMe(e)),qMe=()=>`Définir comme agent par défaut`,JMe=()=>`Set as default agent`,mQ=((e={},t={})=>(t.locale??q())===`fr`?qMe(e):JMe(e)),YMe=e=>`Configurer l'instance « ${e?.instance} »`,XMe=e=>`Configure instance « ${e?.instance} »`,ZMe=((e,t={})=>(t.locale??q())===`fr`?YMe(e):XMe(e)),QMe=()=>`Configurer`,$Me=()=>`Configure`,hQ=((e={},t={})=>(t.locale??q())===`fr`?QMe(e):$Me(e)),eNe=()=>`Config non-secrète du bridge, appliquée à chaud au message suivant (sans redémarrage). Les secrets (tokens, device identity) vivent dans l’environnement du bridge, jamais ici.`,tNe=()=>`Non-secret bridge config, applied hot on the next message (no restart). Secrets (tokens, device identity) live in the bridge environment, never here.`,nNe=((e={},t={})=>(t.locale??q())===`fr`?eNe(e):tNe(e)),rNe=()=>`Aucune instance — ajoutez-en une dans Agents › Instances d’abord.`,iNe=()=>`No instances yet — add one under Agents › Instances first.`,aNe=((e={},t={})=>(t.locale??q())===`fr`?rNe(e):iNe(e)),oNe=()=>`Mode média sortant`,sNe=()=>`Outbound media mode`,cNe=((e={},t={})=>(t.locale??q())===`fr`?oNe(e):sNe(e)),lNe=()=>`Mode média entrant`,uNe=()=>`Inbound media mode`,dNe=((e={},t={})=>(t.locale??q())===`fr`?lNe(e):uNe(e)),fNe=()=>`Taille média max (Mo)`,pNe=()=>`Max media size (MB)`,mNe=((e={},t={})=>(t.locale??q())===`fr`?fNe(e):pNe(e)),hNe=()=>`Ré-hydratation de session`,gNe=()=>`Session re-hydration`,_Ne=((e={},t={})=>(t.locale??q())===`fr`?hNe(e):gNe(e)),vNe=()=>`Enregistrer`,yNe=()=>`Save`,bNe=((e={},t={})=>(t.locale??q())===`fr`?vNe(e):yNe(e)),xNe=()=>`Impossible d’enregistrer la configuration`,SNe=()=>`Could not save the configuration`,CNe=((e={},t={})=>(t.locale??q())===`fr`?xNe(e):SNe(e)),wNe=()=>`Comment le bridge récupère les fichiers SORTANTS (générés par l’agent) pour les héberger : gateway-http (via HTTP depuis la gateway — aucun système de fichiers partagé requis, défaut portable), shared-fs (lit un volume partagé monté), ou off (aucune pièce jointe sortante).`,TNe=()=>`How the bridge fetches OUTBOUND (agent-generated) files to host them: gateway-http (over HTTP from the gateway — no shared filesystem needed, the portable default), shared-fs (read a mounted shared volume), or off (no outbound attachments).`,ENe=((e={},t={})=>(t.locale??q())===`fr`?wNe(e):TNe(e)),DNe=()=>`Comment les fichiers téléversés atteignent l’agent : inline (base64 dans la trame du chat — plafonné par la taille de trame de la gateway), ou shared-fs (streamé vers un volume partagé et référencé par chemin — toute taille, pour les grosses vidéos/audio/docs).`,ONe=()=>`How user-uploaded files reach the agent: inline (base64 in the chat frame — capped by the gateway frame size), or shared-fs (streamed to a shared volume and referenced by path — any size, for large videos/audio/docs).`,kNe=((e={},t={})=>(t.locale??q())===`fr`?DNe(e):ONe(e)),ANe=()=>`Plafond de taille par fichier (Mo). En mode shared-fs il peut être élevé (les fichiers sont streamés sur disque) ; pour l’inline, la vraie limite est la taille de trame de la gateway.`,jNe=()=>`Per-file size cap (MB). In shared-fs mode this can be large (files stream to disk); for inline files the gateway frame size is the real limit.`,MNe=((e={},t={})=>(t.locale??q())===`fr`?ANe(e):jNe(e)),NNe=()=>`Sur une session gateway fraîche/réinitialisée, renvoie les tours précédents pour que le contexte du modèle corresponde au fil visible. Désactiver pour n’envoyer que le message courant.`,PNe=()=>`On a fresh/rolled gateway session, re-send prior turns so the model's context matches the visible thread. Disable to always send only the current message.`,FNe=((e={},t={})=>(t.locale??q())===`fr`?NNe(e):PNe(e)),INe=()=>`Chemin entrant (vu par l’agent)`,LNe=()=>`Inbound path (agent view)`,RNe=((e={},t={})=>(t.locale??q())===`fr`?INe(e):LNe(e)),zNe=()=>`Le chemin DANS le conteneur de la gateway où l’agent LIT les fichiers entrants déposés — le montage du volume partagé côté gateway (ex. /home/node/.openclaw/media/inbound). Doit correspondre à ton montage de volume Docker.`,BNe=()=>`The path INSIDE the gateway container where the agent READS staged inbound files — the gateway's mount of the shared volume (e.g. /home/node/.openclaw/media/inbound). Must match your Docker volume mount.`,VNe=((e={},t={})=>(t.locale??q())===`fr`?zNe(e):BNe(e)),HNe=()=>`Chemin sortant (vu par l’agent)`,UNe=()=>`Outbound path (agent view)`,WNe=((e={},t={})=>(t.locale??q())===`fr`?HNe(e):UNe(e)),GNe=()=>`Le chemin DANS le conteneur de la gateway où l’agent ÉCRIT un fichier généré avant d’émettre MEDIA:<chemin> (ex. /home/node/.openclaw/media/outbound). Doit être accessible en écriture par l’agent dans le conteneur.`,KNe=()=>`The path INSIDE the gateway container where the agent WRITES a generated file before emitting MEDIA:<path> (e.g. /home/node/.openclaw/media/outbound). Must be writable by the agent in the container.`,qNe=((e={},t={})=>(t.locale??q())===`fr`?GNe(e):KNe(e)),JNe=()=>`Vérifier les chemins`,YNe=()=>`Check paths`,XNe=((e={},t={})=>(t.locale??q())===`fr`?JNe(e):YNe(e)),ZNe=()=>`Vérification…`,QNe=()=>`Checking…`,$Ne=((e={},t={})=>(t.locale??q())===`fr`?ZNe(e):QNe(e)),ePe=()=>`Échec de la vérification des chemins`,tPe=()=>`Path check failed`,nPe=((e={},t={})=>(t.locale??q())===`fr`?ePe(e):tPe(e)),rPe=()=>`Vérifie l’accès du BRIDGE aux dossiers partagés. Le montage côté agent (dans le conteneur de la gateway) est à vérifier séparément.`,iPe=()=>`Checks the BRIDGE's access to the shared dirs. The agent-side mount (inside the gateway container) must be verified separately.`,aPe=((e={},t={})=>(t.locale??q())===`fr`?rPe(e):iPe(e)),oPe=()=>`Entrant (écriture bridge)`,sPe=()=>`Inbound (bridge write)`,cPe=((e={},t={})=>(t.locale??q())===`fr`?oPe(e):sPe(e)),lPe=()=>`Sortant (lecture bridge)`,uPe=()=>`Outbound (bridge read)`,dPe=((e={},t={})=>(t.locale??q())===`fr`?lPe(e):uPe(e)),fPe=()=>`Accessible`,pPe=()=>`Accessible`,mPe=((e={},t={})=>(t.locale??q())===`fr`?fPe(e):pPe(e)),hPe=()=>`Non concerné (pas shared-fs)`,gPe=()=>`Not applicable (not shared-fs)`,_Pe=((e={},t={})=>(t.locale??q())===`fr`?hPe(e):gPe(e)),vPe=()=>`Bridge injoignable — vérification impossible`,yPe=()=>`Bridge unreachable — could not check`,bPe=((e={},t={})=>(t.locale??q())===`fr`?vPe(e):yPe(e)),xPe=e=>`Bridge joignable mais la vérification a échoué (${e?.reason})`,SPe=e=>`Bridge reachable but the check failed (${e?.reason})`,CPe=((e,t={})=>(t.locale??q())===`fr`?xPe(e):SPe(e)),wPe=()=>`Santé du bridge — sondage actif toutes les minutes. Données non-secrètes uniquement : joignabilité, état des connexions, dernière cause d’échec. Les secrets (tokens, device identity) vivent dans l’environnement du bridge, jamais ici.`,TPe=()=>`Bridge health — active poll every minute. Non-secret data only: reachability, connection states, last failure cause. Secrets (tokens, device identity) live in the bridge environment, never here.`,EPe=((e={},t={})=>(t.locale??q())===`fr`?wPe(e):TPe(e)),DPe=()=>`Chargement…`,OPe=()=>`Loading…`,gQ=((e={},t={})=>(t.locale??q())===`fr`?DPe(e):OPe(e)),kPe=()=>`Aucun relevé pour l’instant — le sondage tourne chaque minute. Reviens dans un moment.`,APe=()=>`No reading yet — the poll runs every minute. Check back in a moment.`,jPe=((e={},t={})=>(t.locale??q())===`fr`?kPe(e):APe(e)),MPe=()=>`Bridge opérationnel`,NPe=()=>`Bridge operational`,PPe=((e={},t={})=>(t.locale??q())===`fr`?MPe(e):NPe(e)),FPe=()=>`Bridge injoignable`,IPe=()=>`Bridge unreachable`,LPe=((e={},t={})=>(t.locale??q())===`fr`?FPe(e):IPe(e)),RPe=e=>`Bridge : ${e?.count} connexion(s) en erreur`,zPe=e=>`Bridge: ${e?.count} connection(s) in error`,BPe=((e,t={})=>(t.locale??q())===`fr`?RPe(e):zPe(e)),VPe=e=>`Vérifié à ${e?.time}`,HPe=e=>`Checked at ${e?.time}`,UPe=((e,t={})=>(t.locale??q())===`fr`?VPe(e):HPe(e)),WPe=e=>`· Bridge démarré le ${e?.time}`,GPe=e=>`· Bridge started on ${e?.time}`,KPe=((e,t={})=>(t.locale??q())===`fr`?WPe(e):GPe(e)),qPe=()=>`↗ Anomalies`,JPe=()=>`↗ Anomalies`,YPe=((e={},t={})=>(t.locale??q())===`fr`?qPe(e):JPe(e)),XPe=e=>`Connexions (${e?.count})`,ZPe=e=>`Connections (${e?.count})`,QPe=((e,t={})=>(t.locale??q())===`fr`?XPe(e):ZPe(e)),$Pe=()=>`Aucune connexion encore éprouvée. L’état d’une connexion apparaît dès qu’un message la sollicite (le bridge se connecte à la demande).`,eFe=()=>`No connection tested yet. A connection's state appears as soon as a message exercises it (the bridge connects on demand).`,tFe=((e={},t={})=>(t.locale??q())===`fr`?$Pe(e):eFe(e)),nFe=e=>`${e?.ok} OK · ${e?.errors} échec(s) · ${e?.attempts} tentative(s)`,rFe=e=>`${e?.ok} OK · ${e?.errors} failure(s) · ${e?.attempts} attempt(s)`,iFe=((e,t={})=>(t.locale??q())===`fr`?nFe(e):rFe(e)),aFe=e=>`Rejeté par la passerelle : ${e?.label} — pas une défaillance du bridge.`,oFe=e=>`Rejected by the gateway: ${e?.label} — not a bridge fault.`,sFe=((e,t={})=>(t.locale??q())===`fr`?aFe(e):oFe(e)),cFe=()=>`Filtrer par cible ou hôte…`,lFe=()=>`Filter by target or host…`,uFe=((e={},t={})=>(t.locale??q())===`fr`?cFe(e):lFe(e)),dFe=()=>`Tous`,fFe=()=>`All`,_Q=((e={},t={})=>(t.locale??q())===`fr`?dFe(e):fFe(e)),pFe=()=>`État`,mFe=()=>`State`,hFe=((e={},t={})=>(t.locale??q())===`fr`?pFe(e):mFe(e)),gFe=()=>`Instance`,_Fe=()=>`Instance`,vFe=((e={},t={})=>(t.locale??q())===`fr`?gFe(e):_Fe(e)),yFe=()=>`Version`,bFe=()=>`Version`,xFe=((e={},t={})=>(t.locale??q())===`fr`?yFe(e):bFe(e)),SFe=()=>`Aucune connexion ne correspond aux filtres.`,CFe=()=>`No connection matches the filters.`,wFe=((e={},t={})=>(t.locale??q())===`fr`?SFe(e):CFe(e)),TFe=()=>`Cible`,EFe=()=>`Target`,DFe=((e={},t={})=>(t.locale??q())===`fr`?TFe(e):EFe(e)),OFe=()=>`État`,kFe=()=>`State`,AFe=((e={},t={})=>(t.locale??q())===`fr`?OFe(e):kFe(e)),jFe=()=>`Instance`,MFe=()=>`Instance`,NFe=((e={},t={})=>(t.locale??q())===`fr`?jFe(e):MFe(e)),PFe=()=>`Hôte passerelle`,FFe=()=>`Gateway host`,IFe=((e={},t={})=>(t.locale??q())===`fr`?PFe(e):FFe(e)),LFe=()=>`Version`,RFe=()=>`Version`,zFe=((e={},t={})=>(t.locale??q())===`fr`?LFe(e):RFe(e)),BFe=()=>`Stats`,VFe=()=>`Stats`,HFe=((e={},t={})=>(t.locale??q())===`fr`?BFe(e):VFe(e)),UFe=()=>`Dernier OK`,WFe=()=>`Last OK`,GFe=((e={},t={})=>(t.locale??q())===`fr`?UFe(e):WFe(e)),KFe=()=>`connectée`,qFe=()=>`connected`,vQ=((e={},t={})=>(t.locale??q())===`fr`?KFe(e):qFe(e)),JFe=()=>`erreur`,YFe=()=>`error`,yQ=((e={},t={})=>(t.locale??q())===`fr`?JFe(e):YFe(e)),XFe=()=>`inactive`,ZFe=()=>`inactive`,bQ=((e={},t={})=>(t.locale??q())===`fr`?XFe(e):ZFe(e)),QFe=()=>`5 dernières minutes`,$Fe=()=>`Last 5 minutes`,eIe=((e={},t={})=>(t.locale??q())===`fr`?QFe(e):$Fe(e)),tIe=()=>`15 dernières minutes`,nIe=()=>`Last 15 minutes`,rIe=((e={},t={})=>(t.locale??q())===`fr`?tIe(e):nIe(e)),iIe=()=>`30 dernières minutes`,aIe=()=>`Last 30 minutes`,oIe=((e={},t={})=>(t.locale??q())===`fr`?iIe(e):aIe(e)),sIe=()=>`Dernière heure`,cIe=()=>`Last hour`,lIe=((e={},t={})=>(t.locale??q())===`fr`?sIe(e):cIe(e)),uIe=()=>`3 dernières heures`,dIe=()=>`Last 3 hours`,fIe=((e={},t={})=>(t.locale??q())===`fr`?uIe(e):dIe(e)),pIe=()=>`6 dernières heures`,mIe=()=>`Last 6 hours`,hIe=((e={},t={})=>(t.locale??q())===`fr`?pIe(e):mIe(e)),gIe=()=>`12 dernières heures`,_Ie=()=>`Last 12 hours`,vIe=((e={},t={})=>(t.locale??q())===`fr`?gIe(e):_Ie(e)),yIe=()=>`Dernières 24 heures`,bIe=()=>`Last 24 hours`,xIe=((e={},t={})=>(t.locale??q())===`fr`?yIe(e):bIe(e)),SIe=()=>`2 derniers jours`,CIe=()=>`Last 2 days`,wIe=((e={},t={})=>(t.locale??q())===`fr`?SIe(e):CIe(e)),TIe=()=>`7 derniers jours`,EIe=()=>`Last 7 days`,DIe=((e={},t={})=>(t.locale??q())===`fr`?TIe(e):EIe(e)),OIe=()=>`30 derniers jours`,kIe=()=>`Last 30 days`,AIe=((e={},t={})=>(t.locale??q())===`fr`?OIe(e):kIe(e)),jIe=()=>`90 derniers jours`,MIe=()=>`Last 90 days`,NIe=((e={},t={})=>(t.locale??q())===`fr`?jIe(e):MIe(e)),PIe=()=>`Appels API`,FIe=()=>`API calls`,IIe=((e={},t={})=>(t.locale??q())===`fr`?PIe(e):FIe(e)),LIe=()=>`Erreurs API`,RIe=()=>`API errors`,zIe=((e={},t={})=>(t.locale??q())===`fr`?LIe(e):RIe(e)),BIe=()=>`Latence moyenne`,VIe=()=>`Average latency`,HIe=((e={},t={})=>(t.locale??q())===`fr`?BIe(e):VIe(e)),UIe=()=>`Ingestion OpenClaw`,WIe=()=>`OpenClaw ingest`,GIe=((e={},t={})=>(t.locale??q())===`fr`?UIe(e):WIe(e)),KIe=()=>`Messages envoyés`,qIe=()=>`Messages sent`,JIe=((e={},t={})=>(t.locale??q())===`fr`?KIe(e):qIe(e)),YIe=()=>`Erreurs de stream`,XIe=()=>`Stream errors`,ZIe=((e={},t={})=>(t.locale??q())===`fr`?YIe(e):XIe(e)),QIe=()=>`Indicateurs agrégés par heure à partir des traces expurgées (métadonnées non-PHI uniquement). Mise à jour en direct (useQuery) — le rollup tourne chaque heure.`,$Ie=()=>`Hourly aggregated indicators from redacted traces (non-PHI metadata only). Live updates (useQuery) — the rollup runs every hour.`,eLe=((e={},t={})=>(t.locale??q())===`fr`?QIe(e):$Ie(e)),tLe=()=>`La plage filtre l’historique des rollups — une plage antérieure peut être partielle.`,nLe=()=>`The range filters the rollup history — an earlier range may be partial.`,rLe=((e={},t={})=>(t.locale??q())===`fr`?tLe(e):nLe(e)),iLe=()=>`Chargement des KPI…`,aLe=()=>`Loading KPIs…`,oLe=((e={},t={})=>(t.locale??q())===`fr`?iLe(e):aLe(e)),sLe=()=>`Aucune donnée KPI — le rollup tourne chaque heure ; lance-le ou attends.`,cLe=()=>`No KPI data — the rollup runs every hour; run it or wait.`,lLe=((e={},t={})=>(t.locale??q())===`fr`?sLe(e):cLe(e)),uLe=e=>`dernier : ${e?.value}`,dLe=e=>`latest: ${e?.value}`,fLe=((e,t={})=>(t.locale??q())===`fr`?uLe(e):dLe(e)),pLe=()=>`aucune donnée`,mLe=()=>`no data`,hLe=((e={},t={})=>(t.locale??q())===`fr`?pLe(e):mLe(e)),gLe=e=>`${e?.count} h`,_Le=e=>`${e?.count} h`,vLe=((e,t={})=>(t.locale??q())===`fr`?gLe(e):_Le(e)),yLe=e=>`Série horaire (max ${e?.max} ${e?.unit})`,bLe=e=>`Hourly series (max ${e?.max} ${e?.unit})`,xLe=((e,t={})=>(t.locale??q())===`fr`?yLe(e):bLe(e)),SLe=()=>`Mode dev — comptes & rôles`,CLe=()=>`Dev mode — accounts & roles`,wLe=((e={},t={})=>(t.locale??q())===`fr`?SLe(e):CLe(e)),TLe=()=>`Mode dev — comptes & rôles`,ELe=()=>`Dev mode — accounts & roles`,DLe=((e={},t={})=>(t.locale??q())===`fr`?TLe(e):ELe(e)),OLe=()=>`Change de rôle et « agis en tant que » pour tester plusieurs utilisateurs sans CLI. Visible uniquement en dev.`,kLe=()=>`Change roles and “act as” to test multiple users without the CLI. Visible in dev only.`,ALe=((e={},t={})=>(t.locale??q())===`fr`?OLe(e):kLe(e)),jLe=e=>`Moi — ${e?.canonical}`,MLe=e=>`Me — ${e?.canonical}`,NLe=((e,t={})=>(t.locale??q())===`fr`?jLe(e):MLe(e)),PLe=()=>`Devenir admin`,FLe=()=>`Become admin`,ILe=((e={},t={})=>(t.locale??q())===`fr`?PLe(e):FLe(e)),LLe=()=>`Devenir user`,RLe=()=>`Become user`,zLe=((e={},t={})=>(t.locale??q())===`fr`?LLe(e):RLe(e)),BLe=()=>`Devenir pending`,VLe=()=>`Become pending`,HLe=((e={},t={})=>(t.locale??q())===`fr`?BLe(e):VLe(e)),ULe=()=>`Tu agis en tant que`,WLe=()=>`You are acting as`,GLe=((e={},t={})=>(t.locale??q())===`fr`?ULe(e):WLe(e)),KLe=()=>`Arrêter`,qLe=()=>`Stop`,JLe=((e={},t={})=>(t.locale??q())===`fr`?KLe(e):qLe(e)),YLe=()=>`Aucun autre compte. Déconnecte-toi puis reconnecte-toi (nouvelle identité anonyme) — elle sera active immédiatement.`,XLe=()=>`No other account. Sign out then sign back in (new anonymous identity) — it will be active immediately.`,ZLe=((e={},t={})=>(t.locale??q())===`fr`?YLe(e):XLe(e)),QLe=()=>`Deviens admin d'abord`,$Le=()=>`Become admin first`,eRe=((e={},t={})=>(t.locale??q())===`fr`?QLe(e):$Le(e)),tRe=()=>`Un compte pending ne peut pas être impersonné`,nRe=()=>`A pending account cannot be impersonated`,rRe=((e={},t={})=>(t.locale??q())===`fr`?tRe(e):nRe(e)),iRe=()=>`Agir en tant que cet utilisateur`,aRe=()=>`Act as this user`,oRe=((e={},t={})=>(t.locale??q())===`fr`?iRe(e):aRe(e)),sRe=()=>`Agir en tant que`,cRe=()=>`Act as`,lRe=((e={},t={})=>(t.locale??q())===`fr`?sRe(e):cRe(e)),uRe=()=>`Nouveau chat`,dRe=()=>`New chat`,fRe=((e={},t={})=>(t.locale??q())===`fr`?uRe(e):dRe(e)),pRe=()=>`Nouveau projet`,mRe=()=>`New project`,xQ=((e={},t={})=>(t.locale??q())===`fr`?pRe(e):mRe(e)),hRe=()=>`Nom du projet`,gRe=()=>`Project name`,_Re=((e={},t={})=>(t.locale??q())===`fr`?hRe(e):gRe(e)),vRe=()=>`ex. Travail`,yRe=()=>`e.g. Work`,bRe=((e={},t={})=>(t.locale??q())===`fr`?vRe(e):yRe(e)),xRe=()=>`Créer`,SRe=()=>`Create`,CRe=((e={},t={})=>(t.locale??q())===`fr`?xRe(e):SRe(e)),wRe=()=>`Épinglés`,TRe=()=>`Pinned`,ERe=((e={},t={})=>(t.locale??q())===`fr`?wRe(e):TRe(e)),DRe=()=>`Glissez un chat ici`,ORe=()=>`Drop a chat here`,kRe=((e={},t={})=>(t.locale??q())===`fr`?DRe(e):ORe(e)),ARe=()=>`Chats`,jRe=()=>`Chats`,MRe=((e={},t={})=>(t.locale??q())===`fr`?ARe(e):jRe(e)),NRe=()=>`Sans titre`,PRe=()=>`Untitled`,SQ=((e={},t={})=>(t.locale??q())===`fr`?NRe(e):PRe(e)),FRe=()=>`Lecture seule — l'agent associé ne t'est plus disponible`,IRe=()=>`Read-only — its agent is no longer available to you`,CQ=((e={},t={})=>(t.locale??q())===`fr`?FRe(e):IRe(e)),LRe=()=>`Supprimer le projet`,RRe=()=>`Delete project`,wQ=((e={},t={})=>(t.locale??q())===`fr`?LRe(e):RRe(e)),zRe=e=>`Supprimer le projet « ${e?.name} » ?`,BRe=e=>`Delete project "${e?.name}"?`,VRe=((e,t={})=>(t.locale??q())===`fr`?zRe(e):BRe(e)),HRe=e=>`Cette action est irréversible : elle supprimera aussi définitivement ${e?.count} conversation(s) et tous leurs messages.`,URe=e=>`This action is irreversible: it will also permanently delete ${e?.count} conversation(s) and all their messages.`,WRe=((e,t={})=>(t.locale??q())===`fr`?HRe(e):URe(e)),GRe=()=>`Cette action est irréversible.`,KRe=()=>`This action is irreversible.`,qRe=((e={},t={})=>(t.locale??q())===`fr`?GRe(e):KRe(e)),JRe=()=>`Supprimer`,YRe=()=>`Delete`,TQ=((e={},t={})=>(t.locale??q())===`fr`?JRe(e):YRe(e)),XRe=()=>`Déplacer / réordonner`,ZRe=()=>`Move / reorder`,QRe=((e={},t={})=>(t.locale??q())===`fr`?XRe(e):ZRe(e)),$Re=()=>`Actions`,eze=()=>`Actions`,tze=((e={},t={})=>(t.locale??q())===`fr`?$Re(e):eze(e)),nze=()=>`Renommer`,rze=()=>`Rename`,ize=((e={},t={})=>(t.locale??q())===`fr`?nze(e):rze(e)),aze=()=>`Désépingler`,oze=()=>`Unpin`,sze=((e={},t={})=>(t.locale??q())===`fr`?aze(e):oze(e)),cze=()=>`Épingler`,lze=()=>`Pin`,uze=((e={},t={})=>(t.locale??q())===`fr`?cze(e):lze(e)),dze=()=>`Couleur`,fze=()=>`Color`,pze=((e={},t={})=>(t.locale??q())===`fr`?dze(e):fze(e)),mze=()=>`Aucune couleur`,hze=()=>`No color`,gze=((e={},t={})=>(t.locale??q())===`fr`?mze(e):hze(e)),_ze=()=>`Supprimer ce chat ?`,vze=()=>`Delete this chat?`,yze=((e={},t={})=>(t.locale??q())===`fr`?_ze(e):vze(e)),bze=()=>`Cette action est irréversible et supprimera ses messages.`,xze=()=>`This action is irreversible and will delete its messages.`,Sze=((e={},t={})=>(t.locale??q())===`fr`?bze(e):xze(e)),Cze=e=>`Bridge : ${e?.provider}`,wze=e=>`Bridge: ${e?.provider}`,Tze=((e,t={})=>(t.locale??q())===`fr`?Cze(e):wze(e)),Eze=()=>`Renommer le chat`,Dze=()=>`Rename chat`,Oze=((e={},t={})=>(t.locale??q())===`fr`?Eze(e):Dze(e)),kze=()=>`Titre`,Aze=()=>`Title`,jze=((e={},t={})=>(t.locale??q())===`fr`?kze(e):Aze(e)),Mze=()=>`Réflexion…`,Nze=()=>`Thinking…`,Pze=((e={},t={})=>(t.locale??q())===`fr`?Mze(e):Nze(e)),Fze=()=>`Génération…`,Ize=()=>`Generating…`,Lze=((e={},t={})=>(t.locale??q())===`fr`?Fze(e):Ize(e)),Rze=()=>`Erreur`,zze=()=>`Error`,Bze=((e={},t={})=>(t.locale??q())===`fr`?Rze(e):zze(e)),Vze=()=>`La réponse a été générée côté agent mais n’a pas pu être finalisée (connexion au bridge interrompue en cours de route). Vous pouvez supprimer ou régénérer ce message.`,Hze=()=>`The reply was generated on the agent side but could not be finalized (the bridge connection dropped mid-stream). You can delete or regenerate this message.`,Uze=((e={},t={})=>(t.locale??q())===`fr`?Vze(e):Hze(e)),Wze=()=>`Interrompu`,Gze=()=>`Stopped`,Kze=((e={},t={})=>(t.locale??q())===`fr`?Wze(e):Gze(e)),qze=()=>`contient`,Jze=()=>`contains`,Yze=((e={},t={})=>(t.locale??q())===`fr`?qze(e):Jze(e)),Xze=()=>`Filtre avancé`,Zze=()=>`Advanced filter`,Qze=((e={},t={})=>(t.locale??q())===`fr`?Xze(e):Zze(e)),$ze=()=>`Aucun critère. Ajoutez une condition (toutes les conditions sont cumulées avec ET).`,eBe=()=>`No criteria. Add a condition (all conditions are combined with AND).`,tBe=((e={},t={})=>(t.locale??q())===`fr`?$ze(e):eBe(e)),nBe=()=>`Champ`,rBe=()=>`Field`,iBe=((e={},t={})=>(t.locale??q())===`fr`?nBe(e):rBe(e)),aBe=()=>`Valeur`,oBe=()=>`Value`,sBe=((e={},t={})=>(t.locale??q())===`fr`?aBe(e):oBe(e)),cBe=()=>`Supprimer la condition`,lBe=()=>`Remove condition`,uBe=((e={},t={})=>(t.locale??q())===`fr`?cBe(e):lBe(e)),dBe=()=>`Ajouter une condition`,fBe=()=>`Add condition`,pBe=((e={},t={})=>(t.locale??q())===`fr`?dBe(e):fBe(e)),mBe=()=>`Bridge : pas encore de relevé (sondage chaque minute)`,hBe=()=>`Bridge: no reading yet (polled every minute)`,gBe=((e={},t={})=>(t.locale??q())===`fr`?mBe(e):hBe(e)),_Be=()=>`Bridge opérationnel`,vBe=()=>`Bridge operational`,yBe=((e={},t={})=>(t.locale??q())===`fr`?_Be(e):vBe(e)),bBe=e=>` · vérifié à ${e?.time}`,xBe=e=>` · verified at ${e?.time}`,SBe=((e,t={})=>(t.locale??q())===`fr`?bBe(e):xBe(e)),CBe=e=>`Bridge indisponible (${e?.reason}) — ouvre l’onglet Bridge pour le détail`,wBe=e=>`Bridge unavailable (${e?.reason}) — open the Bridge tab for details`,TBe=((e,t={})=>(t.locale??q())===`fr`?CBe(e):wBe(e)),EBe=()=>`Utilisateur`,DBe=()=>`User`,OBe=((e={},t={})=>(t.locale??q())===`fr`?EBe(e):DBe(e)),kBe=()=>`Système`,ABe=()=>`System`,jBe=((e={},t={})=>(t.locale??q())===`fr`?kBe(e):ABe(e)),MBe=()=>`[Export limité aux 200 messages les plus récents de cette conversation]`,NBe=()=>`[Export limited to the 200 most recent messages of this conversation]`,PBe=((e={},t={})=>(t.locale??q())===`fr`?MBe(e):NBe(e)),FBe=()=>`Conversation`,IBe=()=>`Conversation`,EQ=((e={},t={})=>(t.locale??q())===`fr`?FBe(e):IBe(e)),LBe=e=>`Exporté le ${e?.date}`,RBe=e=>`Exported on ${e?.date}`,zBe=((e,t={})=>(t.locale??q())===`fr`?LBe(e):RBe(e)),BBe=e=>`[fichier : ${e?.name}]`,VBe=e=>`[file: ${e?.name}]`,HBe=((e,t={})=>(t.locale??q())===`fr`?BBe(e):VBe(e)),UBe=()=>`Rechercher dans les conversations`,WBe=()=>`Search conversations`,GBe=((e={},t={})=>(t.locale??q())===`fr`?UBe(e):WBe(e)),KBe=()=>`Rechercher…`,qBe=()=>`Search…`,JBe=((e={},t={})=>(t.locale??q())===`fr`?KBe(e):qBe(e)),YBe=()=>`Rechercher dans les conversations`,XBe=()=>`Search conversations`,ZBe=((e={},t={})=>(t.locale??q())===`fr`?YBe(e):XBe(e)),QBe=()=>`Rechercher dans toutes les conversations…`,$Be=()=>`Search across all conversations…`,eVe=((e={},t={})=>(t.locale??q())===`fr`?QBe(e):$Be(e)),tVe=()=>`Recherche`,nVe=()=>`Search`,rVe=((e={},t={})=>(t.locale??q())===`fr`?tVe(e):nVe(e)),iVe=e=>`Tapez au moins ${e?.count} caractères pour rechercher.`,aVe=e=>`Type at least ${e?.count} characters to search.`,oVe=((e,t={})=>(t.locale??q())===`fr`?iVe(e):aVe(e)),sVe=()=>`Recherche…`,cVe=()=>`Searching…`,lVe=((e={},t={})=>(t.locale??q())===`fr`?sVe(e):cVe(e)),uVe=e=>`Aucune conversation ne correspond à « ${e?.term} ».`,dVe=e=>`No conversation matches “${e?.term}”.`,fVe=((e,t={})=>(t.locale??q())===`fr`?uVe(e):dVe(e)),pVe=()=>`Nouveau chat`,mVe=()=>`New chat`,hVe=((e={},t={})=>(t.locale??q())===`fr`?pVe(e):mVe(e)),gVe=()=>`Titre`,_Ve=()=>`Title`,vVe=((e={},t={})=>(t.locale??q())===`fr`?gVe(e):_Ve(e)),yVe=()=>`Message`,bVe=()=>`Message`,xVe=((e={},t={})=>(t.locale??q())===`fr`?yVe(e):bVe(e)),SVe=()=>`naviguer`,CVe=()=>`navigate`,wVe=((e={},t={})=>(t.locale??q())===`fr`?SVe(e):CVe(e)),TVe=()=>`ouvrir`,EVe=()=>`open`,DVe=((e={},t={})=>(t.locale??q())===`fr`?TVe(e):EVe(e)),OVe=()=>`Échap`,kVe=()=>`Esc`,AVe=((e={},t={})=>(t.locale??q())===`fr`?OVe(e):kVe(e)),jVe=()=>`fermer`,MVe=()=>`close`,NVe=((e={},t={})=>(t.locale??q())===`fr`?jVe(e):MVe(e)),PVe=()=>`Choisir un agent`,FVe=()=>`Choose an agent`,IVe=((e={},t={})=>(t.locale??q())===`fr`?PVe(e):FVe(e)),LVe=()=>`Sélectionnez l’agent (et l’instance) pour cette conversation.`,RVe=()=>`Select the agent (and instance) for this conversation.`,zVe=((e={},t={})=>(t.locale??q())===`fr`?LVe(e):RVe(e)),BVe=()=>`Chargement…`,VVe=()=>`Loading…`,HVe=((e={},t={})=>(t.locale??q())===`fr`?BVe(e):VVe(e)),UVe=()=>`Aucun agent ne vous est assigné. Contactez votre administrateur pour qu’il vous en attribue un.`,WVe=()=>`No agent is assigned to you. Contact your administrator to have one assigned.`,GVe=((e={},t={})=>(t.locale??q())===`fr`?UVe(e):WVe(e)),KVe=()=>`Rechercher un agent…`,qVe=()=>`Search for an agent…`,JVe=((e={},t={})=>(t.locale??q())===`fr`?KVe(e):qVe(e)),YVe=()=>`Rechercher un agent`,XVe=()=>`Search for an agent`,ZVe=((e={},t={})=>(t.locale??q())===`fr`?YVe(e):XVe(e)),QVe=()=>`Cet agent n’existe plus sur la gateway`,$Ve=()=>`This agent no longer exists on the gateway`,eHe=((e={},t={})=>(t.locale??q())===`fr`?QVe(e):$Ve(e)),tHe=()=>`Agent par défaut`,nHe=()=>`Default agent`,rHe=((e={},t={})=>(t.locale??q())===`fr`?tHe(e):nHe(e)),iHe=()=>`Rechercher`,aHe=()=>`Search`,oHe=((e={},t={})=>(t.locale??q())===`fr`?iHe(e):aHe(e)),sHe=()=>`Réinitialiser`,cHe=()=>`Reset`,lHe=((e={},t={})=>(t.locale??q())===`fr`?sHe(e):cHe(e)),uHe=()=>`Ajouter`,dHe=()=>`Add`,fHe=((e={},t={})=>(t.locale??q())===`fr`?uHe(e):dHe(e)),pHe=()=>`Aucun élément.`,mHe=()=>`No items.`,hHe=((e={},t={})=>(t.locale??q())===`fr`?pHe(e):mHe(e)),gHe=()=>`Chargement…`,_He=()=>`Loading…`,vHe=((e={},t={})=>(t.locale??q())===`fr`?gHe(e):_He(e)),yHe=()=>`Tout sélectionner`,bHe=()=>`Select all`,xHe=((e={},t={})=>(t.locale??q())===`fr`?yHe(e):bHe(e)),SHe=()=>`Sélectionner la ligne`,CHe=()=>`Select row`,wHe=((e={},t={})=>(t.locale??q())===`fr`?SHe(e):CHe(e)),THe=()=>`Actions`,EHe=()=>`Actions`,DHe=((e={},t={})=>(t.locale??q())===`fr`?THe(e):EHe(e)),OHe=e=>`Trier par ${e?.column}`,kHe=e=>`Sort by ${e?.column}`,AHe=((e,t={})=>(t.locale??q())===`fr`?OHe(e):kHe(e)),jHe=()=>`Agent introuvable`,MHe=()=>`Agent not found`,NHe=((e={},t={})=>(t.locale??q())===`fr`?jHe(e):MHe(e)),PHe=()=>`L’agent configuré n’existe plus sur la passerelle. Vérifiez OPENCLAW_AGENT_ID dans le .env du bridge (il doit correspondre à un agent réel de la passerelle).`,FHe=()=>`The configured agent no longer exists on the gateway. Check OPENCLAW_AGENT_ID in the bridge .env (it must match a real gateway agent).`,IHe=((e={},t={})=>(t.locale??q())===`fr`?PHe(e):FHe(e)),LHe=()=>`Authentification refusée`,RHe=()=>`Authentication refused`,zHe=((e={},t={})=>(t.locale??q())===`fr`?LHe(e):RHe(e)),BHe=()=>`Le token opérateur ne correspond pas au device pairé. Re-pairez un device dédié au bridge sur la passerelle et reportez son token + device identity.`,VHe=()=>`The operator token does not match the paired device. Re-pair a dedicated bridge device on the gateway and report its token + device identity.`,HHe=((e={},t={})=>(t.locale??q())===`fr`?BHe(e):VHe(e)),UHe=()=>`Signature device impossible`,WHe=()=>`Device signing failed`,GHe=((e={},t={})=>(t.locale??q())===`fr`?UHe(e):WHe(e)),KHe=()=>`La clé privée du device identity ne se décode pas. Vérifiez OPENCLAW_DEVICE_IDENTITY (format JSON, \\n simples) — voir fix-devid.mjs.`,qHe=()=>`The device identity private key won’t decode. Check OPENCLAW_DEVICE_IDENTITY (JSON format, single \\n) — see fix-devid.mjs.`,JHe=((e={},t={})=>(t.locale??q())===`fr`?KHe(e):qHe(e)),YHe=()=>`Portée insuffisante`,XHe=()=>`Insufficient scope`,ZHe=((e={},t={})=>(t.locale??q())===`fr`?YHe(e):XHe(e)),QHe=()=>`Le pairing du device n’a pas la portée requise (operator.admin). Approuvez/élevez la portée du device sur la passerelle.`,$He=()=>`The device pairing lacks the required scope (operator.admin). Approve/elevate the device scope on the gateway.`,eUe=((e={},t={})=>(t.locale??q())===`fr`?QHe(e):$He(e)),tUe=()=>`Délai dépassé`,nUe=()=>`Timed out`,rUe=((e={},t={})=>(t.locale??q())===`fr`?tUe(e):nUe(e)),iUe=()=>`La passerelle n’a pas répondu à temps. Vérifiez qu’elle est démarrée et joignable (OPENCLAW_GATEWAY_URL).`,aUe=()=>`The gateway did not respond in time. Check it’s started and reachable (OPENCLAW_GATEWAY_URL).`,oUe=((e={},t={})=>(t.locale??q())===`fr`?iUe(e):aUe(e)),sUe=()=>`Passerelle déconnectée`,cUe=()=>`Gateway disconnected`,lUe=((e={},t={})=>(t.locale??q())===`fr`?sUe(e):cUe(e)),uUe=()=>`La connexion à la passerelle a été coupée. Vérifiez l’état du conteneur OpenClaw et l’URL/port de la passerelle.`,dUe=()=>`The connection to the gateway dropped. Check the OpenClaw container state and the gateway URL/port.`,fUe=((e={},t={})=>(t.locale??q())===`fr`?uUe(e):dUe(e)),pUe=()=>`Bridge injoignable`,mUe=()=>`Bridge unreachable`,hUe=((e={},t={})=>(t.locale??q())===`fr`?pUe(e):mUe(e)),gUe=()=>`Convex n’a pas pu joindre le bridge. Vérifiez que le conteneur bridge tourne et BRIDGE_URL (http://<ip-hôte>:8787).`,_Ue=()=>`Convex could not reach the bridge. Check the bridge container is running and BRIDGE_URL (http://<host-ip>:8787).`,vUe=((e={},t={})=>(t.locale??q())===`fr`?gUe(e):_Ue(e)),yUe=()=>`Pièce jointe trop volumineuse`,bUe=()=>`Attachment too large`,xUe=((e={},t={})=>(t.locale??q())===`fr`?yUe(e):bUe(e)),SUe=()=>`La passerelle a refusé la pièce jointe car elle dépasse la taille qu’elle accepte (limite de mise en sandbox de l’agent). Réduisez la taille du fichier, ou retirez la pièce jointe et envoyez le texte seul.`,CUe=()=>`The gateway refused the attachment because it exceeds the size it accepts (the agent's sandbox staging limit). Use a smaller file, or remove the attachment and send the text alone.`,wUe=((e={},t={})=>(t.locale??q())===`fr`?SUe(e):CUe(e)),TUe=()=>`Pièce jointe non traitée`,EUe=()=>`Attachment could not be processed`,DUe=((e={},t={})=>(t.locale??q())===`fr`?TUe(e):EUe(e)),OUe=()=>`La passerelle n’a pas pu analyser/préparer la pièce jointe. Bug connu de la passerelle (le validateur base64 déborde sur les gros fichiers, RangeError) — à corriger côté passerelle (isValidBase64). En attendant : un fichier plus petit passe, ou envoyez le texte sans pièce jointe.`,kUe=()=>`The gateway could not parse/stage the attachment. Known gateway bug (its base64 validator overflows on large files — RangeError); fix it gateway-side (isValidBase64). Meanwhile: a smaller file works, or send the text without the attachment.`,AUe=((e={},t={})=>(t.locale??q())===`fr`?OUe(e):kUe(e)),jUe=()=>`Requête invalide`,MUe=()=>`Invalid request`,NUe=((e={},t={})=>(t.locale??q())===`fr`?jUe(e):MUe(e)),PUe=()=>`La passerelle a rejeté la requête. Consultez les logs du bridge pour le détail brut.`,FUe=()=>`The gateway rejected the request. Check the bridge logs for the raw detail.`,IUe=((e={},t={})=>(t.locale??q())===`fr`?PUe(e):FUe(e)),LUe=()=>`Bridge non configuré`,RUe=()=>`Bridge not configured`,zUe=((e={},t={})=>(t.locale??q())===`fr`?LUe(e):RUe(e)),BUe=()=>`BRIDGE_URL / BRIDGE_SHARED_SECRET ne sont pas définis côté Convex (npx convex env set).`,VUe=()=>`BRIDGE_URL / BRIDGE_SHARED_SECRET are not set on the Convex side (npx convex env set).`,HUe=((e={},t={})=>(t.locale??q())===`fr`?BUe(e):VUe(e)),UUe=()=>`Utilisateur non routé`,WUe=()=>`User not routed`,GUe=((e={},t={})=>(t.locale??q())===`fr`?UUe(e):WUe(e)),KUe=()=>`Ce compte n’est rattaché à aucune instance. Settings → Users → Override instance, ou affectez un groupe.`,qUe=()=>`This account is not attached to any instance. Settings → Users → Override instance, or assign a group.`,JUe=((e={},t={})=>(t.locale??q())===`fr`?KUe(e):qUe(e)),YUe=()=>`Erreur passerelle`,XUe=()=>`Gateway error`,ZUe=((e={},t={})=>(t.locale??q())===`fr`?YUe(e):XUe(e)),QUe=()=>`Cause non catégorisée. Consultez les logs du bridge pour le message brut.`,$Ue=()=>`Uncategorized cause. Check the bridge logs for the raw message.`,eWe=((e={},t={})=>(t.locale??q())===`fr`?QUe(e):$Ue(e)),tWe=()=>`Cause inconnue`,nWe=()=>`Unknown cause`,rWe=((e={},t={})=>(t.locale??q())===`fr`?tWe(e):nWe(e)),iWe=()=>`Aucun code de cause n’a été remonté (bridge antérieur à cette version ?). Consultez les logs du bridge.`,aWe=()=>`No cause code was reported (bridge older than this version?). Check the bridge logs.`,oWe=((e={},t={})=>(t.locale??q())===`fr`?iWe(e):aWe(e)),sWe=()=>`Cause non répertoriée — voir les logs du bridge.`,cWe=()=>`Cause not catalogued — see the bridge logs.`,lWe=((e={},t={})=>(t.locale??q())===`fr`?sWe(e):cWe(e)),uWe=e=>`Notifications (${e?.count} non lues)`,dWe=e=>`Notifications (${e?.count} unread)`,fWe=((e,t={})=>(t.locale??q())===`fr`?uWe(e):dWe(e)),pWe=()=>`Notifications`,mWe=()=>`Notifications`,hWe=((e={},t={})=>(t.locale??q())===`fr`?pWe(e):mWe(e)),gWe=()=>`Notifications`,_We=()=>`Notifications`,vWe=((e={},t={})=>(t.locale??q())===`fr`?gWe(e):_We(e)),yWe=()=>`Tout lu`,bWe=()=>`Mark all read`,xWe=((e={},t={})=>(t.locale??q())===`fr`?yWe(e):bWe(e)),SWe=()=>`Tout effacer`,CWe=()=>`Clear all`,wWe=((e={},t={})=>(t.locale??q())===`fr`?SWe(e):CWe(e)),TWe=()=>`Aucune notification.`,EWe=()=>`No notifications.`,DWe=((e={},t={})=>(t.locale??q())===`fr`?TWe(e):EWe(e)),OWe=()=>`Marquer comme lue`,kWe=()=>`Mark as read`,DQ=((e={},t={})=>(t.locale??q())===`fr`?OWe(e):kWe(e)),AWe=()=>`Effacer la notification`,jWe=()=>`Clear notification`,OQ=((e={},t={})=>(t.locale??q())===`fr`?AWe(e):jWe(e)),MWe=()=>`Mes signalements`,NWe=()=>`My reports`,PWe=((e={},t={})=>(t.locale??q())===`fr`?MWe(e):NWe(e)),FWe=()=>`Répondu`,IWe=()=>`Answered`,LWe=((e={},t={})=>(t.locale??q())===`fr`?FWe(e):IWe(e)),RWe=()=>`En attente`,zWe=()=>`Pending`,BWe=((e={},t={})=>(t.locale??q())===`fr`?RWe(e):zWe(e)),VWe=()=>`Administrateur`,HWe=()=>`Administrator`,UWe=((e={},t={})=>(t.locale??q())===`fr`?VWe(e):HWe(e)),WWe=()=>`Vous`,GWe=()=>`You`,KWe=((e={},t={})=>(t.locale??q())===`fr`?WWe(e):GWe(e)),qWe=()=>`Voir la conversation`,JWe=()=>`View the conversation`,YWe=((e={},t={})=>(t.locale??q())===`fr`?qWe(e):JWe(e)),XWe=()=>`Message signalé`,ZWe=()=>`Reported message`,QWe=((e={},t={})=>(t.locale??q())===`fr`?XWe(e):ZWe(e)),$We=()=>`Clore le signalement`,eGe=()=>`Close report`,kQ=((e={},t={})=>(t.locale??q())===`fr`?$We(e):eGe(e)),tGe=()=>`Pourquoi clore ce signalement ? (facultatif)`,nGe=()=>`Why close this report? (optional)`,rGe=((e={},t={})=>(t.locale??q())===`fr`?tGe(e):nGe(e)),iGe=()=>`Clore`,aGe=()=>`Close`,oGe=((e={},t={})=>(t.locale??q())===`fr`?iGe(e):aGe(e)),sGe=()=>`Annuler`,cGe=()=>`Cancel`,lGe=((e={},t={})=>(t.locale??q())===`fr`?sGe(e):cGe(e)),uGe=()=>`Réponse à votre signalement`,dGe=()=>`Reply to your report`,fGe=((e={},t={})=>(t.locale??q())===`fr`?uGe(e):dGe(e)),pGe=()=>`Un administrateur a répondu à un signalement que vous avez envoyé.`,mGe=()=>`An administrator replied to a report you sent.`,hGe=((e={},t={})=>(t.locale??q())===`fr`?pGe(e):mGe(e)),gGe=()=>`Mots modifiés / altérés`,_Ge=()=>`Modified / altered words`,vGe=((e={},t={})=>(t.locale??q())===`fr`?gGe(e):_Ge(e)),yGe=()=>`Réponse incorrecte`,bGe=()=>`Incorrect answer`,xGe=((e={},t={})=>(t.locale??q())===`fr`?yGe(e):bGe(e)),SGe=()=>`Incohérence`,CGe=()=>`Incoherence`,wGe=((e={},t={})=>(t.locale??q())===`fr`?SGe(e):CGe(e)),TGe=()=>`Formatage`,EGe=()=>`Formatting`,DGe=((e={},t={})=>(t.locale??q())===`fr`?TGe(e):EGe(e)),OGe=()=>`Latence`,kGe=()=>`Latency`,AGe=((e={},t={})=>(t.locale??q())===`fr`?OGe(e):kGe(e)),jGe=()=>`Erreur API`,MGe=()=>`API error`,NGe=((e={},t={})=>(t.locale??q())===`fr`?jGe(e):MGe(e)),PGe=()=>`Autre`,FGe=()=>`Other`,IGe=((e={},t={})=>(t.locale??q())===`fr`?PGe(e):FGe(e)),LGe=()=>`Utilisateurs`,RGe=()=>`Users`,zGe=((e={},t={})=>(t.locale??q())===`fr`?LGe(e):RGe(e)),BGe=()=>`Instances`,VGe=()=>`Instances`,HGe=((e={},t={})=>(t.locale??q())===`fr`?BGe(e):VGe(e)),UGe=()=>`Bridge`,WGe=()=>`Bridge`,GGe=((e={},t={})=>(t.locale??q())===`fr`?UGe(e):WGe(e)),KGe=()=>`Comptes de service`,qGe=()=>`Service accounts`,JGe=((e={},t={})=>(t.locale??q())===`fr`?KGe(e):qGe(e)),YGe=()=>`Rôles`,XGe=()=>`Roles`,ZGe=((e={},t={})=>(t.locale??q())===`fr`?YGe(e):XGe(e)),QGe=()=>`Traces`,$Ge=()=>`Traces`,eKe=((e={},t={})=>(t.locale??q())===`fr`?QGe(e):$Ge(e)),tKe=()=>`KPI`,nKe=()=>`KPI`,rKe=((e={},t={})=>(t.locale??q())===`fr`?tKe(e):nKe(e)),iKe=()=>`Anomalies`,aKe=()=>`Anomalies`,oKe=((e={},t={})=>(t.locale??q())===`fr`?iKe(e):aKe(e)),sKe=()=>`Intégrations`,cKe=()=>`Integrations`,lKe=((e={},t={})=>(t.locale??q())===`fr`?sKe(e):cKe(e)),uKe=()=>`Audit`,dKe=()=>`Audit`,fKe=((e={},t={})=>(t.locale??q())===`fr`?uKe(e):dKe(e)),pKe=()=>`Feedbacks`,mKe=()=>`Feedbacks`,hKe=((e={},t={})=>(t.locale??q())===`fr`?pKe(e):mKe(e)),gKe=()=>`Groupes`,_Ke=()=>`Groups`,vKe=((e={},t={})=>(t.locale??q())===`fr`?gKe(e):_Ke(e)),yKe=()=>`Accès`,bKe=()=>`Access`,xKe=((e={},t={})=>(t.locale??q())===`fr`?yKe(e):bKe(e)),SKe=()=>`Inspectez les accès d’un utilisateur : ses groupes, les agents et chartes qui lui sont disponibles (avec leur provenance) et ses permissions effectives. Lecture seule.`,CKe=()=>`Inspect a user’s access: their groups, the agents and charts available to them (with provenance), and their effective permissions. Read-only.`,wKe=((e={},t={})=>(t.locale??q())===`fr`?SKe(e):CKe(e)),TKe=()=>`Choisir un utilisateur`,EKe=()=>`Pick a user`,AQ=((e={},t={})=>(t.locale??q())===`fr`?TKe(e):EKe(e)),DKe=()=>`Sélectionnez un utilisateur pour voir ses accès.`,OKe=()=>`Select a user to see their access.`,kKe=((e={},t={})=>(t.locale??q())===`fr`?DKe(e):OKe(e)),AKe=()=>`Identité`,jKe=()=>`Identity`,MKe=((e={},t={})=>(t.locale??q())===`fr`?AKe(e):jKe(e)),NKe=()=>`Groupes`,PKe=()=>`Groups`,FKe=((e={},t={})=>(t.locale??q())===`fr`?NKe(e):PKe(e)),IKe=()=>`Agents disponibles`,LKe=()=>`Available agents`,RKe=((e={},t={})=>(t.locale??q())===`fr`?IKe(e):LKe(e)),zKe=()=>`Chartes disponibles`,BKe=()=>`Available charts`,VKe=((e={},t={})=>(t.locale??q())===`fr`?zKe(e):BKe(e)),HKe=()=>`Permissions effectives`,UKe=()=>`Effective permissions`,WKe=((e={},t={})=>(t.locale??q())===`fr`?HKe(e):UKe(e)),GKe=()=>`Aucun`,KKe=()=>`None`,jQ=((e={},t={})=>(t.locale??q())===`fr`?GKe(e):KKe(e)),qKe=()=>`Défaut`,JKe=()=>`Default`,YKe=((e={},t={})=>(t.locale??q())===`fr`?qKe(e):JKe(e)),XKe=()=>`Direct`,ZKe=()=>`Direct`,QKe=((e={},t={})=>(t.locale??q())===`fr`?XKe(e):ZKe(e)),$Ke=()=>`Tous les agents (aucun groupe)`,eqe=()=>`All agents (no group)`,tqe=((e={},t={})=>(t.locale??q())===`fr`?$Ke(e):eqe(e)),nqe=e=>`Groupe : ${e?.group}`,rqe=e=>`Group: ${e?.group}`,MQ=((e,t={})=>(t.locale??q())===`fr`?nqe(e):rqe(e)),iqe=()=>`Commune`,aqe=()=>`Common`,oqe=((e={},t={})=>(t.locale??q())===`fr`?iqe(e):aqe(e)),sqe=()=>`Perso`,cqe=()=>`Personal`,lqe=((e={},t={})=>(t.locale??q())===`fr`?sqe(e):cqe(e)),uqe=()=>`Groupes`,dqe=()=>`Groups`,fqe=((e={},t={})=>(t.locale??q())===`fr`?uqe(e):dqe(e)),pqe=()=>`Regroupez des utilisateurs et partagez des agents par groupe. Chaque membre hérite des agents du groupe en plus de ses agents directs.`,mqe=()=>`Group users and share agents by group. Each member inherits the group's agents on top of their direct agents.`,hqe=((e={},t={})=>(t.locale??q())===`fr`?pqe(e):mqe(e)),gqe=()=>`Nouveau groupe`,_qe=()=>`New group`,vqe=((e={},t={})=>(t.locale??q())===`fr`?gqe(e):_qe(e)),yqe=()=>`Aucun groupe pour le moment.`,bqe=()=>`No groups yet.`,xqe=((e={},t={})=>(t.locale??q())===`fr`?yqe(e):bqe(e)),Sqe=()=>`Nom`,Cqe=()=>`Name`,wqe=((e={},t={})=>(t.locale??q())===`fr`?Sqe(e):Cqe(e)),Tqe=()=>`Membres`,Eqe=()=>`Members`,Dqe=((e={},t={})=>(t.locale??q())===`fr`?Tqe(e):Eqe(e)),Oqe=()=>`Agents`,kqe=()=>`Agents`,Aqe=((e={},t={})=>(t.locale??q())===`fr`?Oqe(e):kqe(e)),jqe=()=>`Chartes`,Mqe=()=>`Charts`,Nqe=((e={},t={})=>(t.locale??q())===`fr`?jqe(e):Mqe(e)),Pqe=()=>`Filtrer les groupes (nom, membre, agent, charte)…`,Fqe=()=>`Filter groups (name, member, agent, chart)…`,Iqe=((e={},t={})=>(t.locale??q())===`fr`?Pqe(e):Fqe(e)),Lqe=()=>`Gérer`,Rqe=()=>`Manage`,zqe=((e={},t={})=>(t.locale??q())===`fr`?Lqe(e):Rqe(e)),Bqe=()=>`Renommer`,Vqe=()=>`Rename`,Hqe=((e={},t={})=>(t.locale??q())===`fr`?Bqe(e):Vqe(e)),Uqe=()=>`Supprimer`,Wqe=()=>`Delete`,Gqe=((e={},t={})=>(t.locale??q())===`fr`?Uqe(e):Wqe(e)),Kqe=()=>`Enregistrer`,qqe=()=>`Save`,Jqe=((e={},t={})=>(t.locale??q())===`fr`?Kqe(e):qqe(e)),Yqe=()=>`Annuler`,Xqe=()=>`Cancel`,Zqe=((e={},t={})=>(t.locale??q())===`fr`?Yqe(e):Xqe(e)),Qqe=()=>`Nouveau groupe`,$qe=()=>`New group`,eJe=((e={},t={})=>(t.locale??q())===`fr`?Qqe(e):$qe(e)),tJe=()=>`Renommer le groupe`,nJe=()=>`Rename group`,rJe=((e={},t={})=>(t.locale??q())===`fr`?tJe(e):nJe(e)),iJe=()=>`Le nom est libre ; un identifiant stable est généré automatiquement.`,aJe=()=>`The name is free-form; a stable identifier is generated automatically.`,oJe=((e={},t={})=>(t.locale??q())===`fr`?iJe(e):aJe(e)),sJe=()=>`Nom`,cJe=()=>`Name`,lJe=((e={},t={})=>(t.locale??q())===`fr`?sJe(e):cJe(e)),uJe=()=>`Description`,dJe=()=>`Description`,fJe=((e={},t={})=>(t.locale??q())===`fr`?uJe(e):dJe(e)),pJe=e=>`Supprimer le groupe « ${e?.name} » ?`,mJe=e=>`Delete group "${e?.name}"?`,hJe=((e,t={})=>(t.locale??q())===`fr`?pJe(e):mJe(e)),gJe=()=>`Cette action supprime le groupe, ses adhésions et les agents partagés. Elle est irréversible.`,_Je=()=>`This deletes the group, its memberships and shared agents. It cannot be undone.`,vJe=((e={},t={})=>(t.locale??q())===`fr`?gJe(e):_Je(e)),yJe=()=>`Supprimer le groupe`,bJe=()=>`Delete group`,xJe=((e={},t={})=>(t.locale??q())===`fr`?yJe(e):bJe(e)),SJe=e=>`Gérer « ${e?.name} »`,CJe=e=>`Manage "${e?.name}"`,wJe=((e,t={})=>(t.locale??q())===`fr`?SJe(e):CJe(e)),TJe=()=>`Ajoutez ou retirez des membres et partagez des agents découverts avec ce groupe.`,EJe=()=>`Add or remove members and share discovered agents with this group.`,DJe=((e={},t={})=>(t.locale??q())===`fr`?TJe(e):EJe(e)),OJe=()=>`Membres`,kJe=()=>`Members`,AJe=((e={},t={})=>(t.locale??q())===`fr`?OJe(e):kJe(e)),jJe=()=>`Rechercher un utilisateur…`,MJe=()=>`Search a user…`,NJe=((e={},t={})=>(t.locale??q())===`fr`?jJe(e):MJe(e)),PJe=()=>`Agents partagés`,FJe=()=>`Shared agents`,IJe=((e={},t={})=>(t.locale??q())===`fr`?PJe(e):FJe(e)),LJe=()=>`Rechercher un agent…`,RJe=()=>`Search an agent…`,zJe=((e={},t={})=>(t.locale??q())===`fr`?LJe(e):RJe(e)),BJe=()=>`Aucun résultat.`,VJe=()=>`No results.`,HJe=((e={},t={})=>(t.locale??q())===`fr`?BJe(e):VJe(e)),UJe=()=>`Tout sélectionner`,WJe=()=>`Select all`,NQ=((e={},t={})=>(t.locale??q())===`fr`?UJe(e):WJe(e)),GJe=()=>`Précédent`,KJe=()=>`Previous`,qJe=((e={},t={})=>(t.locale??q())===`fr`?GJe(e):KJe(e)),JJe=()=>`Suivant`,YJe=()=>`Next`,XJe=((e={},t={})=>(t.locale??q())===`fr`?JJe(e):YJe(e)),ZJe=e=>`Page ${e?.page} sur ${e?.pages}`,QJe=e=>`Page ${e?.page} of ${e?.pages}`,$Je=((e,t={})=>(t.locale??q())===`fr`?ZJe(e):QJe(e)),eYe=()=>`Administrateur`,tYe=()=>`Admin`,nYe=((e={},t={})=>(t.locale??q())===`fr`?eYe(e):tYe(e)),rYe=()=>`Utilisateur`,iYe=()=>`User`,aYe=((e={},t={})=>(t.locale??q())===`fr`?rYe(e):iYe(e)),oYe=()=>`En attente`,sYe=()=>`Pending`,cYe=((e={},t={})=>(t.locale??q())===`fr`?oYe(e):sYe(e)),lYe=e=>`Basculer l'adhésion de ${e?.user}`,uYe=e=>`Toggle membership of ${e?.user}`,dYe=((e,t={})=>(t.locale??q())===`fr`?lYe(e):uYe(e)),fYe=e=>`Partager l'agent ${e?.name}`,pYe=e=>`Share agent ${e?.name}`,mYe=((e,t={})=>(t.locale??q())===`fr`?fYe(e):pYe(e)),hYe=()=>`Chargement…`,gYe=()=>`Loading…`,PQ=((e={},t={})=>(t.locale??q())===`fr`?hYe(e):gYe(e)),_Ye=()=>`Chargement des agents…`,vYe=()=>`Loading agents…`,yYe=((e={},t={})=>(t.locale??q())===`fr`?_Ye(e):vYe(e)),bYe=()=>`Aucun utilisateur.`,xYe=()=>`No users.`,SYe=((e={},t={})=>(t.locale??q())===`fr`?bYe(e):xYe(e)),CYe=()=>`Aucune instance configurée.`,wYe=()=>`No instances configured.`,TYe=((e={},t={})=>(t.locale??q())===`fr`?CYe(e):wYe(e)),EYe=()=>`Aucun agent découvert.`,DYe=()=>`No discovered agents.`,OYe=((e={},t={})=>(t.locale??q())===`fr`?EYe(e):DYe(e)),kYe=()=>`Instance hors ligne ; agents indisponibles.`,AYe=()=>`Instance offline; agents unavailable.`,jYe=((e={},t={})=>(t.locale??q())===`fr`?kYe(e):AYe(e)),MYe=()=>`hors ligne`,NYe=()=>`offline`,PYe=((e={},t={})=>(t.locale??q())===`fr`?MYe(e):NYe(e)),FYe=()=>`retiré`,IYe=()=>`removed`,LYe=((e={},t={})=>(t.locale??q())===`fr`?FYe(e):IYe(e)),RYe=()=>`Agent par défaut de l'instance`,zYe=()=>`Instance default agent`,FQ=((e={},t={})=>(t.locale??q())===`fr`?RYe(e):zYe(e)),BYe=()=>`Chartes`,VYe=()=>`Charts`,HYe=((e={},t={})=>(t.locale??q())===`fr`?BYe(e):VYe(e)),UYe=()=>`Aucune charte disponible pour ce groupe pour l'instant. Demandez à un administrateur d'ajouter des chartes au pool de ce groupe.`,WYe=()=>`No charts available for this group yet. Ask an admin to add charts to this group's pool.`,GYe=((e={},t={})=>(t.locale??q())===`fr`?UYe(e):WYe(e)),KYe=()=>`Ajoutez des chartes au pool de ce groupe ci-dessous, puis sélectionnez celles que le groupe propose.`,qYe=()=>`Add charts to this group's pool below, then select which ones the group offers.`,JYe=((e={},t={})=>(t.locale??q())===`fr`?KYe(e):qYe(e)),YYe=()=>`Ajouter une charte au pool…`,XYe=()=>`Add a chart to the pool…`,ZYe=((e={},t={})=>(t.locale??q())===`fr`?YYe(e):XYe(e)),QYe=e=>`Retirer ${e?.name} du pool`,$Ye=e=>`Remove ${e?.name} from the pool`,IQ=((e,t={})=>(t.locale??q())===`fr`?QYe(e):$Ye(e)),eXe=e=>`Proposer la charte ${e?.name} à ce groupe`,tXe=e=>`Offer chart ${e?.name} to this group`,nXe=((e,t={})=>(t.locale??q())===`fr`?eXe(e):tXe(e)),rXe=()=>`Charte par défaut du groupe`,iXe=()=>`Group default chart`,LQ=((e={},t={})=>(t.locale??q())===`fr`?rXe(e):iXe(e)),aXe=()=>`Définir par défaut`,oXe=()=>`Set as default`,sXe=((e={},t={})=>(t.locale??q())===`fr`?aXe(e):oXe(e)),cXe=()=>`Gestionnaire`,lXe=()=>`Manager`,RQ=((e={},t={})=>(t.locale??q())===`fr`?cXe(e):lXe(e)),uXe=()=>`Promouvoir gestionnaire`,dXe=()=>`Promote to manager`,zQ=((e={},t={})=>(t.locale??q())===`fr`?uXe(e):dXe(e)),fXe=()=>`Retirer gestionnaire`,pXe=()=>`Remove manager`,BQ=((e={},t={})=>(t.locale??q())===`fr`?fXe(e):pXe(e)),mXe=()=>`Changement de gestionnaire refusé`,hXe=()=>`Manager change rejected`,gXe=((e={},t={})=>(t.locale??q())===`fr`?mXe(e):hXe(e)),_Xe=()=>`Mise à jour de la charte refusée`,vXe=()=>`Chart update rejected`,VQ=((e={},t={})=>(t.locale??q())===`fr`?_Xe(e):vXe(e)),yXe=()=>`Enregistrement du groupe refusé`,bXe=()=>`Group save rejected`,xXe=((e={},t={})=>(t.locale??q())===`fr`?yXe(e):bXe(e)),SXe=()=>`Suppression du groupe refusée`,CXe=()=>`Group deletion rejected`,wXe=((e={},t={})=>(t.locale??q())===`fr`?SXe(e):CXe(e)),TXe=()=>`Mise à jour de l'adhésion refusée`,EXe=()=>`Membership update rejected`,HQ=((e={},t={})=>(t.locale??q())===`fr`?TXe(e):EXe(e)),DXe=()=>`Partage de l'agent refusé`,OXe=()=>`Agent sharing rejected`,UQ=((e={},t={})=>(t.locale??q())===`fr`?DXe(e):OXe(e)),kXe=()=>`Réordonner cet onglet`,AXe=()=>`Reorder this tab`,jXe=((e={},t={})=>(t.locale??q())===`fr`?kXe(e):AXe(e)),MXe=()=>`Réglages`,NXe=()=>`Settings`,PXe=((e={},t={})=>(t.locale??q())===`fr`?MXe(e):NXe(e)),FXe=()=>`← Retour au chat`,IXe=()=>`← Back to chat`,LXe=((e={},t={})=>(t.locale??q())===`fr`?FXe(e):IXe(e)),RXe=()=>`Réglages`,zXe=()=>`Settings`,BXe=((e={},t={})=>(t.locale??q())===`fr`?RXe(e):zXe(e)),VXe=()=>`Personnel`,HXe=()=>`Personal`,UXe=((e={},t={})=>(t.locale??q())===`fr`?VXe(e):HXe(e)),WXe=()=>`Agents`,GXe=()=>`Agents`,KXe=((e={},t={})=>(t.locale??q())===`fr`?WXe(e):GXe(e)),qXe=()=>`Accès & utilisateurs`,JXe=()=>`Access & users`,YXe=((e={},t={})=>(t.locale??q())===`fr`?qXe(e):JXe(e)),XXe=()=>`Observabilité`,ZXe=()=>`Observability`,QXe=((e={},t={})=>(t.locale??q())===`fr`?XXe(e):ZXe(e)),$Xe=()=>`Fermer`,eZe=()=>`Close`,WQ=((e={},t={})=>(t.locale??q())===`fr`?$Xe(e):eZe(e)),tZe=()=>`héritée`,nZe=()=>`inherited`,rZe=((e={},t={})=>(t.locale??q())===`fr`?tZe(e):nZe(e)),iZe=()=>`Revenir à la valeur héritée`,aZe=()=>`Back to the inherited value`,GQ=((e={},t={})=>(t.locale??q())===`fr`?iZe(e):aZe(e)),oZe=()=>`Application…`,sZe=()=>`Applying…`,KQ=((e={},t={})=>(t.locale??q())===`fr`?oZe(e):sZe(e)),cZe=()=>`Échec de l’application.`,lZe=()=>`Failed to apply.`,uZe=((e={},t={})=>(t.locale??q())===`fr`?cZe(e):lZe(e)),dZe=()=>`Réessayer`,fZe=()=>`Retry`,qQ=((e={},t={})=>(t.locale??q())===`fr`?dZe(e):fZe(e)),pZe=()=>`Réflexion`,mZe=()=>`Reasoning`,hZe=((e={},t={})=>(t.locale??q())===`fr`?pZe(e):mZe(e)),gZe=()=>`Vitesse`,_Ze=()=>`Speed`,vZe=((e={},t={})=>(t.locale??q())===`fr`?gZe(e):_Ze(e)),yZe=()=>`Hérité`,bZe=()=>`Inherited`,xZe=((e={},t={})=>(t.locale??q())===`fr`?yZe(e):bZe(e)),SZe=()=>`Rapide`,CZe=()=>`Fast`,JQ=((e={},t={})=>(t.locale??q())===`fr`?SZe(e):CZe(e)),wZe=()=>`Standard`,TZe=()=>`Standard`,YQ=((e={},t={})=>(t.locale??q())===`fr`?wZe(e):TZe(e)),EZe=()=>`Tous les réglages de session`,DZe=()=>`All session settings`,OZe=((e={},t={})=>(t.locale??q())===`fr`?EZe(e):DZe(e)),kZe=()=>`Réglages de session`,AZe=()=>`Session settings`,jZe=((e={},t={})=>(t.locale??q())===`fr`?kZe(e):AZe(e)),MZe=()=>`Réglages appliqués à cette conversation.`,NZe=()=>`Settings applied to this conversation.`,PZe=((e={},t={})=>(t.locale??q())===`fr`?MZe(e):NZe(e)),FZe=()=>`Génération`,IZe=()=>`Generation`,LZe=((e={},t={})=>(t.locale??q())===`fr`?FZe(e):IZe(e)),RZe=()=>`Session`,zZe=()=>`Session`,BZe=((e={},t={})=>(t.locale??q())===`fr`?RZe(e):zZe(e)),VZe=()=>`Agent`,HZe=()=>`Agent`,UZe=((e={},t={})=>(t.locale??q())===`fr`?VZe(e):HZe(e)),WZe=()=>`Actions`,GZe=()=>`Actions`,KZe=((e={},t={})=>(t.locale??q())===`fr`?WZe(e):GZe(e)),qZe=()=>`Contexte`,JZe=()=>`Context`,YZe=((e={},t={})=>(t.locale??q())===`fr`?qZe(e):JZe(e)),XZe=e=>`${e?.pct} % · ${e?.used} / ${e?.total} jetons`,ZZe=e=>`${e?.pct}% · ${e?.used} / ${e?.total} tokens`,QZe=((e,t={})=>(t.locale??q())===`fr`?XZe(e):ZZe(e)),$Ze=()=>`Verbosité`,eQe=()=>`Verbosity`,tQe=((e={},t={})=>(t.locale??q())===`fr`?$Ze(e):eQe(e)),nQe=e=>`${e?.level} · fixée`,rQe=e=>`${e?.level} · pinned`,iQe=((e,t={})=>(t.locale??q())===`fr`?nQe(e):rQe(e)),aQe=()=>`Fixée par la passerelle pour un streaming complet.`,oQe=()=>`Pinned by the bridge for complete streaming.`,sQe=((e={},t={})=>(t.locale??q())===`fr`?aQe(e):oQe(e)),cQe=()=>`Coût / jetons`,lQe=()=>`Cost / tokens`,uQe=((e={},t={})=>(t.locale??q())===`fr`?cQe(e):lQe(e)),dQe=e=>`~${e?.cost} $ · ${e?.tokens} jetons`,fQe=e=>`~$${e?.cost} · ${e?.tokens} tokens`,pQe=((e,t={})=>(t.locale??q())===`fr`?dQe(e):fQe(e)),mQe=e=>`~${e?.cost} $`,hQe=e=>`~$${e?.cost}`,gQe=((e,t={})=>(t.locale??q())===`fr`?mQe(e):hQe(e)),_Qe=e=>`${e?.tokens} jetons`,vQe=e=>`${e?.tokens} tokens`,yQe=((e,t={})=>(t.locale??q())===`fr`?_Qe(e):vQe(e)),bQe=()=>`Compacter le contexte`,xQe=()=>`Compact the context`,SQe=((e={},t={})=>(t.locale??q())===`fr`?bQe(e):xQe(e)),CQe=()=>`Compacter le contexte ?`,wQe=()=>`Compact the context?`,TQe=((e={},t={})=>(t.locale??q())===`fr`?CQe(e):wQe(e)),EQe=()=>`L’agent résume la conversation pour libérer de l’espace dans la fenêtre de contexte. Les messages restent visibles ici.`,DQe=()=>`The agent summarizes the conversation to free space in the context window. Messages stay visible here.`,OQe=((e={},t={})=>(t.locale??q())===`fr`?EQe(e):DQe(e)),kQe=()=>`Compacter`,AQe=()=>`Compact`,jQe=((e={},t={})=>(t.locale??q())===`fr`?kQe(e):AQe(e)),MQe=()=>`Réinitialiser la session`,NQe=()=>`Reset the session`,PQe=((e={},t={})=>(t.locale??q())===`fr`?MQe(e):NQe(e)),FQe=()=>`Réinitialiser la session ?`,IQe=()=>`Reset the session?`,LQe=((e={},t={})=>(t.locale??q())===`fr`?FQe(e):IQe(e)),RQe=()=>`La session de l’agent repart à zéro et se réhydrate depuis la conversation au prochain message. Aucun message n’est supprimé.`,zQe=()=>`The agent session starts fresh and re-hydrates from the conversation on the next message. No message is deleted.`,BQe=((e={},t={})=>(t.locale??q())===`fr`?RQe(e):zQe(e)),VQe=()=>`Réinitialiser`,HQe=()=>`Reset`,UQe=((e={},t={})=>(t.locale??q())===`fr`?VQe(e):HQe(e)),WQe=()=>`Demande envoyée à l’agent.`,GQe=()=>`Request sent to the agent.`,KQe=((e={},t={})=>(t.locale??q())===`fr`?WQe(e):GQe(e)),qQe=()=>`Échec de l’action.`,JQe=()=>`Action failed.`,YQe=((e={},t={})=>(t.locale??q())===`fr`?qQe(e):JQe(e)),XQe=()=>`Fichiers d’agent`,ZQe=()=>`Agent files`,QQe=((e={},t={})=>(t.locale??q())===`fr`?XQe(e):ZQe(e)),$Qe=()=>`Fichiers de l’espace de travail de l’agent (règles, identité, outils). La jauge mesure l’usage du budget bootstrap par fichier ; l’écriture est réservée aux administrateurs et chaque écriture est auditée.`,e$e=()=>`The agent’s workspace files (rules, identity, tools). The gauge tracks each file’s bootstrap budget usage; writing is admin-only and every write is audited.`,t$e=((e={},t={})=>(t.locale??q())===`fr`?$Qe(e):e$e(e)),n$e=()=>`Instance`,r$e=()=>`Instance`,XQ=((e={},t={})=>(t.locale??q())===`fr`?n$e(e):r$e(e)),i$e=()=>`Agent`,a$e=()=>`Agent`,o$e=((e={},t={})=>(t.locale??q())===`fr`?i$e(e):a$e(e)),s$e=()=>`Aucun agent disponible.`,c$e=()=>`No agent available.`,l$e=((e={},t={})=>(t.locale??q())===`fr`?s$e(e):c$e(e)),u$e=()=>`Aucun fichier.`,d$e=()=>`No files.`,f$e=((e={},t={})=>(t.locale??q())===`fr`?u$e(e):d$e(e)),p$e=()=>`Bridge injoignable — impossible de lister les fichiers.`,m$e=()=>`Bridge unreachable — cannot list the files.`,h$e=((e={},t={})=>(t.locale??q())===`fr`?p$e(e):m$e(e)),g$e=()=>`absent`,_$e=()=>`missing`,v$e=((e={},t={})=>(t.locale??q())===`fr`?g$e(e):_$e(e)),y$e=e=>`${e?.size} ko`,b$e=e=>`${e?.size} kB`,x$e=((e,t={})=>(t.locale??q())===`fr`?y$e(e):b$e(e)),S$e=e=>`${e?.pct} %`,C$e=e=>`${e?.pct}%`,w$e=((e,t={})=>(t.locale??q())===`fr`?S$e(e):C$e(e)),T$e=()=>`Proche de la limite bootstrap`,E$e=()=>`Near the bootstrap limit`,D$e=((e={},t={})=>(t.locale??q())===`fr`?T$e(e):E$e(e)),O$e=e=>`Budget total : ${e?.used} ko / ${e?.total} ko (${e?.pct} %)`,k$e=e=>`Total budget: ${e?.used} kB / ${e?.total} kB (${e?.pct}%)`,A$e=((e,t={})=>(t.locale??q())===`fr`?O$e(e):k$e(e)),j$e=()=>`Éditer`,M$e=()=>`Edit`,N$e=((e={},t={})=>(t.locale??q())===`fr`?j$e(e):M$e(e)),P$e=()=>`Consulter`,F$e=()=>`View`,I$e=((e={},t={})=>(t.locale??q())===`fr`?P$e(e):F$e(e)),L$e=e=>`${e?.name}`,R$e=e=>`${e?.name}`,ZQ=((e,t={})=>(t.locale??q())===`fr`?L$e(e):R$e(e)),z$e=e=>`Agent ${e?.agent} · instance ${e?.instance}`,B$e=e=>`Agent ${e?.agent} · instance ${e?.instance}`,V$e=((e,t={})=>(t.locale??q())===`fr`?z$e(e):B$e(e)),H$e=()=>`lecture seule`,U$e=()=>`read-only`,W$e=((e={},t={})=>(t.locale??q())===`fr`?H$e(e):U$e(e)),G$e=()=>`Source markdown brute — l’aperçu rendu n’est pas disponible ici.`,K$e=()=>`Raw markdown source — a rendered preview is not available here.`,q$e=((e={},t={})=>(t.locale??q())===`fr`?G$e(e):K$e(e)),J$e=e=>`${e?.count} / ${e?.max} caractères`,Y$e=e=>`${e?.count} / ${e?.max} characters`,X$e=((e,t={})=>(t.locale??q())===`fr`?J$e(e):Y$e(e)),Z$e=()=>`Enregistrer`,Q$e=()=>`Save`,$$e=((e={},t={})=>(t.locale??q())===`fr`?Z$e(e):Q$e(e)),e1e=e=>`${e?.name} enregistré.`,t1e=e=>`${e?.name} saved.`,n1e=((e,t={})=>(t.locale??q())===`fr`?e1e(e):t1e(e)),r1e=()=>`Échec de l’enregistrement.`,i1e=()=>`Save failed.`,a1e=((e={},t={})=>(t.locale??q())===`fr`?r1e(e):i1e(e)),o1e=()=>`Impossible de charger le fichier.`,s1e=()=>`Could not load the file.`,c1e=((e={},t={})=>(t.locale??q())===`fr`?o1e(e):s1e(e)),l1e=()=>`Le fichier a changé depuis le chargement. Rechargez avant d’enregistrer (vos modifications sont conservées).`,u1e=()=>`The file changed since it was loaded. Reload before saving (your edits are kept).`,d1e=((e={},t={})=>(t.locale??q())===`fr`?l1e(e):u1e(e)),f1e=()=>`Recharger`,p1e=()=>`Reload`,m1e=((e={},t={})=>(t.locale??q())===`fr`?f1e(e):p1e(e)),h1e=e=>`Écrire ${e?.name} ?`,g1e=e=>`Write ${e?.name}?`,_1e=((e,t={})=>(t.locale??q())===`fr`?h1e(e):g1e(e)),v1e=e=>`Le fichier sera écrit sur l’agent ${e?.agent}. Une révision complète avant/après est conservée.`,y1e=e=>`The file will be written to agent ${e?.agent}. A full before/after revision is kept.`,b1e=((e,t={})=>(t.locale??q())===`fr`?v1e(e):y1e(e)),x1e=e=>`${e?.added} ligne(s) ajoutée(s) · ${e?.removed} ligne(s) retirée(s)`,S1e=e=>`${e?.added} line(s) added · ${e?.removed} line(s) removed`,C1e=((e,t={})=>(t.locale??q())===`fr`?x1e(e):S1e(e)),w1e=()=>`Ajoutées (extrait) :`,T1e=()=>`Added (sample):`,E1e=((e={},t={})=>(t.locale??q())===`fr`?w1e(e):T1e(e)),D1e=()=>`Retirées (extrait) :`,O1e=()=>`Removed (sample):`,k1e=((e={},t={})=>(t.locale??q())===`fr`?D1e(e):O1e(e)),A1e=()=>`Écrire le fichier`,j1e=()=>`Write the file`,M1e=((e={},t={})=>(t.locale??q())===`fr`?A1e(e):j1e(e)),N1e=()=>`Défauts de chat`,P1e=()=>`Chat defaults`,F1e=((e={},t={})=>(t.locale??q())===`fr`?N1e(e):P1e(e)),I1e=()=>`Réglages par défaut des nouvelles sessions de chat, lus depuis la configuration globale du gateway. Les réglages par chat et par agent restent prioritaires.`,L1e=()=>`Default settings for new chat sessions, read from the gateway’s global configuration. Per-chat and per-agent settings keep precedence.`,R1e=((e={},t={})=>(t.locale??q())===`fr`?I1e(e):L1e(e)),z1e=()=>`Réflexion par défaut`,B1e=()=>`Default thinking`,V1e=((e={},t={})=>(t.locale??q())===`fr`?z1e(e):B1e(e)),H1e=()=>`Niveau de raisonnement appliqué quand un chat ne définit pas le sien.`,U1e=()=>`Reasoning level applied when a chat does not set its own.`,W1e=((e={},t={})=>(t.locale??q())===`fr`?H1e(e):U1e(e)),G1e=()=>`Vitesse par défaut`,K1e=()=>`Default speed`,q1e=((e={},t={})=>(t.locale??q())===`fr`?G1e(e):K1e(e)),J1e=()=>`Mode rapide ou standard appliqué quand un chat ne définit pas le sien.`,Y1e=()=>`Fast or standard mode applied when a chat does not set its own.`,X1e=((e={},t={})=>(t.locale??q())===`fr`?J1e(e):Y1e(e)),Z1e=()=>`Bridge injoignable — impossible de lire les défauts globaux.`,Q1e=()=>`Bridge unreachable — cannot read the global defaults.`,$1e=((e={},t={})=>(t.locale??q())===`fr`?Z1e(e):Q1e(e)),e0e=()=>`Enregistrer`,t0e=()=>`Save`,n0e=((e={},t={})=>(t.locale??q())===`fr`?e0e(e):t0e(e)),r0e=()=>`Défauts globaux enregistrés.`,i0e=()=>`Global defaults saved.`,a0e=((e={},t={})=>(t.locale??q())===`fr`?r0e(e):i0e(e)),o0e=()=>`Échec de l’écriture des défauts globaux.`,s0e=()=>`Failed to write the global defaults.`,c0e=((e={},t={})=>(t.locale??q())===`fr`?o0e(e):s0e(e)),l0e=()=>`Ces valeurs sont écrites dans openclaw.json, la configuration globale de l’instance — elles s’appliquent à tous les utilisateurs.`,u0e=()=>`These values are written to openclaw.json, the instance’s global configuration — they apply to every user.`,d0e=((e={},t={})=>(t.locale??q())===`fr`?l0e(e):u0e(e)),f0e=()=>`Modifier les défauts globaux ?`,p0e=()=>`Change the global defaults?`,m0e=((e={},t={})=>(t.locale??q())===`fr`?f0e(e):p0e(e)),h0e=()=>`Cette écriture modifie openclaw.json pour toute l’instance : tous les chats qui héritent du défaut changeront de comportement.`,g0e=()=>`This write changes openclaw.json for the whole instance: every chat inheriting the default will change behavior.`,_0e=((e={},t={})=>(t.locale??q())===`fr`?h0e(e):g0e(e)),v0e=()=>`Modifier`,y0e=()=>`Change`,b0e=((e={},t={})=>(t.locale??q())===`fr`?v0e(e):y0e(e)),x0e=()=>`Compatibilité`,S0e=()=>`Compatibility`,C0e=((e={},t={})=>(t.locale??q())===`fr`?x0e(e):S0e(e)),w0e=()=>`Aucun relevé de compatibilité pour l’instant — le sondage tourne toutes les 5 minutes.`,T0e=()=>`No compatibility reading yet — the poll runs every 5 minutes.`,E0e=((e={},t={})=>(t.locale??q())===`fr`?w0e(e):T0e(e)),D0e=()=>`Protocole :`,O0e=()=>`Protocol:`,k0e=((e={},t={})=>(t.locale??q())===`fr`?D0e(e):O0e(e)),A0e=()=>`inconnue`,j0e=()=>`unknown`,QQ=((e={},t={})=>(t.locale??q())===`fr`?A0e(e):j0e(e)),M0e=()=>`Dernier sondage en échec — affichage du dernier relevé valide.`,N0e=()=>`Last poll failed — showing the last good reading.`,P0e=((e={},t={})=>(t.locale??q())===`fr`?M0e(e):N0e(e)),F0e=()=>`Ce bridge ne publie pas de manifeste de compatibilité (version antérieure) — politique héritée : seuls le modèle et la réflexion sont proposés.`,I0e=()=>`This bridge does not publish a compatibility manifest (older version) — legacy policy: only model and reasoning are offered.`,L0e=((e={},t={})=>(t.locale??q())===`fr`?F0e(e):I0e(e)),R0e=()=>`OpenClaw supporté :`,z0e=()=>`OpenClaw supported:`,B0e=((e={},t={})=>(t.locale??q())===`fr`?R0e(e):z0e(e)),V0e=e=>`de ${e?.min} à ${e?.max} (validé)`,H0e=e=>`from ${e?.min} to ${e?.max} (validated)`,U0e=((e,t={})=>(t.locale??q())===`fr`?V0e(e):H0e(e)),W0e=()=>`1 version validée`,G0e=()=>`1 validated version`,K0e=((e={},t={})=>(t.locale??q())===`fr`?W0e(e):G0e(e)),q0e=e=>`${e?.count} versions validées`,J0e=e=>`${e?.count} validated versions`,Y0e=((e,t={})=>(t.locale??q())===`fr`?q0e(e):J0e(e)),X0e=()=>`Validées au banc`,Z0e=()=>`Bench-validated`,Q0e=((e={},t={})=>(t.locale??q())===`fr`?X0e(e):Z0e(e)),$0e=()=>`Aucune connexion connue du relevé de compatibilité.`,e2e=()=>`No connection known to the compatibility reading.`,t2e=((e={},t={})=>(t.locale??q())===`fr`?$0e(e):e2e(e)),n2e=()=>`✓ dans le support`,r2e=()=>`✓ within support`,i2e=((e={},t={})=>(t.locale??q())===`fr`?n2e(e):r2e(e)),a2e=()=>`⚠ au-delà du validé`,o2e=()=>`⚠ beyond validated`,s2e=((e={},t={})=>(t.locale??q())===`fr`?a2e(e):o2e(e)),c2e=()=>`? inconnue`,l2e=()=>`? unknown`,u2e=((e={},t={})=>(t.locale??q())===`fr`?c2e(e):l2e(e)),d2e=()=>`Hermes : adaptateur à venir.`,f2e=()=>`Hermes: adapter coming.`,p2e=((e={},t={})=>(t.locale??q())===`fr`?d2e(e):f2e(e)),m2e=e=>`Non supporté par cette instance (version gateway ${e?.version}).`,h2e=e=>`Not supported by this instance (gateway version ${e?.version}).`,g2e=((e,t={})=>(t.locale??q())===`fr`?m2e(e):h2e(e)),_2e=()=>`Non supporté par cette instance (version gateway inconnue).`,v2e=()=>`Not supported by this instance (unknown gateway version).`,y2e=((e={},t={})=>(t.locale??q())===`fr`?_2e(e):v2e(e)),$Q=(0,N.createContext)({label:`Atrium`,logoUrl:null,isDefault:!0,initials:`A`,agentName:null,agentEmoji:null});function e$(){return(0,N.useContext)($Q)}function b2e(e){return e.agentName??e.label}function x2e(e){return e.agentName?oq({name:e.agentName}):rq({name:e.label})}var S2e={user:OBe(),assistant:`OpenClaw`,system:jBe()},C2e=PBe();function t$(e){return new Date(e).toISOString().slice(0,16).replace(`T`,` `)+` UTC`}function n$(e){return e?e.filter(e=>e.kind===`file`||e.kind===`media`).map(e=>e.filename).filter(e=>typeof e==`string`&&e.length>0):[]}function w2e(e,t={}){let n=[];n.push(`# ${t.title?.trim()||EQ()}`),t.exportedAt!=null&&(n.push(``),n.push(`_${zBe({date:t$(t.exportedAt)})}_`)),t.truncated&&(n.push(``),n.push(C2e));for(let t of e){n.push(``),n.push(`## ${S2e[t.role]} · ${t$(t.createdAt)}`);let e=t.text.trim();e.length>0&&(n.push(``),n.push(e));for(let e of n$(t.parts))n.push(``),n.push(HBe({name:e}))}return n.join(`
|
|
127
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return N.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},Wx=Ax,Gx=jx,Kx=Mx,qx=Px,Jx=Bx,Yx=Hx,Xx=Ix,Zx=Rx;function Qx(e){let t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function $x(e){let[t,n]=N.useState(void 0);return Gy(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var eS=`Checkbox`,[tS,Doe]=Uy(eS),[nS,rS]=tS(eS);function iS(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=Ky({prop:n,defaultProp:i??!1,onChange:c,caller:eS}),[m,h]=N.useState(null),[g,_]=N.useState(null),v=N.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:pS(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,I.jsx)(nS,{scope:t,...b,children:fS(d)?d(b):r})}var aS=`CheckboxTrigger`,oS=N.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=rS(aS,e),h=yy(i,u),g=N.useRef(c);return N.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,I.jsx)(Oy.button,{type:`button`,role:`checkbox`,"aria-checked":pS(c)?`mixed`:c,"aria-required":l,"data-state":mS(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:K(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:K(n,e=>{d(e=>pS(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});oS.displayName=aS;var sS=N.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,I.jsx)(iS,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(oS,{...d,ref:t,__scopeCheckbox:n}),e&&(0,I.jsx)(dS,{__scopeCheckbox:n})]})})});sS.displayName=eS;var cS=`CheckboxIndicator`,lS=N.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=rS(cS,n);return(0,I.jsx)(qy,{present:r||pS(a.checked)||a.checked===!0,children:(0,I.jsx)(Oy.span,{"data-state":mS(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});lS.displayName=cS;var uS=`CheckboxBubbleInput`,dS=N.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=rS(uS,e),m=yy(n,p),h=Qx(a),g=$x(r);N.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=pS(a),n.call(e,pS(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=N.useRef(pS(a)?!1:a);return(0,I.jsx)(Oy.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});dS.displayName=uS;function fS(e){return typeof e==`function`}function pS(e){return e===`indeterminate`}function mS(e){return pS(e)?`indeterminate`:e?`checked`:`unchecked`}var hS=[`top`,`right`,`bottom`,`left`],gS=Math.min,_S=Math.max,vS=Math.round,yS=Math.floor,bS=e=>({x:e,y:e}),Ooe={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function xS(e,t,n){return _S(e,gS(t,n))}function SS(e,t){return typeof e==`function`?e(t):e}function CS(e){return e.split(`-`)[0]}function wS(e){return e.split(`-`)[1]}function TS(e){return e===`x`?`y`:`x`}function ES(e){return e===`y`?`height`:`width`}function DS(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function OS(e){return TS(DS(e))}function koe(e,t,n){n===void 0&&(n=!1);let r=wS(e),i=OS(e),a=ES(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=MS(o)),[o,MS(o)]}function Aoe(e){let t=MS(e);return[kS(e),t,kS(t)]}function kS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var AS=[`left`,`right`],jS=[`right`,`left`],joe=[`top`,`bottom`],Moe=[`bottom`,`top`];function Noe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?jS:AS:t?AS:jS;case`left`:case`right`:return t?joe:Moe;default:return[]}}function Poe(e,t,n,r){let i=wS(e),a=Noe(CS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(kS)))),a}function MS(e){let t=CS(e);return Ooe[t]+e.slice(t.length)}function Foe(e){return{top:0,right:0,bottom:0,left:0,...e}}function NS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Foe(e)}function PS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function FS(e,t,n){let{reference:r,floating:i}=e,a=DS(t),o=OS(t),s=ES(o),c=CS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(wS(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Ioe(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=SS(t,e),p=NS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=PS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=PS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Loe=50,Roe=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Ioe},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=FS(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Loe&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=FS(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},zoe=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=SS(e,t)||{};if(l==null)return{};let d=NS(u),f={x:n,y:r},p=OS(i),m=ES(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=gS(d[_],T),D=gS(d[v],T),O=E,ee=C-h[m]-D,te=C/2-h[m]/2+w,k=xS(O,te,ee),A=!c.arrow&&wS(i)!=null&&te!==k&&a.reference[m]/2-(te<O?E:D)-h[m]/2<0,j=A?te<O?te-O:te-ee:0;return{[p]:f[p]+j,data:{[p]:k,centerOffset:te-k-j,...A&&{alignmentOffset:j}},reset:A}}}),Boe=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=SS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=CS(r),_=DS(o),v=CS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[MS(o)]:Aoe(o)),x=p!==`none`;!d&&x&&b.push(...Poe(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=koe(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==DS(t))||T.every(e=>DS(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=DS(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function IS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LS(e){return hS.some(t=>e[t]>=0)}var Voe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=SS(e,t);switch(i){case`referenceHidden`:{let e=IS(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:LS(e)}}}case`escaped`:{let e=IS(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:LS(e)}}}default:return{}}}}},RS=new Set([`left`,`top`]);async function Hoe(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=CS(n),s=wS(n),c=DS(n)===`y`,l=RS.has(o)?-1:1,u=a&&c?-1:1,d=SS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Uoe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Hoe(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Woe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=SS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=DS(CS(i)),p=TS(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=xS(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=xS(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Goe=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=SS(e,t),u={x:n,y:r},d=DS(i),f=TS(d),p=u[f],m=u[d],h=SS(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=RS.has(CS(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Koe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=SS(e,t),u=await o.detectOverflow(t,l),d=CS(i),f=wS(i),p=DS(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=gS(h-u[g],v),x=gS(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=_S(u.left,0),t=_S(u.right,0),n=_S(u.top,0),r=_S(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:_S(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:_S(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function zS(){return typeof window<`u`}function BS(e){return US(e)?(e.nodeName||``).toLowerCase():`#document`}function VS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function HS(e){return((US(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function US(e){return zS()?e instanceof Node||e instanceof VS(e).Node:!1}function WS(e){return zS()?e instanceof Element||e instanceof VS(e).Element:!1}function GS(e){return zS()?e instanceof HTMLElement||e instanceof VS(e).HTMLElement:!1}function KS(e){return!zS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof VS(e).ShadowRoot}function qS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=eC(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function qoe(e){return/^(table|td|th)$/.test(BS(e))}function JS(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Joe=/transform|translate|scale|rotate|perspective|filter/,Yoe=/paint|layout|strict|content/,YS=e=>!!e&&e!==`none`,XS;function ZS(e){let t=WS(e)?eC(e):e;return YS(t.transform)||YS(t.translate)||YS(t.scale)||YS(t.rotate)||YS(t.perspective)||!QS()&&(YS(t.backdropFilter)||YS(t.filter))||Joe.test(t.willChange||``)||Yoe.test(t.contain||``)}function Xoe(e){let t=nC(e);for(;GS(t)&&!$S(t);){if(ZS(t))return t;if(JS(t))return null;t=nC(t)}return null}function QS(){return XS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),XS}function $S(e){return/^(html|body|#document)$/.test(BS(e))}function eC(e){return VS(e).getComputedStyle(e)}function tC(e){return WS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nC(e){if(BS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||KS(e)&&e.host||HS(e);return KS(t)?t.host:t}function rC(e){let t=nC(e);return $S(t)?e.ownerDocument?e.ownerDocument.body:e.body:GS(t)&&qS(t)?t:rC(t)}function iC(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=rC(e),i=r===e.ownerDocument?.body,a=VS(r);if(i){let e=aC(a);return t.concat(a,a.visualViewport||[],qS(r)?r:[],e&&n?iC(e):[])}else return t.concat(r,iC(r,[],n))}function aC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oC(e){let t=eC(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=GS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=vS(n)!==a||vS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function sC(e){return WS(e)?e:e.contextElement}function cC(e){let t=sC(e);if(!GS(t))return bS(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=oC(t),o=(a?vS(n.width):n.width)/r,s=(a?vS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Zoe=bS(0);function lC(e){let t=VS(e);return!QS()||!t.visualViewport?Zoe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qoe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==VS(e)?!1:t}function uC(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=sC(e),o=bS(1);t&&(r?WS(r)&&(o=cC(r)):o=cC(e));let s=Qoe(a,n,r)?lC(a):bS(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=VS(a),t=r&&WS(r)?VS(r):r,n=e,i=aC(n);for(;i&&r&&t!==n;){let e=cC(i),t=i.getBoundingClientRect(),r=eC(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=VS(i),i=aC(n)}}return PS({width:u,height:d,x:c,y:l})}function dC(e,t){let n=tC(e).scrollLeft;return t?t.left+n:uC(HS(e)).left+n}function fC(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-dC(e,n),y:n.top+t.scrollTop}}function $oe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=HS(r),s=t?JS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=bS(1),u=bS(0),d=GS(r);if((d||!d&&!a)&&((BS(r)!==`body`||qS(o))&&(c=tC(r)),d)){let e=uC(r);l=cC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?fC(o,c):bS(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ese(e){return Array.from(e.getClientRects())}function tse(e){let t=HS(e),n=tC(e),r=e.ownerDocument.body,i=_S(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_S(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+dC(e),s=-n.scrollTop;return eC(r).direction===`rtl`&&(o+=_S(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var pC=25;function nse(e,t){let n=VS(e),r=HS(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=QS();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=dC(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=pC&&(a-=o)}else l<=pC&&(a+=l);return{width:a,height:o,x:s,y:c}}function rse(e,t){let n=uC(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=GS(e)?cC(e):bS(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mC(e,t,n){let r;if(t===`viewport`)r=nse(e,n);else if(t===`document`)r=tse(HS(e));else if(WS(t))r=rse(t,n);else{let n=lC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return PS(r)}function hC(e,t){let n=nC(e);return n===t||!WS(n)||$S(n)?!1:eC(n).position===`fixed`||hC(n,t)}function ise(e,t){let n=t.get(e);if(n)return n;let r=iC(e,[],!1).filter(e=>WS(e)&&BS(e)!==`body`),i=null,a=eC(e).position===`fixed`,o=a?nC(e):e;for(;WS(o)&&!$S(o);){let t=eC(o),n=ZS(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||qS(o)&&!n&&hC(e,o))?r=r.filter(e=>e!==o):i=t,o=nC(o)}return t.set(e,r),r}function ase(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?JS(t)?[]:ise(t,this._c):[].concat(n),r],o=mC(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=mC(t,a[e],i);s=_S(n.top,s),c=gS(n.right,c),l=gS(n.bottom,l),u=_S(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ose(e){let{width:t,height:n}=oC(e);return{width:t,height:n}}function sse(e,t,n){let r=GS(t),i=HS(t),a=n===`fixed`,o=uC(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=bS(0);function l(){c.x=dC(i)}if(r||!r&&!a)if((BS(t)!==`body`||qS(i))&&(s=tC(t)),r){let e=uC(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?fC(i,s):bS(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function gC(e){return eC(e).position===`static`}function _C(e,t){if(!GS(e)||eC(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return HS(e)===n&&(n=n.ownerDocument.body),n}function vC(e,t){let n=VS(e);if(JS(e))return n;if(!GS(e)){let t=nC(e);for(;t&&!$S(t);){if(WS(t)&&!gC(t))return t;t=nC(t)}return n}let r=_C(e,t);for(;r&&qoe(r)&&gC(r);)r=_C(r,t);return r&&$S(r)&&gC(r)&&!ZS(r)?n:r||Xoe(e)||n}var cse=async function(e){let t=this.getOffsetParent||vC,n=this.getDimensions,r=await n(e.floating);return{reference:sse(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lse(e){return eC(e).direction===`rtl`}var use={convertOffsetParentRelativeRectToViewportRelativeRect:$oe,getDocumentElement:HS,getClippingRect:ase,getOffsetParent:vC,getElementRects:cse,getClientRects:ese,getDimensions:ose,getScale:cC,isElement:WS,isRTL:lse};function yC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dse(e,t){let n=null,r,i=HS(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=yS(d),h=yS(i.clientWidth-(u+f)),g=yS(i.clientHeight-(d+p)),_=yS(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:_S(0,gS(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!yC(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function fse(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=sC(e),u=i||a?[...l?iC(l):[],...t?iC(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?dse(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?uC(e):null;c&&g();function g(){let t=uC(e);h&&!yC(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var pse=Uoe,mse=Woe,hse=Boe,gse=Koe,_se=Voe,bC=zoe,vse=Goe,yse=(e,t,n)=>{let r=new Map,i={platform:use,...n},a={...i.platform,_c:r};return Roe(e,t,{...i,platform:a})},xC=typeof document<`u`?N.useLayoutEffect:function(){};function SC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!SC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!SC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function CC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wC(e,t){let n=CC(e);return Math.round(t*n)/n}function TC(e){let t=N.useRef(e);return xC(()=>{t.current=e}),t}function bse(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=N.useState(r);SC(f,r)||p(r);let[m,h]=N.useState(null),[g,_]=N.useState(null),v=N.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=N.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=N.useRef(null),C=N.useRef(null),w=N.useRef(u),T=c!=null,E=TC(c),D=TC(i),O=TC(l),ee=N.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),yse(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};te.current&&!SC(w.current,t)&&(w.current=t,ls.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);xC(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=N.useRef(!1);xC(()=>(te.current=!0,()=>{te.current=!1}),[]),xC(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,ee);ee()}},[b,x,ee,E,T]);let k=N.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),A=N.useMemo(()=>({reference:b,floating:x}),[b,x]),j=N.useMemo(()=>{let e={position:n,left:0,top:0};if(!A.floating)return e;let t=wC(A.floating,u.x),r=wC(A.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...CC(A.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,A.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:ee,refs:k,elements:A,floatingStyles:j}),[u,ee,k,A,j])}var xse=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:bC({element:r.current,padding:i}).fn(n):r?bC({element:r,padding:i}).fn(n):{}}}},Sse=(e,t)=>{let n=pse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cse=(e,t)=>{let n=mse(e);return{name:n.name,fn:n.fn,options:[e,t]}},wse=(e,t)=>({fn:vse(e).fn,options:[e,t]}),Tse=(e,t)=>{let n=hse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ese=(e,t)=>{let n=gse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dse=(e,t)=>{let n=_se(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ose=(e,t)=>{let n=xse(e);return{name:n.name,fn:n.fn,options:[e,t]}},kse=`Arrow`,EC=N.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,I.jsx)(Oy.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,I.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});EC.displayName=kse;var Ase=EC,DC=`Popper`,[OC,kC]=Uy(DC),[jse,AC]=OC(DC),jC=e=>{let{__scopePopper:t,children:n}=e,[r,i]=N.useState(null),[a,o]=N.useState(void 0);return(0,I.jsx)(jse,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};jC.displayName=DC;var MC=`PopperAnchor`,NC=N.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=AC(MC,n),o=N.useRef(null),s=a.onAnchorChange,c=yy(t,N.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=N.useRef(null);N.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&RC(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,I.jsx)(Oy.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});NC.displayName=MC;var PC=`PopperContent`,[Mse,Nse]=OC(PC),FC=N.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l,collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=AC(PC,n),[_,v]=N.useState(null),y=yy(t,e=>v(e)),[b,x]=N.useState(null),S=$x(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=l?Array.isArray(l)?l:[l]:void 0,O=D!==void 0&&D.length>0,ee={padding:E,boundary:D?.filter(Fse),altBoundary:O},{refs:te,floatingStyles:k,placement:A,isPositioned:j,middlewareData:ne}=bse({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>fse(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Sse({mainAxis:i+w,alignmentAxis:o}),c&&Cse({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?wse():void 0,...ee}),c&&Tse({...ee}),Ese({...ee,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Ose({element:b,padding:s}),Ise({arrowWidth:C,arrowHeight:w}),f&&Dse({strategy:`referenceHidden`,...ee})]}),re=g.setPlacementState;Gy(()=>(re(A),()=>{re(void 0)}),[A,re]);let[M,ie]=RC(A),ae=Py(m);Gy(()=>{j&&ae?.()},[j,ae]);let oe=ne.arrow?.x,se=ne.arrow?.y,ce=ne.arrow?.centerOffset!==0,[le,ue]=N.useState();return Gy(()=>{_&&ue(window.getComputedStyle(_).zIndex)},[_]),(0,I.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...k,transform:j?k.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:le,"--radix-popper-transform-origin":[ne.transformOrigin?.x,ne.transformOrigin?.y].join(` `),...ne.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,I.jsx)(Mse,{scope:n,placedSide:M,placedAlign:ie,onArrowChange:x,arrowX:oe,arrowY:se,shouldHideArrow:ce,children:(0,I.jsx)(Oy.div,{"data-side":M,"data-align":ie,...h,ref:y,style:{...h.style,animation:j?void 0:`none`}})})})});FC.displayName=PC;var IC=`PopperArrow`,Pse={top:`bottom`,right:`left`,bottom:`top`,left:`right`},LC=N.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Nse(IC,n),a=Pse[i.placedSide];return(0,I.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,I.jsx)(Ase,{...r,ref:t,style:{...r.style,display:`block`}})})});LC.displayName=IC;function Fse(e){return e!==null}var Ise=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=RC(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function RC(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var zC=jC,BC=NC,VC=FC,HC=LC,UC=`rovingFocusGroup.onEntryFocus`,Lse={bubbles:!1,cancelable:!0},WC=`RovingFocusGroup`,[GC,KC,Rse]=Wy(WC),[zse,qC]=Uy(WC,[Rse]),[Bse,Vse]=zse(WC),JC=N.forwardRef((e,t)=>(0,I.jsx)(GC.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(GC.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Hse,{...e,ref:t})})}));JC.displayName=WC;var Hse=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=N.useRef(null),p=yy(t,f),m=Zy(a),[h,g]=Ky({prop:o,defaultProp:s??null,onChange:c,caller:WC}),[_,v]=N.useState(!1),y=Py(l),b=KC(n),x=N.useRef(!1),[S,C]=N.useState(0);return N.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(UC,y),()=>e.removeEventListener(UC,y)},[y]),(0,I.jsx)(Bse,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:N.useCallback(e=>g(e),[g]),onItemShiftTab:N.useCallback(()=>v(!0),[]),onFocusableItemAdd:N.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:N.useCallback(()=>C(e=>e-1),[]),children:(0,I.jsx)(Oy.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:K(e.onMouseDown,()=>{x.current=!0}),onFocus:K(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(UC,Lse);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);ZC([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:K(e.onBlur,()=>v(!1))})})}),YC=`RovingFocusGroupItem`,XC=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Xy(),l=a||c,u=Vse(YC,n),d=u.currentTabStopId===l,f=KC(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return N.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,I.jsx)(GC.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(Oy.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:K(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:K(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:K(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Gse(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Kse(n,r+1):n.slice(r+1)}setTimeout(()=>ZC(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});XC.displayName=YC;var Use={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Wse(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Gse(e,t,n){let r=Wse(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Use[r]}function ZC(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Kse(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var QC=JC,$C=XC,ew=[`Enter`,` `],qse=[`ArrowDown`,`PageUp`,`Home`],tw=[`ArrowUp`,`PageDown`,`End`],Jse=[...qse,...tw],Yse={ltr:[...ew,`ArrowRight`],rtl:[...ew,`ArrowLeft`]},Xse={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},nw=`Menu`,[rw,Zse,Qse]=Wy(nw),[iw,aw]=Uy(nw,[Qse,kC,qC]),ow=kC(),sw=qC(),[cw,lw]=iw(nw),[$se,uw]=iw(nw),dw=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=ow(t),[c,l]=N.useState(null),u=N.useRef(!1),d=Py(a),f=Zy(i);return N.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,I.jsx)(zC,{...s,children:(0,I.jsx)(cw,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,I.jsx)($se,{scope:t,onClose:N.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};dw.displayName=nw;var ece=`MenuAnchor`,fw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=ow(n);return(0,I.jsx)(BC,{...i,...r,ref:t})});fw.displayName=ece;var pw=`MenuPortal`,[tce,mw]=iw(pw,{forceMount:void 0}),hw=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=lw(pw,t);return(0,I.jsx)(tce,{scope:t,forceMount:n,children:(0,I.jsx)(qy,{present:n||a.open,children:(0,I.jsx)(pb,{asChild:!0,container:i,children:r})})})};hw.displayName=pw;var gw=`MenuContent`,[nce,_w]=iw(gw),vw=N.forwardRef((e,t)=>{let n=mw(gw,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=lw(gw,e.__scopeMenu),o=uw(gw,e.__scopeMenu);return(0,I.jsx)(rw.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(qy,{present:r||a.open,children:(0,I.jsx)(rw.Slot,{scope:e.__scopeMenu,children:o.modal?(0,I.jsx)(rce,{...i,ref:t}):(0,I.jsx)(ice,{...i,ref:t})})})})}),rce=N.forwardRef((e,t)=>{let n=lw(gw,e.__scopeMenu),r=N.useRef(null),i=yy(t,r);return N.useEffect(()=>{let e=r.current;if(e)return Xb(e)},[]),(0,I.jsx)(yw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ice=N.forwardRef((e,t)=>{let n=lw(gw,e.__scopeMenu);return(0,I.jsx)(yw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ace=Sy(`MenuContent.ScrollLock`),yw=N.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=lw(gw,n),_=uw(gw,n),v=ow(n),y=sw(n),b=Zse(n),[x,S]=N.useState(null),C=N.useRef(null),w=yy(t,C,g.onContentChange),T=N.useRef(0),E=N.useRef(``),D=N.useRef(0),O=N.useRef(null),ee=N.useRef(`right`),te=N.useRef(0),k=m?Wb:N.Fragment,A=m?{as:ace,allowPinchZoom:!0}:void 0,j=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=vce(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};N.useEffect(()=>()=>window.clearTimeout(T.current),[]),gb();let ne=N.useCallback(e=>ee.current===O.current?.side&&bce(e,O.current?.area),[]);return(0,I.jsx)(nce,{scope:n,searchRef:E,onItemEnter:N.useCallback(e=>{ne(e)&&e.preventDefault()},[ne]),onItemLeave:N.useCallback(e=>{ne(e)||(C.current?.focus(),S(null))},[ne]),onTriggerLeave:N.useCallback(e=>{ne(e)&&e.preventDefault()},[ne]),pointerGraceTimerRef:D,onPointerGraceIntentChange:N.useCallback(e=>{O.current=e},[]),children:(0,I.jsx)(k,{...A,children:(0,I.jsx)(sb,{asChild:!0,trapped:i,onMountAutoFocus:K(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,I.jsx)(tb,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,I.jsx)(QC,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:K(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,I.jsx)(VC,{role:`menu`,"aria-orientation":`vertical`,"data-state":Hw(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:K(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&j(e.key));let i=C.current;if(e.target!==i||!Jse.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);tw.includes(e.key)&&a.reverse(),gce(a)}),onBlur:K(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:K(e.onPointerMove,Gw(e=>{let t=e.target,n=te.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ee.current=e.clientX>te.current?`right`:`left`,te.current=e.clientX)}))})})})})})})});vw.displayName=gw;var oce=`MenuGroup`,bw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Oy.div,{role:`group`,...r,ref:t})});bw.displayName=oce;var sce=`MenuLabel`,xw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Oy.div,{...r,ref:t})});xw.displayName=sce;var Sw=`MenuItem`,Cw=`menu.itemSelect`,ww=N.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=N.useRef(null),o=uw(Sw,e.__scopeMenu),s=_w(Sw,e.__scopeMenu),c=yy(t,a),l=N.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Cw,{bubbles:!0,cancelable:!0});e.addEventListener(Cw,e=>r?.(e),{once:!0}),ky(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,I.jsx)(Tw,{...i,ref:c,disabled:n,onClick:K(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:K(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:K(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||ew.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ww.displayName=Sw;var Tw=N.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=_w(Sw,n),s=sw(n),c=N.useRef(null),l=yy(t,c),[u,d]=N.useState(!1),[f,p]=N.useState(``);return N.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,I.jsx)(rw.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,I.jsx)($C,{asChild:!0,...s,focusable:!r,children:(0,I.jsx)(Oy.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:K(e.onPointerMove,Gw(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Gw(e=>o.onItemLeave(e))),onFocus:K(e.onFocus,()=>d(!0)),onBlur:K(e.onBlur,()=>d(!1))})})})}),cce=`MenuCheckboxItem`,Ew=N.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,I.jsx)(Mw,{scope:e.__scopeMenu,checked:n,children:(0,I.jsx)(ww,{role:`menuitemcheckbox`,"aria-checked":Uw(n)?`mixed`:n,...i,ref:t,"data-state":Ww(n),onSelect:K(i.onSelect,()=>r?.(Uw(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ew.displayName=cce;var Dw=`MenuRadioGroup`,[lce,uce]=iw(Dw,{value:void 0,onValueChange:()=>{}}),Ow=N.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Py(r);return(0,I.jsx)(lce,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,I.jsx)(bw,{...i,ref:t})})});Ow.displayName=Dw;var kw=`MenuRadioItem`,Aw=N.forwardRef((e,t)=>{let{value:n,...r}=e,i=uce(kw,e.__scopeMenu),a=n===i.value;return(0,I.jsx)(Mw,{scope:e.__scopeMenu,checked:a,children:(0,I.jsx)(ww,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Ww(a),onSelect:K(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Aw.displayName=kw;var jw=`MenuItemIndicator`,[Mw,dce]=iw(jw,{checked:!1}),Nw=N.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=dce(jw,n);return(0,I.jsx)(qy,{present:r||Uw(a.checked)||a.checked===!0,children:(0,I.jsx)(Oy.span,{...i,ref:t,"data-state":Ww(a.checked)})})});Nw.displayName=jw;var fce=`MenuSeparator`,Pw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Oy.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Pw.displayName=fce;var pce=`MenuArrow`,Fw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=ow(n);return(0,I.jsx)(HC,{...i,...r,ref:t})});Fw.displayName=pce;var Iw=`MenuSub`,[mce,Lw]=iw(Iw),hce=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=lw(Iw,t),o=ow(t),[s,c]=N.useState(null),[l,u]=N.useState(null),d=Py(i);return N.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,I.jsx)(zC,{...o,children:(0,I.jsx)(cw,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,I.jsx)(mce,{scope:t,contentId:Xy(),triggerId:Xy(),trigger:s,onTriggerChange:c,children:n})})})};hce.displayName=Iw;var Rw=`MenuSubTrigger`,zw=N.forwardRef((e,t)=>{let n=lw(Rw,e.__scopeMenu),r=uw(Rw,e.__scopeMenu),i=Lw(Rw,e.__scopeMenu),a=_w(Rw,e.__scopeMenu),o=N.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=N.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return N.useEffect(()=>u,[u]),N.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,I.jsx)(fw,{asChild:!0,...l,children:(0,I.jsx)(Tw,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Hw(n.open),...e,ref:vy(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Gw(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:K(e.onPointerLeave,Gw(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Yse[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});zw.displayName=Rw;var Bw=`MenuSubContent`,Vw=N.forwardRef((e,t)=>{let n=mw(gw,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=lw(gw,e.__scopeMenu),s=uw(gw,e.__scopeMenu),c=Lw(Bw,e.__scopeMenu),l=N.useRef(null),u=yy(t,l);return(0,I.jsx)(rw.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(qy,{present:r||o.open,children:(0,I.jsx)(rw.Slot,{scope:e.__scopeMenu,children:(0,I.jsx)(yw,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:K(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Xse[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Vw.displayName=Bw;function Hw(e){return e?`open`:`closed`}function Uw(e){return e===`indeterminate`}function Ww(e){return Uw(e)?`indeterminate`:e?`checked`:`unchecked`}function gce(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function _ce(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function vce(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=_ce(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function yce(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function bce(e,t){return t?yce({x:e.clientX,y:e.clientY},t):!1}function Gw(e){return t=>t.pointerType===`mouse`?e(t):void 0}var xce=dw,Sce=fw,Cce=hw,wce=vw,Tce=bw,Ece=xw,Dce=ww,Oce=Ew,kce=Ow,Ace=Aw,jce=Nw,Mce=Pw,Nce=Fw,Pce=zw,Fce=Vw,Kw=`DropdownMenu`,[Ice,Lce]=Uy(Kw,[aw]),qw=aw(),[Rce,Jw]=Ice(Kw),Yw=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=qw(t),l=N.useRef(null),[u,d]=Ky({prop:i,defaultProp:a??!1,onChange:o,caller:Kw});return(0,I.jsx)(Rce,{scope:t,triggerId:Xy(),triggerRef:l,contentId:Xy(),open:u,onOpenChange:d,onOpenToggle:N.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,I.jsx)(xce,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Yw.displayName=Kw;var Xw=`DropdownMenuTrigger`,Zw=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Jw(Xw,n),o=qw(n);return(0,I.jsx)(Sce,{asChild:!0,...o,children:(0,I.jsx)(Oy.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:vy(t,a.triggerRef),onPointerDown:K(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:K(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Zw.displayName=Xw;var zce=`DropdownMenuPortal`,Qw=e=>{let{__scopeDropdownMenu:t,...n}=e,r=qw(t);return(0,I.jsx)(Cce,{...r,...n})};Qw.displayName=zce;var $w=`DropdownMenuContent`,eT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Jw($w,n),a=qw(n),o=N.useRef(!1);return(0,I.jsx)(wce,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:K(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});eT.displayName=$w;var Bce=`DropdownMenuGroup`,Vce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Tce,{...i,...r,ref:t})});Vce.displayName=Bce;var Hce=`DropdownMenuLabel`,tT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Ece,{...i,...r,ref:t})});tT.displayName=Hce;var Uce=`DropdownMenuItem`,nT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Dce,{...i,...r,ref:t})});nT.displayName=Uce;var Wce=`DropdownMenuCheckboxItem`,Gce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Oce,{...i,...r,ref:t})});Gce.displayName=Wce;var Kce=`DropdownMenuRadioGroup`,rT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(kce,{...i,...r,ref:t})});rT.displayName=Kce;var qce=`DropdownMenuRadioItem`,iT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Ace,{...i,...r,ref:t})});iT.displayName=qce;var Jce=`DropdownMenuItemIndicator`,aT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(jce,{...i,...r,ref:t})});aT.displayName=Jce;var Yce=`DropdownMenuSeparator`,oT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Mce,{...i,...r,ref:t})});oT.displayName=Yce;var Xce=`DropdownMenuArrow`,Zce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Nce,{...i,...r,ref:t})});Zce.displayName=Xce;var Qce=`DropdownMenuSubTrigger`,$ce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Pce,{...i,...r,ref:t})});$ce.displayName=Qce;var ele=`DropdownMenuSubContent`,tle=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(n);return(0,I.jsx)(Fce,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});tle.displayName=ele;var nle=Yw,rle=Zw,ile=Qw,ale=eT,ole=tT,sle=nT,cle=rT,lle=iT,ule=aT,dle=oT;function sT(e,[t,n]){return Math.min(n,Math.max(t,e))}var cT=`Popover`,[lT,fle]=Uy(cT,[kC]),uT=kC(),[ple,dT]=lT(cT),fT=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=uT(t),c=N.useRef(null),[l,u]=N.useState(!1),[d,f]=Ky({prop:r,defaultProp:i??!1,onChange:a,caller:cT});return(0,I.jsx)(zC,{...s,children:(0,I.jsx)(ple,{scope:t,contentId:Xy(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:N.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:N.useCallback(()=>u(!0),[]),onCustomAnchorRemove:N.useCallback(()=>u(!1),[]),modal:o,children:n})})};fT.displayName=cT;var pT=`PopoverAnchor`,mle=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=dT(pT,n),a=uT(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return N.useEffect(()=>(o(),()=>s()),[o,s]),(0,I.jsx)(BC,{...a,...r,ref:t})});mle.displayName=pT;var mT=`PopoverTrigger`,hT=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=dT(mT,n),a=uT(n),o=yy(t,i.triggerRef),s=(0,I.jsx)(Oy.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":ST(i.open),...r,ref:o,onClick:K(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,I.jsx)(BC,{asChild:!0,...a,children:s})});hT.displayName=mT;var gT=`PopoverPortal`,[hle,gle]=lT(gT,{forceMount:void 0}),_T=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=dT(gT,t);return(0,I.jsx)(hle,{scope:t,forceMount:n,children:(0,I.jsx)(qy,{present:n||a.open,children:(0,I.jsx)(pb,{asChild:!0,container:i,children:r})})})};_T.displayName=gT;var vT=`PopoverContent`,yT=N.forwardRef((e,t)=>{let n=gle(vT,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=dT(vT,e.__scopePopover);return(0,I.jsx)(qy,{present:r||a.open,children:a.modal?(0,I.jsx)(vle,{...i,ref:t}):(0,I.jsx)(yle,{...i,ref:t})})});yT.displayName=vT;var _le=Sy(`PopoverContent.RemoveScroll`),vle=N.forwardRef((e,t)=>{let n=dT(vT,e.__scopePopover),r=N.useRef(null),i=yy(t,r),a=N.useRef(!1);return N.useEffect(()=>{let e=r.current;if(e)return Xb(e)},[]),(0,I.jsx)(Wb,{as:_le,allowPinchZoom:!0,children:(0,I.jsx)(bT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),yle=N.forwardRef((e,t)=>{let n=dT(vT,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return(0,I.jsx)(bT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),bT=N.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=dT(vT,n),p=uT(n);return gb(),(0,I.jsx)(sb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(tb,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,I.jsx)(VC,{"data-state":ST(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),xT=`PopoverClose`,ble=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=dT(xT,n);return(0,I.jsx)(Oy.button,{type:`button`,...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})});ble.displayName=xT;var xle=`PopoverArrow`,Sle=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=uT(n);return(0,I.jsx)(HC,{...i,...r,ref:t})});Sle.displayName=xle;function ST(e){return e?`open`:`closed`}var CT=fT,wT=hT,TT=_T,ET=yT,Cle=[` `,`Enter`,`ArrowUp`,`ArrowDown`],wle=[` `,`Enter`],DT=`Select`,[OT,kT,Tle]=Wy(DT),[AT,Ele]=Uy(DT,[Tle,kC]),jT=kC(),[Dle,MT]=AT(DT),[Ole,kle]=AT(DT),Ale=`SelectProvider`;function NT(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=jT(t),[_,v]=N.useState(null),[y,b]=N.useState(null),[x,S]=N.useState(!1),C=Zy(l),[w,T]=Ky({prop:r,defaultProp:i??!1,onChange:a,caller:DT}),[E,D]=Ky({prop:o,defaultProp:s,onChange:c,caller:DT}),O=N.useRef(null),ee=_?!!m||!!_.closest(`form`):!0,[te,k]=N.useState(new Set),A=Xy(),j=Array.from(te).map(e=>e.props.value).join(`;`),ne=N.useCallback(e=>{k(t=>new Set(t).add(e))},[]),re=N.useCallback(e=>{k(t=>{let n=new Set(t);return n.delete(e),n})},[]),M={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:A,value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:te,nativeSelectKey:j,isFormControl:ee};return(0,I.jsx)(zC,{...g,children:(0,I.jsx)(Dle,{scope:t,...M,children:(0,I.jsx)(OT.Provider,{scope:t,children:(0,I.jsx)(Ole,{scope:t,onNativeOptionAdd:ne,onNativeOptionRemove:re,children:qle(h)?h(M):n})})})})}NT.displayName=Ale;var PT=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,I.jsx)(NT,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,I.jsxs)(I.Fragment,{children:[n,e?(0,I.jsx)(gE,{__scopeSelect:t}):null]})})};PT.displayName=DT;var FT=`SelectTrigger`,IT=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=jT(n),o=MT(FT,n),s=o.disabled||r,c=yy(t,o.onTriggerChange),l=kT(n),u=N.useRef(`touch`),[d,f,p]=vE(e=>{let t=l().filter(e=>!e.disabled),n=yE(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,I.jsx)(BC,{asChild:!0,...a,children:(0,I.jsx)(Oy.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":_E(o.value)?``:void 0,...i,ref:c,onClick:K(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:K(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:K(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Cle.includes(e.key)&&(m(),e.preventDefault())})})})});IT.displayName=FT;var LT=`SelectValue`,RT=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=MT(LT,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=yy(t,c.onValueNodeChange);Gy(()=>{l(u)},[l,u]);let f=_E(c.value);return(0,I.jsx)(Oy.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,I.jsx)(N.Fragment,{children:f?o:a},f?`placeholder`:`value`)})});RT.displayName=LT;var jle=`SelectIcon`,zT=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,I.jsx)(Oy.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});zT.displayName=jle;var BT=`SelectPortal`,[Mle,Nle]=AT(BT,{forceMount:void 0}),VT=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,I.jsx)(Mle,{scope:e.__scopeSelect,forceMount:n,children:(0,I.jsx)(pb,{asChild:!0,...r})})};VT.displayName=BT;var HT=`SelectContent`,UT=N.forwardRef((e,t)=>{let n=Nle(HT,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=MT(HT,e.__scopeSelect),[o,s]=N.useState();return Gy(()=>{s(new DocumentFragment)},[]),(0,I.jsx)(qy,{present:r||a.open,children:({present:e})=>e?(0,I.jsx)(JT,{...i,ref:t}):(0,I.jsx)(WT,{...i,fragment:o})})});UT.displayName=HT;var WT=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?ls.createPortal((0,I.jsx)(KT,{scope:n,children:(0,I.jsx)(OT.Slot,{scope:n,children:(0,I.jsx)(`div`,{ref:t,children:r})})}),i):null});WT.displayName=`SelectContentFragment`;var GT=10,[KT,qT]=AT(HT),Ple=`SelectContentImpl`,Fle=Sy(`SelectContent.RemoveScroll`),JT=N.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=MT(HT,n),[y,b]=N.useState(null),[x,S]=N.useState(null),C=yy(t,e=>b(e)),[w,T]=N.useState(null),[E,D]=N.useState(null),O=kT(n),[ee,te]=N.useState(!1),k=N.useRef(!1);N.useEffect(()=>{if(y)return Xb(y)},[y]),gb();let A=N.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),j=N.useCallback(()=>A([w,y]),[A,w,y]);N.useEffect(()=>{ee&&j()},[ee,j]);let{onOpenChange:ne,triggerPointerDownPosRef:re}=v;N.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(re.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||ne(!1),document.removeEventListener(`pointermove`,t),re.current=null};return re.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,ne,re]),N.useEffect(()=>{let e=()=>ne(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ne]);let[M,ie]=vE(e=>{let t=O().filter(e=>!e.disabled),n=yE(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ae=N.useCallback((e,t,n)=>{let r=!k.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(k.current=!0))},[v.value]),oe=N.useCallback(()=>y?.focus(),[y]),se=N.useCallback((e,t,n)=>{let r=!k.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),ce=r===`popper`?XT:YT,le=ce===XT?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,I.jsx)(KT,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ae,selectedItem:w,onItemLeave:oe,itemTextRefCallback:se,focusSelectedItem:j,selectedItemText:E,position:r,isPositioned:ee,searchRef:M,children:(0,I.jsx)(Wb,{as:Fle,allowPinchZoom:!0,children:(0,I.jsx)(sb,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:K(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,I.jsx)(tb,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,I.jsx)(ce,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...le,onPlaced:()=>te(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:K(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ie(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>A(t)),e.preventDefault()}})})})})})})});JT.displayName=Ple;var Ile=`SelectItemAlignedPosition`,YT=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=MT(HT,n),o=qT(HT,n),[s,c]=N.useState(null),[l,u]=N.useState(null),d=yy(t,e=>u(e)),f=kT(n),p=N.useRef(!1),m=N.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=N.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-GT,d=sT(a,[GT,Math.max(GT,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-GT,d=sT(a,[GT,Math.max(GT,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-GT*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-GT,D=c-E,O=g.offsetHeight/2,ee=g.offsetTop+O,te=m+v+ee,k=x-te;if(te<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=te+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+k;s.style.height=t+`px`,h.scrollTop=te-E+h.offsetTop}s.style.margin=`${GT}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Gy(()=>y(),[y]);let[b,x]=N.useState();return Gy(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,I.jsx)(Rle,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:N.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,I.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,I.jsx)(Oy.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});YT.displayName=Ile;var Lle=`SelectPopperPosition`,XT=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=GT,...a}=e,o=jT(n);return(0,I.jsx)(VC,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});XT.displayName=Lle;var[Rle,ZT]=AT(HT,{}),QT=`SelectViewport`,$T=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=qT(QT,n),o=ZT(QT,n),s=yy(t,a.onViewportChange),c=N.useRef(0);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,I.jsx)(OT.Slot,{scope:n,children:(0,I.jsx)(Oy.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:K(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-GT*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});$T.displayName=QT;var eE=`SelectGroup`,[zle,Ble]=AT(eE),Vle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Xy();return(0,I.jsx)(zle,{scope:n,id:i,children:(0,I.jsx)(Oy.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Vle.displayName=eE;var tE=`SelectLabel`,Hle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ble(tE,n);return(0,I.jsx)(Oy.div,{id:i.id,...r,ref:t})});Hle.displayName=tE;var nE=`SelectItem`,[Ule,rE]=AT(nE),iE=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=MT(nE,n),c=qT(nE,n),l=s.value===r,[u,d]=N.useState(a??``),[f,p]=N.useState(!1),m=yy(t,e=>c.itemRefCallback?.(e,r,i)),h=Xy(),g=N.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,I.jsx)(Ule,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:N.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,I.jsx)(OT.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,I.jsx)(Oy.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:K(o.onFocus,()=>p(!0)),onBlur:K(o.onBlur,()=>p(!1)),onClick:K(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:K(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:K(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:K(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:K(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(wle.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});iE.displayName=nE;var aE=`SelectItemText`,oE=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=MT(aE,n),s=qT(aE,n),c=rE(aE,n),l=kle(aE,n),[u,d]=N.useState(null),f=yy(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=N.useMemo(()=>(0,I.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Gy(()=>(h(m),()=>g(m)),[h,g,m]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Oy.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ls.createPortal(a.children,o.valueNode):null]})});oE.displayName=aE;var sE=`SelectItemIndicator`,cE=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return rE(sE,n).isSelected?(0,I.jsx)(Oy.span,{"aria-hidden":!0,...r,ref:t}):null});cE.displayName=sE;var lE=`SelectScrollUpButton`,uE=N.forwardRef((e,t)=>{let n=qT(lE,e.__scopeSelect),r=ZT(lE,e.__scopeSelect),[i,a]=N.useState(!1),o=yy(t,r.onScrollButtonChange);return Gy(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,I.jsx)(pE,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});uE.displayName=lE;var dE=`SelectScrollDownButton`,fE=N.forwardRef((e,t)=>{let n=qT(dE,e.__scopeSelect),r=ZT(dE,e.__scopeSelect),[i,a]=N.useState(!1),o=yy(t,r.onScrollButtonChange);return Gy(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,I.jsx)(pE,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});fE.displayName=dE;var pE=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=qT(`SelectScrollButton`,n),o=N.useRef(null),s=kT(n),c=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>c(),[c]),Gy(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,I.jsx)(Oy.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:K(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:K(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:K(i.onPointerLeave,()=>{c()})})}),Wle=`SelectSeparator`,Gle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,I.jsx)(Oy.div,{"aria-hidden":!0,...r,ref:t})});Gle.displayName=Wle;var mE=`SelectArrow`,Kle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=jT(n);return qT(mE,n).position===`popper`?(0,I.jsx)(HC,{...i,...r,ref:t}):null});Kle.displayName=mE;var hE=`SelectBubbleInput`,gE=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=MT(hE,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=N.useRef(null),m=yy(n,p),h=i??``,g=Qx(h);return N.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,I.jsxs)(Oy.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Vy,...t.style},ref:m,defaultValue:h,children:[_E(i)?(0,I.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});gE.displayName=hE;function qle(e){return typeof e==`function`}function _E(e){return e===``||e===void 0}function vE(e){let t=Py(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function yE(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Jle(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Jle(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bE=`Tabs`,[Yle,Xle]=Uy(bE,[qC]),xE=qC(),[Zle,SE]=Yle(bE),CE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Zy(s),[d,f]=Ky({prop:r,onChange:i,defaultProp:a??``,caller:bE});return(0,I.jsx)(Zle,{scope:n,baseId:Xy(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,I.jsx)(Oy.div,{dir:u,"data-orientation":o,...l,ref:t})})});CE.displayName=bE;var wE=`TabsList`,TE=N.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=SE(wE,n),o=xE(n);return(0,I.jsx)(QC,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,I.jsx)(Oy.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});TE.displayName=wE;var EE=`TabsTrigger`,DE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=SE(EE,n),s=xE(n),c=AE(o.baseId,r),l=jE(o.baseId,r),u=r===o.value;return(0,I.jsx)($C,{asChild:!0,...s,focusable:!i,active:u,children:(0,I.jsx)(Oy.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:K(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:K(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});DE.displayName=EE;var OE=`TabsContent`,kE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=SE(OE,n),c=AE(s.baseId,r),l=jE(s.baseId,r),u=r===s.value,d=N.useRef(u);return N.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,I.jsx)(qy,{present:i||u,children:({present:n})=>(0,I.jsx)(Oy.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});kE.displayName=OE;function AE(e,t){return`${e}-trigger-${t}`}function jE(e,t){return`${e}-content-${t}`}var Qle=CE,$le=TE,eue=DE,tue=kE,[ME,nue]=Uy(`Tooltip`,[kC]),NE=kC(),PE=`TooltipProvider`,rue=700,FE=`tooltip.open`,[iue,IE]=ME(PE),LE=e=>{let{__scopeTooltip:t,delayDuration:n=rue,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=N.useRef(!0),s=N.useRef(!1),c=N.useRef(0);return N.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,I.jsx)(iue,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:N.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:N.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:N.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};LE.displayName=PE;var RE=`Tooltip`,[aue,zE]=ME(RE),BE=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=IE(RE,e.__scopeTooltip),l=NE(t),[u,d]=N.useState(null),f=Xy(),p=N.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=N.useRef(!1),[_,v]=Ky({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(FE))):c.onClose(),a?.(e)},caller:RE}),y=N.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=N.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=N.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=N.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return N.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,I.jsx)(zC,{...l,children:(0,I.jsx)(aue,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:N.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:N.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};BE.displayName=RE;var VE=`TooltipTrigger`,HE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=zE(VE,n),a=IE(VE,n),o=NE(n),s=yy(t,N.useRef(null),i.onTriggerChange),c=N.useRef(!1),l=N.useRef(!1),u=N.useCallback(()=>c.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,I.jsx)(BC,{asChild:!0,...o,children:(0,I.jsx)(Oy.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:K(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:K(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:K(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:K(e.onBlur,i.onClose),onClick:K(e.onClick,i.onClose)})})});HE.displayName=VE;var UE=`TooltipPortal`,[oue,sue]=ME(UE,{forceMount:void 0}),WE=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=zE(UE,t);return(0,I.jsx)(oue,{scope:t,forceMount:n,children:(0,I.jsx)(qy,{present:n||a.open,children:(0,I.jsx)(pb,{asChild:!0,container:i,children:r})})})};WE.displayName=UE;var GE=`TooltipContent`,KE=N.forwardRef((e,t)=>{let n=sue(GE,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=zE(GE,e.__scopeTooltip);return(0,I.jsx)(qy,{present:r||o.open,children:o.disableHoverableContent?(0,I.jsx)(qE,{side:i,...a,ref:t}):(0,I.jsx)(cue,{side:i,...a,ref:t})})}),cue=N.forwardRef((e,t)=>{let n=zE(GE,e.__scopeTooltip),r=IE(GE,e.__scopeTooltip),i=N.useRef(null),a=yy(t,i),[o,s]=N.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=N.useCallback(()=>{s(null),d(!1)},[d]),p=N.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=pue(r,fue(r,n.getBoundingClientRect())),a=mue(t.getBoundingClientRect());s(gue([...i,...a])),d(!0)},[d]);return N.useEffect(()=>()=>f(),[f]),N.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),N.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!hue(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,I.jsx)(qE,{...e,ref:a})}),[lue,uue]=ME(RE,{isInside:!1}),due=Ty(`TooltipContent`),qE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=zE(GE,n),l=NE(n),{onClose:u}=c;return N.useEffect(()=>(document.addEventListener(FE,u),()=>document.removeEventListener(FE,u)),[u]),N.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,I.jsx)(tb,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,I.jsxs)(VC,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,I.jsx)(due,{children:r}),(0,I.jsx)(lue,{scope:n,isInside:!0,children:(0,I.jsx)(Jie,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});KE.displayName=GE;var JE=`TooltipArrow`,YE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=NE(n);return uue(JE,n).isInside?null:(0,I.jsx)(HC,{...i,...r,ref:t})});YE.displayName=JE;function fue(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function pue(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function mue(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function hue(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function gue(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),_ue(t)}function _ue(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var vue=LE,yue=BE,bue=HE,xue=WE,Sue=KE,Cue=YE,XE=(0,H.forwardRef)((e,t)=>(0,I.jsx)(Ay.div,{...e,ref:t}));XE.displayName=`AttachmentPrimitive.Root`;var ZE=(0,H.forwardRef)((e,t)=>{let n=G(e=>{let t=e.attachment.name.split(`.`);return t.length>1?t.pop():``});return(0,I.jsxs)(Ay.div,{...e,ref:t,children:[`.`,n]})});ZE.displayName=`AttachmentPrimitive.unstable_Thumb`;var QE=()=>(0,I.jsx)(I.Fragment,{children:G(e=>e.attachment.name)});QE.displayName=`AttachmentPrimitive.Name`;var wue=Ny(`AttachmentPrimitive.Remove`,()=>{let e=Dg();return W(()=>{e.attachment().remove()},[e])}),$E=xy({Name:()=>QE,Remove:()=>wue,Root:()=>XE,unstable_Thumb:()=>ZE}),Tue=e=>G(t=>{let{role:n,attachments:r,parts:i,branchCount:a,isLast:o,speech:s,isCopied:c,isHovering:l}=t.message;return!(e.hasBranches===!0&&a<2||e.user&&n!==`user`||e.assistant&&n!==`assistant`||e.system&&n!==`system`||e.lastOrHover===!0&&!l&&!o||e.last!==void 0&&e.last!==o||e.copied===!0&&!c||e.copied===!1&&c||e.speaking===!0&&s==null||e.speaking===!1&&s!=null||e.hasAttachments===!0&&(n!==`user`||!r?.length)||e.hasAttachments===!1&&n===`user`&&r?.length||e.hasContent===!0&&i.length===0||e.hasContent===!1&&i.length>0||e.submittedFeedback!==void 0&&(t.message.metadata.submittedFeedback?.type??null)!==e.submittedFeedback)}),eD=({children:e,...t})=>Tue(t)?e:null;eD.displayName=`MessagePrimitive.If`;var tD=(0,H.createContext)(null),nD=()=>Eh(tD),Eue=({children:e})=>{let t=xh(new Map),n=xh([]),r=W(()=>{let e=Array.from(t.current.entries());e.sort((e,t)=>t[1]-e[1]),n.current=e.map(([e])=>e)},[]),i=W((e,n)=>{let i=n?.priority??0;return t.current.set(e,i),r(),()=>{t.current.delete(e),r()}},[r]),a=W(()=>n.current,[]),o=U(()=>({register:i,getPlugins:a}),[i,a]);return(0,I.jsx)(tD.Provider,{value:o,children:e})},rD=(0,H.createContext)(null),iD=(0,H.createContext)(null),aD=()=>{let e=Eh(rD);if(!e)throw Error(`useTriggerPopoverRootContext must be used within ComposerPrimitive.TriggerPopoverRoot`);return e},oD=()=>Eh(rD),Due=()=>{let e=Eh(iD);if(!e)throw Error(`useTriggerPopoverAriaPublish must be used within ComposerPrimitive.TriggerPopoverRoot`);return e},Oue=()=>{let e=aD();return(0,H.useSyncExternalStore)(e.subscribe,e.getTriggers,e.getTriggers)},kue=new Map,sD=()=>()=>{},cD=()=>kue,Aue=()=>{let e=oD();return(0,H.useSyncExternalStore)(e?e.subscribe:sD,e?e.getTriggers:cD,e?e.getTriggers:cD)},lD=()=>null,jue=()=>{let e=oD();return(0,H.useSyncExternalStore)(e?e.subscribeAria:sD,e?e.getActiveAria:lD,e?e.getActiveAria:lD)};function uD(){let e=xh(new Set);return{notify:W(()=>{for(let t of e.current)t()},[]),subscribe:W(t=>(e.current.add(t),()=>{e.current.delete(t)}),[])}}var dD=({children:e})=>{let t=xh(new Map),n=xh(new Set),{notify:r,subscribe:i}=uD(),a=W(e=>{let{char:i}=e;if(t.current.has(i))return()=>{};let a=new Map(t.current);a.set(i,e),t.current=a,r();for(let t of n.current)t.added(e);return()=>{let e=new Map(t.current);e.delete(i),t.current=e,r();for(let e of n.current)e.removed(i)}},[r]),o=W(()=>t.current,[]),s=W(e=>(n.current.add(e),()=>{n.current.delete(e)}),[]),c=xh(null),l=xh(null),{notify:u,subscribe:d}=uD(),f=W((e,t)=>{if(t===null){if(l.current!==e)return;c.current=null,l.current=null,u();return}let n=c.current;l.current===e&&n!==null&&n.popoverId===t.popoverId&&n.highlightedItemId===t.highlightedItemId||(c.current=t,l.current=e,u())},[u]),p=W(()=>c.current,[]),m=U(()=>({register:a,getTriggers:o,subscribe:i,subscribeLifecycle:s,getActiveAria:p,subscribeAria:d}),[a,o,i,s,p,d]),h=U(()=>({setActiveAria:f}),[f]);return(0,I.jsx)(rD.Provider,{value:m,children:(0,I.jsx)(iD.Provider,{value:h,children:e})})},fD=({children:e})=>nD()?(0,I.jsx)(dD,{children:e}):(0,I.jsx)(Eue,{children:(0,I.jsx)(dD,{children:e})});fD.displayName=`ComposerPrimitive.TriggerPopoverRoot`;var pD=/\s/u;function Mue(e,t,n){let r=e.slice(0,n);for(let e=r.length-1;e>=0;e--){let n=r[e];if(pD.test(n))return null;if(r.startsWith(t,e)){if(e>0&&!pD.test(r[e-1]))continue;return{query:r.slice(e+t.length),offset:e}}}return null}var Nue=Oh(function({text:e,triggerChar:t}){let[n,r]=bh(e.length),i=U(()=>Mue(e,t,Math.min(n,e.length)),[n,e,t]);return{trigger:i,query:i?.query??``,setCursorPosition:r}});function Pue(e){return`type`in e}var Fue=Oh(function({navigableList:e,isSearchMode:t,activeCategoryId:n,query:r,popoverId:i,open:a,selectItem:o,selectCategory:s,goBack:c,close:l}){let[u,d]=bh(0);Sh(()=>{d(0)},[e]),Sh(()=>{d(0)},[t,n]);let f=wh(t=>{t<0||t>=e.length||t!==u&&d(t)}),p=wh(t=>{if(!a)return!1;switch(t.key){case`ArrowDown`:return t.preventDefault(),d(t=>{let n=e.length;return n===0?0:t<n-1?t+1:0}),!0;case`ArrowUp`:return t.preventDefault(),d(t=>{let n=e.length;return n===0?0:t>0?t-1:n-1}),!0;case`Enter`:case`Tab`:{if(t.shiftKey)return!1;t.preventDefault();let n=e[u];return n&&(Pue(n)?o(n):s(n.id)),!0}case`Escape`:return t.preventDefault(),l(),!0;case`Backspace`:return n&&r===``?(t.preventDefault(),c(),!0):!1;default:return!1}}),m=e[u];return{highlightedIndex:u,highlightedItemId:a&&m?`${i}-option-${m.id}`:void 0,highlightIndex:f,handleKeyDown:p}});function mD(e,t){return e.id.toLowerCase().includes(t)||e.label.toLowerCase().includes(t)||(e.description?.toLowerCase().includes(t)??!1)}var Iue=Oh(function({adapter:e,query:t,open:n}){let[r,i]=bh(null);Sh(()=>{n||i(null)},[n]);let a=U(()=>!n||!e?[]:e.categories(),[n,e]),o=n?r:null,s=U(()=>!o||!e?[]:e.categoryItems(o),[o,e]),c=U(()=>{if(!n||!e||o||!t&&a.length>0)return null;if(e.search)return e.search(t);let r=[],i=t.toLowerCase();for(let t of a)for(let n of e.categoryItems(t.id))mD(n,i)&&r.push(n);return r},[n,e,t,o,a]),l=c!==null,u=U(()=>{if(l)return[];if(!t)return a;let e=t.toLowerCase();return a.filter(t=>t.label.toLowerCase().includes(e))},[a,t,l]),d=U(()=>{if(l)return c??[];if(!t)return s;let e=t.toLowerCase();return s.filter(t=>mD(t,e))},[s,t,l,c]);return{categories:u,items:d,isSearchMode:l,activeCategoryId:o,navigableList:U(()=>l?c??[]:o?d:u,[l,c,o,d,u]),selectCategory:wh(e=>{i(e)}),goBack:wh(()=>{i(null)})}}),Lue=Oh(function({behavior:e,trigger:t,aui:n,triggerChar:r,setCursorPosition:i,onSelected:a}){let o=xh(null),s=wh(e=>(o.current=e,()=>{o.current===e&&(o.current=null)}));return{selectItem:wh(i=>{if(!t||!e)return;if(o.current?.(i)){a();return}let s=n.composer().getState().text,c=s.slice(0,t.offset),l=s.slice(t.offset+r.length+t.query.length),u=()=>{let t=e.formatter.serialize(i);n.composer().setText(c+t+(l.startsWith(` `)?l:` ${l}`))};e.kind===`directive`?(u(),e.onInserted?.(i)):(e.removeOnExecute?n.composer().setText(c+(l.startsWith(` `)?l.slice(1):l)):u(),e.onExecute(i)),a()}),close:wh(()=>{a(),t&&i(t.offset)}),registerSelectItemOverride:s}}),Rue=Oh(function({adapter:e,text:t,triggerChar:n,behavior:r,aui:i,popoverId:a}){let o=Uh(Nue({text:t,triggerChar:n})),s=o.trigger!==null&&e!==void 0&&r!==void 0,c=Uh(Iue({adapter:e,query:o.query,open:s})),l=wh(()=>{c.goBack()}),u=Uh(Lue({behavior:r,trigger:o.trigger,aui:i,triggerChar:n,setCursorPosition:o.setCursorPosition,onSelected:l})),d=Uh(Fue({navigableList:c.navigableList,isSearchMode:c.isSearchMode,activeCategoryId:c.activeCategoryId,query:o.query,popoverId:a,open:s,selectItem:u.selectItem,selectCategory:c.selectCategory,goBack:c.goBack,close:u.close}));return{open:s,query:o.query,activeCategoryId:c.activeCategoryId,categories:c.categories,items:c.items,highlightedIndex:d.highlightedIndex,isSearchMode:c.isSearchMode,popoverId:a,highlightedItemId:d.highlightedItemId,selectCategory:c.selectCategory,goBack:c.goBack,selectItem:u.selectItem,close:u.close,highlightIndex:d.highlightIndex,handleKeyDown:d.handleKeyDown,setCursorPosition:o.setCursorPosition,registerSelectItemOverride:u.registerSelectItemOverride}}),hD=(0,H.createContext)(null),gD=()=>{let e=Eh(hD);if(!e)throw Error(`useTriggerPopoverScopeContext must be used within ComposerPrimitive.TriggerPopover`);return e},zue=()=>Eh(hD),_D=(0,H.createContext)(null),vD=()=>{let e=Eh(_D);if(!e)throw Error(`TriggerPopover.Directive / TriggerPopover.Action must be rendered inside ComposerPrimitive.TriggerPopover`);return e},yD=(0,H.forwardRef)(({char:e,adapter:t,"aria-label":n,children:r,...i},a)=>{let o=Dg(),s=G(e=>e.composer.text),c=(0,H.useId)(),l=xh(null),[u,d]=bh(null),f=xh(0),p=W(e=>(f.current+=1,l.current=e,d(e),()=>{f.current=Math.max(0,f.current-1),l.current===e&&(l.current=null,d(null))}),[e]),m=U(()=>({register:p}),[p]),h=Uh(Rue({adapter:t,text:s,triggerChar:e,behavior:u??void 0,aui:o,popoverId:c})),g=xh(h);g.current=h;let _=aD();Sh(()=>_.register({char:e,...u?{behavior:u}:{},resource:g.current}),[_,e,u]);let v=nD();Sh(()=>{if(v)return v.register(g.current)},[v]);let y=u!==null&&h.open,b=Due();return Sh(()=>{if(y)return()=>{b.setActiveAria(e,null)}},[b,e,y]),Sh(()=>{y&&b.setActiveAria(e,{popoverId:c,highlightedItemId:h.highlightedItemId})},[b,e,c,y,h.highlightedItemId]),(0,I.jsx)(_D.Provider,{value:m,children:(0,I.jsx)(hD.Provider,{value:h,children:y?(0,I.jsx)(Ay.div,{role:`listbox`,id:c,"aria-label":n??`Suggestions`,"aria-activedescendant":h.highlightedItemId,"data-state":`open`,...i,ref:a,children:r}):r})})});yD.displayName=`ComposerPrimitive.TriggerPopover`;var bD=()=>{let{disabled:e,send:t}=Qre(),n=W(()=>t(),[t]);return e?null:n},Bue=Ny(`ComposerPrimitive.Send`,bD),xD=(0,H.forwardRef)(({onSubmit:e,...t},n)=>{let r=bD(),i=e=>{e.preventDefault(),r&&r()};return(0,I.jsx)(Ay.form,{...t,ref:n,onSubmit:K(e,i)})});xD.displayName=`ComposerPrimitive.Root`;var SD=e=>{let t=Py(e),n=cy(e=>e.onScrollToBottom);Sh(()=>n(t),[n,t])},Vue=()=>!1,Hue=()=>{},Uue=e=>(0,H.useSyncExternalStore)(W(t=>{if(typeof window>`u`||e===null)return Hue;let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),W(()=>typeof window>`u`||e===null?!1:window.matchMedia(e).matches,[e]),Vue);function CD(){return CD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CD.apply(null,arguments)}function Wue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Gue=N.useLayoutEffect,Kue=function(e){var t=N.useRef(e);return Gue(function(){t.current=e}),t},wD=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},que=function(e,t){var n=N.useRef();return N.useCallback(function(r){e.current=r,n.current&&wD(n.current,null),n.current=t,t&&wD(t,r)},[t])},TD={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},ED=function(e){Object.keys(TD).forEach(function(t){e.style.setProperty(t,TD[t],`important`)})},DD=null,OD=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function Jue(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),DD||(DD=document.createElement(`textarea`),DD.setAttribute(`tabindex`,`-1`),DD.setAttribute(`aria-hidden`,`true`),ED(DD)),DD.parentNode===null&&document.body.appendChild(DD);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;DD.style[t]=o[t]}),ED(DD),DD.value=t;var c=OD(DD,e);DD.value=t,c=OD(DD,e),DD.value=`x`;var l=DD.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var kD=function(){},Yue=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},Xue=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Zue=!!document.documentElement.currentStyle,Que=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=Yue(Xue,t),r=n.boxSizing;return r===``?null:(Zue&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function AD(e,t,n){var r=Kue(n);N.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var $ue=function(e,t){AD(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},ede=function(e){AD(window,`resize`,e)},tde=function(e){AD(document.fonts,`loadingdone`,e)},nde=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],rde=N.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?kD:a,s=e.onHeightChange,c=s===void 0?kD:s,l=Wue(e,nde),u=l.value!==void 0,d=N.useRef(null),f=que(d,t),p=N.useRef(0),m=N.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Que(e);if(t){m.current=t;var a=Jue(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return N.useLayoutEffect(h),$ue(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),ede(h),tde(h),N.createElement(`textarea`,CD({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),ide=`(pointer: coarse) and (not (any-pointer: fine))`,jD=(0,H.forwardRef)(({autoFocus:e=!1,asChild:t,render:n,disabled:r,onChange:i,onKeyDown:a,onPaste:o,onSelect:s,submitOnEnter:c,submitMode:l,cancelOnEscape:u=!0,unstable_focusOnRunStart:d=!0,unstable_focusOnScrollToBottom:f=!0,unstable_focusOnThreadSwitched:p=!0,unstable_insertNewlineOnTouchEnter:m=!1,addAttachmentOnPaste:h=!0,...g},_)=>{let v=Dg(),y=nD(),b=jue(),x=l??(c===!1?`none`:`enter`),S=Uue(m?ide:null),C=m&&S&&x===`enter`?`none`:x,w=G(e=>e.composer.isEditing?e.composer.text:``),T=G(e=>e.thread.isDisabled||e.composer.dictation?.inputDisabled)||r,E=xh(null),D=yy(_,E),O=xh(!1);Fy(e=>{if(!E.current?.contains(e.target))return;if(y){for(let t of y.getPlugins())if(t.handleKeyDown(e))return}if(!u)return;let t=v.composer();t.getState().canCancel&&(t.cancel(),e.preventDefault())});let ee=e=>{if(!T&&!e.nativeEvent.isComposing){if(y){for(let t of y.getPlugins())if(t.handleKeyDown(e))return}if(e.key===`Enter`){let t=v.thread().getState(),n=t.capabilities.queue;if(e.shiftKey&&(e.ctrlKey||e.metaKey)&&n&&x!==`none`&&v.composer().getState().canSend){e.preventDefault(),v.composer().send({steer:!0});return}if(e.shiftKey||t.isRunning&&!n)return;let r=!1;C===`ctrlEnter`?r=e.ctrlKey||e.metaKey:C===`enter`&&(r=!0),r&&(e.preventDefault(),E.current?.closest(`form`)?.requestSubmit())}}},te=async e=>{if(!h)return;let t=v.thread().getState().capabilities,n=Array.from(e.clipboardData?.files||[]);if(t.attachments&&n.length>0)try{e.preventDefault(),await Promise.all(n.map(e=>v.composer().addAttachment(e)))}catch(e){console.error(`Error adding attachment:`,e)}},k=e&&!T,A=W(()=>{let e=E.current;!e||!k||(e.focus({preventScroll:!0}),e.setSelectionRange(e.value.length,e.value.length))},[k]);Sh(()=>A(),[A]),SD(()=>{v.composer().getState().type===`thread`&&f&&A()}),Sh(()=>{if(!(v.composer().getState().type!==`thread`||!d))return v.on(`thread.runStart`,A)},[d,A,v]),Sh(()=>{if(!(v.composer().getState().type!==`thread`||!p))return v.on(`threadListItem.switchedTo`,A)},[p,A,v]);let j=b?{"aria-controls":b.popoverId,"aria-expanded":!0,"aria-haspopup":`listbox`,"aria-activedescendant":b.highlightedItemId}:{},ne={name:`input`,value:w,...g,...j,ref:D,disabled:T,onChange:K(i,e=>{if(!v.composer().getState().isEditing)return;let t=e.nativeEvent.isComposing===!0;O.current&&!t&&(O.current=!1);let n=t||O.current;if(Mh(()=>{v.composer().setText(e.target.value)}),n)return;let r=e.target.selectionStart??e.target.value.length;if(y)for(let e of y.getPlugins())e.setCursorPosition(r)}),onKeyDown:K(a,ee),onCompositionStart:K(g.onCompositionStart,()=>{O.current=!0}),onCompositionEnd:K(g.onCompositionEnd,e=>{if(O.current=!1,!v.composer().getState().isEditing)return;let t=e.target;Mh(()=>{v.composer().setText(t.value)});let n=t.selectionStart??t.value.length;if(y)for(let e of y.getPlugins())e.setCursorPosition(n)}),onSelect:K(s,e=>{if(O.current)return;let t=e.target,n=t.selectionStart??t.value.length;if(y)for(let e of y.getPlugins())e.setCursorPosition(n)}),onPaste:K(o,te)};if(n&&(0,H.isValidElement)(n)){let e=g.children===void 0?n.props.children:g.children;return(0,I.jsx)(Cy,{...ne,children:(0,H.cloneElement)(n,void 0,e)})}return(0,I.jsx)(t?Cy:rde,{...ne})});jD.displayName=`ComposerPrimitive.Input`;var ade=Ny(`ComposerPrimitive.Cancel`,()=>{let{disabled:e,cancel:t}=$re();return e?null:t}),ode=Ny(`ComposerPrimitive.AddAttachment`,({multiple:e=!0}={})=>{let{disabled:t,addAttachment:n}=tie(),r=Dg(),i=W(()=>{let t=document.createElement(`input`);t.type=`file`,t.multiple=e,t.hidden=!0;let i=r.composer().getState().attachmentAccept;i!==`*`&&(t.accept=i),document.body.appendChild(t),t.onchange=e=>{let r=e.target.files;if(r){for(let e of r)n(e);document.body.removeChild(t)}},t.oncancel=()=>{(!t.files||t.files.length===0)&&document.body.removeChild(t)},t.click()},[r,e,n]);return t?null:i},[`multiple`]),MD=(0,H.forwardRef)(({disabled:e,asChild:t=!1,render:n,children:r,...i},a)=>{let[o,s]=bh(!1),c=Dg(),l=W(t=>{e||(t.preventDefault(),s(!0))},[e]),u=W(t=>{e||(t.preventDefault(),o||s(!0))},[e,o]),d=W(t=>{if(e)return;t.preventDefault();let n=t.relatedTarget;n&&t.currentTarget.contains(n)||s(!1)},[e]),f=W(async t=>{if(e)return;t.preventDefault(),s(!1);let n=Array.from(t.dataTransfer.files);await Promise.all(n.map(async e=>{try{await c.composer().addAttachment(e)}catch(e){console.error(`Failed to add attachment:`,e)}}))},[e,c]),p={...o?{"data-dragging":`true`}:null,...i,onDragEnterCapture:K(i.onDragEnterCapture,l),onDragOverCapture:K(i.onDragOverCapture,u),onDragLeaveCapture:K(i.onDragLeaveCapture,d),onDropCapture:K(i.onDropCapture,f),ref:a};if(n&&(0,H.isValidElement)(n)){let e=r===void 0?n.props.children:r;return(0,I.jsx)(Cy,{...p,children:(0,H.cloneElement)(n,void 0,e)})}return(0,I.jsx)(t?Cy:`div`,{...p,children:r})});MD.displayName=`ComposerPrimitive.AttachmentDropzone`;var sde=Ny(`ComposerPrimitive.Dictate`,()=>{let{disabled:e,startDictation:t}=eie();return e?null:t}),cde=Ny(`ComposerPrimitive.StopDictation`,()=>{let e=Dg(),t=G(e=>e.composer.dictation!=null),n=W(()=>{e.composer().stopDictation()},[e]);return t?n:null}),ND=(0,H.forwardRef)(({children:e,...t},n)=>{let r=G(e=>e.composer.dictation?.transcript);return r?(0,I.jsx)(Ay.span,{...t,ref:n,children:e??r}):null});ND.displayName=`ComposerPrimitive.DictationTranscript`;var PD=(0,H.forwardRef)((e,t)=>G(e=>e.composer.quote)?(0,I.jsx)(Ay.div,{...e,ref:t}):null);PD.displayName=`ComposerPrimitive.Quote`;var FD=(0,H.forwardRef)(({children:e,...t},n)=>{let r=G(e=>e.composer.quote?.text);return r?(0,I.jsx)(Ay.span,{...t,ref:n,children:e??r}):null});FD.displayName=`ComposerPrimitive.QuoteText`;var ID=(0,H.forwardRef)(({onClick:e,...t},n)=>{let r=Dg(),i=W(()=>{r.composer().setQuote(void 0)},[r]);return(0,I.jsx)(Ay.button,{type:`button`,...t,ref:n,onClick:K(e,i)})});ID.displayName=`ComposerPrimitive.QuoteDismiss`;var LD=(0,H.forwardRef)(({children:e,"aria-label":t,...n},r)=>{let{categories:i,activeCategoryId:a,isSearchMode:o,open:s}=gD();return!s||a||o?null:(0,I.jsx)(Ay.div,{role:`group`,"aria-label":t??`Categories`,...n,ref:r,children:e(i)})});LD.displayName=`ComposerPrimitive.TriggerPopoverCategories`;var RD=(0,H.forwardRef)(({categoryId:e,onClick:t,onMouseMove:n,...r},i)=>{let{selectCategory:a,highlightIndex:o,categories:s,highlightedIndex:c,activeCategoryId:l,isSearchMode:u,popoverId:d}=gD(),f=W(()=>{a(e)},[a,e]),p=s.findIndex(t=>t.id===e),m=!l&&!u&&p===c,h=W(()=>{o(p)},[o,p]);return(0,I.jsx)(Ay.button,{type:`button`,role:`option`,id:`${d}-option-${e}`,"aria-selected":m,"data-highlighted":m?``:void 0,...r,ref:i,onClick:K(t,f),onMouseMove:K(n,h)})});RD.displayName=`ComposerPrimitive.TriggerPopoverCategoryItem`;var zD=(0,H.forwardRef)(({children:e,"aria-label":t,...n},r)=>{let{items:i,activeCategoryId:a,isSearchMode:o,open:s}=gD();return!s||!a&&!o?null:(0,I.jsx)(Ay.div,{role:`group`,"aria-label":t??`Items`,...n,ref:r,children:e(i)})});zD.displayName=`ComposerPrimitive.TriggerPopoverItems`;var BD=(0,H.forwardRef)(({item:e,index:t,onClick:n,onMouseMove:r,...i},a)=>{let{selectItem:o,highlightIndex:s,items:c,highlightedIndex:l,activeCategoryId:u,isSearchMode:d,popoverId:f}=gD(),p=W(()=>{o(e)},[o,e]),m=t??c.findIndex(t=>t.id===e.id),h=(d||u!==null)&&m===l,g=W(()=>{s(m)},[s,m]);return(0,I.jsx)(Ay.button,{type:`button`,role:`option`,id:`${f}-option-${e.id}`,"aria-selected":h,"data-highlighted":h?``:void 0,...i,ref:a,onClick:K(n,p),onMouseMove:K(r,g)})});BD.displayName=`ComposerPrimitive.TriggerPopoverItem`;var VD=(0,H.forwardRef)(({onClick:e,...t},n)=>{let{activeCategoryId:r,isSearchMode:i,goBack:a,open:o}=gD();return!o||!r||i?null:(0,I.jsx)(Ay.button,{type:`button`,...t,ref:n,onClick:K(e,a)})});VD.displayName=`ComposerPrimitive.TriggerPopoverBack`;var HD=({formatter:e,onExecute:t,removeOnExecute:n})=>{let{register:r}=vD(),i=xh(t);return i.current=t,Sh(()=>r({kind:`action`,formatter:e??ay,onExecute:e=>i.current(e),...n===void 0?{}:{removeOnExecute:n}}),[r,e,n]),null};HD.displayName=`ComposerPrimitive.TriggerPopoverAction`;var UD=({formatter:e,onInserted:t})=>{let{register:n}=vD(),r=xh(t);return r.current=t,Sh(()=>n({kind:`directive`,formatter:e??ay,onInserted:e=>r.current?.(e)}),[n,e]),null};UD.displayName=`ComposerPrimitive.TriggerPopoverDirective`;var lde=Object.assign(yD,{Directive:UD,Action:HD}),WD=xy({AddAttachment:()=>ode,AttachmentByIndex:()=>Yv,AttachmentDropzone:()=>MD,Attachments:()=>Zv,Cancel:()=>ade,Dictate:()=>sde,DictationTranscript:()=>ND,If:()=>iy,Input:()=>jD,Queue:()=>Qv,Quote:()=>PD,QuoteDismiss:()=>ID,QuoteText:()=>FD,Root:()=>xD,Send:()=>Bue,StopDictation:()=>cde,Unstable_TriggerPopover:()=>lde,Unstable_TriggerPopoverBack:()=>VD,Unstable_TriggerPopoverCategories:()=>LD,Unstable_TriggerPopoverCategoryItem:()=>RD,Unstable_TriggerPopoverItem:()=>BD,Unstable_TriggerPopoverItems:()=>zD,Unstable_TriggerPopoverRoot:()=>fD,unstable_useTriggerPopoverRootContext:()=>aD,unstable_useTriggerPopoverRootContextOptional:()=>oD,unstable_useTriggerPopoverScopeContext:()=>gD,unstable_useTriggerPopoverScopeContextOptional:()=>zue,unstable_useTriggerPopoverTriggers:()=>Oue,unstable_useTriggerPopoverTriggersOptional:()=>Aue}),GD=()=>G(e=>{if(e.part.type!==`text`&&e.part.type!==`reasoning`)throw Error(`MessagePartText can only be used inside text or reasoning message parts.`);return e.part}),ude=()=>G(e=>{if(e.part.type!==`image`)throw Error(`MessagePartImage can only be used inside image message parts.`);return e.part}),KD=(0,H.createContext)(null),dde=e=>({useSmoothStatus:zg(()=>e)}),fde=({children:e})=>{let t=qD({optional:!0}),n=Dg(),[r]=bh(()=>dde(n.part().getState().status));return t?e:(0,I.jsx)(KD.Provider,{value:r,children:e})},pde=e=>{let t=(0,H.forwardRef)((t,n)=>(0,I.jsx)(fde,{children:(0,I.jsx)(e,{...t,ref:n})}));return t.displayName=e.displayName,t};function qD(e){let t=Eh(KD);if(!e?.optional&&!t)throw Error(`This component must be used within a SmoothContextProvider.`);return t}var{useSmoothStatus:mde,useSmoothStatusStore:hde}=oy(qD,`useSmoothStatus`),gde=class{currentText;setText;animationFrameId=null;lastUpdateTime=Date.now();targetText=``;constructor(e,t){this.currentText=e,this.setText=t}start(){this.animationFrameId===null&&(this.lastUpdateTime=Date.now(),this.animate())}stop(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}animate=()=>{let e=Date.now(),t=e-this.lastUpdateTime,n=this.targetText.length-this.currentText.length,r=Math.min(5,250/n),i=0;for(;t>=r&&i<n;)i++,t-=r;i===n?this.animationFrameId=null:this.animationFrameId=requestAnimationFrame(this.animate),i!==0&&(this.currentText=this.targetText.slice(0,this.currentText.length+i),this.lastUpdateTime=e-t,this.setText(this.currentText))}},JD=Object.freeze({type:`running`}),YD=(e,t=!1)=>{let{text:n}=e,[r,i]=bh(e.status.type===`running`?``:n),a=Dg(),o=G(()=>a.part()),[s,c]=bh(o);(o!==s||!n.startsWith(r))&&(c(o),i(e.status.type===`running`?``:n));let l=hde({optional:!0}),u=Py(t=>{if(i(t),l){let n=r!==t||e.status.type===`running`?JD:e.status;dy(l).setState(n,!0)}});Sh(()=>{if(l){let i=t&&(r!==n||e.status.type===`running`)?JD:e.status;dy(l).setState(i,!0)}},[l,t,n,r,e.status]);let[d]=bh(new gde(r,u)),f=xh(o);return Sh(()=>{if(!t){d.stop();return}let r=f.current!==o;if(f.current=o,r||!n.startsWith(d.targetText)){e.status.type===`running`?(d.currentText=``,d.targetText=n,d.start()):(d.currentText=n,d.targetText=n,d.stop());return}d.targetText=n,d.start()},[d,t,n,e.status.type,o]),Sh(()=>()=>{d.stop()},[d]),U(()=>t?{type:`text`,text:r,status:n===r?e.status:JD}:e,[t,r,e,n])},XD=(0,H.forwardRef)(({smooth:e=!0,component:t=`span`,...n},r)=>{let{text:i,status:a}=YD(GD(),e);return(0,I.jsx)(t,{"data-status":a.type,...n,ref:r,children:i})});XD.displayName=`MessagePartPrimitive.Text`;var ZD=(0,H.forwardRef)((e,t)=>{let{image:n}=ude();return(0,I.jsx)(Ay.img,{src:n,...e,ref:t})});ZD.displayName=`MessagePartPrimitive.Image`;var QD=e=>{let t=xh(void 0);return W(n=>{t.current&&=(t.current(),void 0),n&&(t.current=e(n))},[e])},$D=(e,t)=>{let n=e.trim().match(/^(\d+(?:\.\d+)?|\.\d+)(em|px|rem)$/);if(!n)return 1/0;let r=Number(n[1]),i=n[2];return i===`px`?r:i===`em`?r*(parseFloat(getComputedStyle(t).fontSize)||16):i===`rem`?r*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16):1/0},_de=e=>e.dataset.messageId,vde=()=>{let e=document.createElement(`div`);return e.dataset.auiTopAnchorReserve=``,e.style.height=`0px`,e.style.flexShrink=`0`,e.style.pointerEvents=`none`,e.setAttribute(`aria-hidden`,`true`),e},eO=(e,t)=>{let n=`${t}px`;return e.style.height===n?!1:(e.style.height=n,!0)},yde=e=>{let t=window.devicePixelRatio||1;return Math.round(e*t)/t},tO=()=>{let e=Dg(),t=G(()=>e.message());return QD(W(e=>{let n=()=>{t.setIsHovering(!0)},r=()=>{t.setIsHovering(!1)};return e.addEventListener(`mouseenter`,n),e.addEventListener(`mouseleave`,r),e.matches(`:hover`)&&queueMicrotask(()=>t.setIsHovering(!0)),()=>{e.removeEventListener(`mouseenter`,n),e.removeEventListener(`mouseleave`,r),t.setIsHovering(!1)}},[t]))},bde=()=>{let e=cy(e=>e.topAnchorTurn?.anchorId);return G(t=>t.message.role===`user`&&t.message.index>0&&t.message.index===t.thread.messages.length-2&&t.thread.messages.at(-1)?.role===`assistant`&&(t.message.id===e||t.thread.isRunning))},xde=()=>{let e=cy(e=>e.topAnchorTurn?.targetId);return G(t=>t.message.isLast&&t.message.role===`assistant`&&t.message.index>=1&&t.thread.messages.at(t.message.index-1)?.role===`user`&&(t.message.id===e||t.thread.isRunning))},Sde=(e,t)=>QD(W(n=>{if(e)return t.getState().registerAnchorElement(n)},[e,t])),Cde=({active:e,threadViewportStore:t})=>QD(W(n=>{if(!e)return;let r=t.getState(),i=r.topAnchorMessageClamp;return r.registerAnchorTargetElement(n,{tallerThan:$D(i.tallerThan,n),visibleHeight:$D(i.visibleHeight,n)})},[e,t])),wde=({forwardedRef:e,...t})=>{let n=yy(e,tO()),r=G(e=>e.message.id);return(0,I.jsx)(Ay.div,{...t,ref:n,"data-message-id":r})},Tde=({forwardedRef:e,threadViewportStore:t,...n})=>{let r=tO(),i=bde(),a=xde(),o=yy(e,r,Sde(i,t),Cde({active:a,threadViewportStore:t})),s=G(e=>e.message.id);return(0,I.jsx)(Ay.div,{...n,ref:o,"data-message-id":s,"data-aui-top-anchor-user":i?``:void 0,"data-aui-top-anchor-target":a?``:void 0})},nO=(0,H.forwardRef)((e,t)=>{let n=ly();return n.getState().turnAnchor===`top`?(0,I.jsx)(Tde,{...e,forwardedRef:t,threadViewportStore:n}):(0,I.jsx)(wde,{...e,forwardedRef:t})});nO.displayName=`MessagePrimitive.Root`;var rO={...jv,Text:()=>(0,I.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,I.jsx)(XD,{}),(0,I.jsx)($v,{children:(0,I.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Image:()=>(0,I.jsx)(ZD,{})},iO=e=>{if(`children`in e)return(0,I.jsx)(Rv,{children:e.children});let{components:t,...n}=e;return(0,I.jsx)(Rv,{components:t?{Text:t.Text??rO.Text,Image:t.Image??rO.Image,Reasoning:t.Reasoning??jv.Reasoning,Source:t.Source??jv.Source,File:t.File??jv.File,Unstable_Audio:t.Unstable_Audio??jv.Unstable_Audio,...`ChainOfThought`in t?{ChainOfThought:t.ChainOfThought}:{tools:t.tools,data:t.data,ToolGroup:t.ToolGroup??jv.ToolGroup,ReasoningGroup:t.ReasoningGroup??jv.ReasoningGroup},Empty:t.Empty,Quote:t.Quote,generativeUI:t.generativeUI}:rO,...n})};iO.displayName=`MessagePrimitive.Parts`;var aO=({children:e})=>uie()===void 0?null:e;aO.displayName=`MessagePrimitive.Error`;var Ede=e=>{let t=new Map;for(let n=0;n<e.length;n++){let r=e[n]?.parentId??`__ungrouped_${n}`,i=t.get(r)??[];i.push(n),t.set(r,i)}let n=[];for(let[e,r]of t){let t=e.startsWith(`__ungrouped_`)?void 0:e;n.push({groupKey:t,indices:r})}return n},Dde=e=>{let t=G(e=>e.message.parts);return U(()=>t.length===0?[]:e(t),[t,e])},Ode=({Fallback:e,...t})=>{let n=G(n=>{let r=n.tools.tools[t.toolName]??e;return Array.isArray(r)?r[0]??e:r});return n?(0,I.jsx)(n,{...t}):null},kde=({Fallback:e,...t})=>{let n=G(n=>{let r=n.dataRenderers.renderers[t.name]??e;return Array.isArray(r)?r[0]??e:r});return n?(0,I.jsx)(n,{...t}):null},oO={Text:()=>(0,I.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,I.jsx)(XD,{}),(0,I.jsx)($v,{children:(0,I.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Reasoning:()=>null,Source:()=>null,Image:()=>(0,I.jsx)(ZD,{}),File:()=>null,Unstable_Audio:()=>null,Group:({children:e})=>e},Ade=({components:{Text:e=oO.Text,Reasoning:t=oO.Reasoning,Image:n=oO.Image,Source:r=oO.Source,File:i=oO.File,Unstable_Audio:a=oO.Unstable_Audio,tools:o={},data:s}={}})=>{let c=Dg(),l=G(e=>e.part),u=l.type;if(u===`tool-call`){let e=c.part().addToolResult,t=c.part().resumeToolCall,n=c.part().respondToToolApproval;if(`Override`in o)return(0,I.jsx)(o.Override,{...l,addResult:e,resume:t,respondToApproval:n});let r=o.by_name?.[l.toolName]??o.Fallback;return(0,I.jsx)(Ode,{...l,Fallback:r,addResult:e,resume:t,respondToApproval:n})}if(l.status?.type===`requires-action`)throw Error(`Encountered unexpected requires-action status`);switch(u){case`text`:return(0,I.jsx)(e,{...l});case`reasoning`:return(0,I.jsx)(t,{...l});case`source`:return(0,I.jsx)(r,{...l});case`image`:return(0,I.jsx)(n,{...l});case`file`:return(0,I.jsx)(i,{...l});case`audio`:return(0,I.jsx)(a,{...l});case`data`:{let e=s?.by_name?.[l.name]??s?.Fallback;return(0,I.jsx)(kde,{...l,Fallback:e})}default:return console.warn(`Unknown message part type: ${u}`),null}},jde=(0,H.memo)(({partIndex:e,components:t})=>(0,I.jsx)(o_,{index:e,children:(0,I.jsx)(Ade,{components:t})}),(e,t)=>e.partIndex===t.partIndex&&e.components?.Text===t.components?.Text&&e.components?.Reasoning===t.components?.Reasoning&&e.components?.Source===t.components?.Source&&e.components?.Image===t.components?.Image&&e.components?.File===t.components?.File&&e.components?.Unstable_Audio===t.components?.Unstable_Audio&&e.components?.tools===t.components?.tools&&e.components?.data===t.components?.data&&e.components?.Group===t.components?.Group),Mde=({status:e,component:t})=>(0,I.jsx)(s_,{text:``,isRunning:e.type===`running`,children:(0,I.jsx)(t,{type:`text`,text:``,status:e})}),Nde=Object.freeze({type:`complete`}),Pde=(0,H.memo)(({components:e})=>{let t=G(e=>e.message.status??Nde);return e?.Empty?(0,I.jsx)(e.Empty,{status:t}):(0,I.jsx)(Mde,{status:t,component:e?.Text??oO.Text})},(e,t)=>e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),sO=({groupingFunction:e,components:t})=>{let n=G(e=>e.message.parts.length),r=Dde(e);return(0,I.jsx)(I.Fragment,{children:U(()=>n===0?(0,I.jsx)(Pde,{components:t}):r.map((e,n)=>(0,I.jsx)(t?.Group??oO.Group,{groupKey:e.groupKey,indices:e.indices,children:e.indices.map(e=>(0,I.jsx)(jde,{partIndex:e,components:t},e))},`group-${n}-${e.groupKey??`ungrouped`}`)),[r,t,n])})};sO.displayName=`MessagePrimitive.Unstable_PartsGrouped`;var cO=({components:e,...t})=>(0,I.jsx)(sO,{...t,components:e,groupingFunction:Ede});cO.displayName=`MessagePrimitive.Unstable_PartsGroupedByParentId`;var lO=xy({AttachmentByIndex:()=>Gv,Attachments:()=>qv,Content:()=>iO,Error:()=>aO,GenerativeUI:()=>wv,GroupedParts:()=>Hv,If:()=>eD,PartByIndex:()=>Mv,Parts:()=>iO,Quote:()=>Uv,Root:()=>nO,Unstable_PartsGrouped:()=>sO,Unstable_PartsGroupedByParentId:()=>cO}),Fde=e=>{let t=Py(e);return QD(W(e=>{let n=new ResizeObserver(()=>{t()}),r=new MutationObserver(e=>{e.some(e=>e.type!==`attributes`||e.attributeName!==`style`)&&t()});return n.observe(e),r.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),()=>{n.disconnect(),r.disconnect()}},[t]))},Ide=({autoScroll:e,scrollToBottomOnRunStart:t=!0,scrollToBottomOnInitialize:n=!0,scrollToBottomOnThreadSwitch:r=!0})=>{let i=xh(null),a=G(e=>e.thread.messages.length>0),o=xh(!1),s=xh(null),c=ly();e===void 0&&(e=c.getState().turnAnchor!==`top`);let l=xh(0),u=xh(0),d=xh(0),f=xh(0),p=xh(null),m=W(e=>{let t=i.current;t&&(p.current=e,t.scrollTo({top:t.scrollHeight,behavior:e}))},[]),h=W(e=>{p.current=e,s.current!==null&&cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{s.current=null,m(e)})},[m]);Ch(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]);let g=W(()=>{let e=c.getState();return e.turnAnchor===`top`&&e.element.viewport===i.current&&e.element.anchor!==null},[c]),_=()=>{let e=i.current;if(!e)return;let t=c.getState().isAtBottom,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<=1||e.scrollHeight<=e.clientHeight;!n&&l.current<e.scrollTop||(n?e.scrollHeight>e.clientHeight+1&&(p.current=null):l.current>e.scrollTop&&u.current===e.scrollHeight&&(p.current=null),(n||p.current===null)&&n!==t&&dy(c).setState({isAtBottom:n})),l.current=e.scrollTop,u.current=e.scrollHeight},v=Fde(()=>{let t=i.current;if(!t)return;let{scrollHeight:n,clientHeight:r}=t;if(n===d.current&&r===f.current)return;d.current=n,f.current=r;let a=p.current;a&&g()?p.current=null:a?m(a):e&&c.getState().isAtBottom&&m(`instant`),_()}),y=QD(e=>(e.addEventListener(`scroll`,_),()=>{e.removeEventListener(`scroll`,_)}));return Ch(()=>{if(n){if(!a){o.current=!1;return}o.current||(o.current=!0,p.current===null&&h(`instant`))}},[a,h,n]),SD(({behavior:e})=>{m(e)}),Ag(`thread.runStart`,()=>{t&&c.getState().turnAnchor!==`top`&&h(`auto`)}),Ag(`threadListItem.switchedTo`,()=>{r&&h(`instant`)}),yy(v,y,i)},uO=(0,H.forwardRef)((e,t)=>(0,I.jsx)(Ay.div,{...e,ref:t}));uO.displayName=`ThreadPrimitive.Root`;var dO=({children:e})=>G(e=>e.thread.isEmpty)?e:null;dO.displayName=`ThreadPrimitive.Empty`;var Lde=e=>G(t=>!(e.empty===!0&&!t.thread.isEmpty||e.empty===!1&&t.thread.isEmpty||e.running===!0&&!t.thread.isRunning||e.running===!1&&t.thread.isRunning||e.disabled===!0&&!t.thread.isDisabled||e.disabled===!1&&t.thread.isDisabled)),fO=({children:e,...t})=>Lde(t)?e:null;fO.displayName=`ThreadPrimitive.If`;var pO=(e,t)=>QD(W(n=>{if(!e)return;let r=e(),i=()=>{let e=t?t(n):n.offsetHeight;r.setHeight(e)},a=new ResizeObserver(i);return a.observe(n),i(),()=>{a.disconnect(),r.unregister()}},[e,t])),mO=e=>{let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t},Rde=(e,t)=>{let n=0,r=e;for(;r&&r!==t;)n+=r.offsetTop,r=r.offsetParent;return r===t?n:mO(e)-mO(t)},hO=({viewport:e,anchor:t,tallerThan:n,visibleHeight:r})=>{let i=Rde(t,e),a=t.offsetHeight;return i+Math.max(0,a-(a<=n?a:r))},zde=({scrollHeight:e,...t})=>{let{viewport:n}=t,r=hO(t)+n.clientHeight;return Math.max(0,r-e)},Bde=({viewport:e,reserve:t,...n})=>zde({viewport:e,...n,scrollHeight:e.scrollHeight-t.offsetHeight}),Vde=e=>{let t=new ResizeObserver(e),n=new MutationObserver(e),r=null,i=null,a=null,o=()=>{t.disconnect(),n.disconnect(),r=null,i=null,a=null};return{target:(e,s,c)=>{r===e&&i===s&&a===c||(o(),t.observe(e),t.observe(s),t.observe(c),n.observe(c,{childList:!0,subtree:!0,characterData:!0}),r=e,i=s,a=c)},disconnect:o}},Hde=e=>{let t=null;return{schedule:()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))},cancel:()=>{t!==null&&(cancelAnimationFrame(t),t=null)}}},Ude=e=>{let t=null,n;function r(){let r=e.getState(),{viewport:o,anchor:s,target:c}=r.element,l=r.targetConfig;if(r.turnAnchor!==`top`||!o||!s||!c||!l){a.disconnect(),t&&(eO(t,0),t.remove());return}if(t??=vde(),(t.parentElement!==c.parentElement||t.previousElementSibling!==c)&&c.after(t),a.target(o,s,c),eO(t,Bde({viewport:o,anchor:s,reserve:t,...l}))){i.schedule();return}let u=_de(s);if(u!==void 0&&n===u)return;let d=yde(hO({viewport:o,anchor:s,...l}));Math.abs(o.scrollTop-d)>1&&o.scrollTo({top:d,behavior:`smooth`}),u!==void 0&&(n=u)}let i=Hde(r),a=Vde(i.schedule);i.schedule();let o=e.subscribe(i.schedule);return()=>{i.cancel(),o(),a.disconnect(),t?.remove()}},Wde=e=>{let t=ly();Ch(()=>{if(e)return Ude(t)},[e,t])},gO=({isRunning:e,messages:t})=>{if(!e)return null;let n=t.at(-1),r=t.at(-2);return r?.role!==`user`||n?.role!==`assistant`?null:{anchorId:r.id,targetId:n.id}},Gde=e=>gO(e)?.anchorId,Kde=e=>gO(e)?.targetId,qde=()=>pO(cy(e=>e.registerViewport),W(e=>e.clientHeight,[])),Jde=()=>QD(cy(e=>e.registerViewportElement)),Yde=e=>{let t=ly(),n=G(t=>{if(e)return Gde(t.thread)}),r=G(t=>{if(e)return Kde(t.thread)}),i=U(()=>!n||!r?null:{anchorId:n,targetId:r},[n,r]);Ch(()=>{if(!i)return;let e=t.getState(),n=e.topAnchorTurn;n?.anchorId===i.anchorId&&n.targetId===i.targetId||e.setTopAnchorTurn(i)},[i,t]);let a=W(()=>{t.getState().setTopAnchorTurn(null)},[t]);Ag(`thread.initialize`,a),Ag(`threadListItem.switchedTo`,a)},_O=(0,H.forwardRef)(({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:n,scrollToBottomOnThreadSwitch:r,children:i,...a},o)=>{let s=Ide({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:n,scrollToBottomOnThreadSwitch:r}),c=qde(),l=Jde(),u=ly().getState().turnAnchor===`top`;Yde(u),Wde(u);let d=yy(o,s,c,l);return(0,I.jsx)(Ay.div,{...a,ref:d,children:i})});_O.displayName=`ThreadPrimitive.ViewportScrollable`;var vO=(0,H.forwardRef)(({turnAnchor:e,topAnchorMessageClamp:t,...n},r)=>(0,I.jsx)(fy,{options:{turnAnchor:e,topAnchorMessageClamp:t},children:(0,I.jsx)(_O,{...n,ref:r})}));vO.displayName=`ThreadPrimitive.Viewport`;var yO=(0,H.forwardRef)((e,t)=>{let n=yy(t,pO(cy(e=>e.registerContentInset),W(e=>{let t=parseFloat(getComputedStyle(e).marginTop)||0;return e.offsetHeight+t},[])));return(0,I.jsx)(Ay.div,{...e,ref:n})});yO.displayName=`ThreadPrimitive.ViewportFooter`;var Xde=Ny(`ThreadPrimitive.ScrollToBottom`,({behavior:e}={})=>{let t=cy(e=>e.isAtBottom),n=ly(),r=W(()=>{n.getState().scrollToBottom({behavior:e})},[n,e]);return t?null:r},[`behavior`]),Zde=Ny(`ThreadPrimitive.Suggestion`,({prompt:e,send:t,clearComposer:n,autoSend:r,method:i})=>{let{disabled:a,trigger:o}=lie({prompt:e,send:t??r??!1,clearComposer:n});return a?null:o},[`prompt`,`send`,`clearComposer`,`autoSend`,`method`]),bO=xy({Empty:()=>dO,If:()=>fO,MessageByIndex:()=>vv,Messages:()=>Sre,Root:()=>uO,ScrollToBottom:()=>Xde,Suggestion:()=>Zde,SuggestionByIndex:()=>ty,Suggestions:()=>Xre,Viewport:()=>vO,ViewportFooter:()=>yO,ViewportProvider:()=>fy}),Qde=xy({AssistantRuntimeImpl:()=>A_,BaseAssistantRuntimeCore:()=>j_,CompositeContextProvider:()=>Gh,DefaultThreadComposerRuntimeCore:()=>X_,MessageRepository:()=>H_,ThreadRuntimeImpl:()=>E_,fromThreadMessageLike:()=>z_,generateId:()=>F_,getAutoStatus:()=>L_,splitLocalRuntimeOptions:()=>die,useComposerInputPluginRegistryOptional:()=>nD,useSmooth:()=>YD,useSmoothStatus:()=>mde,withSmoothContextProvider:()=>pde}),xO=typeof window<`u`&&window.location?window.location.hostname:``,SO=e=>`oc.brand.${e}`;function $de(e){if(typeof e!=`object`||!e||Array.isArray(e)||!(`tokens`in e))return!1;let t=e.tokens;if(t===null)return!0;if(typeof t!=`object`)return!1;let n=t.colors;return typeof n==`object`&&!!n&&`light`in n&&`dark`in n}function efe(e){try{let t=localStorage.getItem(SO(e));if(!t)return null;let n=JSON.parse(t);return $de(n)?n:null}catch{return null}}function tfe(e,t){try{localStorage.setItem(SO(e),JSON.stringify(t))}catch{}}var nfe=`background.foreground.card.card-foreground.popover.popover-foreground.primary.primary-foreground.secondary.secondary-foreground.muted.muted-foreground.accent.accent-foreground.destructive.destructive-foreground.border.input.ring.chart-1.chart-2.chart-3.chart-4.chart-5.sidebar.sidebar-foreground.sidebar-primary.sidebar-primary-foreground.sidebar-accent.sidebar-accent-foreground.sidebar-border.sidebar-ring`.split(`.`),CO=[{key:`ocean`,name:`Ocean`,tokens:{colors:{light:{background:`oklch(0.985 0.012 230)`,foreground:`oklch(0.22 0.04 245)`,card:`oklch(0.995 0.008 230)`,"card-foreground":`oklch(0.22 0.04 245)`,popover:`oklch(0.995 0.008 230)`,"popover-foreground":`oklch(0.22 0.04 245)`,primary:`oklch(0.55 0.13 235)`,"primary-foreground":`oklch(0.99 0.01 230)`,secondary:`oklch(0.93 0.03 220)`,"secondary-foreground":`oklch(0.28 0.05 240)`,muted:`oklch(0.94 0.02 225)`,"muted-foreground":`oklch(0.5 0.04 235)`,accent:`oklch(0.9 0.05 200)`,"accent-foreground":`oklch(0.28 0.06 230)`,border:`oklch(0.88 0.03 225)`,input:`oklch(0.88 0.03 225)`,ring:`oklch(0.55 0.13 235)`,"chart-1":`oklch(0.6 0.13 235)`,"chart-2":`oklch(0.65 0.12 200)`,"chart-3":`oklch(0.55 0.1 260)`,"chart-4":`oklch(0.7 0.11 180)`,"chart-5":`oklch(0.5 0.12 215)`,sidebar:`oklch(0.96 0.02 228)`,"sidebar-foreground":`oklch(0.24 0.04 245)`,"sidebar-primary":`oklch(0.55 0.13 235)`,"sidebar-primary-foreground":`oklch(0.99 0.01 230)`,"sidebar-accent":`oklch(0.9 0.05 200)`,"sidebar-accent-foreground":`oklch(0.28 0.06 230)`,"sidebar-border":`oklch(0.87 0.03 225)`,"sidebar-ring":`oklch(0.55 0.13 235)`},dark:{background:`oklch(0.2 0.03 245)`,foreground:`oklch(0.95 0.02 225)`,card:`oklch(0.25 0.04 245)`,"card-foreground":`oklch(0.95 0.02 225)`,popover:`oklch(0.25 0.04 245)`,"popover-foreground":`oklch(0.95 0.02 225)`,primary:`oklch(0.7 0.12 230)`,"primary-foreground":`oklch(0.18 0.04 245)`,secondary:`oklch(0.3 0.04 240)`,"secondary-foreground":`oklch(0.95 0.02 225)`,muted:`oklch(0.3 0.03 242)`,"muted-foreground":`oklch(0.72 0.04 228)`,accent:`oklch(0.4 0.07 210)`,"accent-foreground":`oklch(0.96 0.02 220)`,border:`oklch(0.35 0.03 242)`,input:`oklch(0.35 0.03 242)`,ring:`oklch(0.7 0.12 230)`,"chart-1":`oklch(0.7 0.13 230)`,"chart-2":`oklch(0.72 0.12 195)`,"chart-3":`oklch(0.65 0.11 260)`,"chart-4":`oklch(0.76 0.1 180)`,"chart-5":`oklch(0.62 0.12 215)`,sidebar:`oklch(0.23 0.04 246)`,"sidebar-foreground":`oklch(0.95 0.02 225)`,"sidebar-primary":`oklch(0.7 0.12 230)`,"sidebar-primary-foreground":`oklch(0.18 0.04 245)`,"sidebar-accent":`oklch(0.4 0.07 210)`,"sidebar-accent-foreground":`oklch(0.96 0.02 220)`,"sidebar-border":`oklch(0.34 0.03 242)`,"sidebar-ring":`oklch(0.7 0.12 230)`}},radius:`0.75rem`,fontSans:`ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif`}},{key:`forest`,name:`Forest`,tokens:{colors:{light:{background:`oklch(0.985 0.012 130)`,foreground:`oklch(0.24 0.04 145)`,card:`oklch(0.995 0.008 130)`,"card-foreground":`oklch(0.24 0.04 145)`,popover:`oklch(0.995 0.008 130)`,"popover-foreground":`oklch(0.24 0.04 145)`,primary:`oklch(0.52 0.12 150)`,"primary-foreground":`oklch(0.99 0.01 130)`,secondary:`oklch(0.93 0.04 130)`,"secondary-foreground":`oklch(0.3 0.05 150)`,muted:`oklch(0.94 0.03 135)`,"muted-foreground":`oklch(0.5 0.04 145)`,accent:`oklch(0.9 0.06 115)`,"accent-foreground":`oklch(0.3 0.06 150)`,border:`oklch(0.88 0.03 135)`,input:`oklch(0.88 0.03 135)`,ring:`oklch(0.52 0.12 150)`,"chart-1":`oklch(0.58 0.13 150)`,"chart-2":`oklch(0.68 0.12 120)`,"chart-3":`oklch(0.6 0.11 95)`,"chart-4":`oklch(0.55 0.1 175)`,"chart-5":`oklch(0.5 0.12 140)`,sidebar:`oklch(0.96 0.02 132)`,"sidebar-foreground":`oklch(0.26 0.04 145)`,"sidebar-primary":`oklch(0.52 0.12 150)`,"sidebar-primary-foreground":`oklch(0.99 0.01 130)`,"sidebar-accent":`oklch(0.9 0.06 115)`,"sidebar-accent-foreground":`oklch(0.3 0.06 150)`,"sidebar-border":`oklch(0.87 0.03 135)`,"sidebar-ring":`oklch(0.52 0.12 150)`},dark:{background:`oklch(0.2 0.03 150)`,foreground:`oklch(0.95 0.02 130)`,card:`oklch(0.25 0.04 150)`,"card-foreground":`oklch(0.95 0.02 130)`,popover:`oklch(0.25 0.04 150)`,"popover-foreground":`oklch(0.95 0.02 130)`,primary:`oklch(0.68 0.13 145)`,"primary-foreground":`oklch(0.18 0.04 150)`,secondary:`oklch(0.3 0.04 148)`,"secondary-foreground":`oklch(0.95 0.02 130)`,muted:`oklch(0.3 0.03 150)`,"muted-foreground":`oklch(0.72 0.04 135)`,accent:`oklch(0.4 0.07 120)`,"accent-foreground":`oklch(0.96 0.02 125)`,border:`oklch(0.35 0.03 148)`,input:`oklch(0.35 0.03 148)`,ring:`oklch(0.68 0.13 145)`,"chart-1":`oklch(0.68 0.14 148)`,"chart-2":`oklch(0.74 0.12 120)`,"chart-3":`oklch(0.68 0.11 95)`,"chart-4":`oklch(0.62 0.1 175)`,"chart-5":`oklch(0.6 0.12 140)`,sidebar:`oklch(0.23 0.04 150)`,"sidebar-foreground":`oklch(0.95 0.02 130)`,"sidebar-primary":`oklch(0.68 0.13 145)`,"sidebar-primary-foreground":`oklch(0.18 0.04 150)`,"sidebar-accent":`oklch(0.4 0.07 120)`,"sidebar-accent-foreground":`oklch(0.96 0.02 125)`,"sidebar-border":`oklch(0.34 0.03 148)`,"sidebar-ring":`oklch(0.68 0.13 145)`}},radius:`0.375rem`,fontSans:`Georgia, Cambria, 'Times New Roman', Times, serif`}},{key:`dusk`,name:`Dusk`,tokens:{colors:{light:{background:`oklch(0.985 0.012 300)`,foreground:`oklch(0.24 0.05 300)`,card:`oklch(0.995 0.008 300)`,"card-foreground":`oklch(0.24 0.05 300)`,popover:`oklch(0.995 0.008 300)`,"popover-foreground":`oklch(0.24 0.05 300)`,primary:`oklch(0.55 0.16 300)`,"primary-foreground":`oklch(0.99 0.01 300)`,secondary:`oklch(0.93 0.04 310)`,"secondary-foreground":`oklch(0.3 0.06 300)`,muted:`oklch(0.94 0.03 305)`,"muted-foreground":`oklch(0.5 0.05 300)`,accent:`oklch(0.9 0.07 70)`,"accent-foreground":`oklch(0.32 0.08 60)`,border:`oklch(0.88 0.03 305)`,input:`oklch(0.88 0.03 305)`,ring:`oklch(0.55 0.16 300)`,"chart-1":`oklch(0.58 0.17 300)`,"chart-2":`oklch(0.7 0.15 70)`,"chart-3":`oklch(0.55 0.15 330)`,"chart-4":`oklch(0.65 0.14 35)`,"chart-5":`oklch(0.5 0.16 280)`,sidebar:`oklch(0.96 0.02 303)`,"sidebar-foreground":`oklch(0.26 0.05 300)`,"sidebar-primary":`oklch(0.55 0.16 300)`,"sidebar-primary-foreground":`oklch(0.99 0.01 300)`,"sidebar-accent":`oklch(0.9 0.07 70)`,"sidebar-accent-foreground":`oklch(0.32 0.08 60)`,"sidebar-border":`oklch(0.87 0.03 305)`,"sidebar-ring":`oklch(0.55 0.16 300)`},dark:{background:`oklch(0.2 0.04 300)`,foreground:`oklch(0.95 0.02 305)`,card:`oklch(0.25 0.05 300)`,"card-foreground":`oklch(0.95 0.02 305)`,popover:`oklch(0.25 0.05 300)`,"popover-foreground":`oklch(0.95 0.02 305)`,primary:`oklch(0.72 0.15 300)`,"primary-foreground":`oklch(0.18 0.04 300)`,secondary:`oklch(0.3 0.05 305)`,"secondary-foreground":`oklch(0.95 0.02 305)`,muted:`oklch(0.3 0.04 303)`,"muted-foreground":`oklch(0.72 0.05 305)`,accent:`oklch(0.45 0.1 65)`,"accent-foreground":`oklch(0.96 0.02 70)`,border:`oklch(0.35 0.04 303)`,input:`oklch(0.35 0.04 303)`,ring:`oklch(0.72 0.15 300)`,"chart-1":`oklch(0.72 0.16 300)`,"chart-2":`oklch(0.78 0.14 70)`,"chart-3":`oklch(0.68 0.15 330)`,"chart-4":`oklch(0.72 0.13 35)`,"chart-5":`oklch(0.64 0.16 280)`,sidebar:`oklch(0.23 0.05 300)`,"sidebar-foreground":`oklch(0.95 0.02 305)`,"sidebar-primary":`oklch(0.72 0.15 300)`,"sidebar-primary-foreground":`oklch(0.18 0.04 300)`,"sidebar-accent":`oklch(0.45 0.1 65)`,"sidebar-accent-foreground":`oklch(0.96 0.02 70)`,"sidebar-border":`oklch(0.34 0.04 303)`,"sidebar-ring":`oklch(0.72 0.15 300)`}},radius:`1rem`,fontSans:`ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace`}}];new Set(CO.map(e=>e.key));function wO(e){let t=e??localStorage.getItem(`oc.theme`)??`system`,n=()=>t===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t,[r,i]=(0,N.useState)(n);return(0,N.useEffect)(()=>{if(i(n()),t!==`system`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>i(e.matches?`dark`:`light`);return e.addEventListener(`change`,r),()=>e.removeEventListener(`change`,r)},[t]),r}function rfe(e,t){let n=document.documentElement.style,r=e?.colors?.[t];for(let e of nfe){let t=r?.[e];t===void 0?n.removeProperty(`--`+e):n.setProperty(`--`+e,t)}e?.radius===void 0?n.removeProperty(`--radius`):n.setProperty(`--radius`,e.radius),e?.fontSans===void 0?n.removeProperty(`--ui-font-sans`):n.setProperty(`--ui-font-sans`,e.fontSans),e?.fontMono===void 0?n.removeProperty(`--ui-font-mono`):n.setProperty(`--ui-font-mono`,e.fontMono)}function TO(e,t){(0,N.useEffect)(()=>{rfe(e??null,t)},[e,t])}var EO=new Map,DO={active:!1,percent:0,count:0},OO=new Set;function kO(){let e=0,t=0;for(let n of EO.values())e+=n.loaded,t+=n.total;let n=EO.size;DO={active:n>0,percent:t>0?Math.min(100,Math.round(e/t*100)):0,count:n};for(let e of OO)e()}var AO={subscribe(e){return OO.add(e),()=>OO.delete(e)},getSnapshot(){return DO},report(e,t,n){EO.set(e,{loaded:t,total:n}),kO()},clear(e){EO.delete(e)&&kO()}};function ife(e,t){if(!e)return null;let n=e.logoLightHasAlpha&&e.logoLightUrl||e.logoDarkHasAlpha&&e.logoDarkUrl||null;if(n)return{url:n,masked:!0};let r=jO(e,t);return r?{url:r,masked:!1}:null}function jO(e,t){return(t===`dark`?e?.logoDarkUrl:e?.logoLightUrl)??(t===`dark`?e?.logoLightUrl:e?.logoDarkUrl)??null}function MO(e){if(!e)return null;let t=/oklch\(\s*([0-9]*\.?[0-9]+)(%?)/i.exec(e);if(!t)return null;let n=parseFloat(t[1]);return Number.isFinite(n)?t[2]===`%`?n/100:n:null}function afe(e,t,n){let r=MO(e),i=MO(t);return r===null||i===null?n:i>r?`dark`:`light`}function ofe(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?`?`:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[1][0]).toUpperCase()}function NO({className:e}){return(0,I.jsxs)(`svg`,{className:e,viewBox:`0 0 64 64`,fill:`none`,"aria-hidden":`true`,children:[(0,I.jsx)(`path`,{d:`M25 15H15V49H25`,stroke:`currentColor`,strokeWidth:`6.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,I.jsx)(`path`,{d:`M39 15H49V49H39`,stroke:`currentColor`,strokeWidth:`6.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,I.jsx)(`polyline`,{points:`20 33 26 33 29 25 33 41 37 29 41 33 44 33`,stroke:`currentColor`,strokeWidth:`3.4`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var sfe={},PO=[`fr`,`en`],cfe=`PARAGLIDE_LOCALE`,FO=[`localStorage`,`baseLocale`],IO=[],LO,RO;function lfe(e){if(IO.length===0)return;let t=typeof e==`string`?e:e.href;if(LO===t)return RO;let n=new URL(t,`http://dummy.com`),r;for(let e of IO)if(new sfe(e.match,n.href).exec(n.href)){r=e;break}return LO=t,RO=r,r}function zO(e){let t=lfe(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:FO}var BO=void 0;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var VO=!1,q=()=>{if(BO){let e=BO?.getStore()?.locale;if(e)return e}let e=FO;typeof window<`u`&&window.location?.href&&(e=zO(window.location.href));let t=ufe(e,typeof window<`u`?window.location?.href:void 0);if(t)return VO||(VO=!0,HO(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found`)};function ufe(e,t){let n;for(let t of e){if(t===`baseLocale`)n=`fr`;else if(t===`localStorage`)n=localStorage.getItem(`PARAGLIDE_LOCALE`)??void 0;else if(GO(t)&&WO.has(t)){let e=WO.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return ffe(t)}}let e=UO(n);if(e)return e}}var dfe=e=>{e?window.location.href=e:window.location.reload()},HO=(e,t)=>{let n={reload:!0,...t},r;try{r=q()}catch{}let i=[],a=FO;typeof window<`u`&&window.location?.href&&(a=zO(window.location.href));for(let t of a)if(t===`baseLocale`)continue;else if(t===`localStorage`&&typeof window<`u`)localStorage.setItem(cfe,e);else if(GO(t)&&WO.has(t)){let n=WO.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let o=()=>{n.reload&&window.location&&e!==r&&dfe(void 0)};if(i.length)return Promise.all(i).then(()=>{o()});o()};function UO(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of PO)if(e.toLowerCase()===t)return e}function ffe(e){let t=UO(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${PO.join(`, `)}`)}var WO=new Map;function GO(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}var pfe=e=>`Fichier trop volumineux (${e?.size} Mo, max ${e?.max} Mo). Réduisez-le (p. ex. compressez les images) et réessayez.`,mfe=e=>`File too large (${e?.size} MB, max ${e?.max} MB). Reduce it (e.g. compress images) and try again.`,hfe=((e,t={})=>(t.locale??q())===`fr`?pfe(e):mfe(e)),gfe=()=>`Chargement…`,_fe=()=>`Loading…`,KO=((e={},t={})=>(t.locale??q())===`fr`?gfe(e):_fe(e)),vfe=()=>`Thème`,qO=()=>`Theme`,JO=((e={},t={})=>(t.locale??q())===`fr`?vfe(e):qO(e)),YO=()=>`Clair`,XO=()=>`Light`,ZO=((e={},t={})=>(t.locale??q())===`fr`?YO(e):XO(e)),QO=()=>`Sombre`,$O=()=>`Dark`,ek=((e={},t={})=>(t.locale??q())===`fr`?QO(e):$O(e)),tk=()=>`Système`,nk=()=>`System`,rk=((e={},t={})=>(t.locale??q())===`fr`?tk(e):nk(e)),ik=()=>`Défaut de l’app`,ak=()=>`App default`,ok=((e={},t={})=>(t.locale??q())===`fr`?ik(e):ak(e)),sk=()=>`Se déconnecter`,ck=()=>`Sign out`,lk=((e={},t={})=>(t.locale??q())===`fr`?sk(e):ck(e)),uk=()=>`Préférences`,dk=()=>`Preferences`,fk=((e={},t={})=>(t.locale??q())===`fr`?uk(e):dk(e)),pk=()=>`Nom affiché`,mk=()=>`Display name`,hk=((e={},t={})=>(t.locale??q())===`fr`?pk(e):mk(e)),gk=()=>`Le nom et prénom affichés dans la liste des utilisateurs et le menu de compte. Vous pouvez le modifier à tout moment.`,_k=()=>`The name shown in the user list and the account menu. You can change it at any time.`,vk=((e={},t={})=>(t.locale??q())===`fr`?gk(e):_k(e)),yk=()=>`Votre nom et prénom`,bk=()=>`Your name`,xk=((e={},t={})=>(t.locale??q())===`fr`?yk(e):bk(e)),Sk=()=>`Laissez vide pour n’afficher que votre email.`,Ck=()=>`Leave empty to show only your email.`,wk=((e={},t={})=>(t.locale??q())===`fr`?Sk(e):Ck(e)),Tk=()=>`Nom affiché mis à jour.`,Ek=()=>`Display name updated.`,Dk=((e={},t={})=>(t.locale??q())===`fr`?Tk(e):Ek(e)),Ok=()=>`Échec de la mise à jour du nom`,kk=()=>`Failed to update the name`,Ak=((e={},t={})=>(t.locale??q())===`fr`?Ok(e):kk(e)),jk=()=>`Langue`,Mk=()=>`Language`,Nk=((e={},t={})=>(t.locale??q())===`fr`?jk(e):Mk(e)),Pk=()=>`Choisissez la langue de l’interface. « Défaut de l’app » suit le réglage de l’administrateur.`,Fk=()=>`Choose the interface language. “App default” follows the administrator setting.`,Ik=((e={},t={})=>(t.locale??q())===`fr`?Pk(e):Fk(e)),Lk=()=>`Le changement de langue recharge la page une fois.`,Rk=()=>`Changing the language reloads the page once.`,zk=((e={},t={})=>(t.locale??q())===`fr`?Lk(e):Rk(e)),Bk=()=>`Interface`,Vk=()=>`Interface`,Hk=((e={},t={})=>(t.locale??q())===`fr`?Bk(e):Vk(e)),Uk=()=>`Activez ou masquez des éléments d’interface. Les options grisées sont verrouillées par l’administrateur.`,Wk=()=>`Enable or hide interface elements. Greyed options are locked by the administrator.`,Gk=((e={},t={})=>(t.locale??q())===`fr`?Uk(e):Wk(e)),Kk=()=>`Français`,qk=()=>`French`,Jk=((e={},t={})=>(t.locale??q())===`fr`?Kk(e):qk(e)),Yk=()=>`Anglais`,Xk=()=>`English`,Zk=((e={},t={})=>(t.locale??q())===`fr`?Yk(e):Xk(e)),Qk=()=>`Fichiers`,$k=()=>`Files`,eA=((e={},t={})=>(t.locale??q())===`fr`?Qk(e):$k(e)),tA=()=>`Tous les fichiers échangés dans vos conversations (envoyés et reçus).`,nA=()=>`Every file exchanged across your conversations (sent and received).`,rA=((e={},t={})=>(t.locale??q())===`fr`?tA(e):nA(e)),iA=()=>`Sens`,aA=()=>`Direction`,oA=((e={},t={})=>(t.locale??q())===`fr`?iA(e):aA(e)),sA=()=>`Tous les sens`,cA=()=>`All directions`,lA=((e={},t={})=>(t.locale??q())===`fr`?sA(e):cA(e)),uA=()=>`Envoyé`,dA=()=>`Sent`,fA=((e={},t={})=>(t.locale??q())===`fr`?uA(e):dA(e)),pA=()=>`Reçu`,mA=()=>`Received`,hA=((e={},t={})=>(t.locale??q())===`fr`?pA(e):mA(e)),gA=()=>`Conversation`,_A=()=>`Conversation`,vA=((e={},t={})=>(t.locale??q())===`fr`?gA(e):_A(e)),yA=()=>`Toutes les conversations`,bA=()=>`All conversations`,xA=((e={},t={})=>(t.locale??q())===`fr`?yA(e):bA(e)),SA=()=>`Bridge`,CA=()=>`Bridge`,wA=((e={},t={})=>(t.locale??q())===`fr`?SA(e):CA(e)),TA=()=>`Tous les bridges`,EA=()=>`All bridges`,DA=((e={},t={})=>(t.locale??q())===`fr`?TA(e):EA(e)),OA=()=>`Type`,kA=()=>`Type`,AA=((e={},t={})=>(t.locale??q())===`fr`?OA(e):kA(e)),jA=()=>`Tous les types`,MA=()=>`All types`,NA=((e={},t={})=>(t.locale??q())===`fr`?jA(e):MA(e)),PA=()=>`Image`,FA=()=>`Image`,IA=((e={},t={})=>(t.locale??q())===`fr`?PA(e):FA(e)),LA=()=>`Audio`,RA=()=>`Audio`,zA=((e={},t={})=>(t.locale??q())===`fr`?LA(e):RA(e)),BA=()=>`Vidéo`,VA=()=>`Video`,HA=((e={},t={})=>(t.locale??q())===`fr`?BA(e):VA(e)),UA=()=>`PDF`,WA=()=>`PDF`,GA=((e={},t={})=>(t.locale??q())===`fr`?UA(e):WA(e)),KA=()=>`Document`,qA=()=>`Document`,JA=((e={},t={})=>(t.locale??q())===`fr`?KA(e):qA(e)),YA=()=>`Archive`,XA=()=>`Archive`,ZA=((e={},t={})=>(t.locale??q())===`fr`?YA(e):XA(e)),QA=()=>`Autre`,$A=()=>`Other`,ej=((e={},t={})=>(t.locale??q())===`fr`?QA(e):$A(e)),tj=()=>`Nom`,nj=()=>`Name`,rj=((e={},t={})=>(t.locale??q())===`fr`?tj(e):nj(e)),ij=()=>`Type`,aj=()=>`Type`,oj=((e={},t={})=>(t.locale??q())===`fr`?ij(e):aj(e)),sj=()=>`Sens`,cj=()=>`Direction`,lj=((e={},t={})=>(t.locale??q())===`fr`?sj(e):cj(e)),uj=()=>`Conversation`,dj=()=>`Conversation`,fj=((e={},t={})=>(t.locale??q())===`fr`?uj(e):dj(e)),pj=()=>`Date`,mj=()=>`Date`,hj=((e={},t={})=>(t.locale??q())===`fr`?pj(e):mj(e)),gj=()=>`Action`,_j=()=>`Action`,vj=((e={},t={})=>(t.locale??q())===`fr`?gj(e):_j(e)),yj=()=>`Télécharger`,bj=()=>`Download`,xj=((e={},t={})=>(t.locale??q())===`fr`?yj(e):bj(e)),Sj=()=>`Réinitialiser`,Cj=()=>`Reset`,wj=((e={},t={})=>(t.locale??q())===`fr`?Sj(e):Cj(e)),Tj=()=>`Actions`,Ej=()=>`Actions`,Dj=((e={},t={})=>(t.locale??q())===`fr`?Tj(e):Ej(e)),Oj=()=>`Supprimer`,kj=()=>`Delete`,Aj=((e={},t={})=>(t.locale??q())===`fr`?Oj(e):kj(e)),jj=()=>`Fichier supprimé`,Mj=()=>`File removed`,Nj=((e={},t={})=>(t.locale??q())===`fr`?jj(e):Mj(e)),Pj=()=>`Échec de la suppression du fichier`,Fj=()=>`Could not remove the file`,Ij=((e={},t={})=>(t.locale??q())===`fr`?Pj(e):Fj(e)),Lj=()=>`Supprimer ce fichier ?`,Rj=()=>`Remove this file?`,zj=((e={},t={})=>(t.locale??q())===`fr`?Lj(e):Rj(e)),Bj=()=>`Il sera retiré de vos fichiers. La conversation où il a été échangé n'est pas modifiée.`,Vj=()=>`It will be removed from your files. The conversation where it was exchanged is unchanged.`,Hj=((e={},t={})=>(t.locale??q())===`fr`?Bj(e):Vj(e)),Uj=()=>`Indisponible`,Wj=()=>`Unavailable`,Gj=((e={},t={})=>(t.locale??q())===`fr`?Uj(e):Wj(e)),Kj=()=>`Aucun fichier pour le moment.`,qj=()=>`No files yet.`,Jj=((e={},t={})=>(t.locale??q())===`fr`?Kj(e):qj(e)),Yj=()=>`Aucun fichier ne correspond aux filtres.`,Xj=()=>`No files match the filters.`,Zj=((e={},t={})=>(t.locale??q())===`fr`?Yj(e):Xj(e)),Qj=e=>`Affichage des ${e?.cap} fichiers les plus récents.`,$j=e=>`Showing the ${e?.cap} most recent files.`,eM=((e,t={})=>(t.locale??q())===`fr`?Qj(e):$j(e)),tM=()=>`Apparence`,nM=()=>`Appearance`,rM=((e={},t={})=>(t.locale??q())===`fr`?tM(e):nM(e)),iM=()=>`Thème par défaut de l’application`,aM=()=>`Default app theme`,oM=((e={},t={})=>(t.locale??q())===`fr`?iM(e):aM(e)),sM=()=>`Appliqué aux utilisateurs sans préférence personnelle.`,cM=()=>`Applied to users without a personal preference.`,lM=((e={},t={})=>(t.locale??q())===`fr`?sM(e):cM(e)),uM=()=>`Langue par défaut de l’application`,dM=()=>`Default app language`,fM=((e={},t={})=>(t.locale??q())===`fr`?uM(e):dM(e)),pM=()=>`Langue des nouveaux utilisateurs qui n’ont pas encore choisi la leur.`,mM=()=>`Language for new users who haven’t picked their own yet.`,hM=((e={},t={})=>(t.locale??q())===`fr`?pM(e):mM(e)),gM=()=>`Si vous n’avez pas défini votre propre langue, changer ce défaut rechargera votre vue.`,_M=()=>`If you haven’t set your own language, changing this default will reload your view.`,vM=((e={},t={})=>(t.locale??q())===`fr`?gM(e):_M(e)),yM=()=>`Référence des composants (design)`,bM=()=>`Component reference (design)`,xM=((e={},t={})=>(t.locale??q())===`fr`?yM(e):bM(e)),SM=()=>`Administration de l’apparence`,CM=()=>`Appearance administration`,wM=((e={},t={})=>(t.locale??q())===`fr`?SM(e):CM(e)),TM=()=>`Réservé aux administrateurs. S’applique à toute l’organisation.`,EM=()=>`Admins only. Applies to the whole organization.`,DM=((e={},t={})=>(t.locale??q())===`fr`?TM(e):EM(e)),OM=()=>`Ma charte graphique`,kM=()=>`My graphic chart`,AM=((e={},t={})=>(t.locale??q())===`fr`?OM(e):kM(e)),jM=()=>`Choisissez la palette appliquée à votre interface, en clair comme en sombre.`,MM=()=>`Pick the palette applied to your interface, in light and dark.`,NM=((e={},t={})=>(t.locale??q())===`fr`?jM(e):MM(e)),PM=()=>`Défaut de l’application`,FM=()=>`Application default`,IM=((e={},t={})=>(t.locale??q())===`fr`?PM(e):FM(e)),LM=()=>`Suit le défaut de l’application.`,RM=()=>`Follows the application default.`,zM=((e={},t={})=>(t.locale??q())===`fr`?LM(e):RM(e)),BM=()=>`Commune`,VM=()=>`Common`,HM=((e={},t={})=>(t.locale??q())===`fr`?BM(e):VM(e)),UM=()=>`La vôtre`,WM=()=>`Yours`,GM=((e={},t={})=>(t.locale??q())===`fr`?UM(e):WM(e)),KM=e=>`Via le groupe ${e?.group}`,qM=e=>`Via group ${e?.group}`,JM=((e,t={})=>(t.locale??q())===`fr`?KM(e):qM(e)),YM=()=>`Aucune charte disponible pour le moment.`,XM=()=>`No chart available yet.`,ZM=((e={},t={})=>(t.locale??q())===`fr`?YM(e):XM(e)),QM=()=>`Charte par défaut de l’application`,$M=()=>`Application default chart`,eN=((e={},t={})=>(t.locale??q())===`fr`?QM(e):$M(e)),tN=()=>`Appliquée aux utilisateurs sans charte personnelle.`,nN=()=>`Applied to users without a personal chart.`,rN=((e={},t={})=>(t.locale??q())===`fr`?tN(e):nN(e)),iN=()=>`Pools de chartes par groupe`,aN=()=>`Group chart pools`,oN=((e={},t={})=>(t.locale??q())===`fr`?iN(e):aN(e)),sN=()=>`Définissez le pool de chaque charte : les groupes qui PEUVENT la proposer. Un gestionnaire de groupe choisit ensuite dans son pool (onglet Groupes). Une charte reste commune tant qu’aucun groupe ne l’a sélectionnée.`,cN=()=>`Define each chart's pool: the groups that MAY offer it. A group manager then selects from its pool (Groups tab). A chart stays common until a group actually selects it.`,lN=((e={},t={})=>(t.locale??q())===`fr`?sN(e):cN(e)),uN=()=>`Charte par domaine`,dN=()=>`Chart by domain`,fN=((e={},t={})=>(t.locale??q())===`fr`?uN(e):dN(e)),pN=()=>`Associez un domaine à une charte publique (intégrée ou commune) : elle devient la charte par défaut sur cet hôte, page de connexion comprise.`,mN=()=>`Map a domain to a public chart (builtin or common): it becomes the default chart on that host, including the login page.`,hN=((e={},t={})=>(t.locale??q())===`fr`?pN(e):mN(e)),gN=()=>`Commune`,_N=()=>`Common`,vN=((e={},t={})=>(t.locale??q())===`fr`?gN(e):_N(e)),yN=()=>`Restreinte`,bN=()=>`Restricted`,xN=((e={},t={})=>(t.locale??q())===`fr`?yN(e):bN(e)),SN=()=>`Défaut`,CN=()=>`Default`,wN=((e={},t={})=>(t.locale??q())===`fr`?SN(e):CN(e)),TN=()=>`Aucun groupe à associer.`,EN=()=>`No group to attach.`,DN=((e={},t={})=>(t.locale??q())===`fr`?TN(e):EN(e)),ON=()=>`Disponible aux groupes (pool)`,kN=()=>`Available to groups (pool)`,AN=((e={},t={})=>(t.locale??q())===`fr`?ON(e):kN(e)),jN=()=>`Ajouter au pool d'un groupe…`,MN=()=>`Add to a group's pool…`,NN=((e={},t={})=>(t.locale??q())===`fr`?jN(e):MN(e)),PN=e=>`Retirer ${e?.group} du pool`,FN=e=>`Remove ${e?.group} from the pool`,IN=((e,t={})=>(t.locale??q())===`fr`?PN(e):FN(e)),LN=()=>`Importer une charte`,RN=()=>`Import a chart`,zN=((e={},t={})=>(t.locale??q())===`fr`?LN(e):RN(e)),BN=()=>`Collez le JSON d’une charte (ou choisissez un fichier .json) pour créer votre charte personnelle. Les couleurs doivent être au format oklch ; les valeurs sont validées et nettoyées côté serveur.`,VN=()=>`Paste a chart's JSON (or pick a .json file) to create your personal chart. Colors must be in oklch format; values are validated and sanitized server-side.`,HN=((e={},t={})=>(t.locale??q())===`fr`?BN(e):VN(e)),UN=()=>`Nom de la charte`,WN=()=>`Chart name`,GN=((e={},t={})=>(t.locale??q())===`fr`?UN(e):WN(e)),KN=()=>`Ma charte`,qN=()=>`My chart`,JN=((e={},t={})=>(t.locale??q())===`fr`?KN(e):qN(e)),YN=()=>`JSON des tokens`,XN=()=>`Tokens JSON`,ZN=((e={},t={})=>(t.locale??q())===`fr`?YN(e):XN(e)),QN=()=>`Collez ici le JSON des tokens (colors.light / colors.dark en oklch, radius, fontSans, fontMono)…`,$N=()=>`Paste the tokens JSON here (colors.light / colors.dark in oklch, radius, fontSans, fontMono)…`,eP=((e={},t={})=>(t.locale??q())===`fr`?QN(e):$N(e)),tP=()=>`Charger un fichier .json`,nP=()=>`Load a .json file`,rP=((e={},t={})=>(t.locale??q())===`fr`?tP(e):nP(e)),iP=()=>`Importer`,aP=()=>`Import`,oP=((e={},t={})=>(t.locale??q())===`fr`?iP(e):aP(e)),sP=()=>`JSON invalide : impossible d’analyser le contenu.`,cP=()=>`Invalid JSON: could not parse the content.`,lP=((e={},t={})=>(t.locale??q())===`fr`?sP(e):cP(e)),uP=()=>`Charte importée.`,dP=()=>`Chart imported.`,fP=((e={},t={})=>(t.locale??q())===`fr`?uP(e):dP(e)),pP=()=>`Indiquez un nom de charte.`,mP=()=>`Please provide a chart name.`,hP=((e={},t={})=>(t.locale??q())===`fr`?pP(e):mP(e)),gP=()=>`Mes chartes`,_P=()=>`My charts`,vP=((e={},t={})=>(t.locale??q())===`fr`?gP(e):_P(e)),yP=()=>`Les chartes que vous avez importées. Vous pouvez les renommer, modifier leurs tokens, les associer à vos groupes ou les supprimer.`,bP=()=>`The charts you have imported. You can rename them, edit their tokens, associate them with your groups, or delete them.`,xP=((e={},t={})=>(t.locale??q())===`fr`?yP(e):bP(e)),SP=()=>`Vous n’avez pas encore importé de charte.`,CP=()=>`You haven't imported any chart yet.`,wP=((e={},t={})=>(t.locale??q())===`fr`?SP(e):CP(e)),TP=()=>`Modifier`,EP=()=>`Edit`,DP=((e={},t={})=>(t.locale??q())===`fr`?TP(e):EP(e)),OP=()=>`Supprimer`,kP=()=>`Delete`,AP=((e={},t={})=>(t.locale??q())===`fr`?OP(e):kP(e)),jP=()=>`Logo de marque`,MP=()=>`Brand logo`,NP=((e={},t={})=>(t.locale??q())===`fr`?jP(e):MP(e)),PP=()=>`Mode clair`,FP=()=>`Light mode`,IP=((e={},t={})=>(t.locale??q())===`fr`?PP(e):FP(e)),LP=()=>`Mode sombre`,RP=()=>`Dark mode`,zP=((e={},t={})=>(t.locale??q())===`fr`?LP(e):RP(e)),BP=()=>`Téléverser`,VP=()=>`Upload`,HP=((e={},t={})=>(t.locale??q())===`fr`?BP(e):VP(e)),UP=()=>`Remplacer`,WP=()=>`Replace`,GP=((e={},t={})=>(t.locale??q())===`fr`?UP(e):WP(e)),KP=()=>`Retirer`,qP=()=>`Remove`,JP=((e={},t={})=>(t.locale??q())===`fr`?KP(e):qP(e)),YP=()=>`Générer depuis l’autre mode`,XP=()=>`Generate from the other mode`,ZP=((e={},t={})=>(t.locale??q())===`fr`?YP(e):XP(e)),QP=()=>`Traitement…`,$P=()=>`Processing…`,eF=((e={},t={})=>(t.locale??q())===`fr`?QP(e):$P(e)),tF=()=>`Le fichier doit être une image.`,nF=()=>`The file must be an image.`,rF=((e={},t={})=>(t.locale??q())===`fr`?tF(e):nF(e)),iF=()=>`Image trop volumineuse (max 12 Mo).`,aF=()=>`Image too large (max 12 MB).`,oF=((e={},t={})=>(t.locale??q())===`fr`?iF(e):aF(e)),sF=()=>`Format d’image non pris en charge.`,cF=()=>`Unsupported image format.`,lF=((e={},t={})=>(t.locale??q())===`fr`?sF(e):cF(e)),uF=()=>`Traitement de l’image impossible.`,dF=()=>`Could not process the image.`,fF=((e={},t={})=>(t.locale??q())===`fr`?uF(e):dF(e)),pF=()=>`Encodage de l’image impossible.`,mF=()=>`Could not encode the image.`,hF=((e={},t={})=>(t.locale??q())===`fr`?pF(e):mF(e)),gF=()=>`Domaines (admin)`,_F=()=>`Domains (admin)`,vF=((e={},t={})=>(t.locale??q())===`fr`?gF(e):_F(e)),yF=()=>`Quand Atrium est ouvert sur ce domaine, cette charte s’applique par défaut (page de connexion incluse). Ex. chat.acme.com ou *.acme.com.`,bF=()=>`When Atrium is opened on this domain, this chart applies by default (including the login page). E.g. chat.acme.com or *.acme.com.`,xF=((e={},t={})=>(t.locale??q())===`fr`?yF(e):bF(e)),SF=()=>`chat.acme.com ou *.acme.com`,CF=()=>`chat.acme.com or *.acme.com`,wF=((e={},t={})=>(t.locale??q())===`fr`?SF(e):CF(e)),TF=()=>`Ajouter`,EF=()=>`Add`,DF=((e={},t={})=>(t.locale??q())===`fr`?TF(e):EF(e)),OF=()=>`Aucun domaine.`,kF=()=>`No domain.`,AF=((e={},t={})=>(t.locale??q())===`fr`?OF(e):kF(e)),jF=e=>`Retirer ${e?.domain}`,MF=e=>`Remove ${e?.domain}`,NF=((e,t={})=>(t.locale??q())===`fr`?jF(e):MF(e)),PF=()=>`Enregistrer`,FF=()=>`Save`,IF=((e={},t={})=>(t.locale??q())===`fr`?PF(e):FF(e)),LF=()=>`Annuler`,RF=()=>`Cancel`,zF=((e={},t={})=>(t.locale??q())===`fr`?LF(e):RF(e)),BF=()=>`Nom`,VF=()=>`Name`,HF=((e={},t={})=>(t.locale??q())===`fr`?BF(e):VF(e)),UF=()=>`Tokens (JSON)`,WF=()=>`Tokens (JSON)`,GF=((e={},t={})=>(t.locale??q())===`fr`?UF(e):WF(e)),KF=()=>`Supprimer définitivement cette charte ?`,qF=()=>`Permanently delete this chart?`,JF=((e={},t={})=>(t.locale??q())===`fr`?KF(e):qF(e)),YF=()=>`Chartes personnalisées`,XF=()=>`Custom charts`,ZF=((e={},t={})=>(t.locale??q())===`fr`?YF(e):XF(e)),QF=()=>`Gérez les chartes importées par les utilisateurs : promouvoir en commune (offerte à tous) ou supprimer.`,$F=()=>`Manage charts imported by users: promote to common (offered to everyone) or delete.`,eI=((e={},t={})=>(t.locale??q())===`fr`?QF(e):$F(e)),tI=e=>`Propriétaire : ${e?.owner}`,nI=e=>`Owner: ${e?.owner}`,rI=((e,t={})=>(t.locale??q())===`fr`?tI(e):nI(e)),iI=()=>`Personnelle`,aI=()=>`Personal`,oI=((e={},t={})=>(t.locale??q())===`fr`?iI(e):aI(e)),sI=()=>`Commune`,cI=()=>`Common`,lI=((e={},t={})=>(t.locale??q())===`fr`?sI(e):cI(e)),uI=()=>`Promouvoir en commune`,dI=()=>`Promote to common`,fI=((e={},t={})=>(t.locale??q())===`fr`?uI(e):dI(e)),pI=()=>`Supprimer`,mI=()=>`Delete`,hI=((e={},t={})=>(t.locale??q())===`fr`?pI(e):mI(e)),gI=()=>`Aucune charte personnalisée pour le moment.`,_I=()=>`No custom chart yet.`,vI=((e={},t={})=>(t.locale??q())===`fr`?gI(e):_I(e)),yI=()=>`Messages`,bI=()=>`Messages`,xI=((e={},t={})=>(t.locale??q())===`fr`?yI(e):bI(e)),SI=()=>`Composeur`,CI=()=>`Composer`,wI=((e={},t={})=>(t.locale??q())===`fr`?SI(e):CI(e)),TI=()=>`Barre latérale`,EI=()=>`Sidebar`,DI=((e={},t={})=>(t.locale??q())===`fr`?TI(e):EI(e)),OI=()=>`Autre`,kI=()=>`Other`,AI=((e={},t={})=>(t.locale??q())===`fr`?OI(e):kI(e)),jI=()=>`Vue source des messages`,MI=()=>`Message source view`,NI=((e={},t={})=>(t.locale??q())===`fr`?jI(e):MI(e)),PI=()=>`Le bouton </> qui montre le texte brut exact d’un message.`,FI=()=>`The </> button that shows a message’s exact raw text.`,II=((e={},t={})=>(t.locale??q())===`fr`?PI(e):FI(e)),LI=()=>`Signaler un problème`,RI=()=>`Report a problem`,zI=((e={},t={})=>(t.locale??q())===`fr`?LI(e):RI(e)),BI=()=>`Le drapeau qui envoie un signalement (feedback) sur un message.`,VI=()=>`The flag that sends feedback about a message.`,HI=((e={},t={})=>(t.locale??q())===`fr`?BI(e):VI(e)),UI=()=>`Copier les réponses de l’IA`,WI=()=>`Copy AI replies`,GI=((e={},t={})=>(t.locale??q())===`fr`?UI(e):WI(e)),KI=()=>`Copier vos messages`,qI=()=>`Copy your messages`,JI=((e={},t={})=>(t.locale??q())===`fr`?KI(e):qI(e)),YI=()=>`Supprimer un message`,XI=()=>`Delete a message`,ZI=((e={},t={})=>(t.locale??q())===`fr`?YI(e):XI(e)),QI=()=>`Activité des outils`,$I=()=>`Tool activity`,eL=((e={},t={})=>(t.locale??q())===`fr`?QI(e):$I(e)),tL=()=>`Affiche l’activité des outils et les sources dans la conversation (vue d’analyse, avec détail dépliable). Désactivé : vue épurée centrée sur le contenu — le signal « traitement en cours » reste visible.`,nL=()=>`Shows tool activity and sources in the conversation (analysis view, with expandable detail). Off: a clean, content-focused view — the “processing in progress” signal stays visible.`,rL=((e={},t={})=>(t.locale??q())===`fr`?tL(e):nL(e)),iL=()=>`Saisie vocale (micro)`,aL=()=>`Voice input (mic)`,oL=((e={},t={})=>(t.locale??q())===`fr`?iL(e):aL(e)),sL=()=>`Le bouton micro dans le composeur.`,cL=()=>`The mic button in the composer.`,lL=((e={},t={})=>(t.locale??q())===`fr`?sL(e):cL(e)),uL=()=>`Âge des conversations`,dL=()=>`Conversation age`,fL=((e={},t={})=>(t.locale??q())===`fr`?uL(e):dL(e)),pL=()=>`Afficher l’ancienneté de chaque conversation (ex. « 3j », « 2sem ») dans la liste à gauche.`,mL=()=>`Show each conversation’s age (e.g. “3d”, “2w”) in the left list.`,hL=((e={},t={})=>(t.locale??q())===`fr`?pL(e):mL(e)),gL=()=>`Bridge des conversations`,_L=()=>`Conversation bridge`,vL=((e={},t={})=>(t.locale??q())===`fr`?gL(e):_L(e)),yL=()=>`Marquer le bridge (OpenClaw / Hermes) de chaque conversation dans la liste à gauche. Apparaît uniquement si vos conversations utilisent plusieurs bridges.`,bL=()=>`Tag each conversation’s bridge (OpenClaw / Hermes) in the left list. Shown only if your conversations use more than one bridge.`,xL=((e={},t={})=>(t.locale??q())===`fr`?yL(e):bL(e)),SL=()=>`Filtrer les préférences…`,CL=()=>`Filter preferences…`,wL=((e={},t={})=>(t.locale??q())===`fr`?SL(e):CL(e)),TL=()=>`Aucune préférence ne correspond.`,EL=()=>`No preference matches.`,DL=((e={},t={})=>(t.locale??q())===`fr`?TL(e):EL(e)),OL=()=>`Non activé`,kL=()=>`Not enabled`,AL=((e={},t={})=>(t.locale??q())===`fr`?OL(e):kL(e)),jL=()=>`défaut`,ML=()=>`default`,NL=((e={},t={})=>(t.locale??q())===`fr`?jL(e):ML(e)),PL=()=>`Réinitialiser`,FL=()=>`Reset`,IL=((e={},t={})=>(t.locale??q())===`fr`?PL(e):FL(e)),LL=()=>`Gérer les défauts et verrous`,RL=()=>`Manage defaults and locks`,zL=((e={},t={})=>(t.locale??q())===`fr`?LL(e):RL(e)),BL=()=>`Défaut admin`,VL=()=>`Admin default`,HL=((e={},t={})=>(t.locale??q())===`fr`?BL(e):VL(e)),UL=()=>`Fonctionnalité activée (système)`,WL=()=>`Feature enabled (system)`,GL=((e={},t={})=>(t.locale??q())===`fr`?UL(e):WL(e)),KL=()=>`Configurez l’interface : activez les fonctionnalités système et définissez les valeurs par défaut héritées par les utilisateurs (chacun peut ensuite les redéfinir dans ses propres préférences).`,qL=()=>`Configure the interface: enable system features and set the defaults users inherit (each can then override them in their own preferences).`,JL=((e={},t={})=>(t.locale??q())===`fr`?KL(e):qL(e)),YL=()=>`Une fonctionnalité non activée ici ne peut pas être activée par les utilisateurs (option grisée).`,XL=()=>`A feature not enabled here cannot be turned on by users (greyed out).`,ZL=((e={},t={})=>(t.locale??q())===`fr`?YL(e):XL(e)),QL=()=>`Active le pipeline vocal. Tant que c’est désactivé, l’option reste grisée et non activable par les utilisateurs.`,$L=()=>`Enables the voice pipeline. While off, the option stays greyed and users can’t turn it on.`,eR=((e={},t={})=>(t.locale??q())===`fr`?QL(e):$L(e)),tR=()=>`« Hérité » = la valeur intégrée par défaut de l’application.`,nR=()=>`“Inherited” = the app’s built-in default value.`,rR=((e={},t={})=>(t.locale??q())===`fr`?tR(e):nR(e)),iR=()=>`Activé`,aR=()=>`On`,oR=((e={},t={})=>(t.locale??q())===`fr`?iR(e):aR(e)),sR=()=>`Désactivé`,cR=()=>`Off`,lR=((e={},t={})=>(t.locale??q())===`fr`?sR(e):cR(e)),uR=()=>`Hérité`,dR=()=>`Inherited`,fR=((e={},t={})=>(t.locale??q())===`fr`?uR(e):dR(e)),pR=()=>`Comptes de service pour les agents OpenClaw (auth par clé API). Le texte en clair d’une clé n’est affiché qu’une seule fois à sa création — il n’est jamais stocké ni récupérable ensuite.`,mR=()=>`Service accounts for OpenClaw agents (API key auth). A key's plaintext is shown only once at creation — it is never stored nor retrievable afterwards.`,hR=((e={},t={})=>(t.locale??q())===`fr`?pR(e):mR(e)),gR=()=>`Rechercher un compte`,_R=()=>`Search an account`,vR=((e={},t={})=>(t.locale??q())===`fr`?gR(e):_R(e)),yR=()=>`Rôle`,bR=()=>`Role`,xR=((e={},t={})=>(t.locale??q())===`fr`?yR(e):bR(e)),SR=()=>`Tous les rôles`,CR=()=>`All roles`,wR=((e={},t={})=>(t.locale??q())===`fr`?SR(e):CR(e)),TR=()=>`Tous les statuts`,ER=()=>`All statuses`,DR=((e={},t={})=>(t.locale??q())===`fr`?TR(e):ER(e)),OR=()=>`actif`,kR=()=>`active`,AR=((e={},t={})=>(t.locale??q())===`fr`?OR(e):kR(e)),jR=()=>`désactivé`,MR=()=>`disabled`,NR=((e={},t={})=>(t.locale??q())===`fr`?jR(e):MR(e)),PR=()=>`Comptes de service`,FR=()=>`Service accounts`,IR=((e={},t={})=>(t.locale??q())===`fr`?PR(e):FR(e)),LR=()=>`Ajouter un compte`,RR=()=>`Add an account`,zR=((e={},t={})=>(t.locale??q())===`fr`?LR(e):RR(e)),BR=()=>`Aucun compte de service.`,VR=()=>`No service account.`,HR=((e={},t={})=>(t.locale??q())===`fr`?BR(e):VR(e)),UR=()=>`Générer une clé API`,WR=()=>`Generate an API key`,GR=((e={},t={})=>(t.locale??q())===`fr`?UR(e):WR(e)),KR=()=>`Masquer les clés`,qR=()=>`Hide keys`,JR=((e={},t={})=>(t.locale??q())===`fr`?KR(e):qR(e)),YR=()=>`Afficher les clés`,XR=()=>`Show keys`,ZR=((e={},t={})=>(t.locale??q())===`fr`?YR(e):XR(e)),QR=()=>`Modifier`,$R=()=>`Edit`,ez=((e={},t={})=>(t.locale??q())===`fr`?QR(e):$R(e)),tz=()=>`Supprimer le compte`,nz=()=>`Delete account`,rz=((e={},t={})=>(t.locale??q())===`fr`?tz(e):nz(e)),iz=()=>`Replier`,az=()=>`Collapse`,oz=((e={},t={})=>(t.locale??q())===`fr`?iz(e):az(e)),sz=()=>`Déplier`,cz=()=>`Expand`,lz=((e={},t={})=>(t.locale??q())===`fr`?sz(e):cz(e)),uz=()=>`Nom`,dz=()=>`Name`,fz=((e={},t={})=>(t.locale??q())===`fr`?uz(e):dz(e)),pz=()=>`Rôle`,mz=()=>`Role`,hz=((e={},t={})=>(t.locale??q())===`fr`?pz(e):mz(e)),gz=()=>`Statut`,_z=()=>`Status`,vz=((e={},t={})=>(t.locale??q())===`fr`?gz(e):_z(e)),yz=()=>`Expiration de la prochaine clé`,bz=()=>`Next key expiry`,xz=((e={},t={})=>(t.locale??q())===`fr`?yz(e):bz(e)),Sz=()=>`Clés`,Cz=()=>`Keys`,wz=((e={},t={})=>(t.locale??q())===`fr`?Sz(e):Cz(e)),Tz=()=>`génération…`,Ez=()=>`generating…`,Dz=((e={},t={})=>(t.locale??q())===`fr`?Tz(e):Ez(e)),Oz=e=>`${e?.count} active(s)`,kz=e=>`${e?.count} active`,Az=((e,t={})=>(t.locale??q())===`fr`?Oz(e):kz(e)),jz=()=>`Modifier le compte de service`,Mz=()=>`Edit service account`,Nz=((e={},t={})=>(t.locale??q())===`fr`?jz(e):Mz(e)),Pz=()=>`Modifier le nom, le rôle et la description.`,Fz=()=>`Update the name, role and description.`,Iz=((e={},t={})=>(t.locale??q())===`fr`?Pz(e):Fz(e)),Lz=()=>`Enregistrer`,Rz=()=>`Save`,zz=((e={},t={})=>(t.locale??q())===`fr`?Lz(e):Rz(e)),Bz=()=>`Nouveau compte de service`,Vz=()=>`New service account`,Hz=((e={},t={})=>(t.locale??q())===`fr`?Bz(e):Vz(e)),Uz=()=>`Principal authentifié par clé API (jamais un humain).`,Wz=()=>`Principal authenticated by API key (never a human).`,Gz=((e={},t={})=>(t.locale??q())===`fr`?Uz(e):Wz(e)),Kz=()=>`Ajouter`,qz=()=>`Add`,Jz=((e={},t={})=>(t.locale??q())===`fr`?Kz(e):qz(e)),Yz=()=>`Nom`,Xz=()=>`Name`,Zz=((e={},t={})=>(t.locale??q())===`fr`?Yz(e):Xz(e)),Qz=()=>`Rôle`,$z=()=>`Role`,eB=((e={},t={})=>(t.locale??q())===`fr`?Qz(e):$z(e)),tB=()=>`Choisir un rôle`,nB=()=>`Choose a role`,rB=((e={},t={})=>(t.locale??q())===`fr`?tB(e):nB(e)),iB=()=>`Description (optionnel)`,aB=()=>`Description (optional)`,oB=((e={},t={})=>(t.locale??q())===`fr`?iB(e):aB(e)),sB=()=>`Échec de la création du compte`,cB=()=>`Failed to create the account`,lB=((e={},t={})=>(t.locale??q())===`fr`?sB(e):cB(e)),uB=()=>`Échec de la modification du compte`,dB=()=>`Failed to update the account`,fB=((e={},t={})=>(t.locale??q())===`fr`?uB(e):dB(e)),pB=()=>`Compte de service mis à jour.`,mB=()=>`Service account updated.`,hB=((e={},t={})=>(t.locale??q())===`fr`?pB(e):mB(e)),gB=()=>`Échec de la génération de la clé`,_B=()=>`Failed to generate the key`,vB=((e={},t={})=>(t.locale??q())===`fr`?gB(e):_B(e)),yB=()=>`Supprimer ce compte de service ?`,bB=()=>`Delete this service account?`,xB=((e={},t={})=>(t.locale??q())===`fr`?yB(e):bB(e)),SB=()=>`Le compte`,CB=()=>`The account`,wB=((e={},t={})=>(t.locale??q())===`fr`?SB(e):CB(e)),TB=()=>`et`,EB=()=>`and`,DB=((e={},t={})=>(t.locale??q())===`fr`?TB(e):EB(e)),OB=()=>`toutes ses clés API`,kB=()=>`all its API keys`,AB=((e={},t={})=>(t.locale??q())===`fr`?OB(e):kB(e)),jB=()=>`seront supprimés définitivement. Cette action est irréversible. Tapez le nom du compte pour confirmer.`,MB=()=>`will be permanently deleted. This action is irreversible. Type the account name to confirm.`,NB=((e={},t={})=>(t.locale??q())===`fr`?jB(e):MB(e)),PB=()=>`Supprimer`,FB=()=>`Delete`,IB=((e={},t={})=>(t.locale??q())===`fr`?PB(e):FB(e)),LB=()=>`Compte de service supprimé`,RB=()=>`Service account deleted`,zB=((e={},t={})=>(t.locale??q())===`fr`?LB(e):RB(e)),BB=()=>`Échec de la suppression du compte`,VB=()=>`Failed to delete the account`,HB=((e={},t={})=>(t.locale??q())===`fr`?BB(e):VB(e)),UB=()=>`Révoquer cette clé API ?`,WB=()=>`Revoke this API key?`,GB=((e={},t={})=>(t.locale??q())===`fr`?UB(e):WB(e)),KB=()=>`La clé`,qB=()=>`The key`,JB=((e={},t={})=>(t.locale??q())===`fr`?KB(e):qB(e)),YB=()=>`sera désactivée immédiatement et ne pourra plus authentifier de requêtes. Cette action est irréversible.`,XB=()=>`will be disabled immediately and will no longer be able to authenticate requests. This action is irreversible.`,ZB=((e={},t={})=>(t.locale??q())===`fr`?YB(e):XB(e)),QB=()=>`Révoquer`,$B=()=>`Revoke`,eV=((e={},t={})=>(t.locale??q())===`fr`?QB(e):$B(e)),tV=()=>`Échec de la révocation`,nV=()=>`Failed to revoke`,rV=((e={},t={})=>(t.locale??q())===`fr`?tV(e):nV(e)),iV=()=>`Clés de`,aV=()=>`Keys of`,oV=((e={},t={})=>(t.locale??q())===`fr`?iV(e):aV(e)),sV=()=>`Aucune clé pour ce compte.`,cV=()=>`No key for this account.`,lV=((e={},t={})=>(t.locale??q())===`fr`?sV(e):cV(e)),uV=()=>`Clé`,dV=()=>`Key`,fV=((e={},t={})=>(t.locale??q())===`fr`?uV(e):dV(e)),pV=()=>`Rôle`,mV=()=>`Role`,hV=((e={},t={})=>(t.locale??q())===`fr`?pV(e):mV(e)),gV=()=>`Créée`,_V=()=>`Created`,vV=((e={},t={})=>(t.locale??q())===`fr`?gV(e):_V(e)),yV=()=>`Dernier usage`,bV=()=>`Last used`,xV=((e={},t={})=>(t.locale??q())===`fr`?yV(e):bV(e)),SV=()=>`Expiration`,CV=()=>`Expiry`,wV=((e={},t={})=>(t.locale??q())===`fr`?SV(e):CV(e)),TV=()=>`Statut`,EV=()=>`Status`,DV=((e={},t={})=>(t.locale??q())===`fr`?TV(e):EV(e)),OV=()=>`Révocation…`,kV=()=>`Revoking…`,AV=((e={},t={})=>(t.locale??q())===`fr`?OV(e):kV(e)),jV=()=>`Révoquer`,MV=()=>`Revoke`,NV=((e={},t={})=>(t.locale??q())===`fr`?jV(e):MV(e)),PV=()=>`Clé API créée`,FV=()=>`API key created`,IV=((e={},t={})=>(t.locale??q())===`fr`?PV(e):FV(e)),LV=e=>`Pour le compte « ${e?.name} ». Copiez-la maintenant.`,RV=e=>`For the account « ${e?.name} ». Copy it now.`,zV=((e,t={})=>(t.locale??q())===`fr`?LV(e):RV(e)),BV=()=>`Stockez cette clé en lieu sûr. Vous ne la reverrez plus jamais. Pour la remplacer, il faudra la révoquer et en générer une nouvelle.`,VV=()=>`Store this key in a safe place. You will never see it again. To replace it, you will have to revoke it and generate a new one.`,HV=((e={},t={})=>(t.locale??q())===`fr`?BV(e):VV(e)),UV=()=>`Copier la clé`,WV=()=>`Copy the key`,GV=((e={},t={})=>(t.locale??q())===`fr`?UV(e):WV(e)),KV=()=>`Copié`,qV=()=>`Copied`,JV=((e={},t={})=>(t.locale??q())===`fr`?KV(e):qV(e)),YV=()=>`Copier`,XV=()=>`Copy`,ZV=((e={},t={})=>(t.locale??q())===`fr`?YV(e):XV(e)),QV=()=>`J’ai copié la clé`,$V=()=>`I have copied the key`,eH=((e={},t={})=>(t.locale??q())===`fr`?QV(e):$V(e)),tH=()=>`Jamais`,nH=()=>`Never`,rH=((e={},t={})=>(t.locale??q())===`fr`?tH(e):nH(e)),iH=()=>`30 jours`,aH=()=>`30 days`,oH=((e={},t={})=>(t.locale??q())===`fr`?iH(e):aH(e)),sH=()=>`90 jours`,cH=()=>`90 days`,lH=((e={},t={})=>(t.locale??q())===`fr`?sH(e):cH(e)),uH=()=>`Jamais`,dH=()=>`Never`,fH=((e={},t={})=>(t.locale??q())===`fr`?uH(e):dH(e)),pH=()=>`révoquée`,mH=()=>`revoked`,hH=((e={},t={})=>(t.locale??q())===`fr`?pH(e):mH(e)),gH=()=>`expirée`,_H=()=>`expired`,vH=((e={},t={})=>(t.locale??q())===`fr`?gH(e):_H(e)),yH=()=>`active`,bH=()=>`active`,xH=((e={},t={})=>(t.locale??q())===`fr`?yH(e):bH(e)),SH=()=>`Sélectionnez ou créez une conversation pour commencer.`,CH=()=>`Select or create a chat to begin.`,wH=((e={},t={})=>(t.locale??q())===`fr`?SH(e):CH(e)),TH=()=>`Conversation introuvable`,EH=()=>`Conversation not found`,DH=((e={},t={})=>(t.locale??q())===`fr`?TH(e):EH(e)),OH=()=>`Ce lien ne correspond à aucune conversation. Elle a peut-être été supprimée, ou l’adresse est incomplète.`,kH=()=>`This link does not match any conversation. It may have been deleted, or the address is incomplete.`,AH=((e={},t={})=>(t.locale??q())===`fr`?OH(e):kH(e)),jH=()=>`Nouvelle conversation`,MH=()=>`New conversation`,NH=((e={},t={})=>(t.locale??q())===`fr`?jH(e):MH(e)),PH=()=>`Derniers messages`,FH=()=>`Latest messages`,IH=((e={},t={})=>(t.locale??q())===`fr`?PH(e):FH(e)),LH=()=>`Le service de chat est momentanément indisponible. L’envoi de message est suspendu — réessayez dans un instant. Si cela persiste, contactez votre administrateur.`,RH=()=>`The chat service is temporarily unavailable. Sending messages is suspended — try again in a moment. If this persists, contact your administrator.`,zH=((e={},t={})=>(t.locale??q())===`fr`?LH(e):RH(e)),BH=()=>`Ce chat est en lecture seule : l’agent associé ne t’est plus disponible (ton accès aux agents a été modifié). Démarre un nouveau chat avec un agent disponible.`,VH=()=>`This chat is read-only: its agent is no longer available to you (your agent access was changed). Start a new chat with an available agent.`,HH=((e={},t={})=>(t.locale??q())===`fr`?BH(e):VH(e)),UH=()=>`Réponse reçue.`,WH=()=>`Reply received.`,GH=((e={},t={})=>(t.locale??q())===`fr`?UH(e):WH(e)),KH=()=>`Comment puis-je aider ?`,qH=()=>`How can I help?`,JH=((e={},t={})=>(t.locale??q())===`fr`?KH(e):qH(e)),YH=()=>`Conversation`,XH=()=>`Conversation`,ZH=((e={},t={})=>(t.locale??q())===`fr`?YH(e):XH(e)),QH=e=>`Agent de cette conversation : ${e?.name}`,$H=e=>`Agent for this conversation: ${e?.name}`,eU=((e,t={})=>(t.locale??q())===`fr`?QH(e):$H(e)),tU=()=>` (agent par défaut)`,nU=()=>` (default agent)`,rU=((e={},t={})=>(t.locale??q())===`fr`?tU(e):nU(e)),iU=()=>` — cet agent n’existe plus sur la gateway`,aU=()=>` — this agent no longer exists on the gateway`,oU=((e={},t={})=>(t.locale??q())===`fr`?iU(e):aU(e)),sU=()=>` — état non confirmé (gateway injoignable)`,cU=()=>` — state not confirmed (gateway unreachable)`,lU=((e={},t={})=>(t.locale??q())===`fr`?sU(e):cU(e)),uU=e=>`Instance : ${e?.instance}`,dU=e=>`Instance: ${e?.instance}`,fU=((e,t={})=>(t.locale??q())===`fr`?uU(e):dU(e)),pU=()=>`Modèle`,mU=()=>`Model`,hU=((e={},t={})=>(t.locale??q())===`fr`?pU(e):mU(e)),gU=e=>`Modèle · ${e?.provider}`,_U=e=>`Model · ${e?.provider}`,vU=((e,t={})=>(t.locale??q())===`fr`?gU(e):_U(e)),yU=()=>`Niveau de réflexion hérité de l’agent`,bU=()=>`Thinking level inherited from the agent`,xU=((e={},t={})=>(t.locale??q())===`fr`?yU(e):bU(e)),SU=()=>`Niveau de réflexion (spécifique à ce chat)`,CU=()=>`Thinking level (specific to this chat)`,wU=((e={},t={})=>(t.locale??q())===`fr`?SU(e):CU(e)),TU=()=>`Réflexion`,EU=()=>`Thinking`,DU=((e={},t={})=>(t.locale??q())===`fr`?TU(e):EU(e)),OU=()=>`héritée`,kU=()=>`inherited`,AU=((e={},t={})=>(t.locale??q())===`fr`?OU(e):kU(e)),jU=e=>`Contexte utilisé : ${e?.pct}% (${e?.used} / ${e?.total} tokens)`,MU=e=>`Context used: ${e?.pct}% (${e?.used} / ${e?.total} tokens)`,NU=((e,t={})=>(t.locale??q())===`fr`?jU(e):MU(e)),PU=()=>`Contexte`,FU=()=>`Context`,IU=((e={},t={})=>(t.locale??q())===`fr`?PU(e):FU(e)),LU=()=>`Exporter la conversation`,RU=()=>`Export the conversation`,zU=((e={},t={})=>(t.locale??q())===`fr`?LU(e):RU(e)),BU=()=>`Exporter`,VU=()=>`Export`,HU=((e={},t={})=>(t.locale??q())===`fr`?BU(e):VU(e)),UU=()=>`Markdown (.md)`,WU=()=>`Markdown (.md)`,GU=((e={},t={})=>(t.locale??q())===`fr`?UU(e):WU(e)),KU=()=>`JSON (.json)`,qU=()=>`JSON (.json)`,JU=((e={},t={})=>(t.locale??q())===`fr`?KU(e):qU(e)),YU=()=>`Réglages avancés (réflexion, modèle)`,XU=()=>`Advanced settings (thinking, model)`,ZU=((e={},t={})=>(t.locale??q())===`fr`?YU(e):XU(e)),QU=()=>`Avancé`,$U=()=>`Advanced`,eW=((e={},t={})=>(t.locale??q())===`fr`?QU(e):$U(e)),tW=()=>`Supprimer et régénérer cette réponse ?`,nW=()=>`Delete and regenerate this reply?`,rW=((e={},t={})=>(t.locale??q())===`fr`?tW(e):nW(e)),iW=()=>`Cette réponse sera supprimée, puis régénérée à partir de votre dernier message.`,aW=()=>`This reply will be deleted, then regenerated from your last message.`,oW=((e={},t={})=>(t.locale??q())===`fr`?iW(e):aW(e)),sW=()=>`Régénérer`,cW=()=>`Regenerate`,lW=((e={},t={})=>(t.locale??q())===`fr`?sW(e):cW(e)),uW=()=>`Annuler`,dW=()=>`Cancel`,fW=((e={},t={})=>(t.locale??q())===`fr`?uW(e):dW(e)),pW=()=>`Supprimer ce message et les suivants ?`,mW=()=>`Delete this message and the following ones?`,hW=((e={},t={})=>(t.locale??q())===`fr`?pW(e):mW(e)),gW=()=>`Ce message et tous les messages qui le suivent seront supprimés de la conversation. Cette action est irréversible.`,_W=()=>`This message and all messages following it will be deleted from the conversation. This action is irreversible.`,vW=((e={},t={})=>(t.locale??q())===`fr`?gW(e):_W(e)),yW=()=>`Supprimer`,bW=()=>`Delete`,xW=((e={},t={})=>(t.locale??q())===`fr`?yW(e):bW(e)),SW=()=>`Supprimer et régénérer la réponse`,CW=()=>`Delete and regenerate the reply`,wW=((e={},t={})=>(t.locale??q())===`fr`?SW(e):CW(e)),TW=()=>`Supprimer ce message et les suivants`,EW=()=>`Delete this message and the following ones`,DW=((e={},t={})=>(t.locale??q())===`fr`?TW(e):EW(e)),OW=()=>`Supprimer le message`,kW=()=>`Delete the message`,AW=((e={},t={})=>(t.locale??q())===`fr`?OW(e):kW(e)),jW=()=>`La suppression a échoué`,MW=()=>`Delete failed`,NW=((e={},t={})=>(t.locale??q())===`fr`?jW(e):MW(e)),PW=()=>`Sources`,FW=()=>`Sources`,IW=((e={},t={})=>(t.locale??q())===`fr`?PW(e):FW(e)),LW=()=>`1 souvenir`,RW=()=>`1 memory`,zW=((e={},t={})=>(t.locale??q())===`fr`?LW(e):RW(e)),BW=e=>`${e?.count} souvenirs`,VW=e=>`${e?.count} memories`,HW=((e,t={})=>(t.locale??q())===`fr`?BW(e):VW(e)),UW=()=>`1 document`,WW=()=>`1 document`,GW=((e={},t={})=>(t.locale??q())===`fr`?UW(e):WW(e)),KW=e=>`${e?.count} documents`,qW=e=>`${e?.count} documents`,JW=((e,t={})=>(t.locale??q())===`fr`?KW(e):qW(e)),YW=()=>`Mémoire conversationnelle`,XW=()=>`Conversational memory`,ZW=((e={},t={})=>(t.locale??q())===`fr`?YW(e):XW(e)),QW=()=>`Documents`,$W=()=>`Documents`,eG=((e={},t={})=>(t.locale??q())===`fr`?QW(e):$W(e)),tG=()=>`Contexte`,nG=()=>`Context`,rG=((e={},t={})=>(t.locale??q())===`fr`?tG(e):nG(e)),iG=()=>`1 contexte`,aG=()=>`1 context`,oG=((e={},t={})=>(t.locale??q())===`fr`?iG(e):aG(e)),sG=e=>`${e?.count} contextes`,cG=e=>`${e?.count} contexts`,lG=((e,t={})=>(t.locale??q())===`fr`?sG(e):cG(e)),uG=()=>`Contexte du graphe de connaissances`,dG=()=>`Knowledge-graph context`,fG=((e={},t={})=>(t.locale??q())===`fr`?uG(e):dG(e)),pG=e=>`score ${e?.score}`,mG=e=>`score ${e?.score}`,hG=((e,t={})=>(t.locale??q())===`fr`?pG(e):mG(e)),gG=()=>`(sans titre)`,_G=()=>`(untitled)`,vG=((e={},t={})=>(t.locale??q())===`fr`?gG(e):_G(e)),yG=()=>`Sources de la réponse`,bG=()=>`Sources of the reply`,xG=((e={},t={})=>(t.locale??q())===`fr`?yG(e):bG(e)),SG=()=>`Voir les sources de la réponse`,CG=()=>`View the sources of the reply`,wG=((e={},t={})=>(t.locale??q())===`fr`?SG(e):CG(e)),TG=()=>`Rechercher dans les sources…`,EG=()=>`Search the sources…`,DG=((e={},t={})=>(t.locale??q())===`fr`?TG(e):EG(e)),OG=()=>`Aucune source ne correspond à votre recherche.`,kG=()=>`No source matches your search.`,AG=((e={},t={})=>(t.locale??q())===`fr`?OG(e):kG(e)),jG=()=>`Tout sélectionner`,MG=()=>`Select all`,NG=((e={},t={})=>(t.locale??q())===`fr`?jG(e):MG(e)),PG=e=>`${e?.count} document(s) sélectionné(s)`,FG=e=>`${e?.count} document(s) selected`,IG=((e,t={})=>(t.locale??q())===`fr`?PG(e):FG(e)),LG=()=>`Joindre les documents`,RG=()=>`Attach the documents`,zG=((e={},t={})=>(t.locale??q())===`fr`?LG(e):RG(e)),BG=()=>`Récupère les fichiers sources des documents cochés en liens téléchargeables (slot « Source d'origine »).`,VG=()=>`Fetches the checked documents' source files as downloadable links (the "Original source" slot).`,HG=((e={},t={})=>(t.locale??q())===`fr`?BG(e):VG(e)),UG=e=>`${e?.count} document(s) joint(s) téléchargeable(s) — ouvrir le panneau Sources`,WG=e=>`${e?.count} attached document(s) available for download — open the Sources panel`,GG=((e,t={})=>(t.locale??q())===`fr`?UG(e):WG(e)),KG=()=>`Source d'origine`,qG=()=>`Original source`,JG=((e={},t={})=>(t.locale??q())===`fr`?KG(e):qG(e)),YG=()=>`Aucun agent documentaire configuré`,XG=()=>`No documentary agent configured`,ZG=((e={},t={})=>(t.locale??q())===`fr`?YG(e):XG(e)),QG=()=>`Récupération des documents en cours…`,$G=()=>`Fetching the documents…`,eK=((e={},t={})=>(t.locale??q())===`fr`?QG(e):$G(e)),tK=()=>`Récupération des documents lancée — voir le panneau Sources`,nK=()=>`Document fetch started — see the Sources panel`,rK=((e={},t={})=>(t.locale??q())===`fr`?tK(e):nK(e)),iK=()=>`Impossible de lancer la récupération des documents`,aK=()=>`Could not start the document fetch`,oK=((e={},t={})=>(t.locale??q())===`fr`?iK(e):aK(e)),sK=()=>`Récupération…`,cK=()=>`Fetching…`,lK=((e={},t={})=>(t.locale??q())===`fr`?sK(e):cK(e)),uK=()=>`Télécharger la source`,dK=()=>`Download the source`,fK=((e={},t={})=>(t.locale??q())===`fr`?uK(e):dK(e)),pK=()=>`Source introuvable`,mK=()=>`Source not found`,hK=((e={},t={})=>(t.locale??q())===`fr`?pK(e):mK(e)),gK=()=>`Voir plus`,_K=()=>`Show more`,vK=((e={},t={})=>(t.locale??q())===`fr`?gK(e):_K(e)),yK=()=>`Voir moins`,bK=()=>`Show less`,xK=((e={},t={})=>(t.locale??q())===`fr`?yK(e):bK(e)),SK=()=>`Fermer le panneau des sources`,CK=()=>`Close the sources panel`,wK=((e={},t={})=>(t.locale??q())===`fr`?SK(e):CK(e)),TK=()=>`Redimensionner le panneau des sources`,EK=()=>`Resize the sources panel`,DK=((e={},t={})=>(t.locale??q())===`fr`?TK(e):EK(e)),OK=e=>`Source · texte brut exact · ${e?.count} caractère`,kK=e=>`Source · exact raw text · ${e?.count} character`,AK=((e,t={})=>(t.locale??q())===`fr`?OK(e):kK(e)),jK=e=>`Source · texte brut exact · ${e?.count} caractères`,MK=e=>`Source · exact raw text · ${e?.count} characters`,NK=((e,t={})=>(t.locale??q())===`fr`?jK(e):MK(e)),PK=()=>`Copier la source exacte`,FK=()=>`Copy the exact source`,IK=((e={},t={})=>(t.locale??q())===`fr`?PK(e):FK(e)),LK=()=>`(aucun texte)`,RK=()=>`(no text)`,zK=((e={},t={})=>(t.locale??q())===`fr`?LK(e):RK(e)),BK=()=>`Afficher le message rendu`,VK=()=>`Show the rendered message`,HK=((e={},t={})=>(t.locale??q())===`fr`?BK(e):VK(e)),UK=()=>`Afficher la source (texte brut exact)`,WK=()=>`Show the source (exact raw text)`,GK=((e={},t={})=>(t.locale??q())===`fr`?UK(e):WK(e)),KK=()=>`Afficher la source du message`,qK=()=>`Show the message source`,JK=((e={},t={})=>(t.locale??q())===`fr`?KK(e):qK(e)),YK=()=>`Copier le message`,XK=()=>`Copy the message`,ZK=((e={},t={})=>(t.locale??q())===`fr`?YK(e):XK(e)),QK=()=>`Envoi…`,$K=()=>`Sending…`,eq=((e={},t={})=>(t.locale??q())===`fr`?QK(e):$K(e)),tq=e=>`${e?.name} traite votre message…`,nq=e=>`${e?.name} is processing your message…`,rq=((e,t={})=>(t.locale??q())===`fr`?tq(e):nq(e)),iq=e=>`L'agent ${e?.name} traite votre message…`,aq=e=>`The agent ${e?.name} is processing your message…`,oq=((e,t={})=>(t.locale??q())===`fr`?iq(e):aq(e)),sq=()=>`Copier la réponse`,cq=()=>`Copy the reply`,lq=((e={},t={})=>(t.locale??q())===`fr`?sq(e):cq(e)),uq=()=>`Chat indisponible…`,dq=()=>`Chat unavailable…`,fq=((e={},t={})=>(t.locale??q())===`fr`?uq(e):dq(e)),pq=()=>`Message OpenClaw…`,mq=()=>`Message OpenClaw…`,hq=((e={},t={})=>(t.locale??q())===`fr`?pq(e):mq(e)),gq=()=>`Joindre un fichier`,_q=()=>`Attach a file`,vq=((e={},t={})=>(t.locale??q())===`fr`?gq(e):_q(e)),yq=()=>`échec`,bq=()=>`failed`,xq=((e={},t={})=>(t.locale??q())===`fr`?yq(e):bq(e)),Sq=e=>`Téléversement du fichier… ${e?.percent}%`,Cq=e=>`Uploading file… ${e?.percent}%`,wq=((e,t={})=>(t.locale??q())===`fr`?Sq(e):Cq(e)),Tq=e=>`Téléversement de ${e?.count} fichiers… ${e?.percent}%`,Eq=e=>`Uploading ${e?.count} files… ${e?.percent}%`,Dq=((e,t={})=>(t.locale??q())===`fr`?Tq(e):Eq(e)),Oq=()=>`Retirer la pièce jointe`,kq=()=>`Remove attachment`,Aq=((e={},t={})=>(t.locale??q())===`fr`?Oq(e):kq(e)),jq=()=>`Masquer l'activité des outils et revenir à la vue épurée`,Mq=()=>`Hide tool activity and return to the clean view`,Nq=((e={},t={})=>(t.locale??q())===`fr`?jq(e):Mq(e)),Pq=()=>`Afficher l'activité des outils (traitements réalisés et en cours)`,Fq=()=>`Show tool activity (completed and in-progress processing)`,Iq=((e={},t={})=>(t.locale??q())===`fr`?Pq(e):Fq(e)),Lq=()=>`Outils`,Rq=()=>`Tools`,zq=((e={},t={})=>(t.locale??q())===`fr`?Lq(e):Rq(e)),Bq=e=>`${e?.count} appel d'outil`,Vq=e=>`${e?.count} tool call`,Hq=((e,t={})=>(t.locale??q())===`fr`?Bq(e):Vq(e)),Uq=e=>`${e?.count} appels d'outils`,Wq=e=>`${e?.count} tool calls`,Gq=((e,t={})=>(t.locale??q())===`fr`?Uq(e):Wq(e)),Kq=()=>`Terminé`,qq=()=>`Done`,Jq=((e={},t={})=>(t.locale??q())===`fr`?Kq(e):qq(e)),Yq=()=>`Échec`,Xq=()=>`Failed`,Zq=((e={},t={})=>(t.locale??q())===`fr`?Yq(e):Xq(e)),Qq=e=>`exit ${e?.code}`,$q=e=>`exit ${e?.code}`,eJ=((e,t={})=>(t.locale??q())===`fr`?Qq(e):$q(e)),tJ=e=>`${e?.ms} ms`,nJ=e=>`${e?.ms} ms`,rJ=((e,t={})=>(t.locale??q())===`fr`?tJ(e):nJ(e)),iJ=()=>`Sortie non transmise par la passerelle`,aJ=()=>`Output not transmitted by the gateway`,oJ=((e={},t={})=>(t.locale??q())===`fr`?iJ(e):aJ(e)),sJ=()=>`en cours`,cJ=()=>`running`,lJ=((e={},t={})=>(t.locale??q())===`fr`?sJ(e):cJ(e)),uJ=()=>`terminé`,dJ=()=>`done`,fJ=((e={},t={})=>(t.locale??q())===`fr`?uJ(e):dJ(e)),pJ=()=>`Afficher le détail des appels d'outils`,mJ=()=>`Show tool call details`,hJ=((e={},t={})=>(t.locale??q())===`fr`?pJ(e):mJ(e)),gJ=()=>`Masquer le détail des appels d'outils`,_J=()=>`Hide tool call details`,vJ=((e={},t={})=>(t.locale??q())===`fr`?gJ(e):_J(e)),yJ=()=>`Dictée vocale — bientôt disponible`,bJ=()=>`Voice dictation — coming soon`,xJ=((e={},t={})=>(t.locale??q())===`fr`?yJ(e):bJ(e)),SJ=()=>`Dictée vocale (bientôt disponible)`,CJ=()=>`Voice dictation (coming soon)`,wJ=((e={},t={})=>(t.locale??q())===`fr`?SJ(e):CJ(e)),TJ=()=>`Envoi indisponible (service de chat hors ligne)`,EJ=()=>`Sending unavailable (chat service offline)`,DJ=((e={},t={})=>(t.locale??q())===`fr`?TJ(e):EJ(e)),OJ=()=>`Envoyer`,kJ=()=>`Send`,AJ=((e={},t={})=>(t.locale??q())===`fr`?OJ(e):kJ(e)),jJ=()=>`Réponse en cours…`,MJ=()=>`Response in progress…`,NJ=((e={},t={})=>(t.locale??q())===`fr`?jJ(e):MJ(e)),PJ=()=>`Mettre en file (envoyé après la réponse en cours)`,FJ=()=>`Queue (sent after the current reply)`,IJ=((e={},t={})=>(t.locale??q())===`fr`?PJ(e):FJ(e)),LJ=()=>`Envoyer après la réponse en cours`,RJ=()=>`Send after the current reply`,zJ=((e={},t={})=>(t.locale??q())===`fr`?LJ(e):RJ(e)),BJ=()=>`Trop de messages en attente. Patientez la fin de la réponse en cours.`,VJ=()=>`Too many messages waiting. Wait for the current reply to finish.`,HJ=((e={},t={})=>(t.locale??q())===`fr`?BJ(e):VJ(e)),UJ=()=>`Impossible de mettre le message en file. Réessayez.`,WJ=()=>`Could not queue the message. Try again.`,GJ=((e={},t={})=>(t.locale??q())===`fr`?UJ(e):WJ(e)),KJ=()=>`Chargement…`,qJ=()=>`Loading…`,JJ=((e={},t={})=>(t.locale??q())===`fr`?KJ(e):qJ(e)),YJ=()=>`Configuration des intégrations.`,XJ=()=>`Integrations configuration.`,ZJ=((e={},t={})=>(t.locale??q())===`fr`?YJ(e):XJ(e)),QJ=()=>`Aucune clé API ici`,$J=()=>`No API key here`,eY=((e={},t={})=>(t.locale??q())===`fr`?QJ(e):$J(e)),tY=()=>`— elles vivent dans l'environnement du déploiement ; un champ vide retombe sur la variable d'environnement puis le défaut. L'indicateur « configuré » reflète la présence de la clé côté serveur.`,nY=()=>`— they live in the deployment environment; an empty field falls back to the environment variable then the default. The "configured" indicator reflects the presence of the key on the server side.`,rY=((e={},t={})=>(t.locale??q())===`fr`?tY(e):nY(e)),iY=()=>`actif`,aY=()=>`active`,oY=((e={},t={})=>(t.locale??q())===`fr`?iY(e):aY(e)),sY=()=>`en pause`,cY=()=>`paused`,lY=((e={},t={})=>(t.locale??q())===`fr`?sY(e):cY(e)),uY=()=>`clé manquante (env)`,dY=()=>`key missing (env)`,fY=((e={},t={})=>(t.locale??q())===`fr`?uY(e):dY(e)),pY=()=>`appliqué par le bridge (à venir)`,mY=()=>`applied by the bridge (coming soon)`,hY=((e={},t={})=>(t.locale??q())===`fr`?pY(e):mY(e)),gY=()=>`Export des traces. Clés : LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY (env).`,_Y=()=>`Trace export. Keys: LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY (env).`,vY=((e={},t={})=>(t.locale??q())===`fr`?gY(e):_Y(e)),yY=()=>`Export des traces. Clé : OPIK_API_KEY (env).`,bY=()=>`Trace export. Key: OPIK_API_KEY (env).`,xY=((e={},t={})=>(t.locale??q())===`fr`?yY(e):bY(e)),SY=()=>`Host`,CY=()=>`Host`,wY=((e={},t={})=>(t.locale??q())===`fr`?SY(e):CY(e)),TY=()=>`Base URL`,EY=()=>`Base URL`,DY=((e={},t={})=>(t.locale??q())===`fr`?TY(e):EY(e)),OY=()=>`Workspace`,kY=()=>`Workspace`,AY=((e={},t={})=>(t.locale??q())===`fr`?OY(e):kY(e)),jY=()=>`(défaut serveur)`,MY=()=>`(server default)`,NY=((e={},t={})=>(t.locale??q())===`fr`?jY(e):MY(e)),PY=()=>`Activé (expédition des traces)`,FY=()=>`Enabled (trace shipping)`,IY=((e={},t={})=>(t.locale??q())===`fr`?PY(e):FY(e)),LY=()=>`Synthèse vocale (TTS)`,RY=()=>`Text-to-speech (TTS)`,zY=((e={},t={})=>(t.locale??q())===`fr`?LY(e):RY(e)),BY=()=>`Lecture audio des réponses. Clé du provider via env (ex. OPENAI_API_KEY, ELEVENLABS_API_KEY).`,VY=()=>`Audio playback of replies. Provider key via env (e.g. OPENAI_API_KEY, ELEVENLABS_API_KEY).`,HY=((e={},t={})=>(t.locale??q())===`fr`?BY(e):VY(e)),UY=()=>`Mode auto`,WY=()=>`Auto mode`,GY=((e={},t={})=>(t.locale??q())===`fr`?UY(e):WY(e)),KY=()=>`Désactivé`,qY=()=>`Disabled`,JY=((e={},t={})=>(t.locale??q())===`fr`?KY(e):qY(e)),YY=()=>`Toujours`,XY=()=>`Always`,ZY=((e={},t={})=>(t.locale??q())===`fr`?YY(e):XY(e)),QY=()=>`Après un message vocal`,$Y=()=>`After a voice message`,eX=((e={},t={})=>(t.locale??q())===`fr`?QY(e):$Y(e)),tX=()=>`Sur directive [[tts:…]]`,nX=()=>`On [[tts:…]] directive`,rX=((e={},t={})=>(t.locale??q())===`fr`?tX(e):nX(e)),iX=()=>`Provider`,aX=()=>`Provider`,oX=((e={},t={})=>(t.locale??q())===`fr`?iX(e):aX(e)),sX=()=>`Microsoft (sans clé)`,cX=()=>`Microsoft (no key)`,lX=((e={},t={})=>(t.locale??q())===`fr`?sX(e):cX(e)),uX=()=>`Modèle`,dX=()=>`Model`,fX=((e={},t={})=>(t.locale??q())===`fr`?uX(e):dX(e)),pX=()=>`Voix`,mX=()=>`Voice`,hX=((e={},t={})=>(t.locale??q())===`fr`?pX(e):mX(e)),gX=()=>`speakerVoiceId / nom de voix`,_X=()=>`speakerVoiceId / voice name`,vX=((e={},t={})=>(t.locale??q())===`fr`?gX(e):_X(e)),yX=()=>`Mode conversation (Talk / STS)`,bX=()=>`Conversation mode (Talk / STS)`,xX=((e={},t={})=>(t.locale??q())===`fr`?yX(e):bX(e)),SX=()=>`OpenAI realtime : OPENAI_API_KEY présent (env). Le navigateur recevra un jeton éphémère minté côté serveur — jamais la clé brute.`,CX=()=>`OpenAI realtime: OPENAI_API_KEY present (env). The browser will receive an ephemeral token minted server-side — never the raw key.`,wX=((e={},t={})=>(t.locale??q())===`fr`?SX(e):CX(e)),TX=()=>`OpenAI realtime : OPENAI_API_KEY ABSENT (env). À définir côté déploiement pour activer gpt-realtime.`,EX=()=>`OpenAI realtime: OPENAI_API_KEY ABSENT (env). To be set on the deployment side to enable gpt-realtime.`,DX=((e={},t={})=>(t.locale??q())===`fr`?TX(e):EX(e)),OX=()=>`Activer le mode conversation`,kX=()=>`Enable conversation mode`,AX=((e={},t={})=>(t.locale??q())===`fr`?OX(e):kX(e)),jX=()=>`Provider realtime`,MX=()=>`Realtime provider`,NX=((e={},t={})=>(t.locale??q())===`fr`?jX(e):MX(e)),PX=()=>`Modèle realtime`,FX=()=>`Realtime model`,IX=((e={},t={})=>(t.locale??q())===`fr`?PX(e):FX(e)),LX=()=>`Transport`,RX=()=>`Transport`,zX=((e={},t={})=>(t.locale??q())===`fr`?LX(e):RX(e)),BX=()=>`WebRTC (navigateur)`,VX=()=>`WebRTC (browser)`,HX=((e={},t={})=>(t.locale??q())===`fr`?BX(e):VX(e)),UX=()=>`Locale`,WX=()=>`Locale`,GX=((e={},t={})=>(t.locale??q())===`fr`?UX(e):WX(e)),KX=()=>`Interrompre la lecture quand l'utilisateur parle`,qX=()=>`Interrupt playback when the user speaks`,JX=((e={},t={})=>(t.locale??q())===`fr`?KX(e):qX(e)),YX=()=>`Voice wake (mot d'activation)`,XX=()=>`Voice wake (wake word)`,ZX=((e={},t={})=>(t.locale??q())===`fr`?YX(e):XX(e)),QX=()=>`non câblable dans le navigateur`,$X=()=>`not wireable in the browser`,eZ=((e={},t={})=>(t.locale??q())===`fr`?QX(e):$X(e)),tZ=()=>`OpenClaw gère le voice-wake côté Gateway avec détection native macOS/iOS (Android = micro manuel) ; le navigateur n'est pas une plateforme supportée. Le câbler dans ce webchat nécessiterait un moteur wake-word côté client (type Porcupine) que nous bâtirions — hors de OpenClaw. Configuration des déclencheurs : RPC gateway`,nZ=()=>`OpenClaw handles voice-wake on the Gateway side with native macOS/iOS detection (Android = manual mic); the browser is not a supported platform. Wiring it into this webchat would require a client-side wake-word engine (Porcupine-style) that we would build — outside OpenClaw. Trigger configuration: gateway RPC`,rZ=((e={},t={})=>(t.locale??q())===`fr`?tZ(e):nZ(e)),iZ=()=>`Curseurs d'expédition`,aZ=()=>`Shipping cursors`,oZ=((e={},t={})=>(t.locale??q())===`fr`?iZ(e):aZ(e)),sZ=()=>`Aucun curseur — aucune trace n'a encore été expédiée.`,cZ=()=>`No cursor — no trace has been shipped yet.`,lZ=((e={},t={})=>(t.locale??q())===`fr`?sZ(e):cZ(e)),uZ=()=>`Vendeur`,dZ=()=>`Vendor`,fZ=((e={},t={})=>(t.locale??q())===`fr`?uZ(e):dZ(e)),pZ=()=>`Dernier envoi`,mZ=()=>`Last send`,hZ=((e={},t={})=>(t.locale??q())===`fr`?pZ(e):mZ(e)),gZ=()=>`Échecs consécutifs`,_Z=()=>`Consecutive failures`,vZ=((e={},t={})=>(t.locale??q())===`fr`?gZ(e):_Z(e)),yZ=()=>`Dernier statut HTTP`,bZ=()=>`Last HTTP status`,xZ=((e={},t={})=>(t.locale??q())===`fr`?yZ(e):bZ(e)),SZ=()=>`Dernière erreur`,CZ=()=>`Last error`,wZ=((e={},t={})=>(t.locale??q())===`fr`?SZ(e):CZ(e)),TZ=()=>`Mots modifiés / altérés`,EZ=()=>`Modified / altered words`,DZ=((e={},t={})=>(t.locale??q())===`fr`?TZ(e):EZ(e)),OZ=()=>`Réponse incorrecte`,kZ=()=>`Incorrect answer`,AZ=((e={},t={})=>(t.locale??q())===`fr`?OZ(e):kZ(e)),jZ=()=>`Incohérence`,MZ=()=>`Inconsistency`,NZ=((e={},t={})=>(t.locale??q())===`fr`?jZ(e):MZ(e)),PZ=()=>`Formatage`,FZ=()=>`Formatting`,IZ=((e={},t={})=>(t.locale??q())===`fr`?PZ(e):FZ(e)),LZ=()=>`Latence`,RZ=()=>`Latency`,zZ=((e={},t={})=>(t.locale??q())===`fr`?LZ(e):RZ(e)),BZ=()=>`Erreur API`,VZ=()=>`API error`,HZ=((e={},t={})=>(t.locale??q())===`fr`?BZ(e):VZ(e)),yfe=()=>`Autre`,bfe=()=>`Other`,xfe=((e={},t={})=>(t.locale??q())===`fr`?yfe(e):bfe(e)),Sfe=()=>`reçu = stocké`,Cfe=()=>`received = stored`,wfe=((e={},t={})=>(t.locale??q())===`fr`?Sfe(e):Cfe(e)),Tfe=()=>`affichage fidèle ✓`,Efe=()=>`faithful display ✓`,Dfe=((e={},t={})=>(t.locale??q())===`fr`?Tfe(e):Efe(e)),Ofe=()=>`écart ⚠`,kfe=()=>`mismatch ⚠`,Afe=((e={},t={})=>(t.locale??q())===`fr`?Ofe(e):kfe(e)),jfe=()=>`régénération`,Mfe=()=>`regeneration`,Nfe=((e={},t={})=>(t.locale??q())===`fr`?jfe(e):Mfe(e)),Pfe=()=>`Commentaire du rapporteur`,Ffe=()=>`Reporter's comment`,Ife=((e={},t={})=>(t.locale??q())===`fr`?Pfe(e):Ffe(e)),Lfe=()=>`Échange avec l'utilisateur`,Rfe=()=>`Exchange with the user`,zfe=((e={},t={})=>(t.locale??q())===`fr`?Lfe(e):Rfe(e)),Bfe=()=>`Administrateur`,Vfe=()=>`Administrator`,Hfe=((e={},t={})=>(t.locale??q())===`fr`?Bfe(e):Vfe(e)),Ufe=()=>`Utilisateur`,Wfe=()=>`User`,Gfe=((e={},t={})=>(t.locale??q())===`fr`?Ufe(e):Wfe(e)),Kfe=()=>`Aucune réponse envoyée.`,qfe=()=>`No reply sent.`,Jfe=((e={},t={})=>(t.locale??q())===`fr`?Kfe(e):qfe(e)),Yfe=()=>`Répondre à l'utilisateur (visible dans sa zone de notification)…`,Xfe=()=>`Reply to the user (visible in their notification area)…`,Zfe=((e={},t={})=>(t.locale??q())===`fr`?Yfe(e):Xfe(e)),Qfe=()=>`Envoi…`,$fe=()=>`Sending…`,epe=((e={},t={})=>(t.locale??q())===`fr`?Qfe(e):$fe(e)),tpe=()=>`Répondre`,npe=()=>`Reply`,rpe=((e={},t={})=>(t.locale??q())===`fr`?tpe(e):npe(e)),ipe=()=>`Texte stocké (serveur, autoritatif)`,ape=()=>`Stored text (server, authoritative)`,ope=((e={},t={})=>(t.locale??q())===`fr`?ipe(e):ape(e)),spe=()=>`(vide)`,cpe=()=>`(empty)`,UZ=((e={},t={})=>(t.locale??q())===`fr`?spe(e):cpe(e)),lpe=()=>`Texte affiché (navigateur, au signalement)`,upe=()=>`Displayed text (browser, at report time)`,dpe=((e={},t={})=>(t.locale??q())===`fr`?lpe(e):upe(e)),fpe=()=>`Prompt générateur`,ppe=()=>`Generator prompt`,mpe=((e={},t={})=>(t.locale??q())===`fr`?fpe(e):ppe(e)),hpe=e=>`Contexte figé (${e?.count} tours${e?.truncated})`,gpe=e=>`Frozen context (${e?.count} turns${e?.truncated})`,_pe=((e,t={})=>(t.locale??q())===`fr`?hpe(e):gpe(e)),vpe=()=>`, tronqué`,ype=()=>`, truncated`,bpe=((e={},t={})=>(t.locale??q())===`fr`?vpe(e):ype(e)),xpe=()=>`Payload dispatché (outbox)`,Spe=()=>`Dispatched payload (outbox)`,Cpe=((e={},t={})=>(t.locale??q())===`fr`?xpe(e):Spe(e)),wpe=()=>`Extensions de correction détectées (peuvent altérer le texte)`,Tpe=()=>`Correction extensions detected (may alter the text)`,Epe=((e={},t={})=>(t.locale??q())===`fr`?wpe(e):Tpe(e)),Dpe=()=>`Environnement client`,Ope=()=>`Client environment`,kpe=((e={},t={})=>(t.locale??q())===`fr`?Dpe(e):Ope(e)),Ape=e=>`thème ${e?.theme}`,jpe=e=>`theme ${e?.theme}`,Mpe=((e,t={})=>(t.locale??q())===`fr`?Ape(e):jpe(e)),Npe=()=>`Plugins :`,Ppe=()=>`Plugins:`,Fpe=((e={},t={})=>(t.locale??q())===`fr`?Npe(e):Ppe(e)),Ipe=()=>`(navigator.plugins — neutralisé/partiel dans les navigateurs modernes)`,Lpe=()=>`(navigator.plugins — neutralized/partial in modern browsers)`,Rpe=((e={},t={})=>(t.locale??q())===`fr`?Ipe(e):Lpe(e)),zpe=()=>`Signalements « Report Feedback » enregistrés. La liste est en métadonnées ; ouvrir le détail lit le contenu figé et`,Bpe=()=>`Recorded "Report Feedback" reports. The list shows metadata; opening the detail reads the frozen content and`,Vpe=((e={},t={})=>(t.locale??q())===`fr`?zpe(e):Bpe(e)),Hpe=()=>`trace cet accès dans l'Audit`,Upe=()=>`traces this access in the Audit`,Wpe=((e={},t={})=>(t.locale??q())===`fr`?Hpe(e):Upe(e)),Gpe=()=>`(lecture de contenu d'un autre utilisateur). Fenêtre récente bornée.`,Kpe=()=>`(reading another user's content). Bounded recent window.`,qpe=((e={},t={})=>(t.locale??q())===`fr`?Gpe(e):Kpe(e)),Jpe=()=>`Signalements`,Ype=()=>`Reports`,Xpe=((e={},t={})=>(t.locale??q())===`fr`?Jpe(e):Ype(e)),Zpe=()=>`Aucun signalement pour l'instant.`,Qpe=()=>`No reports yet.`,$pe=((e={},t={})=>(t.locale??q())===`fr`?Zpe(e):Qpe(e)),eme=()=>`Quand`,tme=()=>`When`,nme=((e={},t={})=>(t.locale??q())===`fr`?eme(e):tme(e)),rme=()=>`Catégorie`,ime=()=>`Category`,ame=((e={},t={})=>(t.locale??q())===`fr`?rme(e):ime(e)),ome=()=>`Type`,sme=()=>`Type`,cme=((e={},t={})=>(t.locale??q())===`fr`?ome(e):sme(e)),lme=()=>`user`,ume=()=>`user`,dme=((e={},t={})=>(t.locale??q())===`fr`?lme(e):ume(e)),fme=()=>`AI`,pme=()=>`AI`,mme=((e={},t={})=>(t.locale??q())===`fr`?fme(e):pme(e)),hme=()=>`Rapporteur`,gme=()=>`Reporter`,_me=((e={},t={})=>(t.locale??q())===`fr`?hme(e):gme(e)),vme=e=>`(via ${e?.operator})`,yme=e=>`(via ${e?.operator})`,bme=((e,t={})=>(t.locale??q())===`fr`?vme(e):yme(e)),xme=()=>`Fidélité`,Sme=()=>`Fidelity`,Cme=((e={},t={})=>(t.locale??q())===`fr`?xme(e):Sme(e)),wme=()=>`Note`,Tme=()=>`Note`,Eme=((e={},t={})=>(t.locale??q())===`fr`?wme(e):Tme(e)),Dme=()=>`Statut`,Ome=()=>`Status`,kme=((e={},t={})=>(t.locale??q())===`fr`?Dme(e):Ome(e)),Ame=()=>`Répondu`,jme=()=>`Answered`,Mme=((e={},t={})=>(t.locale??q())===`fr`?Ame(e):jme(e)),Nme=()=>`En attente`,Pme=()=>`Pending`,Fme=((e={},t={})=>(t.locale??q())===`fr`?Nme(e):Pme(e)),Ime=()=>`Clos par l'utilisateur`,Lme=()=>`Closed by user`,Rme=((e={},t={})=>(t.locale??q())===`fr`?Ime(e):Lme(e)),zme=()=>`Raison de clôture`,Bme=()=>`Close reason`,Vme=((e={},t={})=>(t.locale??q())===`fr`?zme(e):Bme(e)),Hme=()=>`Masquer`,Ume=()=>`Hide`,Wme=((e={},t={})=>(t.locale??q())===`fr`?Hme(e):Ume(e)),Gme=()=>`Voir le détail`,Kme=()=>`View detail`,qme=((e={},t={})=>(t.locale??q())===`fr`?Gme(e):Kme(e)),Jme=()=>`Supprimer`,Yme=()=>`Delete`,Xme=((e={},t={})=>(t.locale??q())===`fr`?Jme(e):Yme(e)),Zme=()=>`Supprimer ce signalement ?`,Qme=()=>`Delete this report?`,$me=((e={},t={})=>(t.locale??q())===`fr`?Zme(e):Qme(e)),ehe=()=>`L'instantané forensique figé sera définitivement supprimé. Cette action est irréversible.`,the=()=>`The frozen forensic snapshot will be permanently deleted. This action is irreversible.`,nhe=((e={},t={})=>(t.locale??q())===`fr`?ehe(e):the(e)),rhe=()=>`Supprimer`,ihe=()=>`Delete`,ahe=((e={},t={})=>(t.locale??q())===`fr`?rhe(e):ihe(e)),ohe=()=>`Aucun onglet`,she=()=>`No tabs`,che=((e={},t={})=>(t.locale??q())===`fr`?ohe(e):she(e)),lhe=e=>`${e?.count} onglets`,uhe=e=>`${e?.count} tabs`,dhe=((e,t={})=>(t.locale??q())===`fr`?lhe(e):uhe(e)),fhe=()=>`Onglets Settings autorisés`,phe=()=>`Allowed Settings tabs`,mhe=((e={},t={})=>(t.locale??q())===`fr`?fhe(e):phe(e)),hhe=()=>`Changement de rôle refusé`,ghe=()=>`Role change refused`,_he=((e={},t={})=>(t.locale??q())===`fr`?hhe(e):ghe(e)),vhe=()=>`Mise à jour des permissions refusée`,yhe=()=>`Permission update refused`,bhe=((e={},t={})=>(t.locale??q())===`fr`?vhe(e):yhe(e)),xhe=()=>`Rechercher (email, nom)`,She=()=>`Search (email, name)`,Che=((e={},t={})=>(t.locale??q())===`fr`?xhe(e):She(e)),whe=()=>`Tous les rôles`,The=()=>`All roles`,Ehe=((e={},t={})=>(t.locale??q())===`fr`?whe(e):The(e)),Dhe=()=>`Utilisateurs`,Ohe=()=>`Users`,khe=((e={},t={})=>(t.locale??q())===`fr`?Dhe(e):Ohe(e)),Ahe=()=>`Aucun utilisateur.`,jhe=()=>`No users.`,Mhe=((e={},t={})=>(t.locale??q())===`fr`?Ahe(e):jhe(e)),Nhe=()=>`Voir comme cet utilisateur`,Phe=()=>`View as this user`,Fhe=((e={},t={})=>(t.locale??q())===`fr`?Nhe(e):Phe(e)),Ihe=()=>`Supprimer l’utilisateur`,Lhe=()=>`Delete user`,Rhe=((e={},t={})=>(t.locale??q())===`fr`?Ihe(e):Lhe(e)),zhe=()=>`Supprimer cet utilisateur ?`,Bhe=()=>`Delete this user?`,Vhe=((e={},t={})=>(t.locale??q())===`fr`?zhe(e):Bhe(e)),Hhe=e=>`« ${e?.user} » et toutes ses données (conversations, fichiers, accès) seront définitivement supprimés. Cette action est irréversible.`,Uhe=e=>`“${e?.user}” and all their data (conversations, files, access) will be permanently deleted. This action cannot be undone.`,Whe=((e,t={})=>(t.locale??q())===`fr`?Hhe(e):Uhe(e)),Ghe=()=>`SUPPRIMER`,Khe=()=>`DELETE`,qhe=((e={},t={})=>(t.locale??q())===`fr`?Ghe(e):Khe(e)),Jhe=()=>`Supprimer définitivement`,Yhe=()=>`Delete permanently`,Xhe=((e={},t={})=>(t.locale??q())===`fr`?Jhe(e):Yhe(e)),Zhe=()=>`Suppression de l’utilisateur refusée`,Qhe=()=>`User deletion refused`,$he=((e={},t={})=>(t.locale??q())===`fr`?Zhe(e):Qhe(e)),ege=e=>`Utilisateur « ${e?.user} » supprimé.`,tge=e=>`User “${e?.user}” deleted.`,nge=((e,t={})=>(t.locale??q())===`fr`?ege(e):tge(e)),rge=()=>`Renommer`,ige=()=>`Rename`,age=((e={},t={})=>(t.locale??q())===`fr`?rge(e):ige(e)),oge=()=>`Renommer l’utilisateur`,sge=()=>`Rename user`,cge=((e={},t={})=>(t.locale??q())===`fr`?oge(e):sge(e)),lge=e=>`Nom affiché pour « ${e?.user} »`,uge=e=>`Display name for “${e?.user}”`,dge=((e,t={})=>(t.locale??q())===`fr`?lge(e):uge(e)),fge=()=>`Nom et prénom`,pge=()=>`Name`,mge=((e={},t={})=>(t.locale??q())===`fr`?fge(e):pge(e)),hge=()=>`Nom mis à jour.`,gge=()=>`Name updated.`,_ge=((e={},t={})=>(t.locale??q())===`fr`?hge(e):gge(e)),vge=()=>`Renommage refusé`,yge=()=>`Rename refused`,bge=((e={},t={})=>(t.locale??q())===`fr`?vge(e):yge(e)),xge=()=>`Utilisateur`,Sge=()=>`User`,Cge=((e={},t={})=>(t.locale??q())===`fr`?xge(e):Sge(e)),wge=()=>`Rôle`,Tge=()=>`Role`,Ege=((e={},t={})=>(t.locale??q())===`fr`?wge(e):Tge(e)),Dge=()=>`Accès Settings`,Oge=()=>`Settings access`,kge=((e={},t={})=>(t.locale??q())===`fr`?Dge(e):Oge(e)),Age=()=>`Tous (admin)`,jge=()=>`All (admin)`,Mge=((e={},t={})=>(t.locale??q())===`fr`?Age(e):jge(e)),Nge=()=>`Agents`,Pge=()=>`Agents`,WZ=((e={},t={})=>(t.locale??q())===`fr`?Nge(e):Pge(e)),Fge=()=>`Gérer les agents`,Ige=()=>`Manage agents`,GZ=((e={},t={})=>(t.locale??q())===`fr`?Fge(e):Ige(e)),Lge=()=>`Échec de l’enregistrement de l’instance`,Rge=()=>`Failed to save instance`,zge=((e={},t={})=>(t.locale??q())===`fr`?Lge(e):Rge(e)),Bge=()=>`Les agents sont `,Vge=()=>`Agents are `,Hge=((e={},t={})=>(t.locale??q())===`fr`?Bge(e):Vge(e)),Uge=()=>`découverts par le bridge`,Wge=()=>`discovered by the bridge`,Gge=((e={},t={})=>(t.locale??q())===`fr`?Uge(e):Wge(e)),Kge=()=>` (jamais saisis à la main). Les identifiants gateway (token, device, clé API) se configurent par instance via « Identifiants » — chiffrés au repos.`,qge=()=>` (never entered by hand). Gateway credentials (token, device identity, API key) are set per instance via “Credentials” — encrypted at rest.`,Jge=((e={},t={})=>(t.locale??q())===`fr`?Kge(e):qge(e)),Yge=()=>`Instances`,Xge=()=>`Instances`,Zge=((e={},t={})=>(t.locale??q())===`fr`?Yge(e):Xge(e)),Qge=()=>`Ajouter une instance`,$ge=()=>`Add instance`,e_e=((e={},t={})=>(t.locale??q())===`fr`?Qge(e):$ge(e)),t_e=()=>`Aucune instance.`,n_e=()=>`No instances.`,r_e=((e={},t={})=>(t.locale??q())===`fr`?t_e(e):n_e(e)),i_e=()=>`Nom`,a_e=()=>`Name`,o_e=((e={},t={})=>(t.locale??q())===`fr`?i_e(e):a_e(e)),s_e=()=>`Bridge`,c_e=()=>`Bridge`,l_e=((e={},t={})=>(t.locale??q())===`fr`?s_e(e):c_e(e)),u_e=()=>`Gateway URL`,d_e=()=>`Gateway URL`,f_e=((e={},t={})=>(t.locale??q())===`fr`?u_e(e):d_e(e)),p_e=()=>`Affichage`,m_e=()=>`Display`,h_e=((e={},t={})=>(t.locale??q())===`fr`?p_e(e):m_e(e)),g_e=()=>`Configurer le bridge`,__e=()=>`Configure bridge`,v_e=((e={},t={})=>(t.locale??q())===`fr`?g_e(e):__e(e)),y_e=()=>`Supprimer`,b_e=()=>`Delete`,KZ=((e={},t={})=>(t.locale??q())===`fr`?y_e(e):b_e(e)),x_e=()=>`Nouvelle instance`,S_e=()=>`New instance`,C_e=((e={},t={})=>(t.locale??q())===`fr`?x_e(e):S_e(e)),w_e=()=>`Modifier`,T_e=()=>`Edit`,E_e=((e={},t={})=>(t.locale??q())===`fr`?w_e(e):T_e(e)),D_e=()=>`Modifier l'instance`,O_e=()=>`Edit instance`,k_e=((e={},t={})=>(t.locale??q())===`fr`?D_e(e):O_e(e)),A_e=()=>`Le nom est la clé de routage et ne peut pas être modifié après création.`,j_e=()=>`The name is the routing key and can't be changed after creation.`,M_e=((e={},t={})=>(t.locale??q())===`fr`?A_e(e):j_e(e)),N_e=()=>`Métadonnées non-secrètes.`,P_e=()=>`Non-secret metadata.`,F_e=((e={},t={})=>(t.locale??q())===`fr`?N_e(e):P_e(e)),I_e=()=>`Enregistrer`,L_e=()=>`Save`,qZ=((e={},t={})=>(t.locale??q())===`fr`?I_e(e):L_e(e)),R_e=()=>`Nom de l’instance (ex. main)`,z_e=()=>`Instance name (e.g. main)`,B_e=((e={},t={})=>(t.locale??q())===`fr`?R_e(e):z_e(e)),V_e=()=>`Technologie (bridge)`,H_e=()=>`Technology (bridge)`,U_e=((e={},t={})=>(t.locale??q())===`fr`?V_e(e):H_e(e)),W_e=()=>`Gateway URL (ws(s)://)`,G_e=()=>`Gateway URL (ws(s)://)`,K_e=((e={},t={})=>(t.locale??q())===`fr`?W_e(e):G_e(e)),q_e=()=>`URL du bridge`,J_e=()=>`Bridge URL`,Y_e=((e={},t={})=>(t.locale??q())===`fr`?q_e(e):J_e(e)),X_e=()=>`http://bridge-host:8787 — sinon le BRIDGE_URL du déploiement`,Z_e=()=>`http://bridge-host:8787 — else the deployment BRIDGE_URL`,Q_e=((e={},t={})=>(t.locale??q())===`fr`?X_e(e):Z_e(e)),$_e=()=>`Nom affiché (optionnel)`,eve=()=>`Display name (optional)`,tve=((e={},t={})=>(t.locale??q())===`fr`?$_e(e):eve(e)),nve=()=>`Version de la gateway (optionnel)`,rve=()=>`Gateway version (optional)`,ive=((e={},t={})=>(t.locale??q())===`fr`?nve(e):rve(e)),ave=()=>`ex. 2026.6.5 — repli de compatibilité`,ove=()=>`e.g. 2026.6.5 — compat fallback`,sve=((e={},t={})=>(t.locale??q())===`fr`?ave(e):ove(e)),cve=()=>`URL HTTP média (optionnel)`,lve=()=>`Media HTTP URL (optional)`,uve=((e={},t={})=>(t.locale??q())===`fr`?cve(e):lve(e)),dve=()=>`Seulement si le média est servi sur un autre hôte/port`,fve=()=>`Only if media is served on another host/port`,pve=((e={},t={})=>(t.locale??q())===`fr`?dve(e):fve(e)),mve=()=>`Identifiants`,hve=()=>`Credentials`,gve=((e={},t={})=>(t.locale??q())===`fr`?mve(e):hve(e)),_ve=e=>`Identifiants de la gateway — instance « ${e?.instance} »`,vve=e=>`Gateway credentials — instance « ${e?.instance} »`,yve=((e,t={})=>(t.locale??q())===`fr`?_ve(e):vve(e)),bve=()=>`Stockés chiffrés au repos. En écriture seule : une valeur n'est jamais réaffichée — définissez-la, remplacez-la ou effacez-la.`,xve=()=>`Stored encrypted at rest. Write-only: a value is never shown again — set or replace it, or clear it.`,Sve=((e={},t={})=>(t.locale??q())===`fr`?bve(e):xve(e)),Cve=()=>`Jeton opérateur`,wve=()=>`Operator token`,Tve=((e={},t={})=>(t.locale??q())===`fr`?Cve(e):wve(e)),Eve=()=>`Identité d'appareil (JSON Ed25519)`,Dve=()=>`Device identity (Ed25519 JSON)`,Ove=((e={},t={})=>(t.locale??q())===`fr`?Eve(e):Dve(e)),kve=()=>`Clé API`,Ave=()=>`API key`,jve=((e={},t={})=>(t.locale??q())===`fr`?kve(e):Ave(e)),Mve=()=>`Configuré`,Nve=()=>`Configured`,JZ=((e={},t={})=>(t.locale??q())===`fr`?Mve(e):Nve(e)),Pve=()=>`Non défini`,Fve=()=>`Not set`,YZ=((e={},t={})=>(t.locale??q())===`fr`?Pve(e):Fve(e)),Ive=()=>`Saisir la valeur…`,Lve=()=>`Enter value…`,Rve=((e={},t={})=>(t.locale??q())===`fr`?Ive(e):Lve(e)),zve=()=>`Remplacer la valeur…`,Bve=()=>`Replace value…`,Vve=((e={},t={})=>(t.locale??q())===`fr`?zve(e):Bve(e)),Hve=()=>`Définir`,Uve=()=>`Set`,Wve=((e={},t={})=>(t.locale??q())===`fr`?Hve(e):Uve(e)),Gve=()=>`Effacer`,Kve=()=>`Clear`,qve=((e={},t={})=>(t.locale??q())===`fr`?Gve(e):Kve(e)),Jve=()=>`Identifiant enregistré`,Yve=()=>`Credential saved`,Xve=((e={},t={})=>(t.locale??q())===`fr`?Jve(e):Yve(e)),Zve=()=>`Impossible d'enregistrer l'identifiant`,Qve=()=>`Could not save the credential`,XZ=((e={},t={})=>(t.locale??q())===`fr`?Zve(e):Qve(e)),$ve=()=>`Identifiant effacé`,eye=()=>`Credential cleared`,tye=((e={},t={})=>(t.locale??q())===`fr`?$ve(e):eye(e)),nye=()=>`Générer`,rye=()=>`Generate`,iye=((e={},t={})=>(t.locale??q())===`fr`?nye(e):rye(e)),aye=()=>`Crée une identité Ed25519 côté serveur (la clé privée ne touche jamais le navigateur) et l'enregistre. Vous l'appairerez ensuite sur la gateway.`,oye=()=>`Mints an Ed25519 identity server-side (the private key never reaches the browser) and saves it. You'll then pair it on the gateway.`,sye=((e={},t={})=>(t.locale??q())===`fr`?aye(e):oye(e)),cye=()=>`Identité générée et enregistrée`,lye=()=>`Device identity generated and saved`,ZZ=((e={},t={})=>(t.locale??q())===`fr`?cye(e):lye(e)),uye=()=>`Appairez cet appareil sur votre gateway avec :`,dye=()=>`Pair this device on your gateway with:`,fye=((e={},t={})=>(t.locale??q())===`fr`?uye(e):dye(e)),pye=()=>`Impossible de générer l'identité d'appareil`,mye=()=>`Could not generate the device identity`,hye=((e={},t={})=>(t.locale??q())===`fr`?pye(e):mye(e)),gye=()=>`Synchroniser maintenant`,_ye=()=>`Sync now`,vye=((e={},t={})=>(t.locale??q())===`fr`?gye(e):_ye(e)),yye=()=>`Synchronisation…`,bye=()=>`Syncing…`,xye=((e={},t={})=>(t.locale??q())===`fr`?yye(e):bye(e)),Sye=()=>`Synchronisation effectuée`,Cye=()=>`Synced`,wye=((e={},t={})=>(t.locale??q())===`fr`?Sye(e):Cye(e)),Tye=()=>`Échec de la synchronisation`,Eye=()=>`Sync failed`,Dye=((e={},t={})=>(t.locale??q())===`fr`?Tye(e):Eye(e)),Oye=()=>`Aucun agent récupéré — appairez l'appareil sur la gateway (ou vérifiez la configuration de l'instance), puis re-synchronisez`,kye=()=>`No agents retrieved — pair the device on the gateway (or check the instance configuration), then sync again`,Aye=((e={},t={})=>(t.locale??q())===`fr`?Oye(e):kye(e)),jye=()=>`Aucun bridge ne sert cette instance — définissez son « Bridge URL » dans Settings → Agents → Instances.`,Mye=()=>`No bridge serves this instance — set its “Bridge URL” in Settings → Agents → Instances.`,Nye=((e={},t={})=>(t.locale??q())===`fr`?jye(e):Mye(e)),Pye=()=>`Configuration Convex incomplète : BRIDGE_SHARED_SECRET manquant sur le déploiement.`,Fye=()=>`Convex deployment is misconfigured: BRIDGE_SHARED_SECRET is missing.`,Iye=((e={},t={})=>(t.locale??q())===`fr`?Pye(e):Fye(e)),Lye=()=>`Bridge injoignable — vérifiez qu'il tourne et que son URL est correcte.`,Rye=()=>`Bridge unreachable — check it is running and its URL is correct.`,zye=((e={},t={})=>(t.locale??q())===`fr`?Lye(e):Rye(e)),Bye=()=>`Le bridge a rejeté l'authentification — BRIDGE_SHARED_SECRET désynchronisé entre Convex et le bridge.`,Vye=()=>`The bridge rejected authentication — BRIDGE_SHARED_SECRET is out of sync between Convex and the bridge.`,Hye=((e={},t={})=>(t.locale??q())===`fr`?Bye(e):Vye(e)),Uye=()=>`Le bridge ne sert pas cette instance — son secret doit figurer dans BRIDGE_INSTANCE_SECRETS et ses identifiants doivent être valides.`,Wye=()=>`The bridge does not serve this instance — its secret must be in BRIDGE_INSTANCE_SECRETS and its credentials must be valid.`,Gye=((e={},t={})=>(t.locale??q())===`fr`?Uye(e):Wye(e)),Kye=()=>`Force le bridge à prendre en compte les identifiants et à récupérer les agents depuis la gateway maintenant (sinon ~2 min via le cron). Déclenche aussi l'appairage si l'appareil n'est pas encore appairé.`,qye=()=>`Forces the bridge to take the credentials into account and fetch the agents from the gateway now (otherwise ~2 min via the cron). Also triggers pairing if the device is not yet paired.`,Jye=((e={},t={})=>(t.locale??q())===`fr`?Kye(e):qye(e)),Yye=()=>`Secret du bridge (bridge → Convex)`,Xye=()=>`Bridge secret (bridge → Convex)`,Zye=((e={},t={})=>(t.locale??q())===`fr`?Yye(e):Xye(e)),Qye=()=>`Authentifie CE bridge auprès de Convex et le lie à cette instance, afin que le bridge ne puisse lire que les secrets de cette gateway. À définir dans l'environnement du bridge. Affiché une seule fois à la génération.`,$ye=()=>`Authenticates THIS bridge to Convex and ties it to this instance, so the bridge can only ever read this gateway's secrets. Set it in the bridge's environment. Shown once at generation.`,ebe=((e={},t={})=>(t.locale??q())===`fr`?Qye(e):$ye(e)),tbe=()=>`Générer`,nbe=()=>`Generate`,rbe=((e={},t={})=>(t.locale??q())===`fr`?tbe(e):nbe(e)),ibe=()=>`Régénérer`,abe=()=>`Regenerate`,obe=((e={},t={})=>(t.locale??q())===`fr`?ibe(e):abe(e)),sbe=()=>`Révoquer`,cbe=()=>`Revoke`,lbe=((e={},t={})=>(t.locale??q())===`fr`?sbe(e):cbe(e)),ube=()=>`Secret du bridge révoqué`,dbe=()=>`Bridge secret revoked`,fbe=((e={},t={})=>(t.locale??q())===`fr`?ube(e):dbe(e)),pbe=()=>`Impossible de générer le secret du bridge`,mbe=()=>`Could not generate the bridge secret`,QZ=((e={},t={})=>(t.locale??q())===`fr`?pbe(e):mbe(e)),hbe=()=>`Copiez ce secret maintenant — il ne sera plus jamais affiché. Placez-le dans la variable d'environnement du bridge.`,gbe=()=>`Copy this secret now — it is never shown again. Put it in the bridge's environment variable.`,_be=((e={},t={})=>(t.locale??q())===`fr`?hbe(e):gbe(e)),vbe=()=>`J'ai copié le secret`,ybe=()=>`I've copied the secret`,$Z=((e={},t={})=>(t.locale??q())===`fr`?vbe(e):ybe(e)),bbe=e=>`Agents — instance « ${e?.name} »`,xbe=e=>`Agents — instance « ${e?.name} »`,Sbe=((e,t={})=>(t.locale??q())===`fr`?bbe(e):xbe(e)),Cbe=()=>`Les agents sont découverts par le bridge. Coche ceux à rendre disponibles en aval (assignables aux groupes/users), et choisis un défaut. Un agent désactivé reste listé mais grisé.`,wbe=()=>`Agents are discovered by the bridge. Tick the ones to make available downstream (assignable to groups/users), and pick one default. A disabled agent stays listed but greyed.`,Tbe=((e={},t={})=>(t.locale??q())===`fr`?Cbe(e):wbe(e)),Ebe=()=>`Impossible de mettre à jour l’agent`,Dbe=()=>`Could not update the agent`,eQ=((e={},t={})=>(t.locale??q())===`fr`?Ebe(e):Dbe(e)),Obe=()=>`Types`,kbe=()=>`Types`,Abe=((e={},t={})=>(t.locale??q())===`fr`?Obe(e):kbe(e)),jbe=()=>`Gérer`,Mbe=()=>`Manage`,Nbe=((e={},t={})=>(t.locale??q())===`fr`?jbe(e):Mbe(e)),Pbe=()=>`Types de l'agent`,Fbe=()=>`Agent types`,Ibe=((e={},t={})=>(t.locale??q())===`fr`?Pbe(e):Fbe(e)),Lbe=()=>`Un agent peut avoir plusieurs types. Chaque type indique à Atrium comment l'agent peut être utilisé.`,Rbe=()=>`An agent may hold several types. Each type tells Atrium how the agent can be used.`,zbe=((e={},t={})=>(t.locale??q())===`fr`?Lbe(e):Rbe(e)),Bbe=()=>`Conversationnel`,Vbe=()=>`Conversational`,Hbe=((e={},t={})=>(t.locale??q())===`fr`?Bbe(e):Vbe(e)),Ube=()=>`Agent de chat standard — répond aux messages des utilisateurs dans une conversation.`,Wbe=()=>`Standard chat agent — answers users' messages in a conversation.`,Gbe=((e={},t={})=>(t.locale??q())===`fr`?Ube(e):Wbe(e)),Kbe=()=>`Source documentaire`,qbe=()=>`Documentary source`,Jbe=((e={},t={})=>(t.locale??q())===`fr`?Kbe(e):qbe(e)),Ybe=()=>`Agent spécialisé appelé par une action Atrium dédiée pour exploiter une source documentaire — pas de chat direct.`,Xbe=()=>`Specialised agent invoked by a dedicated Atrium action to exploit a documentary source — not used for direct chat.`,Zbe=((e={},t={})=>(t.locale??q())===`fr`?Ybe(e):Xbe(e)),Qbe=()=>`Définir par défaut`,$be=()=>`Set as default`,exe=((e={},t={})=>(t.locale??q())===`fr`?Qbe(e):$be(e)),txe=()=>`Retirer`,nxe=()=>`Remove`,rxe=((e={},t={})=>(t.locale??q())===`fr`?txe(e):nxe(e)),ixe=e=>`Retirer ${e?.name} ?`,axe=e=>`Remove ${e?.name}?`,oxe=((e,t={})=>(t.locale??q())===`fr`?ixe(e):axe(e)),sxe=()=>`Cet agent n’existe plus sur le gateway. Le retirer le supprime aussi de la liste d’agents de chaque groupe et utilisateur. Action irréversible.`,cxe=()=>`This agent no longer exists on the gateway. Removing it also removes it from every group's and user's agent list. This cannot be undone.`,lxe=((e={},t={})=>(t.locale??q())===`fr`?sxe(e):cxe(e)),uxe=()=>`Retirer`,dxe=()=>`Remove`,fxe=((e={},t={})=>(t.locale??q())===`fr`?uxe(e):dxe(e)),pxe=()=>`Agent retiré`,mxe=()=>`Agent removed`,hxe=((e={},t={})=>(t.locale??q())===`fr`?pxe(e):mxe(e)),gxe=()=>`Chargement…`,_xe=()=>`Loading…`,vxe=((e={},t={})=>(t.locale??q())===`fr`?gxe(e):_xe(e)),yxe=()=>`Jamais sondé.`,bxe=()=>`Never polled.`,xxe=((e={},t={})=>(t.locale??q())===`fr`?yxe(e):bxe(e)),Sxe=()=>`Découverte OK.`,Cxe=()=>`Discovery OK.`,wxe=((e={},t={})=>(t.locale??q())===`fr`?Sxe(e):Cxe(e)),Txe=e=>`Hors-ligne (${e?.error}) — dernier bon résultat servi.`,Exe=e=>`Offline (${e?.error}) — last good result served.`,Dxe=((e,t={})=>(t.locale??q())===`fr`?Txe(e):Exe(e)),Oxe=()=>`Aucun agent découvert.`,kxe=()=>`No agent discovered.`,Axe=((e={},t={})=>(t.locale??q())===`fr`?Oxe(e):kxe(e)),jxe=()=>`défaut`,Mxe=()=>`default`,tQ=((e={},t={})=>(t.locale??q())===`fr`?jxe(e):Mxe(e)),Nxe=()=>`supprimé`,Pxe=()=>`removed`,Fxe=((e={},t={})=>(t.locale??q())===`fr`?Nxe(e):Pxe(e)),Ixe=()=>`Trace des actions effectuées sous usurpation d’identité : qui a réellement agi (acteur réel) et au nom de quel utilisateur. Le contenu des messages n’est jamais enregistré.`,Lxe=()=>`Trace of actions performed under impersonation: who really acted (real actor) and on behalf of which user. Message content is never recorded.`,Rxe=((e={},t={})=>(t.locale??q())===`fr`?Ixe(e):Lxe(e)),zxe=()=>`Fenêtre récente bornée — une plage antérieure peut être partielle.`,Bxe=()=>`Bounded recent window — an earlier range may be partial.`,Vxe=((e={},t={})=>(t.locale??q())===`fr`?zxe(e):Bxe(e)),Hxe=()=>`Rechercher (action, acteur, ressource)`,Uxe=()=>`Search (action, actor, resource)`,Wxe=((e={},t={})=>(t.locale??q())===`fr`?Hxe(e):Uxe(e)),Gxe=()=>`Action`,Kxe=()=>`Action`,nQ=((e={},t={})=>(t.locale??q())===`fr`?Gxe(e):Kxe(e)),qxe=()=>`Toutes les actions`,Jxe=()=>`All actions`,Yxe=((e={},t={})=>(t.locale??q())===`fr`?qxe(e):Jxe(e)),Xxe=()=>`Usurpation : toutes`,Zxe=()=>`Impersonation: all`,Qxe=((e={},t={})=>(t.locale??q())===`fr`?Xxe(e):Zxe(e)),$xe=()=>`Sous usurpation`,eSe=()=>`Under impersonation`,tSe=((e={},t={})=>(t.locale??q())===`fr`?$xe(e):eSe(e)),nSe=()=>`Sans usurpation`,rSe=()=>`Without impersonation`,iSe=((e={},t={})=>(t.locale??q())===`fr`?nSe(e):rSe(e)),aSe=()=>`Ressource`,oSe=()=>`Resource`,rQ=((e={},t={})=>(t.locale??q())===`fr`?aSe(e):oSe(e)),sSe=()=>`Toutes les ressources`,cSe=()=>`All resources`,lSe=((e={},t={})=>(t.locale??q())===`fr`?sSe(e):cSe(e)),uSe=()=>`Audit`,dSe=()=>`Audit`,fSe=((e={},t={})=>(t.locale??q())===`fr`?uSe(e):dSe(e)),pSe=()=>`Aucune action tracée pour l’instant.`,mSe=()=>`No action traced yet.`,hSe=((e={},t={})=>(t.locale??q())===`fr`?pSe(e):mSe(e)),gSe=()=>`Quand`,_Se=()=>`When`,vSe=((e={},t={})=>(t.locale??q())===`fr`?gSe(e):_Se(e)),ySe=()=>`Acteur réel`,bSe=()=>`Real actor`,xSe=((e={},t={})=>(t.locale??q())===`fr`?ySe(e):bSe(e)),SSe=()=>`Au nom de`,CSe=()=>`On behalf of`,wSe=((e={},t={})=>(t.locale??q())===`fr`?SSe(e):CSe(e)),TSe=()=>`Traces`,ESe=()=>`Traces`,DSe=((e={},t={})=>(t.locale??q())===`fr`?TSe(e):ESe(e)),OSe=()=>`KPI`,kSe=()=>`KPI`,ASe=((e={},t={})=>(t.locale??q())===`fr`?OSe(e):kSe(e)),jSe=()=>`OpenClaw / Anomalies`,MSe=()=>`OpenClaw / Anomalies`,NSe=((e={},t={})=>(t.locale??q())===`fr`?jSe(e):MSe(e)),PSe=()=>`Chats`,FSe=()=>`Chats`,ISe=((e={},t={})=>(t.locale??q())===`fr`?PSe(e):FSe(e)),LSe=()=>`Admin`,RSe=()=>`Admin`,zSe=((e={},t={})=>(t.locale??q())===`fr`?LSe(e):RSe(e)),BSe=()=>`Lire`,VSe=()=>`Read`,iQ=((e={},t={})=>(t.locale??q())===`fr`?BSe(e):VSe(e)),HSe=()=>`Contenu`,USe=()=>`Content`,WSe=((e={},t={})=>(t.locale??q())===`fr`?HSe(e):USe(e)),GSe=()=>`Écrire`,KSe=()=>`Write`,aQ=((e={},t={})=>(t.locale??q())===`fr`?GSe(e):KSe(e)),qSe=()=>`Requête`,JSe=()=>`Query`,YSe=((e={},t={})=>(t.locale??q())===`fr`?qSe(e):JSe(e)),XSe=()=>`Anomalies`,ZSe=()=>`Anomalies`,QSe=((e={},t={})=>(t.locale??q())===`fr`?XSe(e):ZSe(e)),$Se=()=>`Signaler`,eCe=()=>`Report`,tCe=((e={},t={})=>(t.locale??q())===`fr`?$Se(e):eCe(e)),nCe=()=>`Gérer`,rCe=()=>`Manage`,iCe=((e={},t={})=>(t.locale??q())===`fr`?nCe(e):rCe(e)),aCe=()=>`Auto-correction`,oCe=()=>`Self-heal`,sCe=((e={},t={})=>(t.locale??q())===`fr`?aCe(e):oCe(e)),cCe=e=>`${e?.key} — accès au contenu brut (PHI), à accorder avec prudence`,lCe=e=>`${e?.key} — access to raw content (PHI), grant with caution`,uCe=((e,t={})=>(t.locale??q())===`fr`?cCe(e):lCe(e)),dCe=()=>`Échec de l’initialisation des rôles`,fCe=()=>`Failed to initialize roles`,pCe=((e={},t={})=>(t.locale??q())===`fr`?dCe(e):fCe(e)),mCe=e=>`Modifier le rôle intégré « ${e?.name} » ?`,hCe=e=>`Edit the built-in role “${e?.name}”?`,gCe=((e,t={})=>(t.locale??q())===`fr`?mCe(e):hCe(e)),_Ce=()=>`Les rôles intégrés sont la base du modèle de permissions. Les modifier peut affecter les comptes existants. Continuer ?`,vCe=()=>`Built-in roles are the foundation of the permission model. Editing them may affect existing accounts. Continue?`,yCe=((e={},t={})=>(t.locale??q())===`fr`?_Ce(e):vCe(e)),bCe=()=>`Modifier`,xCe=()=>`Edit`,SCe=((e={},t={})=>(t.locale??q())===`fr`?bCe(e):xCe(e)),CCe=()=>`Échec de la mise à jour des permissions`,wCe=()=>`Failed to update permissions`,TCe=((e={},t={})=>(t.locale??q())===`fr`?CCe(e):wCe(e)),ECe=()=>`Échec de la création du rôle`,DCe=()=>`Failed to create role`,OCe=((e={},t={})=>(t.locale??q())===`fr`?ECe(e):DCe(e)),kCe=()=>`Matrice de permissions. Lignes = rôles (intégrés + personnalisés), colonnes = clés de permission. Le rôle`,ACe=()=>`Permission matrix. Rows = roles (built-in + custom), columns = permission keys. The`,jCe=((e={},t={})=>(t.locale??q())===`fr`?kCe(e):ACe(e)),MCe=()=>`détient le joker « * » (toutes les permissions) et est verrouillé. La colonne`,NCe=()=>`role holds the “*” wildcard (all permissions) and is locked. The`,PCe=((e={},t={})=>(t.locale??q())===`fr`?MCe(e):NCe(e)),FCe=()=>`donne accès au contenu brut (PHI) — à n’accorder qu’à bon escient.`,ICe=()=>`column grants access to raw content (PHI) — grant only when justified.`,LCe=((e={},t={})=>(t.locale??q())===`fr`?FCe(e):ICe(e)),RCe=()=>`Rôles`,zCe=()=>`Roles`,BCe=((e={},t={})=>(t.locale??q())===`fr`?RCe(e):zCe(e)),VCe=()=>`Ajouter un rôle`,HCe=()=>`Add a role`,UCe=((e={},t={})=>(t.locale??q())===`fr`?VCe(e):HCe(e)),WCe=()=>`Chargement…`,GCe=()=>`Loading…`,KCe=((e={},t={})=>(t.locale??q())===`fr`?WCe(e):GCe(e)),qCe=()=>`Initialisation des rôles…`,JCe=()=>`Initializing roles…`,YCe=((e={},t={})=>(t.locale??q())===`fr`?qCe(e):JCe(e)),XCe=()=>`Rôle`,ZCe=()=>`Role`,QCe=((e={},t={})=>(t.locale??q())===`fr`?XCe(e):ZCe(e)),$Ce=()=>`intégré`,ewe=()=>`built-in`,twe=((e={},t={})=>(t.locale??q())===`fr`?$Ce(e):ewe(e)),nwe=()=>`personnalisé`,rwe=()=>`custom`,iwe=((e={},t={})=>(t.locale??q())===`fr`?nwe(e):rwe(e)),awe=()=>`Authentifié mais pas encore approuvé — l’accès est bloqué tant qu’un administrateur n’a pas validé le compte.`,owe=()=>`Authenticated but not yet approved — access is blocked until an admin approves the account.`,swe=((e={},t={})=>(t.locale??q())===`fr`?awe(e):owe(e)),cwe=()=>`Personne approuvée, avec accès au chat.`,lwe=()=>`Approved person with chat access.`,uwe=((e={},t={})=>(t.locale??q())===`fr`?cwe(e):lwe(e)),dwe=()=>`Accès total (superset) : gère les utilisateurs, rôles, agents, instances et l’observabilité.`,fwe=()=>`Full access (superset): manages users, roles, agents, instances and observability.`,pwe=((e={},t={})=>(t.locale??q())===`fr`?dwe(e):fwe(e)),mwe=()=>`Compte de service en LECTURE SEULE pour superviser : voit les traces, KPI, anomalies et l’état du bridge/version via l’API. Ne peut rien écrire ni déclencher.`,hwe=()=>`READ-ONLY service account for monitoring: views traces, KPIs, anomalies and bridge/version status through the API. Cannot write or trigger anything.`,gwe=((e={},t={})=>(t.locale??q())===`fr`?mwe(e):hwe(e)),_we=()=>`Compte de service pour un agent OpenClaw lui-même : tout ce que voit l’observateur, PLUS interroger OpenClaw et SIGNALER des anomalies (écriture — ex. heartbeat / auto-réparation). À utiliser pour un agent automatisé, pas pour un humain qui consulte les tableaux de bord.`,vwe=()=>`Service account for an OpenClaw agent itself: the observer's read access PLUS querying OpenClaw and REPORTING anomalies (write — e.g. heartbeat / self-repair). Use it for an automated agent, not a human watching dashboards.`,ywe=((e={},t={})=>(t.locale??q())===`fr`?_we(e):vwe(e)),bwe=()=>`Accordé via « * » (toutes les permissions)`,xwe=()=>`Granted via “*” (all permissions)`,Swe=((e={},t={})=>(t.locale??q())===`fr`?bwe(e):xwe(e)),Cwe=()=>`Écriture en cours…`,wwe=()=>`Writing…`,Twe=((e={},t={})=>(t.locale??q())===`fr`?Cwe(e):wwe(e)),Ewe=()=>`Nouveau rôle`,Dwe=()=>`New role`,Owe=((e={},t={})=>(t.locale??q())===`fr`?Ewe(e):Dwe(e)),kwe=()=>`Rôle personnalisé. Ajustez les permissions dans la matrice après création.`,Awe=()=>`Custom role. Adjust the permissions in the matrix after creation.`,jwe=((e={},t={})=>(t.locale??q())===`fr`?kwe(e):Awe(e)),Mwe=()=>`Créer`,Nwe=()=>`Create`,Pwe=((e={},t={})=>(t.locale??q())===`fr`?Mwe(e):Nwe(e)),Fwe=()=>`Clé (identifiant stable)`,Iwe=()=>`Key (stable identifier)`,Lwe=((e={},t={})=>(t.locale??q())===`fr`?Fwe(e):Iwe(e)),Rwe=()=>`ex. analyst`,zwe=()=>`e.g. analyst`,Bwe=((e={},t={})=>(t.locale??q())===`fr`?Rwe(e):zwe(e)),Vwe=()=>`Nom affiché`,Hwe=()=>`Display name`,Uwe=((e={},t={})=>(t.locale??q())===`fr`?Vwe(e):Hwe(e)),Wwe=()=>`Description (optionnel)`,Gwe=()=>`Description (optional)`,Kwe=((e={},t={})=>(t.locale??q())===`fr`?Wwe(e):Gwe(e)),qwe=()=>`Ouvertes`,Jwe=()=>`Open`,Ywe=((e={},t={})=>(t.locale??q())===`fr`?qwe(e):Jwe(e)),Xwe=()=>`En sourdine`,Zwe=()=>`Muted`,Qwe=((e={},t={})=>(t.locale??q())===`fr`?Xwe(e):Zwe(e)),$we=()=>`Résolues`,eTe=()=>`Resolved`,tTe=((e={},t={})=>(t.locale??q())===`fr`?$we(e):eTe(e)),nTe=()=>`Résoudre cette anomalie ?`,rTe=()=>`Resolve this anomaly?`,iTe=((e={},t={})=>(t.locale??q())===`fr`?nTe(e):rTe(e)),aTe=()=>`L’anomalie`,oTe=()=>`The anomaly`,sTe=((e={},t={})=>(t.locale??q())===`fr`?aTe(e):oTe(e)),cTe=()=>`sera marquée comme`,lTe=()=>`will be marked as`,uTe=((e={},t={})=>(t.locale??q())===`fr`?cTe(e):lTe(e)),dTe=()=>`résolue`,fTe=()=>`resolved`,pTe=((e={},t={})=>(t.locale??q())===`fr`?dTe(e):fTe(e)),mTe=()=>`Elle sortira du décompte des anomalies ouvertes (signal de self-repair OpenClaw).`,hTe=()=>`It will be removed from the open anomalies count (OpenClaw self-repair signal).`,gTe=((e={},t={})=>(t.locale??q())===`fr`?mTe(e):hTe(e)),_Te=()=>`Résoudre`,vTe=()=>`Resolve`,yTe=((e={},t={})=>(t.locale??q())===`fr`?_Te(e):vTe(e)),bTe=()=>`Anomalie résolue`,xTe=()=>`Anomaly resolved`,STe=((e={},t={})=>(t.locale??q())===`fr`?bTe(e):xTe(e)),CTe=()=>`Échec de la résolution`,wTe=()=>`Resolution failed`,TTe=((e={},t={})=>(t.locale??q())===`fr`?CTe(e):wTe(e)),ETe=()=>`Anomalie acquittée`,DTe=()=>`Anomaly acknowledged`,OTe=((e={},t={})=>(t.locale??q())===`fr`?ETe(e):DTe(e)),kTe=()=>`Échec de l’acquittement`,ATe=()=>`Acknowledgement failed`,jTe=((e={},t={})=>(t.locale??q())===`fr`?kTe(e):ATe(e)),MTe=()=>`Anomalies détectées (cron) ou signalées par les agents OpenClaw. Données non-PHI uniquement (type, sévérité, message, corrélation).`,NTe=()=>`Anomalies detected (cron) or reported by OpenClaw agents. Non-PHI data only (type, severity, message, correlation).`,PTe=((e={},t={})=>(t.locale??q())===`fr`?MTe(e):NTe(e)),FTe=()=>`Ouverte`,ITe=()=>`Open`,LTe=((e={},t={})=>(t.locale??q())===`fr`?FTe(e):ITe(e)),RTe=()=>`= active, elle alerte et compte dans le heartbeat.`,zTe=()=>`= active, it alerts and counts in the heartbeat.`,BTe=((e={},t={})=>(t.locale??q())===`fr`?RTe(e):zTe(e)),VTe=()=>`En sourdine`,HTe=()=>`Muted`,UTe=((e={},t={})=>(t.locale??q())===`fr`?VTe(e):HTe(e)),WTe=()=>`= vue, plus d'alerte, mais pas forcément corrigée (les admins sont notifiés des nouvelles anomalies).`,GTe=()=>`= seen, no more alerts, but not necessarily fixed (admins are notified of new anomalies).`,KTe=((e={},t={})=>(t.locale??q())===`fr`?WTe(e):GTe(e)),qTe=()=>`Résolue`,JTe=()=>`Resolved`,YTe=((e={},t={})=>(t.locale??q())===`fr`?qTe(e):JTe(e)),XTe=()=>`= le problème est réglé (le détecteur résout automatiquement quand la condition cesse). Les deux la sortent du décompte heartbeat.`,ZTe=()=>`= the problem is fixed (the detector resolves automatically when the condition clears). Both remove it from the heartbeat count.`,QTe=((e={},t={})=>(t.locale??q())===`fr`?XTe(e):ZTe(e)),$Te=()=>`La plage temporelle filtre la fenêtre récente — une plage antérieure peut être partielle.`,eEe=()=>`The time range filters the recent window — an earlier range may be partial.`,tEe=((e={},t={})=>(t.locale??q())===`fr`?$Te(e):eEe(e)),nEe=()=>`Rechercher (message, type, corrélation)`,rEe=()=>`Search (message, type, correlation)`,iEe=((e={},t={})=>(t.locale??q())===`fr`?nEe(e):rEe(e)),aEe=()=>`Tous les statuts`,oEe=()=>`All statuses`,sEe=((e={},t={})=>(t.locale??q())===`fr`?aEe(e):oEe(e)),cEe=()=>`Sévérité`,lEe=()=>`Severity`,oQ=((e={},t={})=>(t.locale??q())===`fr`?cEe(e):lEe(e)),uEe=()=>`Toutes sévérités`,dEe=()=>`All severities`,fEe=((e={},t={})=>(t.locale??q())===`fr`?uEe(e):dEe(e)),pEe=()=>`Source`,mEe=()=>`Source`,sQ=((e={},t={})=>(t.locale??q())===`fr`?pEe(e):mEe(e)),hEe=()=>`Toutes sources`,gEe=()=>`All sources`,_Ee=((e={},t={})=>(t.locale??q())===`fr`?hEe(e):gEe(e)),vEe=()=>`Type`,yEe=()=>`Type`,cQ=((e={},t={})=>(t.locale??q())===`fr`?vEe(e):yEe(e)),bEe=()=>`Tous les types`,xEe=()=>`All types`,SEe=((e={},t={})=>(t.locale??q())===`fr`?bEe(e):xEe(e)),CEe=()=>`Anomalies`,wEe=()=>`Anomalies`,TEe=((e={},t={})=>(t.locale??q())===`fr`?CEe(e):wEe(e)),EEe=()=>`Aucune anomalie ouverte. 🎉`,DEe=()=>`No open anomalies. 🎉`,OEe=((e={},t={})=>(t.locale??q())===`fr`?EEe(e):DEe(e)),kEe=()=>`Aucune anomalie enregistrée.`,AEe=()=>`No anomalies recorded.`,jEe=((e={},t={})=>(t.locale??q())===`fr`?kEe(e):AEe(e)),MEe=()=>`Résoudre (corrigé)`,NEe=()=>`Resolve (fixed)`,PEe=((e={},t={})=>(t.locale??q())===`fr`?MEe(e):NEe(e)),FEe=()=>`Marquer comme vue (sourdine)`,IEe=()=>`Mark as seen (mute)`,LEe=((e={},t={})=>(t.locale??q())===`fr`?FEe(e):IEe(e)),REe=()=>`Quand`,zEe=()=>`When`,BEe=((e={},t={})=>(t.locale??q())===`fr`?REe(e):zEe(e)),VEe=()=>`Statut`,HEe=()=>`Status`,UEe=((e={},t={})=>(t.locale??q())===`fr`?VEe(e):HEe(e)),WEe=()=>`Message`,GEe=()=>`Message`,KEe=((e={},t={})=>(t.locale??q())===`fr`?WEe(e):GEe(e)),qEe=()=>`Cause & correctif`,JEe=()=>`Cause & fix`,YEe=((e={},t={})=>(t.locale??q())===`fr`?qEe(e):JEe(e)),XEe=()=>`Corrélation`,ZEe=()=>`Correlation`,QEe=((e={},t={})=>(t.locale??q())===`fr`?XEe(e):ZEe(e)),$Ee=()=>`Voir la trace`,eDe=()=>`View trace`,tDe=((e={},t={})=>(t.locale??q())===`fr`?$Ee(e):eDe(e)),nDe=()=>`ouverte`,rDe=()=>`open`,iDe=((e={},t={})=>(t.locale??q())===`fr`?nDe(e):rDe(e)),aDe=()=>`en sourdine`,oDe=()=>`muted`,sDe=((e={},t={})=>(t.locale??q())===`fr`?aDe(e):oDe(e)),cDe=()=>`résolue`,lDe=()=>`resolved`,uDe=((e={},t={})=>(t.locale??q())===`fr`?cDe(e):lDe(e)),dDe=()=>`Réponse incorrecte`,fDe=()=>`Incorrect response`,pDe=((e={},t={})=>(t.locale??q())===`fr`?dDe(e):fDe(e)),mDe=()=>`Incohérence`,hDe=()=>`Inconsistency`,gDe=((e={},t={})=>(t.locale??q())===`fr`?mDe(e):hDe(e)),_De=()=>`Mots / orthographe erronés`,vDe=()=>`Wrong words / spelling`,yDe=((e={},t={})=>(t.locale??q())===`fr`?_De(e):vDe(e)),bDe=()=>`Formatage`,xDe=()=>`Formatting`,SDe=((e={},t={})=>(t.locale??q())===`fr`?bDe(e):xDe(e)),CDe=()=>`Latence`,wDe=()=>`Latency`,TDe=((e={},t={})=>(t.locale??q())===`fr`?CDe(e):wDe(e)),EDe=()=>`Erreur API`,DDe=()=>`API error`,ODe=((e={},t={})=>(t.locale??q())===`fr`?EDe(e):DDe(e)),kDe=()=>`Autre`,ADe=()=>`Other`,lQ=((e={},t={})=>(t.locale??q())===`fr`?kDe(e):ADe(e)),jDe=()=>`Mots modifiés à l'envoi`,MDe=()=>`Words altered on send`,NDe=((e={},t={})=>(t.locale??q())===`fr`?jDe(e):MDe(e)),PDe=()=>`Caractères / mise en forme altérés`,FDe=()=>`Characters / formatting altered`,IDe=((e={},t={})=>(t.locale??q())===`fr`?PDe(e):FDe(e)),LDe=()=>`Signaler un problème`,RDe=()=>`Report an issue`,zDe=((e={},t={})=>(t.locale??q())===`fr`?LDe(e):RDe(e)),BDe=()=>`Merci. Un instantané complet de ce message a été figé pour analyse.`,VDe=()=>`Thank you. A complete snapshot of this message has been frozen for analysis.`,HDe=((e={},t={})=>(t.locale??q())===`fr`?BDe(e):VDe(e)),UDe=()=>`Signalez un problème avec votre message tel qu'il a été envoyé. Un instantané forensique exact est enregistré.`,WDe=()=>`Report an issue with your message as it was sent. An exact forensic snapshot is recorded.`,GDe=((e={},t={})=>(t.locale??q())===`fr`?UDe(e):WDe(e)),KDe=()=>`Signalez un problème avec cette réponse. Un instantané forensique exact est enregistré au moment de l'envoi.`,qDe=()=>`Report an issue with this response. An exact forensic snapshot is recorded at send time.`,JDe=((e={},t={})=>(t.locale??q())===`fr`?KDe(e):qDe(e)),YDe=()=>`✓ Le texte affiché (vue source) correspond exactement, caractère pour caractère, au texte stocké côté serveur. La comparaison est figée comme preuve.`,XDe=()=>`✓ The displayed text (source view) matches exactly, character for character, the text stored on the server. The comparison is frozen as evidence.`,ZDe=((e={},t={})=>(t.locale??q())===`fr`?YDe(e):XDe(e)),QDe=()=>`⚠ Écart détecté entre le texte affiché (vue source) et le texte stocké. L'instantané a figé les deux versions.`,$De=()=>`⚠ Discrepancy detected between the displayed text (source view) and the stored text. The snapshot has frozen both versions.`,eOe=((e={},t={})=>(t.locale??q())===`fr`?QDe(e):$De(e)),tOe=()=>`Instantané enregistré. Pour vérifier que l'affichage n'altère aucun caractère, ouvrez la vue source (</>) sur ce message puis signalez à nouveau : la comparaison portera alors sur le texte réellement affiché par le navigateur.`,nOe=()=>`Snapshot recorded. To verify that the display does not alter any character, open the source view (</>) on this message then report again: the comparison will then be on the text actually rendered by the browser.`,rOe=((e={},t={})=>(t.locale??q())===`fr`?tOe(e):nOe(e)),iOe=()=>`Catégorie`,aOe=()=>`Category`,oOe=((e={},t={})=>(t.locale??q())===`fr`?iOe(e):aOe(e)),sOe=()=>`Choisir une catégorie`,cOe=()=>`Choose a category`,lOe=((e={},t={})=>(t.locale??q())===`fr`?sOe(e):cOe(e)),uOe=()=>`Commentaire`,dOe=()=>`Comment`,fOe=((e={},t={})=>(t.locale??q())===`fr`?uOe(e):dOe(e)),pOe=()=>`Décrivez le problème…`,mOe=()=>`Describe the issue…`,hOe=((e={},t={})=>(t.locale??q())===`fr`?pOe(e):mOe(e)),gOe=()=>`Fermer`,_Oe=()=>`Close`,vOe=((e={},t={})=>(t.locale??q())===`fr`?gOe(e):_Oe(e)),yOe=()=>`Annuler`,bOe=()=>`Cancel`,xOe=((e={},t={})=>(t.locale??q())===`fr`?yOe(e):bOe(e)),SOe=()=>`Envoi…`,COe=()=>`Sending…`,wOe=((e={},t={})=>(t.locale??q())===`fr`?SOe(e):COe(e)),TOe=()=>`Envoyer`,EOe=()=>`Send`,DOe=((e={},t={})=>(t.locale??q())===`fr`?TOe(e):EOe(e)),OOe=()=>`Problème signalé`,kOe=()=>`Issue reported`,AOe=((e={},t={})=>(t.locale??q())===`fr`?OOe(e):kOe(e)),jOe=()=>`Signaler un problème`,MOe=()=>`Report an issue`,NOe=((e={},t={})=>(t.locale??q())===`fr`?jOe(e):MOe(e)),POe=()=>`Signaler un problème avec ce message`,FOe=()=>`Report an issue with this message`,IOe=((e={},t={})=>(t.locale??q())===`fr`?POe(e):FOe(e)),LOe=()=>`Événements récents (fenêtre bornée, plus récents d’abord). Toutes les traces sont des métadonnées `,ROe=()=>`Recent events (bounded window, newest first). All traces are redacted metadata `,zOe=((e={},t={})=>(t.locale??q())===`fr`?LOe(e):ROe(e)),BOe=()=>`expurgées`,VOe=()=>`redacted`,HOe=((e={},t={})=>(t.locale??q())===`fr`?BOe(e):VOe(e)),UOe=()=>` : aucun contenu de message, pièce jointe ou jeton n’est stocké — uniquement des longueurs, codes et indicateurs.`,WOe=()=>`: no message content, attachment or token is stored — only lengths, codes and flags.`,GOe=((e={},t={})=>(t.locale??q())===`fr`?UOe(e):WOe(e)),KOe=()=>`La plage temporelle filtre la fenêtre récente — une plage antérieure peut être partielle.`,qOe=()=>`The time range filters the recent window — an older range may be partial.`,JOe=((e={},t={})=>(t.locale??q())===`fr`?KOe(e):qOe(e)),YOe=()=>`Rechercher (kind, principal, rôle, route, correlationId)`,XOe=()=>`Search (kind, principal, role, route, correlationId)`,ZOe=((e={},t={})=>(t.locale??q())===`fr`?YOe(e):XOe(e)),QOe=()=>`Statut`,$Oe=()=>`Status`,eke=((e={},t={})=>(t.locale??q())===`fr`?QOe(e):$Oe(e)),tke=()=>`Tous statuts`,nke=()=>`All statuses`,rke=((e={},t={})=>(t.locale??q())===`fr`?tke(e):nke(e)),ike=()=>`Principal`,ake=()=>`Principal`,oke=((e={},t={})=>(t.locale??q())===`fr`?ike(e):ake(e)),ske=()=>`Tous principaux`,cke=()=>`All principals`,lke=((e={},t={})=>(t.locale??q())===`fr`?ske(e):cke(e)),uke=()=>`Direction`,dke=()=>`Direction`,fke=((e={},t={})=>(t.locale??q())===`fr`?uke(e):dke(e)),pke=()=>`Toutes directions`,mke=()=>`All directions`,hke=((e={},t={})=>(t.locale??q())===`fr`?pke(e):mke(e)),gke=()=>`Rôle`,_ke=()=>`Role`,vke=((e={},t={})=>(t.locale??q())===`fr`?gke(e):_ke(e)),yke=()=>`Tous les rôles`,bke=()=>`All roles`,xke=((e={},t={})=>(t.locale??q())===`fr`?yke(e):bke(e)),Ske=()=>`Tous les kinds`,Cke=()=>`All kinds`,wke=((e={},t={})=>(t.locale??q())===`fr`?Ske(e):Cke(e)),Tke=()=>`tous les kinds`,Eke=()=>`all kinds`,Dke=((e={},t={})=>(t.locale??q())===`fr`?Tke(e):Eke(e)),Oke=e=>`${e?.count} lignes`,kke=e=>`${e?.count} rows`,Ake=((e,t={})=>(t.locale??q())===`fr`?Oke(e):kke(e)),jke=()=>`Effacer le filtre de corrélation`,Mke=()=>`Clear correlation filter`,Nke=((e={},t={})=>(t.locale??q())===`fr`?jke(e):Mke(e)),Pke=()=>`filtre: correlationId=`,Fke=()=>`filter: correlationId=`,Ike=((e={},t={})=>(t.locale??q())===`fr`?Pke(e):Fke(e)),Lke=()=>`Effacer`,Rke=()=>`Clear`,zke=((e={},t={})=>(t.locale??q())===`fr`?Lke(e):Rke(e)),Bke=()=>`Traces`,Vke=()=>`Traces`,Hke=((e={},t={})=>(t.locale??q())===`fr`?Bke(e):Vke(e)),Uke=()=>`Aucun événement pour cette corrélation dans la fenêtre.`,Wke=()=>`No event for this correlation in the window.`,Gke=((e={},t={})=>(t.locale??q())===`fr`?Uke(e):Wke(e)),Kke=()=>`Aucun événement tracé pour l’instant.`,qke=()=>`No traced event yet.`,Jke=((e={},t={})=>(t.locale??q())===`fr`?Kke(e):qke(e)),Yke=()=>`Quand`,Xke=()=>`When`,Zke=((e={},t={})=>(t.locale??q())===`fr`?Yke(e):Xke(e)),Qke=()=>`Kind`,$ke=()=>`Kind`,eAe=((e={},t={})=>(t.locale??q())===`fr`?Qke(e):$ke(e)),tAe=()=>`Résultat`,nAe=()=>`Result`,rAe=((e={},t={})=>(t.locale??q())===`fr`?tAe(e):nAe(e)),iAe=()=>`ok`,aAe=()=>`ok`,oAe=((e={},t={})=>(t.locale??q())===`fr`?iAe(e):aAe(e)),sAe=()=>`Direction`,cAe=()=>`Direction`,lAe=((e={},t={})=>(t.locale??q())===`fr`?sAe(e):cAe(e)),uAe=()=>`Principal`,dAe=()=>`Principal`,fAe=((e={},t={})=>(t.locale??q())===`fr`?uAe(e):dAe(e)),pAe=()=>`Rôle`,mAe=()=>`Role`,hAe=((e={},t={})=>(t.locale??q())===`fr`?pAe(e):mAe(e)),gAe=()=>`Route`,_Ae=()=>`Route`,vAe=((e={},t={})=>(t.locale??q())===`fr`?gAe(e):_Ae(e)),yAe=()=>`Statut`,bAe=()=>`Status`,xAe=((e={},t={})=>(t.locale??q())===`fr`?yAe(e):bAe(e)),SAe=()=>`Latence`,CAe=()=>`Latency`,wAe=((e={},t={})=>(t.locale??q())===`fr`?SAe(e):CAe(e)),TAe=()=>`Corrélation`,EAe=()=>`Correlation`,DAe=((e={},t={})=>(t.locale??q())===`fr`?TAe(e):EAe(e)),OAe=()=>`Suivre ce tour (filtrer par correlationId)`,kAe=()=>`Follow this turn (filter by correlationId)`,AAe=((e={},t={})=>(t.locale??q())===`fr`?OAe(e):kAe(e)),jAe=()=>`Meta`,MAe=()=>`Meta`,NAe=((e={},t={})=>(t.locale??q())===`fr`?jAe(e):MAe(e)),PAe=()=>`Voir`,FAe=()=>`View`,IAe=((e={},t={})=>(t.locale??q())===`fr`?PAe(e):FAe(e)),LAe=()=>`Meta ·`,RAe=()=>`Meta ·`,zAe=((e={},t={})=>(t.locale??q())===`fr`?LAe(e):RAe(e)),BAe=()=>`expurgé`,VAe=()=>`redacted`,HAe=((e={},t={})=>(t.locale??q())===`fr`?BAe(e):VAe(e)),UAe=()=>`Métadonnées non-PHI uniquement (longueurs, codes, indicateurs). Aucun contenu de message n’est stocké.`,WAe=()=>`Non-PHI metadata only (lengths, codes, flags). No message content is stored.`,GAe=((e={},t={})=>(t.locale??q())===`fr`?UAe(e):WAe(e)),KAe=()=>`Chargement…`,qAe=()=>`Loading…`,uQ=((e={},t={})=>(t.locale??q())===`fr`?KAe(e):qAe(e)),JAe=()=>`Connexion refusée. Le domaine de ce compte n’est pas autorisé.`,YAe=()=>`Sign-in refused. This account’s email domain is not allowed.`,XAe=((e={},t={})=>(t.locale??q())===`fr`?JAe(e):YAe(e)),ZAe=()=>`Bon retour`,QAe=()=>`Welcome back`,$Ae=((e={},t={})=>(t.locale??q())===`fr`?ZAe(e):QAe(e)),eje=()=>`Connectez-vous pour continuer`,tje=()=>`Sign in to continue`,nje=((e={},t={})=>(t.locale??q())===`fr`?eje(e):tje(e)),rje=()=>`Se connecter avec Google`,ije=()=>`Sign in with Google`,aje=((e={},t={})=>(t.locale??q())===`fr`?rje(e):ije(e)),oje=()=>`Aucun mode de connexion configuré.`,sje=()=>`No sign-in method configured.`,cje=((e={},t={})=>(t.locale??q())===`fr`?oje(e):sje(e)),lje=()=>`Continuer (dev, sans compte)`,uje=()=>`Continue (dev, no account)`,dje=((e={},t={})=>(t.locale??q())===`fr`?lje(e):uje(e)),fje=()=>`Compte`,pje=()=>`Account`,mje=((e={},t={})=>(t.locale??q())===`fr`?fje(e):pje(e)),hje=()=>`En attente d’approbation`,gje=()=>`Awaiting approval`,_je=((e={},t={})=>(t.locale??q())===`fr`?hje(e):gje(e)),vje=()=>`Ton compte est créé mais doit être approuvé par un administrateur avant d’accéder au chat.`,yje=()=>`Your account has been created but must be approved by an administrator before you can access the chat.`,bje=((e={},t={})=>(t.locale??q())===`fr`?vje(e):yje(e)),xje=()=>`Vous explorez l’application en tant que`,Sje=()=>`You are exploring the application as`,Cje=((e={},t={})=>(t.locale??q())===`fr`?xje(e):Sje(e)),wje=()=>`. Toute action est exécutée et tracée en votre nom (`,Tje=()=>`. Every action is executed and traced in your name (`,Eje=((e={},t={})=>(t.locale??q())===`fr`?wje(e):Tje(e)),Dje=()=>`).`,Oje=()=>`).`,kje=((e={},t={})=>(t.locale??q())===`fr`?Dje(e):Oje(e)),Aje=()=>`Quitter`,jje=()=>`Exit`,Mje=((e={},t={})=>(t.locale??q())===`fr`?Aje(e):jje(e)),Nje=()=>`Afficher la barre latérale`,Pje=()=>`Show sidebar`,Fje=((e={},t={})=>(t.locale??q())===`fr`?Nje(e):Pje(e)),Ije=()=>`Réduire la barre latérale`,Lje=()=>`Collapse sidebar`,Rje=((e={},t={})=>(t.locale??q())===`fr`?Ije(e):Lje(e)),zje=()=>`Paramètres`,Bje=()=>`Settings`,Vje=((e={},t={})=>(t.locale??q())===`fr`?zje(e):Bje(e)),Hje=()=>`Redimensionner la barre latérale`,Uje=()=>`Resize sidebar`,Wje=((e={},t={})=>(t.locale??q())===`fr`?Hje(e):Uje(e)),Gje=()=>`Accès non autorisé`,Kje=()=>`Access denied`,qje=((e={},t={})=>(t.locale??q())===`fr`?Gje(e):Kje(e)),Jje=()=>`Vous n’avez pas la permission de consulter cet onglet. Choisissez un onglet disponible dans le menu, ou contactez votre administrateur.`,Yje=()=>`You do not have permission to view this tab. Choose an available tab from the menu, or contact your administrator.`,Xje=((e={},t={})=>(t.locale??q())===`fr`?Jje(e):Yje(e)),Zje=()=>`Une erreur est survenue`,Qje=()=>`Something went wrong`,$je=((e={},t={})=>(t.locale??q())===`fr`?Zje(e):Qje(e)),eMe=()=>`Cette page n’a pas pu être affichée. Réessayez, ou revenez à l’accueil. Si le problème persiste, contactez votre administrateur.`,tMe=()=>`This page could not be displayed. Try again, or return home. If the problem persists, contact your administrator.`,nMe=((e={},t={})=>(t.locale??q())===`fr`?eMe(e):tMe(e)),rMe=()=>`Réessayer`,iMe=()=>`Retry`,aMe=((e={},t={})=>(t.locale??q())===`fr`?rMe(e):iMe(e)),oMe=()=>`Accueil`,sMe=()=>`Home`,dQ=((e={},t={})=>(t.locale??q())===`fr`?oMe(e):sMe(e)),cMe=()=>`Page introuvable`,lMe=()=>`Page not found`,uMe=((e={},t={})=>(t.locale??q())===`fr`?cMe(e):lMe(e)),dMe=()=>`Cette adresse ne correspond à aucune page de l’application.`,fMe=()=>`This address does not match any page in the application.`,pMe=((e={},t={})=>(t.locale??q())===`fr`?dMe(e):fMe(e)),mMe=e=>`Agents de ${e?.user}`,hMe=e=>`${e?.user}'s agents`,gMe=((e,t={})=>(t.locale??q())===`fr`?mMe(e):hMe(e)),_Me=()=>`Associez les agents découverts (par instance) et désignez l'agent par défaut. Au moins un agent est requis pour créer des conversations.`,vMe=()=>`Assign the discovered agents (per instance) and designate the default agent. At least one agent is required to create conversations.`,yMe=((e={},t={})=>(t.locale??q())===`fr`?_Me(e):vMe(e)),bMe=()=>`Agents des groupes du membre. Cochez pour restreindre à une sélection ; sans coche, le membre voit tous ces agents.`,xMe=()=>`The member's group agents. Check to restrict to a selection; with none checked, the member sees all of them.`,SMe=((e={},t={})=>(t.locale??q())===`fr`?bMe(e):xMe(e)),CMe=()=>`Le membre n'appartient à aucun groupe : il voit tous les agents. Cochez pour restreindre à une sélection.`,wMe=()=>`The member belongs to no group, so they see every agent. Check to restrict to a selection.`,TMe=((e={},t={})=>(t.locale??q())===`fr`?CMe(e):wMe(e)),EMe=()=>`Chargement…`,DMe=()=>`Loading…`,OMe=((e={},t={})=>(t.locale??q())===`fr`?EMe(e):DMe(e)),kMe=()=>`Mise à jour de l'accès refusée`,AMe=()=>`Access update denied`,jMe=((e={},t={})=>(t.locale??q())===`fr`?kMe(e):AMe(e)),MMe=()=>`Définition de l'agent par défaut refusée`,NMe=()=>`Setting the default agent was denied`,PMe=((e={},t={})=>(t.locale??q())===`fr`?MMe(e):NMe(e)),FMe=()=>`Aucun agent découvert.`,IMe=()=>`No agent discovered.`,LMe=((e={},t={})=>(t.locale??q())===`fr`?FMe(e):IMe(e)),RMe=e=>`Assigner ${e?.name}`,zMe=e=>`Assign ${e?.name}`,BMe=((e,t={})=>(t.locale??q())===`fr`?RMe(e):zMe(e)),VMe=()=>`supprimé`,HMe=()=>`removed`,UMe=((e={},t={})=>(t.locale??q())===`fr`?VMe(e):HMe(e)),WMe=()=>`hors groupe`,GMe=()=>`outside group`,KMe=((e={},t={})=>(t.locale??q())===`fr`?WMe(e):GMe(e)),qMe=()=>`Agent par défaut`,JMe=()=>`Default agent`,fQ=((e={},t={})=>(t.locale??q())===`fr`?qMe(e):JMe(e)),YMe=()=>`Définir comme agent par défaut`,XMe=()=>`Set as default agent`,pQ=((e={},t={})=>(t.locale??q())===`fr`?YMe(e):XMe(e)),ZMe=e=>`Configurer l'instance « ${e?.instance} »`,QMe=e=>`Configure instance « ${e?.instance} »`,$Me=((e,t={})=>(t.locale??q())===`fr`?ZMe(e):QMe(e)),eNe=()=>`Configurer`,tNe=()=>`Configure`,mQ=((e={},t={})=>(t.locale??q())===`fr`?eNe(e):tNe(e)),nNe=()=>`Config non-secrète du bridge, appliquée à chaud au message suivant (sans redémarrage). Les secrets (tokens, device identity) vivent dans l’environnement du bridge, jamais ici.`,rNe=()=>`Non-secret bridge config, applied hot on the next message (no restart). Secrets (tokens, device identity) live in the bridge environment, never here.`,iNe=((e={},t={})=>(t.locale??q())===`fr`?nNe(e):rNe(e)),aNe=()=>`Aucune instance — ajoutez-en une dans Agents › Instances d’abord.`,oNe=()=>`No instances yet — add one under Agents › Instances first.`,sNe=((e={},t={})=>(t.locale??q())===`fr`?aNe(e):oNe(e)),cNe=()=>`Mode média sortant`,lNe=()=>`Outbound media mode`,uNe=((e={},t={})=>(t.locale??q())===`fr`?cNe(e):lNe(e)),dNe=()=>`Mode média entrant`,fNe=()=>`Inbound media mode`,pNe=((e={},t={})=>(t.locale??q())===`fr`?dNe(e):fNe(e)),mNe=()=>`Taille média max (Mo)`,hNe=()=>`Max media size (MB)`,gNe=((e={},t={})=>(t.locale??q())===`fr`?mNe(e):hNe(e)),_Ne=()=>`Ré-hydratation de session`,vNe=()=>`Session re-hydration`,yNe=((e={},t={})=>(t.locale??q())===`fr`?_Ne(e):vNe(e)),bNe=()=>`Enregistrer`,xNe=()=>`Save`,SNe=((e={},t={})=>(t.locale??q())===`fr`?bNe(e):xNe(e)),CNe=()=>`Impossible d’enregistrer la configuration`,wNe=()=>`Could not save the configuration`,TNe=((e={},t={})=>(t.locale??q())===`fr`?CNe(e):wNe(e)),ENe=()=>`Comment le bridge récupère les fichiers SORTANTS (générés par l’agent) pour les héberger : gateway-http (via HTTP depuis la gateway — aucun système de fichiers partagé requis, défaut portable), shared-fs (lit un volume partagé monté), ou off (aucune pièce jointe sortante).`,DNe=()=>`How the bridge fetches OUTBOUND (agent-generated) files to host them: gateway-http (over HTTP from the gateway — no shared filesystem needed, the portable default), shared-fs (read a mounted shared volume), or off (no outbound attachments).`,ONe=((e={},t={})=>(t.locale??q())===`fr`?ENe(e):DNe(e)),kNe=()=>`Comment les fichiers téléversés atteignent l’agent : inline (base64 dans la trame du chat — plafonné par la taille de trame de la gateway), ou shared-fs (streamé vers un volume partagé et référencé par chemin — toute taille, pour les grosses vidéos/audio/docs).`,ANe=()=>`How user-uploaded files reach the agent: inline (base64 in the chat frame — capped by the gateway frame size), or shared-fs (streamed to a shared volume and referenced by path — any size, for large videos/audio/docs).`,jNe=((e={},t={})=>(t.locale??q())===`fr`?kNe(e):ANe(e)),MNe=()=>`Plafond de taille par fichier (Mo). En mode shared-fs il peut être élevé (les fichiers sont streamés sur disque) ; pour l’inline, la vraie limite est la taille de trame de la gateway.`,NNe=()=>`Per-file size cap (MB). In shared-fs mode this can be large (files stream to disk); for inline files the gateway frame size is the real limit.`,PNe=((e={},t={})=>(t.locale??q())===`fr`?MNe(e):NNe(e)),FNe=()=>`Sur une session gateway fraîche/réinitialisée, renvoie les tours précédents pour que le contexte du modèle corresponde au fil visible. Désactiver pour n’envoyer que le message courant.`,INe=()=>`On a fresh/rolled gateway session, re-send prior turns so the model's context matches the visible thread. Disable to always send only the current message.`,LNe=((e={},t={})=>(t.locale??q())===`fr`?FNe(e):INe(e)),RNe=()=>`Chemin entrant (vu par l’agent)`,zNe=()=>`Inbound path (agent view)`,BNe=((e={},t={})=>(t.locale??q())===`fr`?RNe(e):zNe(e)),VNe=()=>`Le chemin DANS le conteneur de la gateway où l’agent LIT les fichiers entrants déposés — le montage du volume partagé côté gateway (ex. /home/node/.openclaw/media/inbound). Doit correspondre à ton montage de volume Docker.`,HNe=()=>`The path INSIDE the gateway container where the agent READS staged inbound files — the gateway's mount of the shared volume (e.g. /home/node/.openclaw/media/inbound). Must match your Docker volume mount.`,UNe=((e={},t={})=>(t.locale??q())===`fr`?VNe(e):HNe(e)),WNe=()=>`Chemin sortant (vu par l’agent)`,GNe=()=>`Outbound path (agent view)`,KNe=((e={},t={})=>(t.locale??q())===`fr`?WNe(e):GNe(e)),qNe=()=>`Le chemin DANS le conteneur de la gateway où l’agent ÉCRIT un fichier généré avant d’émettre MEDIA:<chemin> (ex. /home/node/.openclaw/media/outbound). Doit être accessible en écriture par l’agent dans le conteneur.`,JNe=()=>`The path INSIDE the gateway container where the agent WRITES a generated file before emitting MEDIA:<path> (e.g. /home/node/.openclaw/media/outbound). Must be writable by the agent in the container.`,YNe=((e={},t={})=>(t.locale??q())===`fr`?qNe(e):JNe(e)),XNe=()=>`Vérifier les chemins`,ZNe=()=>`Check paths`,QNe=((e={},t={})=>(t.locale??q())===`fr`?XNe(e):ZNe(e)),$Ne=()=>`Vérification…`,ePe=()=>`Checking…`,tPe=((e={},t={})=>(t.locale??q())===`fr`?$Ne(e):ePe(e)),nPe=()=>`Échec de la vérification des chemins`,rPe=()=>`Path check failed`,iPe=((e={},t={})=>(t.locale??q())===`fr`?nPe(e):rPe(e)),aPe=()=>`Vérifie l’accès du BRIDGE aux dossiers partagés. Le montage côté agent (dans le conteneur de la gateway) est à vérifier séparément.`,oPe=()=>`Checks the BRIDGE's access to the shared dirs. The agent-side mount (inside the gateway container) must be verified separately.`,sPe=((e={},t={})=>(t.locale??q())===`fr`?aPe(e):oPe(e)),cPe=()=>`Entrant (écriture bridge)`,lPe=()=>`Inbound (bridge write)`,uPe=((e={},t={})=>(t.locale??q())===`fr`?cPe(e):lPe(e)),dPe=()=>`Sortant (lecture bridge)`,fPe=()=>`Outbound (bridge read)`,pPe=((e={},t={})=>(t.locale??q())===`fr`?dPe(e):fPe(e)),mPe=()=>`Accessible`,hPe=()=>`Accessible`,gPe=((e={},t={})=>(t.locale??q())===`fr`?mPe(e):hPe(e)),_Pe=()=>`Non concerné (pas shared-fs)`,vPe=()=>`Not applicable (not shared-fs)`,yPe=((e={},t={})=>(t.locale??q())===`fr`?_Pe(e):vPe(e)),bPe=()=>`Bridge injoignable — vérification impossible`,xPe=()=>`Bridge unreachable — could not check`,SPe=((e={},t={})=>(t.locale??q())===`fr`?bPe(e):xPe(e)),CPe=e=>`Bridge joignable mais la vérification a échoué (${e?.reason})`,wPe=e=>`Bridge reachable but the check failed (${e?.reason})`,TPe=((e,t={})=>(t.locale??q())===`fr`?CPe(e):wPe(e)),EPe=()=>`Santé du bridge — sondage actif toutes les minutes. Données non-secrètes uniquement : joignabilité, état des connexions, dernière cause d’échec. Les secrets (tokens, device identity) vivent dans l’environnement du bridge, jamais ici.`,DPe=()=>`Bridge health — active poll every minute. Non-secret data only: reachability, connection states, last failure cause. Secrets (tokens, device identity) live in the bridge environment, never here.`,OPe=((e={},t={})=>(t.locale??q())===`fr`?EPe(e):DPe(e)),kPe=()=>`Chargement…`,APe=()=>`Loading…`,hQ=((e={},t={})=>(t.locale??q())===`fr`?kPe(e):APe(e)),jPe=()=>`Aucun relevé pour l’instant — le sondage tourne chaque minute. Reviens dans un moment.`,MPe=()=>`No reading yet — the poll runs every minute. Check back in a moment.`,NPe=((e={},t={})=>(t.locale??q())===`fr`?jPe(e):MPe(e)),PPe=()=>`Bridge opérationnel`,FPe=()=>`Bridge operational`,IPe=((e={},t={})=>(t.locale??q())===`fr`?PPe(e):FPe(e)),LPe=()=>`Bridge injoignable`,RPe=()=>`Bridge unreachable`,zPe=((e={},t={})=>(t.locale??q())===`fr`?LPe(e):RPe(e)),BPe=e=>`Bridge : ${e?.count} connexion(s) en erreur`,VPe=e=>`Bridge: ${e?.count} connection(s) in error`,HPe=((e,t={})=>(t.locale??q())===`fr`?BPe(e):VPe(e)),UPe=e=>`Vérifié à ${e?.time}`,WPe=e=>`Checked at ${e?.time}`,GPe=((e,t={})=>(t.locale??q())===`fr`?UPe(e):WPe(e)),KPe=e=>`· Bridge démarré le ${e?.time}`,qPe=e=>`· Bridge started on ${e?.time}`,JPe=((e,t={})=>(t.locale??q())===`fr`?KPe(e):qPe(e)),YPe=()=>`↗ Anomalies`,XPe=()=>`↗ Anomalies`,ZPe=((e={},t={})=>(t.locale??q())===`fr`?YPe(e):XPe(e)),QPe=e=>`Connexions (${e?.count})`,$Pe=e=>`Connections (${e?.count})`,eFe=((e,t={})=>(t.locale??q())===`fr`?QPe(e):$Pe(e)),tFe=()=>`Aucune connexion encore éprouvée. L’état d’une connexion apparaît dès qu’un message la sollicite (le bridge se connecte à la demande).`,nFe=()=>`No connection tested yet. A connection's state appears as soon as a message exercises it (the bridge connects on demand).`,rFe=((e={},t={})=>(t.locale??q())===`fr`?tFe(e):nFe(e)),iFe=e=>`${e?.ok} OK · ${e?.errors} échec(s) · ${e?.attempts} tentative(s)`,aFe=e=>`${e?.ok} OK · ${e?.errors} failure(s) · ${e?.attempts} attempt(s)`,oFe=((e,t={})=>(t.locale??q())===`fr`?iFe(e):aFe(e)),sFe=e=>`Rejeté par la passerelle : ${e?.label} — pas une défaillance du bridge.`,cFe=e=>`Rejected by the gateway: ${e?.label} — not a bridge fault.`,lFe=((e,t={})=>(t.locale??q())===`fr`?sFe(e):cFe(e)),uFe=()=>`Filtrer par cible ou hôte…`,dFe=()=>`Filter by target or host…`,fFe=((e={},t={})=>(t.locale??q())===`fr`?uFe(e):dFe(e)),pFe=()=>`Tous`,mFe=()=>`All`,gQ=((e={},t={})=>(t.locale??q())===`fr`?pFe(e):mFe(e)),hFe=()=>`État`,gFe=()=>`State`,_Fe=((e={},t={})=>(t.locale??q())===`fr`?hFe(e):gFe(e)),vFe=()=>`Instance`,yFe=()=>`Instance`,bFe=((e={},t={})=>(t.locale??q())===`fr`?vFe(e):yFe(e)),xFe=()=>`Version`,SFe=()=>`Version`,CFe=((e={},t={})=>(t.locale??q())===`fr`?xFe(e):SFe(e)),wFe=()=>`Aucune connexion ne correspond aux filtres.`,TFe=()=>`No connection matches the filters.`,EFe=((e={},t={})=>(t.locale??q())===`fr`?wFe(e):TFe(e)),DFe=()=>`Cible`,OFe=()=>`Target`,kFe=((e={},t={})=>(t.locale??q())===`fr`?DFe(e):OFe(e)),AFe=()=>`État`,jFe=()=>`State`,MFe=((e={},t={})=>(t.locale??q())===`fr`?AFe(e):jFe(e)),NFe=()=>`Instance`,PFe=()=>`Instance`,FFe=((e={},t={})=>(t.locale??q())===`fr`?NFe(e):PFe(e)),IFe=()=>`Hôte passerelle`,LFe=()=>`Gateway host`,RFe=((e={},t={})=>(t.locale??q())===`fr`?IFe(e):LFe(e)),zFe=()=>`Version`,BFe=()=>`Version`,VFe=((e={},t={})=>(t.locale??q())===`fr`?zFe(e):BFe(e)),HFe=()=>`Stats`,UFe=()=>`Stats`,WFe=((e={},t={})=>(t.locale??q())===`fr`?HFe(e):UFe(e)),GFe=()=>`Dernier OK`,KFe=()=>`Last OK`,qFe=((e={},t={})=>(t.locale??q())===`fr`?GFe(e):KFe(e)),JFe=()=>`connectée`,YFe=()=>`connected`,_Q=((e={},t={})=>(t.locale??q())===`fr`?JFe(e):YFe(e)),XFe=()=>`erreur`,ZFe=()=>`error`,vQ=((e={},t={})=>(t.locale??q())===`fr`?XFe(e):ZFe(e)),QFe=()=>`inactive`,$Fe=()=>`inactive`,yQ=((e={},t={})=>(t.locale??q())===`fr`?QFe(e):$Fe(e)),eIe=()=>`5 dernières minutes`,tIe=()=>`Last 5 minutes`,nIe=((e={},t={})=>(t.locale??q())===`fr`?eIe(e):tIe(e)),rIe=()=>`15 dernières minutes`,iIe=()=>`Last 15 minutes`,aIe=((e={},t={})=>(t.locale??q())===`fr`?rIe(e):iIe(e)),oIe=()=>`30 dernières minutes`,sIe=()=>`Last 30 minutes`,cIe=((e={},t={})=>(t.locale??q())===`fr`?oIe(e):sIe(e)),lIe=()=>`Dernière heure`,uIe=()=>`Last hour`,dIe=((e={},t={})=>(t.locale??q())===`fr`?lIe(e):uIe(e)),fIe=()=>`3 dernières heures`,pIe=()=>`Last 3 hours`,mIe=((e={},t={})=>(t.locale??q())===`fr`?fIe(e):pIe(e)),hIe=()=>`6 dernières heures`,gIe=()=>`Last 6 hours`,_Ie=((e={},t={})=>(t.locale??q())===`fr`?hIe(e):gIe(e)),vIe=()=>`12 dernières heures`,yIe=()=>`Last 12 hours`,bIe=((e={},t={})=>(t.locale??q())===`fr`?vIe(e):yIe(e)),xIe=()=>`Dernières 24 heures`,SIe=()=>`Last 24 hours`,CIe=((e={},t={})=>(t.locale??q())===`fr`?xIe(e):SIe(e)),wIe=()=>`2 derniers jours`,TIe=()=>`Last 2 days`,EIe=((e={},t={})=>(t.locale??q())===`fr`?wIe(e):TIe(e)),DIe=()=>`7 derniers jours`,OIe=()=>`Last 7 days`,kIe=((e={},t={})=>(t.locale??q())===`fr`?DIe(e):OIe(e)),AIe=()=>`30 derniers jours`,jIe=()=>`Last 30 days`,MIe=((e={},t={})=>(t.locale??q())===`fr`?AIe(e):jIe(e)),NIe=()=>`90 derniers jours`,PIe=()=>`Last 90 days`,FIe=((e={},t={})=>(t.locale??q())===`fr`?NIe(e):PIe(e)),IIe=()=>`Appels API`,LIe=()=>`API calls`,RIe=((e={},t={})=>(t.locale??q())===`fr`?IIe(e):LIe(e)),zIe=()=>`Erreurs API`,BIe=()=>`API errors`,VIe=((e={},t={})=>(t.locale??q())===`fr`?zIe(e):BIe(e)),HIe=()=>`Latence moyenne`,UIe=()=>`Average latency`,WIe=((e={},t={})=>(t.locale??q())===`fr`?HIe(e):UIe(e)),GIe=()=>`Ingestion OpenClaw`,KIe=()=>`OpenClaw ingest`,qIe=((e={},t={})=>(t.locale??q())===`fr`?GIe(e):KIe(e)),JIe=()=>`Messages envoyés`,YIe=()=>`Messages sent`,XIe=((e={},t={})=>(t.locale??q())===`fr`?JIe(e):YIe(e)),ZIe=()=>`Erreurs de stream`,QIe=()=>`Stream errors`,$Ie=((e={},t={})=>(t.locale??q())===`fr`?ZIe(e):QIe(e)),eLe=()=>`Indicateurs agrégés par heure à partir des traces expurgées (métadonnées non-PHI uniquement). Mise à jour en direct (useQuery) — le rollup tourne chaque heure.`,tLe=()=>`Hourly aggregated indicators from redacted traces (non-PHI metadata only). Live updates (useQuery) — the rollup runs every hour.`,nLe=((e={},t={})=>(t.locale??q())===`fr`?eLe(e):tLe(e)),rLe=()=>`La plage filtre l’historique des rollups — une plage antérieure peut être partielle.`,iLe=()=>`The range filters the rollup history — an earlier range may be partial.`,aLe=((e={},t={})=>(t.locale??q())===`fr`?rLe(e):iLe(e)),oLe=()=>`Chargement des KPI…`,sLe=()=>`Loading KPIs…`,cLe=((e={},t={})=>(t.locale??q())===`fr`?oLe(e):sLe(e)),lLe=()=>`Aucune donnée KPI — le rollup tourne chaque heure ; lance-le ou attends.`,uLe=()=>`No KPI data — the rollup runs every hour; run it or wait.`,dLe=((e={},t={})=>(t.locale??q())===`fr`?lLe(e):uLe(e)),fLe=e=>`dernier : ${e?.value}`,pLe=e=>`latest: ${e?.value}`,mLe=((e,t={})=>(t.locale??q())===`fr`?fLe(e):pLe(e)),hLe=()=>`aucune donnée`,gLe=()=>`no data`,_Le=((e={},t={})=>(t.locale??q())===`fr`?hLe(e):gLe(e)),vLe=e=>`${e?.count} h`,yLe=e=>`${e?.count} h`,bLe=((e,t={})=>(t.locale??q())===`fr`?vLe(e):yLe(e)),xLe=e=>`Série horaire (max ${e?.max} ${e?.unit})`,SLe=e=>`Hourly series (max ${e?.max} ${e?.unit})`,CLe=((e,t={})=>(t.locale??q())===`fr`?xLe(e):SLe(e)),wLe=()=>`Mode dev — comptes & rôles`,TLe=()=>`Dev mode — accounts & roles`,ELe=((e={},t={})=>(t.locale??q())===`fr`?wLe(e):TLe(e)),DLe=()=>`Mode dev — comptes & rôles`,OLe=()=>`Dev mode — accounts & roles`,kLe=((e={},t={})=>(t.locale??q())===`fr`?DLe(e):OLe(e)),ALe=()=>`Change de rôle et « agis en tant que » pour tester plusieurs utilisateurs sans CLI. Visible uniquement en dev.`,jLe=()=>`Change roles and “act as” to test multiple users without the CLI. Visible in dev only.`,MLe=((e={},t={})=>(t.locale??q())===`fr`?ALe(e):jLe(e)),NLe=e=>`Moi — ${e?.canonical}`,PLe=e=>`Me — ${e?.canonical}`,FLe=((e,t={})=>(t.locale??q())===`fr`?NLe(e):PLe(e)),ILe=()=>`Devenir admin`,LLe=()=>`Become admin`,RLe=((e={},t={})=>(t.locale??q())===`fr`?ILe(e):LLe(e)),zLe=()=>`Devenir user`,BLe=()=>`Become user`,VLe=((e={},t={})=>(t.locale??q())===`fr`?zLe(e):BLe(e)),HLe=()=>`Devenir pending`,ULe=()=>`Become pending`,WLe=((e={},t={})=>(t.locale??q())===`fr`?HLe(e):ULe(e)),GLe=()=>`Tu agis en tant que`,KLe=()=>`You are acting as`,qLe=((e={},t={})=>(t.locale??q())===`fr`?GLe(e):KLe(e)),JLe=()=>`Arrêter`,YLe=()=>`Stop`,XLe=((e={},t={})=>(t.locale??q())===`fr`?JLe(e):YLe(e)),ZLe=()=>`Aucun autre compte. Déconnecte-toi puis reconnecte-toi (nouvelle identité anonyme) — elle sera active immédiatement.`,QLe=()=>`No other account. Sign out then sign back in (new anonymous identity) — it will be active immediately.`,$Le=((e={},t={})=>(t.locale??q())===`fr`?ZLe(e):QLe(e)),eRe=()=>`Deviens admin d'abord`,tRe=()=>`Become admin first`,nRe=((e={},t={})=>(t.locale??q())===`fr`?eRe(e):tRe(e)),rRe=()=>`Un compte pending ne peut pas être impersonné`,iRe=()=>`A pending account cannot be impersonated`,aRe=((e={},t={})=>(t.locale??q())===`fr`?rRe(e):iRe(e)),oRe=()=>`Agir en tant que cet utilisateur`,sRe=()=>`Act as this user`,cRe=((e={},t={})=>(t.locale??q())===`fr`?oRe(e):sRe(e)),lRe=()=>`Agir en tant que`,uRe=()=>`Act as`,dRe=((e={},t={})=>(t.locale??q())===`fr`?lRe(e):uRe(e)),fRe=()=>`Nouveau chat`,pRe=()=>`New chat`,mRe=((e={},t={})=>(t.locale??q())===`fr`?fRe(e):pRe(e)),hRe=()=>`Nouveau projet`,gRe=()=>`New project`,bQ=((e={},t={})=>(t.locale??q())===`fr`?hRe(e):gRe(e)),_Re=()=>`Nom du projet`,vRe=()=>`Project name`,yRe=((e={},t={})=>(t.locale??q())===`fr`?_Re(e):vRe(e)),bRe=()=>`ex. Travail`,xRe=()=>`e.g. Work`,SRe=((e={},t={})=>(t.locale??q())===`fr`?bRe(e):xRe(e)),CRe=()=>`Créer`,wRe=()=>`Create`,TRe=((e={},t={})=>(t.locale??q())===`fr`?CRe(e):wRe(e)),ERe=()=>`Épinglés`,DRe=()=>`Pinned`,ORe=((e={},t={})=>(t.locale??q())===`fr`?ERe(e):DRe(e)),kRe=()=>`Glissez un chat ici`,ARe=()=>`Drop a chat here`,jRe=((e={},t={})=>(t.locale??q())===`fr`?kRe(e):ARe(e)),MRe=()=>`Chats`,NRe=()=>`Chats`,PRe=((e={},t={})=>(t.locale??q())===`fr`?MRe(e):NRe(e)),FRe=()=>`Sans titre`,IRe=()=>`Untitled`,xQ=((e={},t={})=>(t.locale??q())===`fr`?FRe(e):IRe(e)),LRe=()=>`Lecture seule — l'agent associé ne t'est plus disponible`,RRe=()=>`Read-only — its agent is no longer available to you`,SQ=((e={},t={})=>(t.locale??q())===`fr`?LRe(e):RRe(e)),zRe=()=>`Supprimer le projet`,BRe=()=>`Delete project`,CQ=((e={},t={})=>(t.locale??q())===`fr`?zRe(e):BRe(e)),VRe=e=>`Supprimer le projet « ${e?.name} » ?`,HRe=e=>`Delete project "${e?.name}"?`,URe=((e,t={})=>(t.locale??q())===`fr`?VRe(e):HRe(e)),WRe=e=>`Cette action est irréversible : elle supprimera aussi définitivement ${e?.count} conversation(s) et tous leurs messages.`,GRe=e=>`This action is irreversible: it will also permanently delete ${e?.count} conversation(s) and all their messages.`,KRe=((e,t={})=>(t.locale??q())===`fr`?WRe(e):GRe(e)),qRe=()=>`Cette action est irréversible.`,JRe=()=>`This action is irreversible.`,YRe=((e={},t={})=>(t.locale??q())===`fr`?qRe(e):JRe(e)),XRe=()=>`Supprimer`,ZRe=()=>`Delete`,wQ=((e={},t={})=>(t.locale??q())===`fr`?XRe(e):ZRe(e)),QRe=()=>`Déplacer / réordonner`,$Re=()=>`Move / reorder`,eze=((e={},t={})=>(t.locale??q())===`fr`?QRe(e):$Re(e)),tze=()=>`Actions`,nze=()=>`Actions`,rze=((e={},t={})=>(t.locale??q())===`fr`?tze(e):nze(e)),ize=()=>`Renommer`,aze=()=>`Rename`,oze=((e={},t={})=>(t.locale??q())===`fr`?ize(e):aze(e)),sze=()=>`Désépingler`,cze=()=>`Unpin`,lze=((e={},t={})=>(t.locale??q())===`fr`?sze(e):cze(e)),uze=()=>`Épingler`,dze=()=>`Pin`,fze=((e={},t={})=>(t.locale??q())===`fr`?uze(e):dze(e)),pze=()=>`Couleur`,mze=()=>`Color`,hze=((e={},t={})=>(t.locale??q())===`fr`?pze(e):mze(e)),gze=()=>`Aucune couleur`,_ze=()=>`No color`,vze=((e={},t={})=>(t.locale??q())===`fr`?gze(e):_ze(e)),yze=()=>`Supprimer ce chat ?`,bze=()=>`Delete this chat?`,xze=((e={},t={})=>(t.locale??q())===`fr`?yze(e):bze(e)),Sze=()=>`Cette action est irréversible et supprimera ses messages.`,Cze=()=>`This action is irreversible and will delete its messages.`,wze=((e={},t={})=>(t.locale??q())===`fr`?Sze(e):Cze(e)),Tze=e=>`Bridge : ${e?.provider}`,Eze=e=>`Bridge: ${e?.provider}`,Dze=((e,t={})=>(t.locale??q())===`fr`?Tze(e):Eze(e)),Oze=()=>`Renommer le chat`,kze=()=>`Rename chat`,Aze=((e={},t={})=>(t.locale??q())===`fr`?Oze(e):kze(e)),jze=()=>`Titre`,Mze=()=>`Title`,Nze=((e={},t={})=>(t.locale??q())===`fr`?jze(e):Mze(e)),Pze=()=>`Réflexion…`,Fze=()=>`Thinking…`,Ize=((e={},t={})=>(t.locale??q())===`fr`?Pze(e):Fze(e)),Lze=()=>`Génération…`,Rze=()=>`Generating…`,zze=((e={},t={})=>(t.locale??q())===`fr`?Lze(e):Rze(e)),Bze=()=>`Erreur`,Vze=()=>`Error`,Hze=((e={},t={})=>(t.locale??q())===`fr`?Bze(e):Vze(e)),Uze=()=>`La réponse a été générée côté agent mais n’a pas pu être finalisée (connexion au bridge interrompue en cours de route). Vous pouvez supprimer ou régénérer ce message.`,Wze=()=>`The reply was generated on the agent side but could not be finalized (the bridge connection dropped mid-stream). You can delete or regenerate this message.`,Gze=((e={},t={})=>(t.locale??q())===`fr`?Uze(e):Wze(e)),Kze=()=>`Interrompu`,qze=()=>`Stopped`,Jze=((e={},t={})=>(t.locale??q())===`fr`?Kze(e):qze(e)),Yze=()=>`contient`,Xze=()=>`contains`,Zze=((e={},t={})=>(t.locale??q())===`fr`?Yze(e):Xze(e)),Qze=()=>`Filtre avancé`,$ze=()=>`Advanced filter`,eBe=((e={},t={})=>(t.locale??q())===`fr`?Qze(e):$ze(e)),tBe=()=>`Aucun critère. Ajoutez une condition (toutes les conditions sont cumulées avec ET).`,nBe=()=>`No criteria. Add a condition (all conditions are combined with AND).`,rBe=((e={},t={})=>(t.locale??q())===`fr`?tBe(e):nBe(e)),iBe=()=>`Champ`,aBe=()=>`Field`,oBe=((e={},t={})=>(t.locale??q())===`fr`?iBe(e):aBe(e)),sBe=()=>`Valeur`,cBe=()=>`Value`,lBe=((e={},t={})=>(t.locale??q())===`fr`?sBe(e):cBe(e)),uBe=()=>`Supprimer la condition`,dBe=()=>`Remove condition`,fBe=((e={},t={})=>(t.locale??q())===`fr`?uBe(e):dBe(e)),pBe=()=>`Ajouter une condition`,mBe=()=>`Add condition`,hBe=((e={},t={})=>(t.locale??q())===`fr`?pBe(e):mBe(e)),gBe=()=>`Bridge : pas encore de relevé (sondage chaque minute)`,_Be=()=>`Bridge: no reading yet (polled every minute)`,vBe=((e={},t={})=>(t.locale??q())===`fr`?gBe(e):_Be(e)),yBe=()=>`Bridge opérationnel`,bBe=()=>`Bridge operational`,xBe=((e={},t={})=>(t.locale??q())===`fr`?yBe(e):bBe(e)),SBe=e=>` · vérifié à ${e?.time}`,CBe=e=>` · verified at ${e?.time}`,wBe=((e,t={})=>(t.locale??q())===`fr`?SBe(e):CBe(e)),TBe=e=>`Bridge indisponible (${e?.reason}) — ouvre l’onglet Bridge pour le détail`,EBe=e=>`Bridge unavailable (${e?.reason}) — open the Bridge tab for details`,DBe=((e,t={})=>(t.locale??q())===`fr`?TBe(e):EBe(e)),OBe=()=>`Utilisateur`,kBe=()=>`User`,ABe=((e={},t={})=>(t.locale??q())===`fr`?OBe(e):kBe(e)),jBe=()=>`Système`,MBe=()=>`System`,NBe=((e={},t={})=>(t.locale??q())===`fr`?jBe(e):MBe(e)),PBe=()=>`[Export limité aux 200 messages les plus récents de cette conversation]`,FBe=()=>`[Export limited to the 200 most recent messages of this conversation]`,IBe=((e={},t={})=>(t.locale??q())===`fr`?PBe(e):FBe(e)),LBe=()=>`Conversation`,RBe=()=>`Conversation`,TQ=((e={},t={})=>(t.locale??q())===`fr`?LBe(e):RBe(e)),zBe=e=>`Exporté le ${e?.date}`,BBe=e=>`Exported on ${e?.date}`,VBe=((e,t={})=>(t.locale??q())===`fr`?zBe(e):BBe(e)),HBe=e=>`[fichier : ${e?.name}]`,UBe=e=>`[file: ${e?.name}]`,WBe=((e,t={})=>(t.locale??q())===`fr`?HBe(e):UBe(e)),GBe=()=>`Rechercher dans les conversations`,KBe=()=>`Search conversations`,qBe=((e={},t={})=>(t.locale??q())===`fr`?GBe(e):KBe(e)),JBe=()=>`Rechercher…`,YBe=()=>`Search…`,XBe=((e={},t={})=>(t.locale??q())===`fr`?JBe(e):YBe(e)),ZBe=()=>`Rechercher dans les conversations`,QBe=()=>`Search conversations`,$Be=((e={},t={})=>(t.locale??q())===`fr`?ZBe(e):QBe(e)),eVe=()=>`Rechercher dans toutes les conversations…`,tVe=()=>`Search across all conversations…`,nVe=((e={},t={})=>(t.locale??q())===`fr`?eVe(e):tVe(e)),rVe=()=>`Recherche`,iVe=()=>`Search`,aVe=((e={},t={})=>(t.locale??q())===`fr`?rVe(e):iVe(e)),oVe=e=>`Tapez au moins ${e?.count} caractères pour rechercher.`,sVe=e=>`Type at least ${e?.count} characters to search.`,cVe=((e,t={})=>(t.locale??q())===`fr`?oVe(e):sVe(e)),lVe=()=>`Recherche…`,uVe=()=>`Searching…`,dVe=((e={},t={})=>(t.locale??q())===`fr`?lVe(e):uVe(e)),fVe=e=>`Aucune conversation ne correspond à « ${e?.term} ».`,pVe=e=>`No conversation matches “${e?.term}”.`,mVe=((e,t={})=>(t.locale??q())===`fr`?fVe(e):pVe(e)),hVe=()=>`Nouveau chat`,gVe=()=>`New chat`,_Ve=((e={},t={})=>(t.locale??q())===`fr`?hVe(e):gVe(e)),vVe=()=>`Titre`,yVe=()=>`Title`,bVe=((e={},t={})=>(t.locale??q())===`fr`?vVe(e):yVe(e)),xVe=()=>`Message`,SVe=()=>`Message`,CVe=((e={},t={})=>(t.locale??q())===`fr`?xVe(e):SVe(e)),wVe=()=>`naviguer`,TVe=()=>`navigate`,EVe=((e={},t={})=>(t.locale??q())===`fr`?wVe(e):TVe(e)),DVe=()=>`ouvrir`,OVe=()=>`open`,kVe=((e={},t={})=>(t.locale??q())===`fr`?DVe(e):OVe(e)),AVe=()=>`Échap`,jVe=()=>`Esc`,MVe=((e={},t={})=>(t.locale??q())===`fr`?AVe(e):jVe(e)),NVe=()=>`fermer`,PVe=()=>`close`,FVe=((e={},t={})=>(t.locale??q())===`fr`?NVe(e):PVe(e)),IVe=()=>`Choisir un agent`,LVe=()=>`Choose an agent`,RVe=((e={},t={})=>(t.locale??q())===`fr`?IVe(e):LVe(e)),zVe=()=>`Sélectionnez l’agent (et l’instance) pour cette conversation.`,BVe=()=>`Select the agent (and instance) for this conversation.`,VVe=((e={},t={})=>(t.locale??q())===`fr`?zVe(e):BVe(e)),HVe=()=>`Chargement…`,UVe=()=>`Loading…`,WVe=((e={},t={})=>(t.locale??q())===`fr`?HVe(e):UVe(e)),GVe=()=>`Aucun agent ne vous est assigné. Contactez votre administrateur pour qu’il vous en attribue un.`,KVe=()=>`No agent is assigned to you. Contact your administrator to have one assigned.`,qVe=((e={},t={})=>(t.locale??q())===`fr`?GVe(e):KVe(e)),JVe=()=>`Rechercher un agent…`,YVe=()=>`Search for an agent…`,XVe=((e={},t={})=>(t.locale??q())===`fr`?JVe(e):YVe(e)),ZVe=()=>`Rechercher un agent`,QVe=()=>`Search for an agent`,$Ve=((e={},t={})=>(t.locale??q())===`fr`?ZVe(e):QVe(e)),eHe=()=>`Cet agent n’existe plus sur la gateway`,tHe=()=>`This agent no longer exists on the gateway`,nHe=((e={},t={})=>(t.locale??q())===`fr`?eHe(e):tHe(e)),rHe=()=>`Agent par défaut`,iHe=()=>`Default agent`,aHe=((e={},t={})=>(t.locale??q())===`fr`?rHe(e):iHe(e)),oHe=()=>`Rechercher`,sHe=()=>`Search`,cHe=((e={},t={})=>(t.locale??q())===`fr`?oHe(e):sHe(e)),lHe=()=>`Réinitialiser`,uHe=()=>`Reset`,dHe=((e={},t={})=>(t.locale??q())===`fr`?lHe(e):uHe(e)),fHe=()=>`Ajouter`,pHe=()=>`Add`,mHe=((e={},t={})=>(t.locale??q())===`fr`?fHe(e):pHe(e)),hHe=()=>`Aucun élément.`,gHe=()=>`No items.`,_He=((e={},t={})=>(t.locale??q())===`fr`?hHe(e):gHe(e)),vHe=()=>`Chargement…`,yHe=()=>`Loading…`,bHe=((e={},t={})=>(t.locale??q())===`fr`?vHe(e):yHe(e)),xHe=()=>`Tout sélectionner`,SHe=()=>`Select all`,CHe=((e={},t={})=>(t.locale??q())===`fr`?xHe(e):SHe(e)),wHe=()=>`Sélectionner la ligne`,THe=()=>`Select row`,EHe=((e={},t={})=>(t.locale??q())===`fr`?wHe(e):THe(e)),DHe=()=>`Actions`,OHe=()=>`Actions`,kHe=((e={},t={})=>(t.locale??q())===`fr`?DHe(e):OHe(e)),AHe=e=>`Trier par ${e?.column}`,jHe=e=>`Sort by ${e?.column}`,MHe=((e,t={})=>(t.locale??q())===`fr`?AHe(e):jHe(e)),NHe=()=>`Agent introuvable`,PHe=()=>`Agent not found`,FHe=((e={},t={})=>(t.locale??q())===`fr`?NHe(e):PHe(e)),IHe=()=>`L’agent configuré n’existe plus sur la passerelle. Vérifiez OPENCLAW_AGENT_ID dans le .env du bridge (il doit correspondre à un agent réel de la passerelle).`,LHe=()=>`The configured agent no longer exists on the gateway. Check OPENCLAW_AGENT_ID in the bridge .env (it must match a real gateway agent).`,RHe=((e={},t={})=>(t.locale??q())===`fr`?IHe(e):LHe(e)),zHe=()=>`Authentification refusée`,BHe=()=>`Authentication refused`,VHe=((e={},t={})=>(t.locale??q())===`fr`?zHe(e):BHe(e)),HHe=()=>`Le token opérateur ne correspond pas au device pairé. Re-pairez un device dédié au bridge sur la passerelle et reportez son token + device identity.`,UHe=()=>`The operator token does not match the paired device. Re-pair a dedicated bridge device on the gateway and report its token + device identity.`,WHe=((e={},t={})=>(t.locale??q())===`fr`?HHe(e):UHe(e)),GHe=()=>`Signature device impossible`,KHe=()=>`Device signing failed`,qHe=((e={},t={})=>(t.locale??q())===`fr`?GHe(e):KHe(e)),JHe=()=>`La clé privée du device identity ne se décode pas. Vérifiez OPENCLAW_DEVICE_IDENTITY (format JSON, \\n simples) — voir fix-devid.mjs.`,YHe=()=>`The device identity private key won’t decode. Check OPENCLAW_DEVICE_IDENTITY (JSON format, single \\n) — see fix-devid.mjs.`,XHe=((e={},t={})=>(t.locale??q())===`fr`?JHe(e):YHe(e)),ZHe=()=>`Portée insuffisante`,QHe=()=>`Insufficient scope`,$He=((e={},t={})=>(t.locale??q())===`fr`?ZHe(e):QHe(e)),eUe=()=>`Le pairing du device n’a pas la portée requise (operator.admin). Approuvez/élevez la portée du device sur la passerelle.`,tUe=()=>`The device pairing lacks the required scope (operator.admin). Approve/elevate the device scope on the gateway.`,nUe=((e={},t={})=>(t.locale??q())===`fr`?eUe(e):tUe(e)),rUe=()=>`Délai dépassé`,iUe=()=>`Timed out`,aUe=((e={},t={})=>(t.locale??q())===`fr`?rUe(e):iUe(e)),oUe=()=>`La passerelle n’a pas répondu à temps. Vérifiez qu’elle est démarrée et joignable (OPENCLAW_GATEWAY_URL).`,sUe=()=>`The gateway did not respond in time. Check it’s started and reachable (OPENCLAW_GATEWAY_URL).`,cUe=((e={},t={})=>(t.locale??q())===`fr`?oUe(e):sUe(e)),lUe=()=>`Passerelle déconnectée`,uUe=()=>`Gateway disconnected`,dUe=((e={},t={})=>(t.locale??q())===`fr`?lUe(e):uUe(e)),fUe=()=>`La connexion à la passerelle a été coupée. Vérifiez l’état du conteneur OpenClaw et l’URL/port de la passerelle.`,pUe=()=>`The connection to the gateway dropped. Check the OpenClaw container state and the gateway URL/port.`,mUe=((e={},t={})=>(t.locale??q())===`fr`?fUe(e):pUe(e)),hUe=()=>`Bridge injoignable`,gUe=()=>`Bridge unreachable`,_Ue=((e={},t={})=>(t.locale??q())===`fr`?hUe(e):gUe(e)),vUe=()=>`Convex n’a pas pu joindre le bridge. Vérifiez que le conteneur bridge tourne et BRIDGE_URL (http://<ip-hôte>:8787).`,yUe=()=>`Convex could not reach the bridge. Check the bridge container is running and BRIDGE_URL (http://<host-ip>:8787).`,bUe=((e={},t={})=>(t.locale??q())===`fr`?vUe(e):yUe(e)),xUe=()=>`Pièce jointe trop volumineuse`,SUe=()=>`Attachment too large`,CUe=((e={},t={})=>(t.locale??q())===`fr`?xUe(e):SUe(e)),wUe=()=>`La passerelle a refusé la pièce jointe car elle dépasse la taille qu’elle accepte (limite de mise en sandbox de l’agent). Réduisez la taille du fichier, ou retirez la pièce jointe et envoyez le texte seul.`,TUe=()=>`The gateway refused the attachment because it exceeds the size it accepts (the agent's sandbox staging limit). Use a smaller file, or remove the attachment and send the text alone.`,EUe=((e={},t={})=>(t.locale??q())===`fr`?wUe(e):TUe(e)),DUe=()=>`Pièce jointe non traitée`,OUe=()=>`Attachment could not be processed`,kUe=((e={},t={})=>(t.locale??q())===`fr`?DUe(e):OUe(e)),AUe=()=>`La passerelle n’a pas pu analyser/préparer la pièce jointe. Bug connu de la passerelle (le validateur base64 déborde sur les gros fichiers, RangeError) — à corriger côté passerelle (isValidBase64). En attendant : un fichier plus petit passe, ou envoyez le texte sans pièce jointe.`,jUe=()=>`The gateway could not parse/stage the attachment. Known gateway bug (its base64 validator overflows on large files — RangeError); fix it gateway-side (isValidBase64). Meanwhile: a smaller file works, or send the text without the attachment.`,MUe=((e={},t={})=>(t.locale??q())===`fr`?AUe(e):jUe(e)),NUe=()=>`Requête invalide`,PUe=()=>`Invalid request`,FUe=((e={},t={})=>(t.locale??q())===`fr`?NUe(e):PUe(e)),IUe=()=>`La passerelle a rejeté la requête. Consultez les logs du bridge pour le détail brut.`,LUe=()=>`The gateway rejected the request. Check the bridge logs for the raw detail.`,RUe=((e={},t={})=>(t.locale??q())===`fr`?IUe(e):LUe(e)),zUe=()=>`Bridge non configuré`,BUe=()=>`Bridge not configured`,VUe=((e={},t={})=>(t.locale??q())===`fr`?zUe(e):BUe(e)),HUe=()=>`BRIDGE_URL / BRIDGE_SHARED_SECRET ne sont pas définis côté Convex (npx convex env set).`,UUe=()=>`BRIDGE_URL / BRIDGE_SHARED_SECRET are not set on the Convex side (npx convex env set).`,WUe=((e={},t={})=>(t.locale??q())===`fr`?HUe(e):UUe(e)),GUe=()=>`Utilisateur non routé`,KUe=()=>`User not routed`,qUe=((e={},t={})=>(t.locale??q())===`fr`?GUe(e):KUe(e)),JUe=()=>`Ce compte n’est rattaché à aucune instance. Settings → Users → Override instance, ou affectez un groupe.`,YUe=()=>`This account is not attached to any instance. Settings → Users → Override instance, or assign a group.`,XUe=((e={},t={})=>(t.locale??q())===`fr`?JUe(e):YUe(e)),ZUe=()=>`Erreur passerelle`,QUe=()=>`Gateway error`,$Ue=((e={},t={})=>(t.locale??q())===`fr`?ZUe(e):QUe(e)),eWe=()=>`Cause non catégorisée. Consultez les logs du bridge pour le message brut.`,tWe=()=>`Uncategorized cause. Check the bridge logs for the raw message.`,nWe=((e={},t={})=>(t.locale??q())===`fr`?eWe(e):tWe(e)),rWe=()=>`Cause inconnue`,iWe=()=>`Unknown cause`,aWe=((e={},t={})=>(t.locale??q())===`fr`?rWe(e):iWe(e)),oWe=()=>`Aucun code de cause n’a été remonté (bridge antérieur à cette version ?). Consultez les logs du bridge.`,sWe=()=>`No cause code was reported (bridge older than this version?). Check the bridge logs.`,cWe=((e={},t={})=>(t.locale??q())===`fr`?oWe(e):sWe(e)),lWe=()=>`Cause non répertoriée — voir les logs du bridge.`,uWe=()=>`Cause not catalogued — see the bridge logs.`,dWe=((e={},t={})=>(t.locale??q())===`fr`?lWe(e):uWe(e)),fWe=e=>`Notifications (${e?.count} non lues)`,pWe=e=>`Notifications (${e?.count} unread)`,mWe=((e,t={})=>(t.locale??q())===`fr`?fWe(e):pWe(e)),hWe=()=>`Notifications`,gWe=()=>`Notifications`,_We=((e={},t={})=>(t.locale??q())===`fr`?hWe(e):gWe(e)),vWe=()=>`Notifications`,yWe=()=>`Notifications`,bWe=((e={},t={})=>(t.locale??q())===`fr`?vWe(e):yWe(e)),xWe=()=>`Tout lu`,SWe=()=>`Mark all read`,CWe=((e={},t={})=>(t.locale??q())===`fr`?xWe(e):SWe(e)),wWe=()=>`Tout effacer`,TWe=()=>`Clear all`,EWe=((e={},t={})=>(t.locale??q())===`fr`?wWe(e):TWe(e)),DWe=()=>`Aucune notification.`,OWe=()=>`No notifications.`,kWe=((e={},t={})=>(t.locale??q())===`fr`?DWe(e):OWe(e)),AWe=()=>`Marquer comme lue`,jWe=()=>`Mark as read`,EQ=((e={},t={})=>(t.locale??q())===`fr`?AWe(e):jWe(e)),MWe=()=>`Effacer la notification`,NWe=()=>`Clear notification`,DQ=((e={},t={})=>(t.locale??q())===`fr`?MWe(e):NWe(e)),PWe=()=>`Mes signalements`,FWe=()=>`My reports`,IWe=((e={},t={})=>(t.locale??q())===`fr`?PWe(e):FWe(e)),LWe=()=>`Répondu`,RWe=()=>`Answered`,zWe=((e={},t={})=>(t.locale??q())===`fr`?LWe(e):RWe(e)),BWe=()=>`En attente`,VWe=()=>`Pending`,HWe=((e={},t={})=>(t.locale??q())===`fr`?BWe(e):VWe(e)),UWe=()=>`Administrateur`,WWe=()=>`Administrator`,GWe=((e={},t={})=>(t.locale??q())===`fr`?UWe(e):WWe(e)),KWe=()=>`Vous`,qWe=()=>`You`,JWe=((e={},t={})=>(t.locale??q())===`fr`?KWe(e):qWe(e)),YWe=()=>`Voir la conversation`,XWe=()=>`View the conversation`,ZWe=((e={},t={})=>(t.locale??q())===`fr`?YWe(e):XWe(e)),QWe=()=>`Message signalé`,$We=()=>`Reported message`,eGe=((e={},t={})=>(t.locale??q())===`fr`?QWe(e):$We(e)),tGe=()=>`Clore le signalement`,nGe=()=>`Close report`,OQ=((e={},t={})=>(t.locale??q())===`fr`?tGe(e):nGe(e)),rGe=()=>`Pourquoi clore ce signalement ? (facultatif)`,iGe=()=>`Why close this report? (optional)`,aGe=((e={},t={})=>(t.locale??q())===`fr`?rGe(e):iGe(e)),oGe=()=>`Clore`,sGe=()=>`Close`,cGe=((e={},t={})=>(t.locale??q())===`fr`?oGe(e):sGe(e)),lGe=()=>`Annuler`,uGe=()=>`Cancel`,dGe=((e={},t={})=>(t.locale??q())===`fr`?lGe(e):uGe(e)),fGe=()=>`Réponse à votre signalement`,pGe=()=>`Reply to your report`,mGe=((e={},t={})=>(t.locale??q())===`fr`?fGe(e):pGe(e)),hGe=()=>`Un administrateur a répondu à un signalement que vous avez envoyé.`,gGe=()=>`An administrator replied to a report you sent.`,_Ge=((e={},t={})=>(t.locale??q())===`fr`?hGe(e):gGe(e)),vGe=()=>`Mots modifiés / altérés`,yGe=()=>`Modified / altered words`,bGe=((e={},t={})=>(t.locale??q())===`fr`?vGe(e):yGe(e)),xGe=()=>`Réponse incorrecte`,SGe=()=>`Incorrect answer`,CGe=((e={},t={})=>(t.locale??q())===`fr`?xGe(e):SGe(e)),wGe=()=>`Incohérence`,TGe=()=>`Incoherence`,EGe=((e={},t={})=>(t.locale??q())===`fr`?wGe(e):TGe(e)),DGe=()=>`Formatage`,OGe=()=>`Formatting`,kGe=((e={},t={})=>(t.locale??q())===`fr`?DGe(e):OGe(e)),AGe=()=>`Latence`,jGe=()=>`Latency`,MGe=((e={},t={})=>(t.locale??q())===`fr`?AGe(e):jGe(e)),NGe=()=>`Erreur API`,PGe=()=>`API error`,FGe=((e={},t={})=>(t.locale??q())===`fr`?NGe(e):PGe(e)),IGe=()=>`Autre`,LGe=()=>`Other`,RGe=((e={},t={})=>(t.locale??q())===`fr`?IGe(e):LGe(e)),zGe=()=>`Utilisateurs`,BGe=()=>`Users`,VGe=((e={},t={})=>(t.locale??q())===`fr`?zGe(e):BGe(e)),HGe=()=>`Instances`,UGe=()=>`Instances`,WGe=((e={},t={})=>(t.locale??q())===`fr`?HGe(e):UGe(e)),GGe=()=>`Bridge`,KGe=()=>`Bridge`,qGe=((e={},t={})=>(t.locale??q())===`fr`?GGe(e):KGe(e)),JGe=()=>`Comptes de service`,YGe=()=>`Service accounts`,XGe=((e={},t={})=>(t.locale??q())===`fr`?JGe(e):YGe(e)),ZGe=()=>`Rôles`,QGe=()=>`Roles`,$Ge=((e={},t={})=>(t.locale??q())===`fr`?ZGe(e):QGe(e)),eKe=()=>`Traces`,tKe=()=>`Traces`,nKe=((e={},t={})=>(t.locale??q())===`fr`?eKe(e):tKe(e)),rKe=()=>`KPI`,iKe=()=>`KPI`,aKe=((e={},t={})=>(t.locale??q())===`fr`?rKe(e):iKe(e)),oKe=()=>`Anomalies`,sKe=()=>`Anomalies`,cKe=((e={},t={})=>(t.locale??q())===`fr`?oKe(e):sKe(e)),lKe=()=>`Intégrations`,uKe=()=>`Integrations`,dKe=((e={},t={})=>(t.locale??q())===`fr`?lKe(e):uKe(e)),fKe=()=>`Audit`,pKe=()=>`Audit`,mKe=((e={},t={})=>(t.locale??q())===`fr`?fKe(e):pKe(e)),hKe=()=>`Feedbacks`,gKe=()=>`Feedbacks`,_Ke=((e={},t={})=>(t.locale??q())===`fr`?hKe(e):gKe(e)),vKe=()=>`Groupes`,yKe=()=>`Groups`,bKe=((e={},t={})=>(t.locale??q())===`fr`?vKe(e):yKe(e)),xKe=()=>`Accès`,SKe=()=>`Access`,CKe=((e={},t={})=>(t.locale??q())===`fr`?xKe(e):SKe(e)),wKe=()=>`Inspectez les accès d’un utilisateur : ses groupes, les agents et chartes qui lui sont disponibles (avec leur provenance) et ses permissions effectives. Lecture seule.`,TKe=()=>`Inspect a user’s access: their groups, the agents and charts available to them (with provenance), and their effective permissions. Read-only.`,EKe=((e={},t={})=>(t.locale??q())===`fr`?wKe(e):TKe(e)),DKe=()=>`Choisir un utilisateur`,OKe=()=>`Pick a user`,kQ=((e={},t={})=>(t.locale??q())===`fr`?DKe(e):OKe(e)),kKe=()=>`Sélectionnez un utilisateur pour voir ses accès.`,AKe=()=>`Select a user to see their access.`,jKe=((e={},t={})=>(t.locale??q())===`fr`?kKe(e):AKe(e)),MKe=()=>`Identité`,NKe=()=>`Identity`,PKe=((e={},t={})=>(t.locale??q())===`fr`?MKe(e):NKe(e)),FKe=()=>`Groupes`,IKe=()=>`Groups`,LKe=((e={},t={})=>(t.locale??q())===`fr`?FKe(e):IKe(e)),RKe=()=>`Agents disponibles`,zKe=()=>`Available agents`,BKe=((e={},t={})=>(t.locale??q())===`fr`?RKe(e):zKe(e)),VKe=()=>`Chartes disponibles`,HKe=()=>`Available charts`,UKe=((e={},t={})=>(t.locale??q())===`fr`?VKe(e):HKe(e)),WKe=()=>`Permissions effectives`,GKe=()=>`Effective permissions`,KKe=((e={},t={})=>(t.locale??q())===`fr`?WKe(e):GKe(e)),qKe=()=>`Aucun`,JKe=()=>`None`,AQ=((e={},t={})=>(t.locale??q())===`fr`?qKe(e):JKe(e)),YKe=()=>`Défaut`,XKe=()=>`Default`,ZKe=((e={},t={})=>(t.locale??q())===`fr`?YKe(e):XKe(e)),QKe=()=>`Direct`,$Ke=()=>`Direct`,eqe=((e={},t={})=>(t.locale??q())===`fr`?QKe(e):$Ke(e)),tqe=()=>`Tous les agents (aucun groupe)`,nqe=()=>`All agents (no group)`,rqe=((e={},t={})=>(t.locale??q())===`fr`?tqe(e):nqe(e)),iqe=e=>`Groupe : ${e?.group}`,aqe=e=>`Group: ${e?.group}`,jQ=((e,t={})=>(t.locale??q())===`fr`?iqe(e):aqe(e)),oqe=()=>`Commune`,sqe=()=>`Common`,cqe=((e={},t={})=>(t.locale??q())===`fr`?oqe(e):sqe(e)),lqe=()=>`Perso`,uqe=()=>`Personal`,dqe=((e={},t={})=>(t.locale??q())===`fr`?lqe(e):uqe(e)),fqe=()=>`Groupes`,pqe=()=>`Groups`,mqe=((e={},t={})=>(t.locale??q())===`fr`?fqe(e):pqe(e)),hqe=()=>`Regroupez des utilisateurs et partagez des agents par groupe. Chaque membre hérite des agents du groupe en plus de ses agents directs.`,gqe=()=>`Group users and share agents by group. Each member inherits the group's agents on top of their direct agents.`,_qe=((e={},t={})=>(t.locale??q())===`fr`?hqe(e):gqe(e)),vqe=()=>`Nouveau groupe`,yqe=()=>`New group`,bqe=((e={},t={})=>(t.locale??q())===`fr`?vqe(e):yqe(e)),xqe=()=>`Aucun groupe pour le moment.`,Sqe=()=>`No groups yet.`,Cqe=((e={},t={})=>(t.locale??q())===`fr`?xqe(e):Sqe(e)),wqe=()=>`Nom`,Tqe=()=>`Name`,Eqe=((e={},t={})=>(t.locale??q())===`fr`?wqe(e):Tqe(e)),Dqe=()=>`Membres`,Oqe=()=>`Members`,kqe=((e={},t={})=>(t.locale??q())===`fr`?Dqe(e):Oqe(e)),Aqe=()=>`Agents`,jqe=()=>`Agents`,Mqe=((e={},t={})=>(t.locale??q())===`fr`?Aqe(e):jqe(e)),Nqe=()=>`Chartes`,Pqe=()=>`Charts`,Fqe=((e={},t={})=>(t.locale??q())===`fr`?Nqe(e):Pqe(e)),Iqe=()=>`Filtrer les groupes (nom, membre, agent, charte)…`,Lqe=()=>`Filter groups (name, member, agent, chart)…`,Rqe=((e={},t={})=>(t.locale??q())===`fr`?Iqe(e):Lqe(e)),zqe=()=>`Gérer`,Bqe=()=>`Manage`,Vqe=((e={},t={})=>(t.locale??q())===`fr`?zqe(e):Bqe(e)),Hqe=()=>`Renommer`,Uqe=()=>`Rename`,Wqe=((e={},t={})=>(t.locale??q())===`fr`?Hqe(e):Uqe(e)),Gqe=()=>`Supprimer`,Kqe=()=>`Delete`,qqe=((e={},t={})=>(t.locale??q())===`fr`?Gqe(e):Kqe(e)),Jqe=()=>`Enregistrer`,Yqe=()=>`Save`,Xqe=((e={},t={})=>(t.locale??q())===`fr`?Jqe(e):Yqe(e)),Zqe=()=>`Annuler`,Qqe=()=>`Cancel`,$qe=((e={},t={})=>(t.locale??q())===`fr`?Zqe(e):Qqe(e)),eJe=()=>`Nouveau groupe`,tJe=()=>`New group`,nJe=((e={},t={})=>(t.locale??q())===`fr`?eJe(e):tJe(e)),rJe=()=>`Renommer le groupe`,iJe=()=>`Rename group`,aJe=((e={},t={})=>(t.locale??q())===`fr`?rJe(e):iJe(e)),oJe=()=>`Le nom est libre ; un identifiant stable est généré automatiquement.`,sJe=()=>`The name is free-form; a stable identifier is generated automatically.`,cJe=((e={},t={})=>(t.locale??q())===`fr`?oJe(e):sJe(e)),lJe=()=>`Nom`,uJe=()=>`Name`,dJe=((e={},t={})=>(t.locale??q())===`fr`?lJe(e):uJe(e)),fJe=()=>`Description`,pJe=()=>`Description`,mJe=((e={},t={})=>(t.locale??q())===`fr`?fJe(e):pJe(e)),hJe=e=>`Supprimer le groupe « ${e?.name} » ?`,gJe=e=>`Delete group "${e?.name}"?`,_Je=((e,t={})=>(t.locale??q())===`fr`?hJe(e):gJe(e)),vJe=()=>`Cette action supprime le groupe, ses adhésions et les agents partagés. Elle est irréversible.`,yJe=()=>`This deletes the group, its memberships and shared agents. It cannot be undone.`,bJe=((e={},t={})=>(t.locale??q())===`fr`?vJe(e):yJe(e)),xJe=()=>`Supprimer le groupe`,SJe=()=>`Delete group`,CJe=((e={},t={})=>(t.locale??q())===`fr`?xJe(e):SJe(e)),wJe=e=>`Gérer « ${e?.name} »`,TJe=e=>`Manage "${e?.name}"`,EJe=((e,t={})=>(t.locale??q())===`fr`?wJe(e):TJe(e)),DJe=()=>`Ajoutez ou retirez des membres et partagez des agents découverts avec ce groupe.`,OJe=()=>`Add or remove members and share discovered agents with this group.`,kJe=((e={},t={})=>(t.locale??q())===`fr`?DJe(e):OJe(e)),AJe=()=>`Membres`,jJe=()=>`Members`,MJe=((e={},t={})=>(t.locale??q())===`fr`?AJe(e):jJe(e)),NJe=()=>`Rechercher un utilisateur…`,PJe=()=>`Search a user…`,FJe=((e={},t={})=>(t.locale??q())===`fr`?NJe(e):PJe(e)),IJe=()=>`Agents partagés`,LJe=()=>`Shared agents`,RJe=((e={},t={})=>(t.locale??q())===`fr`?IJe(e):LJe(e)),zJe=()=>`Rechercher un agent…`,BJe=()=>`Search an agent…`,VJe=((e={},t={})=>(t.locale??q())===`fr`?zJe(e):BJe(e)),HJe=()=>`Aucun résultat.`,UJe=()=>`No results.`,WJe=((e={},t={})=>(t.locale??q())===`fr`?HJe(e):UJe(e)),GJe=()=>`Tout sélectionner`,KJe=()=>`Select all`,MQ=((e={},t={})=>(t.locale??q())===`fr`?GJe(e):KJe(e)),qJe=()=>`Précédent`,JJe=()=>`Previous`,YJe=((e={},t={})=>(t.locale??q())===`fr`?qJe(e):JJe(e)),XJe=()=>`Suivant`,ZJe=()=>`Next`,QJe=((e={},t={})=>(t.locale??q())===`fr`?XJe(e):ZJe(e)),$Je=e=>`Page ${e?.page} sur ${e?.pages}`,eYe=e=>`Page ${e?.page} of ${e?.pages}`,tYe=((e,t={})=>(t.locale??q())===`fr`?$Je(e):eYe(e)),nYe=()=>`Administrateur`,rYe=()=>`Admin`,iYe=((e={},t={})=>(t.locale??q())===`fr`?nYe(e):rYe(e)),aYe=()=>`Utilisateur`,oYe=()=>`User`,sYe=((e={},t={})=>(t.locale??q())===`fr`?aYe(e):oYe(e)),cYe=()=>`En attente`,lYe=()=>`Pending`,uYe=((e={},t={})=>(t.locale??q())===`fr`?cYe(e):lYe(e)),dYe=e=>`Basculer l'adhésion de ${e?.user}`,fYe=e=>`Toggle membership of ${e?.user}`,pYe=((e,t={})=>(t.locale??q())===`fr`?dYe(e):fYe(e)),mYe=e=>`Partager l'agent ${e?.name}`,hYe=e=>`Share agent ${e?.name}`,gYe=((e,t={})=>(t.locale??q())===`fr`?mYe(e):hYe(e)),_Ye=()=>`Chargement…`,vYe=()=>`Loading…`,NQ=((e={},t={})=>(t.locale??q())===`fr`?_Ye(e):vYe(e)),yYe=()=>`Chargement des agents…`,bYe=()=>`Loading agents…`,xYe=((e={},t={})=>(t.locale??q())===`fr`?yYe(e):bYe(e)),SYe=()=>`Aucun utilisateur.`,CYe=()=>`No users.`,wYe=((e={},t={})=>(t.locale??q())===`fr`?SYe(e):CYe(e)),TYe=()=>`Aucune instance configurée.`,EYe=()=>`No instances configured.`,DYe=((e={},t={})=>(t.locale??q())===`fr`?TYe(e):EYe(e)),OYe=()=>`Aucun agent découvert.`,kYe=()=>`No discovered agents.`,AYe=((e={},t={})=>(t.locale??q())===`fr`?OYe(e):kYe(e)),jYe=()=>`Instance hors ligne ; agents indisponibles.`,MYe=()=>`Instance offline; agents unavailable.`,NYe=((e={},t={})=>(t.locale??q())===`fr`?jYe(e):MYe(e)),PYe=()=>`hors ligne`,FYe=()=>`offline`,IYe=((e={},t={})=>(t.locale??q())===`fr`?PYe(e):FYe(e)),LYe=()=>`retiré`,RYe=()=>`removed`,zYe=((e={},t={})=>(t.locale??q())===`fr`?LYe(e):RYe(e)),BYe=()=>`Agent par défaut de l'instance`,VYe=()=>`Instance default agent`,PQ=((e={},t={})=>(t.locale??q())===`fr`?BYe(e):VYe(e)),HYe=()=>`Chartes`,UYe=()=>`Charts`,WYe=((e={},t={})=>(t.locale??q())===`fr`?HYe(e):UYe(e)),GYe=()=>`Aucune charte disponible pour ce groupe pour l'instant. Demandez à un administrateur d'ajouter des chartes au pool de ce groupe.`,KYe=()=>`No charts available for this group yet. Ask an admin to add charts to this group's pool.`,qYe=((e={},t={})=>(t.locale??q())===`fr`?GYe(e):KYe(e)),JYe=()=>`Ajoutez des chartes au pool de ce groupe ci-dessous, puis sélectionnez celles que le groupe propose.`,YYe=()=>`Add charts to this group's pool below, then select which ones the group offers.`,XYe=((e={},t={})=>(t.locale??q())===`fr`?JYe(e):YYe(e)),ZYe=()=>`Ajouter une charte au pool…`,QYe=()=>`Add a chart to the pool…`,$Ye=((e={},t={})=>(t.locale??q())===`fr`?ZYe(e):QYe(e)),eXe=e=>`Retirer ${e?.name} du pool`,tXe=e=>`Remove ${e?.name} from the pool`,FQ=((e,t={})=>(t.locale??q())===`fr`?eXe(e):tXe(e)),nXe=e=>`Proposer la charte ${e?.name} à ce groupe`,rXe=e=>`Offer chart ${e?.name} to this group`,iXe=((e,t={})=>(t.locale??q())===`fr`?nXe(e):rXe(e)),aXe=()=>`Charte par défaut du groupe`,oXe=()=>`Group default chart`,IQ=((e={},t={})=>(t.locale??q())===`fr`?aXe(e):oXe(e)),sXe=()=>`Définir par défaut`,cXe=()=>`Set as default`,lXe=((e={},t={})=>(t.locale??q())===`fr`?sXe(e):cXe(e)),uXe=()=>`Gestionnaire`,dXe=()=>`Manager`,LQ=((e={},t={})=>(t.locale??q())===`fr`?uXe(e):dXe(e)),fXe=()=>`Promouvoir gestionnaire`,pXe=()=>`Promote to manager`,RQ=((e={},t={})=>(t.locale??q())===`fr`?fXe(e):pXe(e)),mXe=()=>`Retirer gestionnaire`,hXe=()=>`Remove manager`,zQ=((e={},t={})=>(t.locale??q())===`fr`?mXe(e):hXe(e)),gXe=()=>`Changement de gestionnaire refusé`,_Xe=()=>`Manager change rejected`,vXe=((e={},t={})=>(t.locale??q())===`fr`?gXe(e):_Xe(e)),yXe=()=>`Mise à jour de la charte refusée`,bXe=()=>`Chart update rejected`,BQ=((e={},t={})=>(t.locale??q())===`fr`?yXe(e):bXe(e)),xXe=()=>`Enregistrement du groupe refusé`,SXe=()=>`Group save rejected`,CXe=((e={},t={})=>(t.locale??q())===`fr`?xXe(e):SXe(e)),wXe=()=>`Suppression du groupe refusée`,TXe=()=>`Group deletion rejected`,EXe=((e={},t={})=>(t.locale??q())===`fr`?wXe(e):TXe(e)),DXe=()=>`Mise à jour de l'adhésion refusée`,OXe=()=>`Membership update rejected`,VQ=((e={},t={})=>(t.locale??q())===`fr`?DXe(e):OXe(e)),kXe=()=>`Partage de l'agent refusé`,AXe=()=>`Agent sharing rejected`,HQ=((e={},t={})=>(t.locale??q())===`fr`?kXe(e):AXe(e)),jXe=()=>`Réordonner cet onglet`,MXe=()=>`Reorder this tab`,NXe=((e={},t={})=>(t.locale??q())===`fr`?jXe(e):MXe(e)),PXe=()=>`Réglages`,FXe=()=>`Settings`,IXe=((e={},t={})=>(t.locale??q())===`fr`?PXe(e):FXe(e)),LXe=()=>`← Retour au chat`,RXe=()=>`← Back to chat`,zXe=((e={},t={})=>(t.locale??q())===`fr`?LXe(e):RXe(e)),BXe=()=>`Réglages`,VXe=()=>`Settings`,HXe=((e={},t={})=>(t.locale??q())===`fr`?BXe(e):VXe(e)),UXe=()=>`Personnel`,WXe=()=>`Personal`,GXe=((e={},t={})=>(t.locale??q())===`fr`?UXe(e):WXe(e)),KXe=()=>`Agents`,qXe=()=>`Agents`,JXe=((e={},t={})=>(t.locale??q())===`fr`?KXe(e):qXe(e)),YXe=()=>`Accès & utilisateurs`,XXe=()=>`Access & users`,ZXe=((e={},t={})=>(t.locale??q())===`fr`?YXe(e):XXe(e)),QXe=()=>`Observabilité`,$Xe=()=>`Observability`,eZe=((e={},t={})=>(t.locale??q())===`fr`?QXe(e):$Xe(e)),tZe=()=>`Fermer`,nZe=()=>`Close`,UQ=((e={},t={})=>(t.locale??q())===`fr`?tZe(e):nZe(e)),rZe=()=>`héritée`,iZe=()=>`inherited`,aZe=((e={},t={})=>(t.locale??q())===`fr`?rZe(e):iZe(e)),oZe=()=>`Revenir à la valeur héritée`,sZe=()=>`Back to the inherited value`,WQ=((e={},t={})=>(t.locale??q())===`fr`?oZe(e):sZe(e)),cZe=()=>`Application…`,lZe=()=>`Applying…`,GQ=((e={},t={})=>(t.locale??q())===`fr`?cZe(e):lZe(e)),uZe=()=>`Échec de l’application.`,dZe=()=>`Failed to apply.`,fZe=((e={},t={})=>(t.locale??q())===`fr`?uZe(e):dZe(e)),pZe=()=>`Réessayer`,mZe=()=>`Retry`,KQ=((e={},t={})=>(t.locale??q())===`fr`?pZe(e):mZe(e)),hZe=()=>`Réflexion`,gZe=()=>`Reasoning`,_Ze=((e={},t={})=>(t.locale??q())===`fr`?hZe(e):gZe(e)),vZe=()=>`Vitesse`,yZe=()=>`Speed`,bZe=((e={},t={})=>(t.locale??q())===`fr`?vZe(e):yZe(e)),xZe=()=>`Hérité`,SZe=()=>`Inherited`,CZe=((e={},t={})=>(t.locale??q())===`fr`?xZe(e):SZe(e)),wZe=()=>`Rapide`,TZe=()=>`Fast`,qQ=((e={},t={})=>(t.locale??q())===`fr`?wZe(e):TZe(e)),EZe=()=>`Standard`,DZe=()=>`Standard`,JQ=((e={},t={})=>(t.locale??q())===`fr`?EZe(e):DZe(e)),OZe=()=>`Tous les réglages de session`,kZe=()=>`All session settings`,AZe=((e={},t={})=>(t.locale??q())===`fr`?OZe(e):kZe(e)),jZe=()=>`Réglages de session`,MZe=()=>`Session settings`,NZe=((e={},t={})=>(t.locale??q())===`fr`?jZe(e):MZe(e)),PZe=()=>`Réglages appliqués à cette conversation.`,FZe=()=>`Settings applied to this conversation.`,IZe=((e={},t={})=>(t.locale??q())===`fr`?PZe(e):FZe(e)),LZe=()=>`Génération`,RZe=()=>`Generation`,zZe=((e={},t={})=>(t.locale??q())===`fr`?LZe(e):RZe(e)),BZe=()=>`Session`,VZe=()=>`Session`,HZe=((e={},t={})=>(t.locale??q())===`fr`?BZe(e):VZe(e)),UZe=()=>`Agent`,WZe=()=>`Agent`,GZe=((e={},t={})=>(t.locale??q())===`fr`?UZe(e):WZe(e)),KZe=()=>`Actions`,qZe=()=>`Actions`,JZe=((e={},t={})=>(t.locale??q())===`fr`?KZe(e):qZe(e)),YZe=()=>`Contexte`,XZe=()=>`Context`,ZZe=((e={},t={})=>(t.locale??q())===`fr`?YZe(e):XZe(e)),QZe=e=>`${e?.pct} % · ${e?.used} / ${e?.total} jetons`,$Ze=e=>`${e?.pct}% · ${e?.used} / ${e?.total} tokens`,eQe=((e,t={})=>(t.locale??q())===`fr`?QZe(e):$Ze(e)),tQe=()=>`Verbosité`,nQe=()=>`Verbosity`,rQe=((e={},t={})=>(t.locale??q())===`fr`?tQe(e):nQe(e)),iQe=e=>`${e?.level} · fixée`,aQe=e=>`${e?.level} · pinned`,oQe=((e,t={})=>(t.locale??q())===`fr`?iQe(e):aQe(e)),sQe=()=>`Fixée par la passerelle pour un streaming complet.`,cQe=()=>`Pinned by the bridge for complete streaming.`,lQe=((e={},t={})=>(t.locale??q())===`fr`?sQe(e):cQe(e)),uQe=()=>`Coût / jetons`,dQe=()=>`Cost / tokens`,fQe=((e={},t={})=>(t.locale??q())===`fr`?uQe(e):dQe(e)),pQe=e=>`~${e?.cost} $ · ${e?.tokens} jetons`,mQe=e=>`~$${e?.cost} · ${e?.tokens} tokens`,hQe=((e,t={})=>(t.locale??q())===`fr`?pQe(e):mQe(e)),gQe=e=>`~${e?.cost} $`,_Qe=e=>`~$${e?.cost}`,vQe=((e,t={})=>(t.locale??q())===`fr`?gQe(e):_Qe(e)),yQe=e=>`${e?.tokens} jetons`,bQe=e=>`${e?.tokens} tokens`,xQe=((e,t={})=>(t.locale??q())===`fr`?yQe(e):bQe(e)),SQe=()=>`Compacter le contexte`,CQe=()=>`Compact the context`,wQe=((e={},t={})=>(t.locale??q())===`fr`?SQe(e):CQe(e)),TQe=()=>`Compacter le contexte ?`,EQe=()=>`Compact the context?`,DQe=((e={},t={})=>(t.locale??q())===`fr`?TQe(e):EQe(e)),OQe=()=>`L’agent résume la conversation pour libérer de l’espace dans la fenêtre de contexte. Les messages restent visibles ici.`,kQe=()=>`The agent summarizes the conversation to free space in the context window. Messages stay visible here.`,AQe=((e={},t={})=>(t.locale??q())===`fr`?OQe(e):kQe(e)),jQe=()=>`Compacter`,MQe=()=>`Compact`,NQe=((e={},t={})=>(t.locale??q())===`fr`?jQe(e):MQe(e)),PQe=()=>`Réinitialiser la session`,FQe=()=>`Reset the session`,IQe=((e={},t={})=>(t.locale??q())===`fr`?PQe(e):FQe(e)),LQe=()=>`Réinitialiser la session ?`,RQe=()=>`Reset the session?`,zQe=((e={},t={})=>(t.locale??q())===`fr`?LQe(e):RQe(e)),BQe=()=>`La session de l’agent repart à zéro et se réhydrate depuis la conversation au prochain message. Aucun message n’est supprimé.`,VQe=()=>`The agent session starts fresh and re-hydrates from the conversation on the next message. No message is deleted.`,HQe=((e={},t={})=>(t.locale??q())===`fr`?BQe(e):VQe(e)),UQe=()=>`Réinitialiser`,WQe=()=>`Reset`,GQe=((e={},t={})=>(t.locale??q())===`fr`?UQe(e):WQe(e)),KQe=()=>`Demande envoyée à l’agent.`,qQe=()=>`Request sent to the agent.`,JQe=((e={},t={})=>(t.locale??q())===`fr`?KQe(e):qQe(e)),YQe=()=>`Échec de l’action.`,XQe=()=>`Action failed.`,ZQe=((e={},t={})=>(t.locale??q())===`fr`?YQe(e):XQe(e)),QQe=()=>`Fichiers d’agent`,$Qe=()=>`Agent files`,e$e=((e={},t={})=>(t.locale??q())===`fr`?QQe(e):$Qe(e)),t$e=()=>`Fichiers de l’espace de travail de l’agent (règles, identité, outils). La jauge mesure l’usage du budget bootstrap par fichier ; l’écriture est réservée aux administrateurs et chaque écriture est auditée.`,n$e=()=>`The agent’s workspace files (rules, identity, tools). The gauge tracks each file’s bootstrap budget usage; writing is admin-only and every write is audited.`,r$e=((e={},t={})=>(t.locale??q())===`fr`?t$e(e):n$e(e)),i$e=()=>`Instance`,a$e=()=>`Instance`,YQ=((e={},t={})=>(t.locale??q())===`fr`?i$e(e):a$e(e)),o$e=()=>`Agent`,s$e=()=>`Agent`,c$e=((e={},t={})=>(t.locale??q())===`fr`?o$e(e):s$e(e)),l$e=()=>`Aucun agent disponible.`,u$e=()=>`No agent available.`,d$e=((e={},t={})=>(t.locale??q())===`fr`?l$e(e):u$e(e)),f$e=()=>`Aucun fichier.`,p$e=()=>`No files.`,m$e=((e={},t={})=>(t.locale??q())===`fr`?f$e(e):p$e(e)),h$e=()=>`Bridge injoignable — impossible de lister les fichiers.`,g$e=()=>`Bridge unreachable — cannot list the files.`,_$e=((e={},t={})=>(t.locale??q())===`fr`?h$e(e):g$e(e)),v$e=()=>`absent`,y$e=()=>`missing`,b$e=((e={},t={})=>(t.locale??q())===`fr`?v$e(e):y$e(e)),x$e=e=>`${e?.size} ko`,S$e=e=>`${e?.size} kB`,C$e=((e,t={})=>(t.locale??q())===`fr`?x$e(e):S$e(e)),w$e=e=>`${e?.pct} %`,T$e=e=>`${e?.pct}%`,E$e=((e,t={})=>(t.locale??q())===`fr`?w$e(e):T$e(e)),D$e=()=>`Proche de la limite bootstrap`,O$e=()=>`Near the bootstrap limit`,k$e=((e={},t={})=>(t.locale??q())===`fr`?D$e(e):O$e(e)),A$e=e=>`Budget total : ${e?.used} ko / ${e?.total} ko (${e?.pct} %)`,j$e=e=>`Total budget: ${e?.used} kB / ${e?.total} kB (${e?.pct}%)`,M$e=((e,t={})=>(t.locale??q())===`fr`?A$e(e):j$e(e)),N$e=()=>`Éditer`,P$e=()=>`Edit`,F$e=((e={},t={})=>(t.locale??q())===`fr`?N$e(e):P$e(e)),I$e=()=>`Consulter`,L$e=()=>`View`,R$e=((e={},t={})=>(t.locale??q())===`fr`?I$e(e):L$e(e)),z$e=e=>`${e?.name}`,B$e=e=>`${e?.name}`,XQ=((e,t={})=>(t.locale??q())===`fr`?z$e(e):B$e(e)),V$e=e=>`Agent ${e?.agent} · instance ${e?.instance}`,H$e=e=>`Agent ${e?.agent} · instance ${e?.instance}`,U$e=((e,t={})=>(t.locale??q())===`fr`?V$e(e):H$e(e)),W$e=()=>`lecture seule`,G$e=()=>`read-only`,K$e=((e={},t={})=>(t.locale??q())===`fr`?W$e(e):G$e(e)),q$e=()=>`Source markdown brute — l’aperçu rendu n’est pas disponible ici.`,J$e=()=>`Raw markdown source — a rendered preview is not available here.`,Y$e=((e={},t={})=>(t.locale??q())===`fr`?q$e(e):J$e(e)),X$e=e=>`${e?.count} / ${e?.max} caractères`,Z$e=e=>`${e?.count} / ${e?.max} characters`,Q$e=((e,t={})=>(t.locale??q())===`fr`?X$e(e):Z$e(e)),$$e=()=>`Enregistrer`,e1e=()=>`Save`,t1e=((e={},t={})=>(t.locale??q())===`fr`?$$e(e):e1e(e)),n1e=e=>`${e?.name} enregistré.`,r1e=e=>`${e?.name} saved.`,i1e=((e,t={})=>(t.locale??q())===`fr`?n1e(e):r1e(e)),a1e=()=>`Échec de l’enregistrement.`,o1e=()=>`Save failed.`,s1e=((e={},t={})=>(t.locale??q())===`fr`?a1e(e):o1e(e)),c1e=()=>`Impossible de charger le fichier.`,l1e=()=>`Could not load the file.`,u1e=((e={},t={})=>(t.locale??q())===`fr`?c1e(e):l1e(e)),d1e=()=>`Le fichier a changé depuis le chargement. Rechargez avant d’enregistrer (vos modifications sont conservées).`,f1e=()=>`The file changed since it was loaded. Reload before saving (your edits are kept).`,p1e=((e={},t={})=>(t.locale??q())===`fr`?d1e(e):f1e(e)),m1e=()=>`Recharger`,h1e=()=>`Reload`,g1e=((e={},t={})=>(t.locale??q())===`fr`?m1e(e):h1e(e)),_1e=e=>`Écrire ${e?.name} ?`,v1e=e=>`Write ${e?.name}?`,y1e=((e,t={})=>(t.locale??q())===`fr`?_1e(e):v1e(e)),b1e=e=>`Le fichier sera écrit sur l’agent ${e?.agent}. Une révision complète avant/après est conservée.`,x1e=e=>`The file will be written to agent ${e?.agent}. A full before/after revision is kept.`,S1e=((e,t={})=>(t.locale??q())===`fr`?b1e(e):x1e(e)),C1e=e=>`${e?.added} ligne(s) ajoutée(s) · ${e?.removed} ligne(s) retirée(s)`,w1e=e=>`${e?.added} line(s) added · ${e?.removed} line(s) removed`,T1e=((e,t={})=>(t.locale??q())===`fr`?C1e(e):w1e(e)),E1e=()=>`Ajoutées (extrait) :`,D1e=()=>`Added (sample):`,O1e=((e={},t={})=>(t.locale??q())===`fr`?E1e(e):D1e(e)),k1e=()=>`Retirées (extrait) :`,A1e=()=>`Removed (sample):`,j1e=((e={},t={})=>(t.locale??q())===`fr`?k1e(e):A1e(e)),M1e=()=>`Écrire le fichier`,N1e=()=>`Write the file`,P1e=((e={},t={})=>(t.locale??q())===`fr`?M1e(e):N1e(e)),F1e=()=>`Défauts de chat`,I1e=()=>`Chat defaults`,L1e=((e={},t={})=>(t.locale??q())===`fr`?F1e(e):I1e(e)),R1e=()=>`Réglages par défaut des nouvelles sessions de chat, lus depuis la configuration globale du gateway. Les réglages par chat et par agent restent prioritaires.`,z1e=()=>`Default settings for new chat sessions, read from the gateway’s global configuration. Per-chat and per-agent settings keep precedence.`,B1e=((e={},t={})=>(t.locale??q())===`fr`?R1e(e):z1e(e)),V1e=()=>`Réflexion par défaut`,H1e=()=>`Default thinking`,U1e=((e={},t={})=>(t.locale??q())===`fr`?V1e(e):H1e(e)),W1e=()=>`Niveau de raisonnement appliqué quand un chat ne définit pas le sien.`,G1e=()=>`Reasoning level applied when a chat does not set its own.`,K1e=((e={},t={})=>(t.locale??q())===`fr`?W1e(e):G1e(e)),q1e=()=>`Vitesse par défaut`,J1e=()=>`Default speed`,Y1e=((e={},t={})=>(t.locale??q())===`fr`?q1e(e):J1e(e)),X1e=()=>`Mode rapide ou standard appliqué quand un chat ne définit pas le sien.`,Z1e=()=>`Fast or standard mode applied when a chat does not set its own.`,Q1e=((e={},t={})=>(t.locale??q())===`fr`?X1e(e):Z1e(e)),$1e=()=>`Bridge injoignable — impossible de lire les défauts globaux.`,e0e=()=>`Bridge unreachable — cannot read the global defaults.`,t0e=((e={},t={})=>(t.locale??q())===`fr`?$1e(e):e0e(e)),n0e=()=>`Enregistrer`,r0e=()=>`Save`,i0e=((e={},t={})=>(t.locale??q())===`fr`?n0e(e):r0e(e)),a0e=()=>`Défauts globaux enregistrés.`,o0e=()=>`Global defaults saved.`,s0e=((e={},t={})=>(t.locale??q())===`fr`?a0e(e):o0e(e)),c0e=()=>`Échec de l’écriture des défauts globaux.`,l0e=()=>`Failed to write the global defaults.`,u0e=((e={},t={})=>(t.locale??q())===`fr`?c0e(e):l0e(e)),d0e=()=>`Ces valeurs sont écrites dans openclaw.json, la configuration globale de l’instance — elles s’appliquent à tous les utilisateurs.`,f0e=()=>`These values are written to openclaw.json, the instance’s global configuration — they apply to every user.`,p0e=((e={},t={})=>(t.locale??q())===`fr`?d0e(e):f0e(e)),m0e=()=>`Modifier les défauts globaux ?`,h0e=()=>`Change the global defaults?`,g0e=((e={},t={})=>(t.locale??q())===`fr`?m0e(e):h0e(e)),_0e=()=>`Cette écriture modifie openclaw.json pour toute l’instance : tous les chats qui héritent du défaut changeront de comportement.`,v0e=()=>`This write changes openclaw.json for the whole instance: every chat inheriting the default will change behavior.`,y0e=((e={},t={})=>(t.locale??q())===`fr`?_0e(e):v0e(e)),b0e=()=>`Modifier`,x0e=()=>`Change`,S0e=((e={},t={})=>(t.locale??q())===`fr`?b0e(e):x0e(e)),C0e=()=>`Compatibilité`,w0e=()=>`Compatibility`,T0e=((e={},t={})=>(t.locale??q())===`fr`?C0e(e):w0e(e)),E0e=()=>`Aucun relevé de compatibilité pour l’instant — le sondage tourne toutes les 5 minutes.`,D0e=()=>`No compatibility reading yet — the poll runs every 5 minutes.`,O0e=((e={},t={})=>(t.locale??q())===`fr`?E0e(e):D0e(e)),k0e=()=>`Protocole :`,A0e=()=>`Protocol:`,j0e=((e={},t={})=>(t.locale??q())===`fr`?k0e(e):A0e(e)),M0e=()=>`inconnue`,N0e=()=>`unknown`,ZQ=((e={},t={})=>(t.locale??q())===`fr`?M0e(e):N0e(e)),P0e=()=>`Dernier sondage en échec — affichage du dernier relevé valide.`,F0e=()=>`Last poll failed — showing the last good reading.`,I0e=((e={},t={})=>(t.locale??q())===`fr`?P0e(e):F0e(e)),L0e=()=>`Ce bridge ne publie pas de manifeste de compatibilité (version antérieure) — politique héritée : seuls le modèle et la réflexion sont proposés.`,R0e=()=>`This bridge does not publish a compatibility manifest (older version) — legacy policy: only model and reasoning are offered.`,z0e=((e={},t={})=>(t.locale??q())===`fr`?L0e(e):R0e(e)),B0e=()=>`OpenClaw supporté :`,V0e=()=>`OpenClaw supported:`,H0e=((e={},t={})=>(t.locale??q())===`fr`?B0e(e):V0e(e)),U0e=e=>`de ${e?.min} à ${e?.max} (validé)`,W0e=e=>`from ${e?.min} to ${e?.max} (validated)`,G0e=((e,t={})=>(t.locale??q())===`fr`?U0e(e):W0e(e)),K0e=()=>`1 version validée`,q0e=()=>`1 validated version`,J0e=((e={},t={})=>(t.locale??q())===`fr`?K0e(e):q0e(e)),Y0e=e=>`${e?.count} versions validées`,X0e=e=>`${e?.count} validated versions`,Z0e=((e,t={})=>(t.locale??q())===`fr`?Y0e(e):X0e(e)),Q0e=()=>`Validées au banc`,$0e=()=>`Bench-validated`,e2e=((e={},t={})=>(t.locale??q())===`fr`?Q0e(e):$0e(e)),t2e=()=>`Aucune connexion connue du relevé de compatibilité.`,n2e=()=>`No connection known to the compatibility reading.`,r2e=((e={},t={})=>(t.locale??q())===`fr`?t2e(e):n2e(e)),i2e=()=>`✓ dans le support`,a2e=()=>`✓ within support`,o2e=((e={},t={})=>(t.locale??q())===`fr`?i2e(e):a2e(e)),s2e=()=>`⚠ au-delà du validé`,c2e=()=>`⚠ beyond validated`,l2e=((e={},t={})=>(t.locale??q())===`fr`?s2e(e):c2e(e)),u2e=()=>`? inconnue`,d2e=()=>`? unknown`,f2e=((e={},t={})=>(t.locale??q())===`fr`?u2e(e):d2e(e)),p2e=()=>`Hermes : adaptateur à venir.`,m2e=()=>`Hermes: adapter coming.`,h2e=((e={},t={})=>(t.locale??q())===`fr`?p2e(e):m2e(e)),g2e=e=>`Non supporté par cette instance (version gateway ${e?.version}).`,_2e=e=>`Not supported by this instance (gateway version ${e?.version}).`,v2e=((e,t={})=>(t.locale??q())===`fr`?g2e(e):_2e(e)),y2e=()=>`Non supporté par cette instance (version gateway inconnue).`,b2e=()=>`Not supported by this instance (unknown gateway version).`,x2e=((e={},t={})=>(t.locale??q())===`fr`?y2e(e):b2e(e)),QQ=(0,N.createContext)({label:`Atrium`,logoUrl:null,logoMasked:!1,isDefault:!0,initials:`A`,agentName:null,agentEmoji:null});function $Q(){return(0,N.useContext)(QQ)}function S2e(e){return e.agentName??e.label}function C2e(e){return e.agentName?oq({name:e.agentName}):rq({name:e.label})}var w2e={user:ABe(),assistant:`OpenClaw`,system:NBe()},T2e=IBe();function e$(e){return new Date(e).toISOString().slice(0,16).replace(`T`,` `)+` UTC`}function t$(e){return e?e.filter(e=>e.kind===`file`||e.kind===`media`).map(e=>e.filename).filter(e=>typeof e==`string`&&e.length>0):[]}function E2e(e,t={}){let n=[];n.push(`# ${t.title?.trim()||TQ()}`),t.exportedAt!=null&&(n.push(``),n.push(`_${VBe({date:e$(t.exportedAt)})}_`)),t.truncated&&(n.push(``),n.push(T2e));for(let t of e){n.push(``),n.push(`## ${w2e[t.role]} · ${e$(t.createdAt)}`);let e=t.text.trim();e.length>0&&(n.push(``),n.push(e));for(let e of t$(t.parts))n.push(``),n.push(WBe({name:e}))}return n.join(`
|
|
128
128
|
`)+`
|
|
129
|
-
`}function
|
|
130
|
-
`}function E2e(e){return((e??``).trim()||`conversation`).toLowerCase().normalize(`NFD`).replace(/[̀-ͯ]/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,60)||`conversation`}function r$(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=r$(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function i$(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=r$(e))&&(r&&(r+=` `),r+=t);return r}var D2e=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},O2e=(e,t)=>({classGroupId:e,validator:t}),a$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),o$=`-`,s$=[],k2e=`arbitrary..`,A2e=e=>{let t=M2e(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return j2e(e);let n=e.split(o$);return c$(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?D2e(i,t):t:i||s$}return n[e]||s$}}},c$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=c$(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(o$):e.slice(t).join(o$),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},j2e=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?k2e+r:void 0})(),M2e=e=>{let{theme:t,classGroups:n}=e;return N2e(n,t)},N2e=(e,t)=>{let n=a$();for(let r in e){let i=e[r];l$(i,n,r,t)}return n},l$=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];P2e(i,t,n,r)}},P2e=(e,t,n,r)=>{if(typeof e==`string`){F2e(e,t,n);return}if(typeof e==`function`){I2e(e,t,n,r);return}L2e(e,t,n,r)},F2e=(e,t,n)=>{let r=e===``?t:u$(t,e);r.classGroupId=n},I2e=(e,t,n,r)=>{if(R2e(e)){l$(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(O2e(n,e))},L2e=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];l$(o,u$(t,a),n,r)}},u$=(e,t)=>{let n=e,r=t.split(o$),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=a$(),n.nextPart.set(t,i)),n=i}return n},R2e=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,z2e=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},d$=`!`,f$=`:`,B2e=[],p$=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),V2e=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===f$){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(d$)?(c=s.slice(0,-1),l=!0):s.startsWith(d$)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return p$(t,l,c,u)};if(t){let e=t+f$,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):p$(B2e,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},H2e=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},U2e=e=>({cache:z2e(e.cacheSize),parseClassName:V2e(e),sortModifiers:H2e(e),postfixLookupClassGroupIds:W2e(e),...A2e(e)}),W2e=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},G2e=/\s+/,K2e=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(G2e),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+d$:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},q2e=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=m$(n))&&(i&&(i+=` `),i+=r);return i},m$=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=m$(e[r]))&&(n&&(n+=` `),n+=t);return n},J2e=(e,...t)=>{let n,r,i,a,o=o=>(n=U2e(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=K2e(e,n);return i(e,a),a};return a=o,(...e)=>a(q2e(...e))},Y2e=[],h$=e=>{let t=t=>t[e]||Y2e;return t.isThemeGetter=!0,t},g$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,X2e=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Z2e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Q2e=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$2e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,e4e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t4e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,v$=e=>X2e.test(e),y$=e=>!!e&&!Number.isNaN(Number(e)),b$=e=>!!e&&Number.isInteger(Number(e)),x$=e=>e.endsWith(`%`)&&y$(e.slice(0,-1)),S$=e=>Z2e.test(e),C$=()=>!0,n4e=e=>Q2e.test(e)&&!$2e.test(e),w$=()=>!1,r4e=e=>e4e.test(e),i4e=e=>t4e.test(e),a4e=e=>!J(e)&&!Y(e),o4e=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),s4e=e=>M$(e,I$,w$),J=e=>g$.test(e),T$=e=>M$(e,L$,n4e),E$=e=>M$(e,h4e,y$),c4e=e=>M$(e,z$,C$),l4e=e=>M$(e,R$,w$),D$=e=>M$(e,P$,w$),u4e=e=>M$(e,F$,i4e),O$=e=>M$(e,B$,r4e),Y=e=>_$.test(e),k$=e=>N$(e,L$),d4e=e=>N$(e,R$),A$=e=>N$(e,P$),f4e=e=>N$(e,I$),p4e=e=>N$(e,F$),j$=e=>N$(e,B$,!0),m4e=e=>N$(e,z$,!0),M$=(e,t,n)=>{let r=g$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},N$=(e,t,n=!1)=>{let r=_$.exec(e);return r?r[1]?t(r[1]):n:!1},P$=e=>e===`position`||e===`percentage`,F$=e=>e===`image`||e===`url`,I$=e=>e===`length`||e===`size`||e===`bg-size`,L$=e=>e===`length`,h4e=e=>e===`number`,R$=e=>e===`family-name`,z$=e=>e===`number`||e===`weight`,B$=e=>e===`shadow`,g4e=J2e(()=>{let e=h$(`color`),t=h$(`font`),n=h$(`text`),r=h$(`font-weight`),i=h$(`tracking`),a=h$(`leading`),o=h$(`breakpoint`),s=h$(`container`),c=h$(`spacing`),l=h$(`radius`),u=h$(`shadow`),d=h$(`inset-shadow`),f=h$(`text-shadow`),p=h$(`drop-shadow`),m=h$(`blur`),h=h$(`perspective`),g=h$(`aspect`),_=h$(`ease`),v=h$(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,J,c],T=()=>[v$,`full`,`auto`,...w()],E=()=>[b$,`none`,`subgrid`,Y,J],D=()=>[`auto`,{span:[`full`,b$,Y,J]},b$,Y,J],O=()=>[b$,`auto`,Y,J],ee=()=>[`auto`,`min`,`max`,`fr`,Y,J],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[v$,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[v$,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[v$,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,Y,J],ie=()=>[...b(),A$,D$,{position:[Y,J]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,f4e,s4e,{size:[Y,J]}],se=()=>[x$,k$,T$],ce=()=>[``,`none`,`full`,l,Y,J],le=()=>[``,y$,k$,T$],ue=()=>[`solid`,`dashed`,`dotted`,`double`],de=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],fe=()=>[y$,x$,A$,D$],pe=()=>[``,`none`,m,Y,J],me=()=>[`none`,y$,Y,J],he=()=>[`none`,y$,Y,J],ge=()=>[y$,Y,J],_e=()=>[v$,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[S$],breakpoint:[S$],color:[C$],container:[S$],"drop-shadow":[S$],ease:[`in`,`out`,`in-out`],font:[a4e],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[S$],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[S$],shadow:[S$],spacing:[`px`,y$],text:[S$],"text-shadow":[S$],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,v$,J,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,J]}],"container-named":[o4e],columns:[{columns:[y$,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[b$,`auto`,Y,J]}],basis:[{basis:[v$,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[y$,v$,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,y$,Y,J]}],shrink:[{shrink:[``,y$,Y,J]}],order:[{order:[b$,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,...j()]}],"font-size":[{text:[`base`,n,k$,T$]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,m4e,c4e]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,x$,J]}],"font-family":[{font:[d4e,l4e,t]}],"font-features":[{"font-features":[J]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Y,J]}],"line-clamp":[{"line-clamp":[y$,`none`,Y,E$]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ue(),`wavy`]}],"text-decoration-thickness":[{decoration:[y$,`from-font`,`auto`,Y,T$]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[y$,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[b$,Y,J]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},b$,Y,J],radial:[``,Y,J],conic:[b$,Y,J]},p4e,u4e]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-bs":[{"border-bs":le()}],"border-w-be":[{"border-be":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":le()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ue(),`hidden`,`none`]}],"divide-style":[{divide:[...ue(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...ue(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[y$,Y,J]}],"outline-w":[{outline:[``,y$,k$,T$]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,j$,O$]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,j$,O$]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:le()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[y$,T$]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,j$,O$]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[y$,Y,J]}],"mix-blend":[{"mix-blend":[...de(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[y$]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[y$]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:pe()}],brightness:[{brightness:[y$,Y,J]}],contrast:[{contrast:[y$,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,j$,O$]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,y$,Y,J]}],"hue-rotate":[{"hue-rotate":[y$,Y,J]}],invert:[{invert:[``,y$,Y,J]}],saturate:[{saturate:[y$,Y,J]}],sepia:[{sepia:[``,y$,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[y$,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[y$,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,y$,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y$,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,y$,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[y$,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[y$,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,y$,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[y$,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[y$,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":[`scale-3d`],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":[`translate-none`],zoom:[{zoom:[b$,Y,J]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Y,J]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Y,J]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[y$,k$,T$,E$]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function V$(...e){return g4e(i$(e))}function H$(e){return(0,I.jsx)(nle,{"data-slot":`dropdown-menu`,...e})}function U$(e){return(0,I.jsx)(rle,{"data-slot":`dropdown-menu-trigger`,...e})}function W$({className:e,sideOffset:t=4,...n}){return(0,I.jsx)(ile,{children:(0,I.jsx)(ale,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:V$(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,e),...n})})}function G$({className:e,inset:t,variant:n=`default`,...r}){return(0,I.jsx)(sle,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:V$(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function K$({className:e,inset:t,...n}){return(0,I.jsx)(ole,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:V$(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function q$({className:e,...t}){return(0,I.jsx)(dle,{"data-slot":`dropdown-menu-separator`,className:V$(`bg-border -mx-1 my-1 h-px`,e),...t})}function _4e(e){return(0,I.jsx)(cle,{"data-slot":`dropdown-menu-radio-group`,...e})}function J$({className:e,children:t,...n}){return(0,I.jsxs)(lle,{"data-slot":`dropdown-menu-radio-item`,className:V$(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,I.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,I.jsx)(ule,{children:(0,I.jsx)(Cee,{className:`size-2 fill-current`})})}),t]})}function Y$({...e}){return(0,I.jsx)(CT,{"data-slot":`popover`,...e})}function X$({...e}){return(0,I.jsx)(wT,{"data-slot":`popover-trigger`,...e})}function Z$({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,I.jsx)(TT,{children:(0,I.jsx)(ET,{"data-slot":`popover-content`,align:t,sideOffset:n,className:V$(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...r})})}var Q$=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,$$=i$,e1=(e,t)=>n=>{if(t?.variants==null)return $$(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Q$(t)||Q$(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return $$(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},t1=e1(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function X({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,I.jsx)(r?Cy:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:V$(t1({variant:t,size:n,className:e})),...i})}function n1({className:e,type:t,...n}){return(0,I.jsx)(`input`,{type:t,"data-slot":`input`,className:V$(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function r1({...e}){return(0,I.jsx)(Wx,{"data-slot":`alert-dialog`,...e})}function v4e({...e}){return(0,I.jsx)(Gx,{"data-slot":`alert-dialog-portal`,...e})}function y4e({className:e,...t}){return(0,I.jsx)(Kx,{"data-slot":`alert-dialog-overlay`,className:V$(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function i1({className:e,...t}){return(0,I.jsxs)(v4e,{children:[(0,I.jsx)(y4e,{}),(0,I.jsx)(qx,{"data-slot":`alert-dialog-content`,className:V$(`fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-popover bg-clip-padding p-5 text-sm text-popover-foreground shadow-lg duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...t})]})}function a1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:V$(`flex flex-col gap-1.5`,e),...t})}function o1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:V$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function s1({className:e,...t}){return(0,I.jsx)(Xx,{"data-slot":`alert-dialog-title`,className:V$(`text-base font-medium text-foreground`,e),...t})}function c1({className:e,...t}){return(0,I.jsx)(Zx,{"data-slot":`alert-dialog-description`,className:V$(`text-sm text-muted-foreground`,e),...t})}function l1({className:e,...t}){return(0,I.jsx)(Jx,{className:V$(t1(),e),...t})}function u1({className:e,...t}){return(0,I.jsx)(Yx,{className:V$(t1({variant:`outline`}),e),...t})}function d1({...e}){return(0,I.jsx)(xx,{"data-slot":`dialog`,...e})}function b4e({...e}){return(0,I.jsx)(Sx,{"data-slot":`dialog-portal`,...e})}function x4e({className:e,...t}){return(0,I.jsx)(Cx,{"data-slot":`dialog-overlay`,className:V$(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function f1({className:e,children:t,showCloseButton:n=!0,...r}){return(0,I.jsxs)(b4e,{children:[(0,I.jsx)(x4e,{}),(0,I.jsxs)(wx,{"data-slot":`dialog-content`,className:V$(`fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-popover bg-clip-padding p-5 text-sm text-popover-foreground shadow-lg duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,I.jsx)(Dx,{"data-slot":`dialog-close`,asChild:!0,children:(0,I.jsxs)(X,{variant:`ghost`,size:`icon-sm`,className:`absolute top-3 right-3`,children:[(0,I.jsx)(Gm,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:WQ()})]})})]})]})}function p1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-header`,className:V$(`flex flex-col gap-1.5 pr-6`,e),...t})}function m1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-footer`,className:V$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function h1({className:e,...t}){return(0,I.jsx)(Tx,{"data-slot":`dialog-title`,className:V$(`text-base font-medium text-foreground`,e),...t})}function g1({className:e,...t}){return(0,I.jsx)(Ex,{"data-slot":`dialog-description`,className:V$(`text-sm text-muted-foreground`,e),...t})}var _1=N.createContext(null);function S4e({children:e}){let[t,n]=N.useState(null),r=N.useRef(null),i=N.useRef(null),[a,o]=N.useState(``),s=N.useCallback(e=>{let t=r.current;r.current=null,n(null),t&&t(e)},[]),c=N.useMemo(()=>({confirm:e=>new Promise(t=>{r.current=t,o(``),n({kind:`confirm`,opts:e})}),prompt:e=>new Promise(t=>{r.current=t,o(e.defaultValue??``),n({kind:`prompt`,opts:e})})}),[]),l=t?.kind===`confirm`,u=t?.kind===`prompt`,d=t?.kind===`confirm`?t.opts.confirmWord:void 0,f=!d||a.trim().toLowerCase()===d.trim().toLowerCase(),p=a.trim().length>0,m=e=>{e.preventDefault(),requestAnimationFrame(()=>i.current?.focus())};return(0,I.jsxs)(_1.Provider,{value:c,children:[e,(0,I.jsx)(r1,{open:l,onOpenChange:e=>{e||s(!1)},children:l?(0,I.jsxs)(i1,{onOpenAutoFocus:d?m:void 0,...t.opts.description?{}:{"aria-describedby":void 0},children:[(0,I.jsxs)(a1,{children:[(0,I.jsx)(s1,{children:t.opts.title}),t.opts.description?(0,I.jsx)(c1,{children:t.opts.description}):null]}),d?(0,I.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,I.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[`Pour confirmer, saisissez`,` `,(0,I.jsxs)(`span`,{className:`font-medium text-foreground`,children:[`« `,d,` »`]}),` `,`ci-dessous.`]}),(0,I.jsx)(n1,{ref:i,value:a,placeholder:d,autoComplete:`off`,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&f&&(e.preventDefault(),s(!0))}})]}):null,(0,I.jsxs)(o1,{children:[(0,I.jsx)(u1,{onClick:()=>s(!1),children:t.opts.cancelLabel??`Annuler`}),(0,I.jsx)(X,{variant:t.opts.destructive?`destructive`:`default`,disabled:!f,onClick:()=>s(!0),children:t.opts.confirmLabel??`Supprimer`})]})]}):null}),(0,I.jsx)(d1,{open:u,onOpenChange:e=>{e||s(null)},children:u?(0,I.jsxs)(f1,{onOpenAutoFocus:m,...t.opts.description?{}:{"aria-describedby":void 0},children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:t.opts.title}),t.opts.description?(0,I.jsx)(g1,{children:t.opts.description}):null]}),(0,I.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[t.opts.label?(0,I.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:t.opts.label}):null,(0,I.jsx)(n1,{ref:i,value:a,placeholder:t.opts.placeholder,autoComplete:`off`,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p&&(e.preventDefault(),s(a.trim()))}})]}),(0,I.jsxs)(m1,{children:[(0,I.jsx)(X,{variant:`outline`,onClick:()=>s(null),children:t.opts.cancelLabel??`Annuler`}),(0,I.jsx)(X,{disabled:!p,onClick:()=>s(a.trim()),children:t.opts.confirmLabel??`Valider`})]})]}):null})]})}function v1(){let e=N.useContext(_1);if(!e)throw Error(`useConfirm/usePrompt must be used within <DialogsProvider>`);return e}function y1(){return v1().confirm}function b1(){return v1().prompt}var x1=N.createContext(null),C4e=6e3;function S1(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return String(e)}catch{return`Erreur inconnue`}}function w4e({children:e}){let[t,n]=N.useState([]),r=N.useRef(0),i=N.useRef(new Map),a=N.useCallback(e=>{n(t=>t.filter(t=>t.id!==e));let t=i.current.get(e);t!==void 0&&(window.clearTimeout(t),i.current.delete(e))},[]),o=N.useCallback(e=>{let t=r.current++,o={id:t,variant:e.variant??`info`,title:e.title,description:e.description};n(e=>[...e,o]);let s=window.setTimeout(()=>a(t),C4e);i.current.set(t,s)},[a]);N.useEffect(()=>{let e=i.current;return()=>{for(let t of e.values())window.clearTimeout(t);e.clear()}},[]);let s=N.useMemo(()=>({toast:o,error:(e,t)=>o({variant:`error`,title:e,description:t===void 0?void 0:S1(t)}),success:(e,t)=>o({variant:`success`,title:e,description:t})}),[o]);return(0,I.jsxs)(x1.Provider,{value:s,children:[e,(0,I.jsx)(`div`,{className:`oc-toast__viewport`,role:`region`,"aria-label":`Notifications`,children:t.map(e=>(0,I.jsxs)(`div`,{className:V$(`oc-toast`,`oc-toast--${e.variant}`),role:e.variant===`error`?`alert`:`status`,children:[(0,I.jsxs)(`div`,{className:`oc-toast__body`,children:[(0,I.jsx)(`div`,{className:`oc-toast__title`,children:e.title}),e.description?(0,I.jsx)(`div`,{className:`oc-toast__desc`,children:e.description}):null]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-toast__close`,"aria-label":`Fermer`,onClick:()=>a(e.id),children:(0,I.jsx)(Gm,{"aria-hidden":!0})})]},e.id))})]})}function C1(){let e=N.useContext(x1);if(!e)throw Error(`useToast must be used within <ToastProvider>`);return e}function T4e(e){return e.kind===`tool`}function E4e(e){return e.kind===`media`}function D4e(e){return e.kind===`file`}function O4e(e){return e.kind===`reasoning`}var k4e=/---[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?=\.[^.]+$|$)/i;function A4e(e){return e.replace(k4e,``)}function j4e(e,t){let n=e.runId??`norun`;return`${e._id}:${n}:${t}`}function M4e(e,t,n){return{toolCallId:j4e(e,t),toolName:n.name,args:n.input??{},result:n.output,argsText:n.input===void 0?void 0:F4e(n.input),phase:typeof n.phase==`string`?n.phase:void 0}}function N4e(e){return e&&A4e(e)}function P4e(e){return e.url?{type:`file`,mimeType:e.mimeType,data:e.url,filename:N4e(e.filename)}:null}function F4e(e){try{return typeof e==`string`?e:JSON.stringify(e,null,2)}catch{return String(e)}}function I4e(e){let t=[],n=[],r=[];return e.parts.forEach((i,a)=>{O4e(i)?t.push({type:`reasoning`,text:i.text}):T4e(i)?n.push(M4e(e,a,i)):i.kind===`provenance`&&r.push(i)}),e.text&&e.text.length>0&&t.push({type:`text`,text:e.text}),e.parts.forEach(e=>{if(E4e(e)||D4e(e)){let n=P4e(e);n&&t.push(n)}}),t.length===0&&t.push({type:`text`,text:``}),{id:e._id,role:e.role,createdAt:new Date(e.updatedAt??e._creationTime),content:t,metadata:{custom:{messageId:e._id,chatId:e.chatId,status:e.status,runId:e.runId??null,error:e.error??null,toolParts:n,provenanceParts:r,attachedDocCount:e.attachedDocCount??0,rawText:e.text}}}}function L4e(e){return typeof e==`string`&&e.toLowerCase().startsWith(`image/`)}var R4e=128*1024;function z4e(e){let t=e-R4e;return t<=0?0:Math.floor(t/4)*3}function B4e(){return`att_${Math.random().toString(36).slice(2)}_${Date.now()}`}function V4e(e){if(!e)return[];let t=[];for(let n of e){let e=n.convex;e?.storageId&&t.push({storageId:e.storageId,filename:e.filename,mimeType:e.mimeType})}return t}function H4e(e,t,n){return{accept:`*`,async add({file:r}){let i=null;try{i=(await e.query(V.bridgeHealth.getBridgeAvailability,n?{chatId:n}:{}))?.maxInboundBytes??null}catch{}let a=i??z4e(26214400);if(n&&!L4e(r.type))try{let t=await e.query(V.bridge.getChatInboundPolicy,{chatId:n});t?.inboundMediaMode===`shared-fs`&&(a=t.sharedFsMaxBytes)}catch{}if(r.size>a){let e=e=>Math.floor(e/1024/1024),n=mfe({size:e(r.size),max:e(a)});throw t?.(n),Error(n)}return{id:B4e(),type:U4e(r.type),name:r.name,contentType:r.type||`application/octet-stream`,file:r,status:{type:`running`,reason:`uploading`,progress:0}}},async send(t){let n=t.file;AO.report(t.id,0,n.size||1);try{let r;try{r=await e.mutation(V.chats.generateUploadUrl,{})}catch(e){throw console.error(`[attach] generateUploadUrl failed:`,e),e}let i=await new Promise((e,i)=>{let a=new XMLHttpRequest;a.open(`POST`,r),a.setRequestHeader(`Content-Type`,n.type||`application/octet-stream`),a.upload.onprogress=e=>{e.lengthComputable&&AO.report(t.id,e.loaded,e.total)},a.onload=()=>{if(a.status>=200&&a.status<300)try{e(JSON.parse(a.responseText).storageId)}catch(e){i(e)}else i(Error(`Upload failed (${a.status})`))},a.onerror=()=>{console.error(`[attach] upload POST failed (network/CORS/CSP)`),i(Error(`Upload failed (network)`))},a.send(n)});return await e.mutation(V.uploads.registerUpload,{storageId:i}),{id:t.id,type:t.type,name:t.name,contentType:t.contentType,status:{type:`complete`},content:[{type:`text`,text:n.name}],convex:{storageId:i,filename:n.name,mimeType:n.type||`application/octet-stream`}}}finally{AO.clear(t.id)}},async remove(){}}}function U4e(e){return e.startsWith(`image/`)?`image`:`document`}function W4e({chatId:e}){let t=Zn(),n=C1(),r=F(V.send.sendMessage).withOptimisticUpdate((e,t)=>{let n={chatId:t.chatId},r=e.getQuery(V.messages.listByChat,n)??[],i=`optimistic-${t.clientMessageId}`;if(r.some(e=>e._id===i))return;let a=Date.now(),o={_id:i,chatId:t.chatId,_creationTime:a,role:`user`,status:`complete`,runId:void 0,error:void 0,errorCode:void 0,attachedDocCount:void 0,text:t.text,updatedAt:a,parts:[]};e.setQuery(V.messages.listByChat,n,[...r,o])}),i=P(V.messages.listByChat,e?{chatId:e}:`skip`),a=P(V.messages.getStreamingText,e?{chatId:e}:`skip`),o=(0,N.useMemo)(()=>H4e(t,e=>n.error(e),e),[t,n,e]),s=(0,N.useMemo)(()=>{let e=i??[];if(!a||a.length===0)return e;let t=new Map(a.map(e=>[e.messageId,e.text]));return e.map(e=>e.status===`streaming`&&t.has(e._id)?{...e,text:t.get(e._id)}:e)},[i,a]),c=s.length>0?s[s.length-1].role:null,l=s.some(e=>e.status===`streaming`),[u,d]=(0,N.useState)(null);(0,N.useEffect)(()=>{d(null)},[e]),(0,N.useEffect)(()=>{c===`assistant`&&d(null)},[c,s]),(0,N.useEffect)(()=>{if(u===null)return;let e=window.setTimeout(()=>d(null),12e4);return()=>window.clearTimeout(e)},[u]);let f=u!==null||l,p=(0,N.useMemo)(()=>({messages:s,isRunning:f,convertMessage:I4e,onNew:async t=>{if(!e)throw Error(`No chat selected`);let n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(``),i=V4e(t.attachments).map(e=>({storageId:e.storageId,filename:e.filename,mimeType:e.mimeType}));d(Date.now());try{await r({chatId:e,text:n,clientMessageId:crypto.randomUUID(),attachments:i})}catch(e){throw d(null),e}},adapters:{attachments:o}}),[s,f,e,r,o]),m=(0,N.useMemo)(()=>({begin:()=>d(Date.now()),cancel:()=>d(null)}),[]),h=(0,N.useCallback)(async t=>{let i=t.trim();if(!e||i===``)return!1;try{return await r({chatId:e,text:t,clientMessageId:crypto.randomUUID()}),!0}catch(e){return n.error(e?.message?.includes(`QUEUE_FULL`)?HJ():GJ()),!1}},[e,r,n]);return{runtime:hv(p),turnGate:m,queueSend:h}}function w1(e,{key:t,value:n}){let r=e.getQuery(V.me.getMe,{host:xO});if(!r?.ui)return;let i={...r.ui.effective},a={...r.ui.userOverrides},o=t,s=t;n===null?delete a[s]:(i[o]=n,a[s]=n),e.setQuery(V.me.getMe,{host:xO},{...r,ui:{...r.ui,effective:i,userOverrides:a}})}function G4e(e,{messageId:t}){for(let{args:n,value:r}of e.getAllQueries(V.messages.listByChat)){if(r===void 0)continue;let i=r.find(e=>e._id===t);if(i===void 0)continue;let a=i._creationTime;e.setQuery(V.messages.listByChat,n,r.filter(e=>e._creationTime<a))}}function K4e(e,t){if(e===void 0)return`thinking`;switch(e){case`streaming`:return t?`generating`:`thinking`;case`error`:return`error`;case`aborted`:return`aborted`;default:return null}}function q4e(e){return e?e.some(e=>e?.type===`text`&&typeof e.text==`string`&&e.text.trim().length>0):!1}var J4e={thinking:Pze,generating:Lze,error:Bze,aborted:Kze};function Y4e(e,t){let n=K4e(e,t);return n===null?null:{kind:n,label:J4e[n]()}}var X4e=q4e;function Z4e(e){return e===`stream_orphaned`?Uze():e}function Q4e(){let e=e$(),t=gy(e=>e.metadata?.custom?.status),n=gy(e=>e.metadata?.custom?.runId),r=gy(e=>e.metadata?.custom?.error),i=Y4e(t,gy(e=>X4e(e.content))),a=i?.kind===`thinking`,[o,s]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{if(!a){s(!1);return}let e=window.setTimeout(()=>s(!0),6e3);return()=>window.clearTimeout(e)},[a]),i?i.kind===`error`?(0,I.jsxs)(`div`,{className:`oc-error-card`,role:`alert`,title:n?`run ${n}`:void 0,children:[(0,I.jsx)(hm,{size:18,className:`oc-error-card__icon`,"aria-hidden":!0}),(0,I.jsxs)(`div`,{className:`oc-error-card__body`,children:[(0,I.jsx)(`span`,{className:`oc-error-card__title`,children:i.label}),r?(0,I.jsx)(`span`,{className:`oc-error-card__msg`,children:Z4e(r)}):null]})]}):(0,I.jsxs)(`div`,{className:`oc-run-status oc-run-status--${i.kind}`,role:`status`,title:n?`run ${n}`:void 0,children:[i.kind===`thinking`?(0,I.jsxs)(`span`,{className:`oc-dots`,"aria-hidden":!0,children:[(0,I.jsx)(`span`,{}),(0,I.jsx)(`span`,{}),(0,I.jsx)(`span`,{})]}):i.kind===`generating`?(0,I.jsx)(`span`,{className:`oc-run-status__pulse`,"aria-hidden":!0}):(0,I.jsx)(zee,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-run-status__label`,children:i.kind===`thinking`&&o?x2e(e):i.label})]}):null}var $4e=new Set([`status`,`exitCode`,`durationMs`]);function e3e(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function t3e(e){if(typeof e==`string`)return{kind:`text`,text:e};if(typeof e==`object`&&e&&!Array.isArray(e)){let t=e,n=Object.keys(t);if(typeof t.exitCode==`number`&&n.every(e=>$4e.has(e)))return{kind:`outcome`,status:typeof t.status==`string`?t.status:null,exitCode:t.exitCode,durationMs:typeof t.durationMs==`number`?t.durationMs:null}}return{kind:`json`,text:e3e(e)}}function n3e(e){let t=[(e.exitCode===null?e.status===`completed`:e.exitCode===0)?Jq():Zq()];return e.exitCode!==null&&t.push(eJ({code:e.exitCode})),e.durationMs!==null&&t.push(rJ({ms:e.durationMs})),t.join(` · `)}var r3e=new Set([`complete`,`error`,`aborted`]),i3e=new Set([`completed`,`error`]);function a3e(e,t){if(e.length===0)return!1;if(t===`streaming`)return!0;if(t!==void 0&&r3e.has(t))return!1;let n=e[e.length-1];return n.phase!==void 0&&i3e.has(n.phase)?!1:n.result===void 0||n.result===null}var o3e=[`command`,`query`,`url`,`path`,`pattern`,`file`,`cmd`,`prompt`];function s3e(e,t){let n=``;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;for(let e of o3e){let r=t[e];if(typeof r==`string`&&r.trim()){n=r;break}}}return n||=t??(typeof e==`string`?e:``),n.replace(/\s+/g,` `).trim()}function c3e(e,t){let n=e.length,r=n===1?Hq({count:n}):Gq({count:n});return{count:n,running:a3e(e,t),label:r}}function T1({text:e}){let[t,n]=(0,N.useState)(!1);return(0,I.jsx)(`button`,{type:`button`,className:`oc-copybtn`,title:`Copier`,"aria-label":`Copier le contenu`,onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:t?(0,I.jsx)(um,{size:13,"aria-hidden":!0}):(0,I.jsx)(_m,{size:13,"aria-hidden":!0})})}function l3e(e,t){let n=typeof e==`string`?e:void 0;return n===`error`?`error`:t||n===`completed`?`completed`:`running`}function u3e(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function d3e({toolName:e,args:t,argsText:n,result:r,status:i}){let a=r!=null,o=l3e(i?.type,a),s=n??u3e(t),c=s3e(t,n),l=a?t3e(r):null,u=o===`running`?Cm:o===`error`?hm:xee;return(0,I.jsxs)(`details`,{className:`oc-tool oc-tool--${o}`,children:[(0,I.jsxs)(`summary`,{className:`oc-tool__header`,children:[(0,I.jsx)(u,{className:`oc-tool__status${o===`running`?` oc-tool__status--spin`:``}`,size:14,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-tool__name`,children:e}),c?(0,I.jsx)(`span`,{className:`oc-tool__preview`,title:c,children:c}):null,(0,I.jsx)(`span`,{className:`oc-tool__phase`,children:o}),(0,I.jsx)(fm,{size:15,className:`oc-tool__chevron`,"aria-hidden":!0})]}),(0,I.jsxs)(`div`,{className:`oc-tool__body`,children:[s?(0,I.jsxs)(`details`,{className:`oc-tool__io`,children:[(0,I.jsx)(`summary`,{children:`input`}),(0,I.jsxs)(`div`,{className:`oc-tool__prewrap`,children:[(0,I.jsx)(`pre`,{className:`oc-tool__pre`,children:s}),(0,I.jsx)(T1,{text:s})]})]}):null,l&&l.kind===`outcome`?(0,I.jsxs)(`div`,{className:`oc-tool__outcome`,children:[(0,I.jsx)(`span`,{className:`oc-tool__outcome-label`,children:n3e(l)}),(0,I.jsx)(`span`,{className:`oc-tool__outcome-note`,children:oJ()})]}):l?(0,I.jsxs)(`details`,{className:`oc-tool__io`,open:!0,children:[(0,I.jsx)(`summary`,{children:`output`}),(0,I.jsxs)(`div`,{className:`oc-tool__prewrap`,children:[(0,I.jsx)(`pre`,{className:`oc-tool__pre`,children:l.text}),(0,I.jsx)(T1,{text:l.text})]})]}):null]})]})}function f3e(){let e=gy(e=>e.metadata?.custom?.toolParts),t=gy(e=>e.metadata?.custom?.status),[n,r]=(0,N.useState)(!1);if(!e||e.length===0)return null;let i=n,a=c3e(e,t);return(0,I.jsxs)(`div`,{className:`oc-toolact${i?` is-open`:``}`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-toolact__summary`,"aria-expanded":i,title:i?vJ():hJ(),onClick:()=>r(!i),children:[(0,I.jsx)(Wm,{size:13,className:`oc-toolact__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-toolact__label`,children:a.label}),a.running?(0,I.jsxs)(`span`,{className:`oc-toolact__state`,children:[(0,I.jsx)(Cm,{size:12,className:`oc-toolact__spin`,"aria-hidden":!0}),lJ()]}):(0,I.jsxs)(`span`,{className:`oc-toolact__state oc-toolact__state--done`,children:[(0,I.jsx)(um,{size:12,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-sr-only`,children:fJ()})]}),(0,I.jsx)(fm,{size:14,className:`oc-toolact__chevron`,"aria-hidden":!0})]}),i?(0,I.jsx)(`div`,{className:`oc-toolact__detail`,children:e.map(e=>(0,I.jsx)(d3e,{toolName:e.toolName,args:e.args,argsText:e.argsText,result:e.result,status:e.phase?{type:e.phase}:void 0},e.toolCallId))}):null]})}function E1({className:e,...t}){return(0,I.jsx)(sS,{"data-slot":`checkbox`,className:V$(`peer size-4 shrink-0 rounded-[4px] border border-input bg-background ring-offset-background transition-shadow outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground`,e),...t,children:(0,I.jsx)(lS,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current`,children:t.checked===`indeterminate`?(0,I.jsx)(Om,{className:`size-3.5`}):(0,I.jsx)(um,{className:`size-3.5`})})})}function D1(e,t){return t===`memory`?`memory`:e.context===!0||!e.file_name?`context`:`document`}function O1(e){let t={memory:0,documents:0,context:0};for(let n of e)for(let e of n.items){let r=D1(e,n.group);r===`memory`?t.memory+=1:r===`document`?t.documents+=1:t.context+=1}return t}function p3e(e){return e.memory+e.documents+e.context>0}function k1(e){let t=[];return e.memory>0&&t.push(e.memory===1?zW():HW({count:e.memory})),e.documents>0&&t.push(e.documents===1?GW():JW({count:e.documents})),e.context>0&&t.push(e.context===1?oG():lG({count:e.context})),t.join(` · `)}function A1(e){return e.file_name??e.id??e.type??vG()}function j1(e){let t=[];return e.type&&A1(e)!==e.type&&t.push(e.type),e.date&&t.push(e.date),e.collection&&t.push(e.collection),typeof e.score==`number`&&t.push(hG({score:e.score.toFixed(2)})),t}function M1(e,t){let n=[];return e.forEach((e,r)=>{e.group===t&&e.items.forEach((t,i)=>{n.push({key:`${e.pluginId}|${e.group}|${t.id??t.file_name??`?`}|${r}.${i}`,group:e.group,pluginId:e.pluginId,source:e.source,item:t})})}),n.sort((e,t)=>(t.item.score??0)-(e.item.score??0))}function N1(e,t){let n=t.trim().toLowerCase();return n===``?!0:[I1(e),e.item.text??``,...j1(e.item)].join(` `).toLowerCase().includes(n)}function P1(e){return D1(e.item,e.group)===`document`}function F1(e){return D1(e.item,e.group)===`context`}function I1(e){return F1(e)?fG():A1(e.item)}var L1=(0,N.createContext)(null),m3e=[];function h3e(){let e=gy(e=>e.metadata?.custom?.provenanceParts??m3e),t=gy(e=>e.metadata?.custom?.messageId),n=gy(e=>e.metadata?.custom?.attachedDocCount??0),r=(0,N.useContext)(L1),i=O1(e);if(e.length===0||!p3e(i))return null;let a=r?.activeMessageId===t&&t!==void 0;return(0,I.jsxs)(`button`,{type:`button`,className:`oc-sources-trigger${a?` is-active`:``}`,onClick:()=>t&&r?.openFor(t),"aria-haspopup":`dialog`,"aria-expanded":a,"aria-label":wG(),children:[(0,I.jsx)(bm,{size:13,className:`oc-sources-trigger__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-sources-trigger__label`,children:IW()}),(0,I.jsx)(`span`,{className:`oc-sources-trigger__counts`,children:k1(i)}),n>0?(0,I.jsxs)(`span`,{className:`oc-sources-trigger__attached`,title:GG({count:n}),children:[(0,I.jsx)(vm,{size:12,"aria-hidden":!0}),n]}):null,(0,I.jsx)(fm,{size:14,className:`oc-sources-trigger__chev`,"aria-hidden":!0})]})}function R1({messageId:e,onClose:t}){let n=P(V.messages.getProvenanceParts,{messageId:e}),r=(0,N.useMemo)(()=>n??[],[n]),i=P(V.agents.documentaryAvailable,{}),a=P(V.documentAttachments.getDocumentAttachments,{sourceMessageId:e}),o=F(V.documentAttachments.attachDocuments),s=C1(),c=(0,N.useMemo)(()=>{let e=new Map;for(let t of a??[])e.set(t.entryKey,t);return e},[a]),l=(a??[]).some(e=>e.status===`pending`),[u,d]=(0,N.useState)(``),[f,p]=(0,N.useState)(!1),[m,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(!1),[v,y]=(0,N.useState)(new Set);(0,N.useEffect)(()=>{d(``),p(!1),h(!1),_(!1),y(new Set)},[e]);let b=(0,N.useMemo)(()=>M1(r,`documents`).filter(e=>P1(e)&&N1(e,u)),[r,u]),x=(0,N.useMemo)(()=>M1(r,`documents`).filter(e=>F1(e)&&N1(e,u)),[r,u]),S=(0,N.useMemo)(()=>M1(r,`memory`).filter(e=>N1(e,u)),[r,u]),C=O1(r),w=e=>y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),T=(e,t)=>y(n=>{let r=new Set(n);for(let n of e)t?r.add(n):r.delete(n);return r}),E=(0,N.useMemo)(()=>M1(r,`documents`).filter(e=>P1(e)&&v.has(e.key)),[r,v]),D=i!=null&&E.length>0&&!l;async function O(){if(D)try{await o({sourceMessageId:e,items:E.map(e=>({entryKey:e.key,reference:A1(e.item)}))}),s.success(rK())}catch(e){let t=S1(e);t.includes(`fetch_in_flight`)?s.error(eK()):t.includes(`no_documentary_agent`)?s.error(ZG()):s.error(oK(),e)}}let ee=n===void 0;return(0,I.jsxs)(`div`,{className:`oc-sources-panel`,children:[(0,I.jsxs)(`div`,{className:`oc-sources-panel__head`,children:[(0,I.jsxs)(`div`,{className:`oc-sources-panel__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-sources-panel__title`,children:xG()}),(0,I.jsx)(`p`,{className:`oc-sources-panel__sub`,children:k1(C)})]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn`,onClick:t,"aria-label":wK(),title:wK(),children:(0,I.jsx)(Gm,{size:16,"aria-hidden":!0})})]}),(0,I.jsxs)(`div`,{className:`oc-sources-panel__search`,children:[(0,I.jsx)(Fm,{size:15,"aria-hidden":!0}),(0,I.jsx)(n1,{value:u,onChange:e=>d(e.target.value),placeholder:DG(),"aria-label":DG()})]}),(0,I.jsx)(`div`,{className:`oc-sources-panel__body`,children:ee?(0,I.jsx)(`p`,{className:`oc-sources-panel__empty`,children:(0,I.jsx)(Cm,{size:14,className:`oc-iconbtn__spin`,"aria-hidden":!0})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(z1,{icon:(0,I.jsx)(bm,{size:14,"aria-hidden":!0}),label:eG(),count:b.length,expanded:f,onToggle:()=>p(e=>!e),entries:b,selectable:!0,selected:v,onToggle1:w,onToggleAll:e=>T(b.map(e=>e.key),e),attachmentByKey:c}),(0,I.jsx)(z1,{icon:(0,I.jsx)(jm,{size:14,"aria-hidden":!0}),label:rG(),count:x.length,expanded:m,onToggle:()=>h(e=>!e),entries:x,selectable:!1,selected:v,onToggle1:w,onToggleAll:e=>T(x.map(e=>e.key),e),attachmentByKey:c}),(0,I.jsx)(z1,{icon:(0,I.jsx)(yee,{size:14,"aria-hidden":!0}),label:ZW(),count:S.length,expanded:g,onToggle:()=>_(e=>!e),entries:S,selectable:!1,selected:v,onToggle1:w,onToggleAll:e=>T(S.map(e=>e.key),e),attachmentByKey:c}),b.length===0&&x.length===0&&S.length===0?(0,I.jsx)(`p`,{className:`oc-sources-panel__empty`,children:AG()}):null]})}),E.length>0?(0,I.jsxs)(`div`,{className:`oc-sources-panel__actions`,children:[(0,I.jsxs)(`div`,{className:`oc-sources-panel__actrow`,children:[(0,I.jsx)(`span`,{className:`oc-sources-panel__selcount`,children:IG({count:E.length})}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,disabled:!D,onClick:()=>void O(),children:[l?(0,I.jsx)(Cm,{size:14,className:`oc-iconbtn__spin`,"aria-hidden":!0}):(0,I.jsx)(Ree,{size:14,"aria-hidden":!0}),zG()]})]}),(0,I.jsx)(`p`,{className:`oc-sources-panel__acthint`,children:i==null?ZG():l?eK():HG()})]}):null]})}function z1({icon:e,label:t,count:n,expanded:r,onToggle:i,entries:a,selectable:o,selected:s,onToggle1:c,onToggleAll:l,attachmentByKey:u}){if(n===0)return null;let d=a.every(e=>s.has(e.key));return(0,I.jsxs)(`section`,{className:`oc-srcsec${r?` is-open`:``}`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-srcsec__head`,"aria-expanded":r,onClick:i,children:[r?(0,I.jsx)(dm,{size:14,"aria-hidden":!0}):(0,I.jsx)(fm,{size:14,"aria-hidden":!0}),e,(0,I.jsx)(`span`,{className:`oc-srcsec__label`,children:t}),(0,I.jsx)(`span`,{className:`oc-srcsec__count`,children:n})]}),r?(0,I.jsxs)(`div`,{className:`oc-srcsec__body`,children:[o?(0,I.jsxs)(`label`,{className:`oc-srcsec__all`,children:[(0,I.jsx)(E1,{checked:d,onCheckedChange:e=>l(e===!0)}),(0,I.jsx)(`span`,{children:NG()})]}):null,a.map(e=>(0,I.jsx)(g3e,{entry:e,selectable:o,selected:s.has(e.key),onToggle:()=>c(e.key),attachment:u.get(e.key)},e.key))]}):null]})}function g3e({entry:e,selectable:t,selected:n,onToggle:r,attachment:i}){let[a,o]=(0,N.useState)(!1),s=(0,N.useRef)(null),[c,l]=(0,N.useState)(!1),{item:u}=e;(0,N.useEffect)(()=>{let e=s.current;if(!e)return;let t=()=>l(e.scrollHeight>e.clientHeight+1);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[u.text]);let d=j1(u),f=typeof u.score==`number`?Math.max(0,Math.min(1,u.score)):null,p=P1(e);return(0,I.jsxs)(`div`,{className:`oc-srccard${t&&n?` is-selected`:``}`,children:[t?(0,I.jsx)(`label`,{className:`oc-srccard__pick`,children:(0,I.jsx)(E1,{checked:n,onCheckedChange:r})}):null,(0,I.jsxs)(`div`,{className:`oc-srccard__body`,children:[(0,I.jsx)(`div`,{className:`oc-srccard__title`,children:I1(e)}),d.length>0||f!==null?(0,I.jsxs)(`div`,{className:`oc-srccard__meta`,children:[d.map(e=>(0,I.jsx)(`span`,{className:`oc-srccard__chip`,children:e},e)),f===null?null:(0,I.jsx)(`span`,{className:`oc-srccard__relev`,title:hG({score:f.toFixed(2)}),children:(0,I.jsx)(`span`,{className:`oc-srccard__relev-track`,"aria-hidden":!0,children:(0,I.jsx)(`span`,{className:`oc-srccard__relev-fill`,style:{width:`${Math.round(f*100)}%`}})})})]}):null,u.text?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`blockquote`,{ref:s,className:`oc-srccard__excerpt${a?` is-full`:``}`,children:u.text}),c||a?(0,I.jsx)(`button`,{type:`button`,className:`oc-srccard__more`,onClick:()=>o(e=>!e),children:a?xK():vK()}):null]}):null,p?(0,I.jsx)(_3e,{attachment:i}):null]})]})}function _3e({attachment:e}){if(e?.status===`ready`&&e.url){let t=e.filename??fK();return(0,I.jsxs)(`a`,{className:`oc-srccard__origin oc-srccard__origin--ready`,href:e.url,download:e.filename??void 0,target:`_blank`,rel:`noreferrer`,title:fK(),children:[(0,I.jsx)(vm,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-srccard__origin-name`,children:t})]})}return e?.status===`pending`?(0,I.jsxs)(`div`,{className:`oc-srccard__origin oc-srccard__origin--pending`,children:[(0,I.jsx)(Cm,{size:13,"aria-hidden":!0}),lK()]}):e?.status===`not_found`||e?.status===`failed`?(0,I.jsxs)(`div`,{className:`oc-srccard__origin oc-srccard__origin--missing`,"aria-disabled":!0,children:[(0,I.jsx)(Gm,{size:13,"aria-hidden":!0}),hK()]}):(0,I.jsxs)(`div`,{className:`oc-srccard__origin`,"aria-disabled":!0,children:[(0,I.jsx)(vm,{size:13,"aria-hidden":!0}),JG()]})}var v3e=`oc.sidebar.width`,B1=`oc.sidebar.collapsed`,V1=200,H1=520,y3e=260,U1=`(max-width: 767px)`;function W1(){let[e,t]=(0,N.useState)(()=>typeof window<`u`&&window.matchMedia(U1).matches);return(0,N.useEffect)(()=>{let e=window.matchMedia(U1),n=e=>t(e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}function G1(e){let{storageKey:t,defaultWidth:n,min:r,max:i,edge:a}=e,o=(0,N.useCallback)(e=>Math.min(i,Math.max(r,e)),[r,i]),[s,c]=(0,N.useState)(()=>{let e=Number(localStorage.getItem(t));return e?Math.min(i,Math.max(r,e)):n});(0,N.useEffect)(()=>{localStorage.setItem(t,String(s))},[t,s]);let l=(0,N.useRef)(!1);return{width:s,startResize:(0,N.useCallback)(e=>{e.preventDefault(),l.current=!0;let t=e.clientX,n=s,r=a===`left`?1:-1,i=e=>{l.current&&c(o(n+r*(e.clientX-t)))},u=()=>{l.current=!1,window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,u),document.body.style.cursor=``,document.body.style.userSelect=``};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,u),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[s,a,o]),setWidth:c}}function b3e(){let{width:e,startResize:t}=G1({storageKey:v3e,defaultWidth:y3e,min:V1,max:H1,edge:`left`}),[n,r]=(0,N.useState)(()=>localStorage.getItem(B1)===`1`),i=W1();return(0,N.useEffect)(()=>{localStorage.setItem(B1,n?`1`:`0`)},[n]),(0,N.useEffect)(()=>{i&&r(!0)},[i]),{width:e,collapsed:n,toggleCollapsed:(0,N.useCallback)(()=>r(e=>!e),[]),collapse:(0,N.useCallback)(()=>r(!0),[]),startResize:t,isMobile:i,MIN_WIDTH:V1,MAX_WIDTH:H1}}function K1({...e}){return(0,I.jsx)(xx,{"data-slot":`sheet`,...e})}function x3e({...e}){return(0,I.jsx)(Sx,{"data-slot":`sheet-portal`,...e})}function S3e({className:e,...t}){return(0,I.jsx)(Cx,{"data-slot":`sheet-overlay`,className:V$(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function q1({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,I.jsxs)(x3e,{children:[(0,I.jsx)(S3e,{}),(0,I.jsxs)(wx,{"data-slot":`sheet-content`,"data-side":n,className:V$(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...i,children:[t,r&&(0,I.jsx)(Dx,{"data-slot":`sheet-close`,asChild:!0,children:(0,I.jsxs)(X,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,I.jsx)(Gm,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:WQ()})]})})]})]})}function J1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sheet-header`,className:V$(`flex flex-col gap-0.5 p-4`,e),...t})}function Y1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sheet-footer`,className:V$(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function X1({className:e,...t}){return(0,I.jsx)(Tx,{"data-slot":`sheet-title`,className:V$(`font-heading text-base font-medium text-foreground`,e),...t})}function Z1({className:e,...t}){return(0,I.jsx)(Ex,{"data-slot":`sheet-description`,className:V$(`text-sm text-muted-foreground`,e),...t})}function C3e({mimeType:e,data:t,filename:n}){let r=e??``,i=t??``,a=n??`attachment`;return i?r.startsWith(`audio/`)?(0,I.jsxs)(`div`,{className:`oc-media oc-media--audio`,children:[(0,I.jsx)(`audio`,{controls:!0,preload:`metadata`,src:i,className:`oc-media__audio`,children:(0,I.jsx)(`a`,{href:i,download:a,children:`Download audio`})}),(0,I.jsx)(`span`,{className:`oc-media__name`,children:a})]}):r.startsWith(`image/`)?(0,I.jsxs)(`figure`,{className:`oc-media oc-media--image`,children:[(0,I.jsx)(`img`,{src:i,alt:a,className:`oc-media__img`,loading:`lazy`}),(0,I.jsx)(`figcaption`,{className:`oc-media__name`,children:a})]}):r.startsWith(`video/`)?(0,I.jsxs)(`div`,{className:`oc-media oc-media--video`,children:[(0,I.jsx)(`video`,{controls:!0,preload:`metadata`,src:i,className:`oc-media__video`}),(0,I.jsx)(`span`,{className:`oc-media__name`,children:a})]}):(0,I.jsxs)(`a`,{className:`oc-media oc-media--file`,href:i,target:`_blank`,rel:`noopener noreferrer`,children:[(0,I.jsx)(`span`,{className:`oc-media__icon`,"aria-hidden":!0,children:`⬇`}),(0,I.jsx)(`span`,{className:`oc-media__name`,children:a})]}):null}var w3e=(e,t)=>typeof e==`string`?e===t:JSON.stringify(e)===JSON.stringify(t),T3e=(e,t)=>{if(!e||!t)return!1;let n=e=>{let{position:t,data:n,...r}=e||{};return r};return JSON.stringify(n(e.properties))===JSON.stringify(n(t.properties))&&w3e(e.children,t.children)},Q1=(e,t)=>T3e(e.node,t.node),$1=(0,N.createContext)(null),E3e=()=>(0,N.useContext)($1)!==null,D3e=(0,N.memo)(({children:e,...t})=>(0,I.jsx)($1.Provider,{value:t,children:e}),Q1),O3e=({node:e,...t})=>(0,I.jsx)(`pre`,{...t}),k3e=({node:e,...t})=>(0,I.jsx)(`code`,{...t}),e0=({node:e,components:{Pre:t,Code:n},code:r})=>(0,I.jsx)(t,{children:(0,I.jsx)(n,{node:e,children:r})}),A3e=()=>null,j3e=({node:e,components:{Pre:t,Code:n,SyntaxHighlighter:r,CodeHeader:i},language:a,code:o})=>{let s=(0,N.useMemo)(()=>({Pre:t,Code:n}),[t,n]);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(i,{node:e,language:a,code:o}),(0,I.jsx)(a?r:e0,{node:e,components:s,language:a??`unknown`,code:o})]})},t0=u(o(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()}))(),1),n0=({className:e,...t})=>({className:n,...r})=>({className:(0,t0.default)(e,n),...t,...r}),M3e=({node:e,components:{Pre:t,Code:n,SyntaxHighlighter:r,CodeHeader:i},componentsByLanguage:a={},children:o,...s})=>{let c=n0((0,N.useContext)($1)),l=Py(e=>(0,I.jsx)(t,{...c(e)})),u=n0(s),d=Py(e=>(0,I.jsx)(n,{...u(e)})),f=/language-(\w+)/.exec(s.className||``)?.[1]??``;return typeof o==`string`?(0,I.jsx)(j3e,{node:e,components:{Pre:l,Code:d,SyntaxHighlighter:a[f]?.SyntaxHighlighter??r,CodeHeader:a[f]?.CodeHeader??i},language:f||`unknown`,code:o}):(0,I.jsx)(e0,{node:e,components:{Pre:l,Code:d},code:o})},N3e=(0,N.memo)(({node:e,components:t,componentsByLanguage:n,...r})=>E3e()?(0,I.jsx)(M3e,{node:e,components:t,componentsByLanguage:n,...r}):(0,I.jsx)(t.Code,{...r}),(e,t)=>e.components===t.components&&e.componentsByLanguage===t.componentsByLanguage&&Q1(e,t));function P3e(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var F3e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,I3e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,L3e={};function r0(e,t){return((t||L3e).jsx?I3e:F3e).test(e)}var R3e=/[ \t\n\f\r]/g;function z3e(e){return typeof e==`object`?e.type===`text`?i0(e.value):!1:i0(e)}function i0(e){return e.replace(R3e,``)===``}var a0=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};a0.prototype.normal={},a0.prototype.property={},a0.prototype.space=void 0;function o0(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new a0(n,r,t)}function s0(e){return e.toLowerCase()}var c0=class{constructor(e,t){this.attribute=t,this.property=e}};c0.prototype.attribute=``,c0.prototype.booleanish=!1,c0.prototype.boolean=!1,c0.prototype.commaOrSpaceSeparated=!1,c0.prototype.commaSeparated=!1,c0.prototype.defined=!1,c0.prototype.mustUseProperty=!1,c0.prototype.number=!1,c0.prototype.overloadedBoolean=!1,c0.prototype.property=``,c0.prototype.spaceSeparated=!1,c0.prototype.space=void 0;var l0=s({boolean:()=>u0,booleanish:()=>d0,commaOrSpaceSeparated:()=>h0,commaSeparated:()=>m0,number:()=>Z,overloadedBoolean:()=>f0,spaceSeparated:()=>p0}),B3e=0,u0=g0(),d0=g0(),f0=g0(),Z=g0(),p0=g0(),m0=g0(),h0=g0();function g0(){return 2**++B3e}var _0=Object.keys(l0),v0=class extends c0{constructor(e,t,n,r){let i=-1;if(super(e,t),y0(this,`space`,r),typeof n==`number`)for(;++i<_0.length;){let e=_0[i];y0(this,_0[i],(n&l0[e])===l0[e])}}};v0.prototype.defined=!0;function y0(e,t,n){n&&(e[t]=n)}function b0(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new v0(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[s0(r)]=r,n[s0(a.attribute)]=r}return new a0(t,n,e.space)}var x0=b0({properties:{ariaActiveDescendant:null,ariaAtomic:d0,ariaAutoComplete:null,ariaBusy:d0,ariaChecked:d0,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:p0,ariaCurrent:null,ariaDescribedBy:p0,ariaDetails:null,ariaDisabled:d0,ariaDropEffect:p0,ariaErrorMessage:null,ariaExpanded:d0,ariaFlowTo:p0,ariaGrabbed:d0,ariaHasPopup:null,ariaHidden:d0,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:p0,ariaLevel:Z,ariaLive:null,ariaModal:d0,ariaMultiLine:d0,ariaMultiSelectable:d0,ariaOrientation:null,ariaOwns:p0,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:d0,ariaReadOnly:d0,ariaRelevant:null,ariaRequired:d0,ariaRoleDescription:p0,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:d0,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function S0(e,t){return t in e?e[t]:t}function C0(e,t){return S0(e,t.toLowerCase())}var V3e=b0({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:m0,acceptCharset:p0,accessKey:p0,action:null,allow:null,allowFullScreen:u0,allowPaymentRequest:u0,allowUserMedia:u0,alpha:u0,alt:null,as:null,async:u0,autoCapitalize:null,autoComplete:p0,autoFocus:u0,autoPlay:u0,blocking:p0,capture:null,charSet:null,checked:u0,cite:null,className:p0,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:d0,controls:u0,controlsList:p0,coords:Z|m0,crossOrigin:null,data:null,dateTime:null,decoding:null,default:u0,defer:u0,dir:null,dirName:null,disabled:u0,download:f0,draggable:d0,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:u0,formTarget:null,headers:p0,height:Z,hidden:f0,high:Z,href:null,hrefLang:null,htmlFor:p0,httpEquiv:p0,id:null,imageSizes:null,imageSrcSet:null,inert:u0,inputMode:null,integrity:null,is:null,isMap:u0,itemId:null,itemProp:p0,itemRef:p0,itemScope:u0,itemType:p0,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:u0,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:u0,muted:u0,name:null,nonce:null,noModule:u0,noValidate:u0,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:u0,optimum:Z,pattern:null,ping:p0,placeholder:null,playsInline:u0,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:u0,referrerPolicy:null,rel:p0,required:u0,reversed:u0,rows:Z,rowSpan:Z,sandbox:p0,scope:null,scoped:u0,seamless:u0,selected:u0,shadowRootClonable:u0,shadowRootCustomElementRegistry:u0,shadowRootDelegatesFocus:u0,shadowRootMode:null,shadowRootSerializable:u0,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:d0,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:u0,useMap:null,value:d0,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:p0,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:u0,declare:u0,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:u0,noHref:u0,noShade:u0,noWrap:u0,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:d0,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:u0,disablePictureInPicture:u0,disableRemotePlayback:u0,exportParts:m0,part:p0,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:C0}),H3e=b0({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:h0,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:p0,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:u0,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:m0,g2:m0,glyphName:m0,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:h0,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:p0,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:h0,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:h0,rev:h0,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:h0,requiredFeatures:h0,requiredFonts:h0,requiredFormats:h0,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:h0,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:h0,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:h0,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:S0}),w0=b0({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),T0=b0({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:C0}),E0=b0({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),U3e={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},W3e=/[A-Z]/g,D0=/-[a-z]/g,G3e=/^data[-\w.:]+$/i;function K3e(e,t){let n=s0(t),r=t,i=c0;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&G3e.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(D0,J3e);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!D0.test(e)){let n=e.replace(W3e,q3e);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=v0}return new i(r,t)}function q3e(e){return`-`+e.toLowerCase()}function J3e(e){return e.charAt(1).toUpperCase()}var Y3e=o0([x0,V3e,w0,T0,E0],`html`),O0=o0([x0,H3e,w0,T0,E0],`svg`);function X3e(e){return e.join(` `).trim()}var Z3e=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
131
|
-
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Q3e=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Z3e());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),$3e=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),e6e=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Q3e()),r=$3e();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),k0=j0(`end`),A0=j0(`start`);function j0(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function t6e(e){let t=A0(e),n=k0(e);if(t&&n)return{start:t,end:n}}function M0(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?P0(e.position):`start`in e||`end`in e?P0(e):`line`in e||`column`in e?N0(e):``}function N0(e){return F0(e&&e.line)+`:`+F0(e&&e.column)}function P0(e){return N0(e&&e.start)+`-`+N0(e&&e.end)}function F0(e){return e&&typeof e==`number`?e:1}var I0=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=M0(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};I0.prototype.file=``,I0.prototype.name=``,I0.prototype.reason=``,I0.prototype.message=``,I0.prototype.stack=``,I0.prototype.column=void 0,I0.prototype.line=void 0,I0.prototype.ancestors=void 0,I0.prototype.cause=void 0,I0.prototype.fatal=void 0,I0.prototype.place=void 0,I0.prototype.ruleId=void 0,I0.prototype.source=void 0;var n6e=u(e6e(),1),L0={}.hasOwnProperty,r6e=new Map,i6e=/[A-Z]/g,a6e=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),o6e=new Set([`td`,`th`]);function s6e(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=h6e(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=m6e(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?O0:Y3e,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=R0(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function R0(e,t,n){if(t.type===`element`)return c6e(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return l6e(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return d6e(e,t,n);if(t.type===`mdxjsEsm`)return u6e(e,t);if(t.type===`root`)return f6e(e,t,n);if(t.type===`text`)return p6e(e,t)}function c6e(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=O0,e.schema=i),e.ancestors.push(t);let a=H0(e,t.tagName,!1),o=g6e(e,t),s=V0(e,t);return a6e.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!z3e(e):!0})),z0(e,o,a,t),B0(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function l6e(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}U0(e,t.position)}function u6e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);U0(e,t.position)}function d6e(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=O0,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:H0(e,t.name,!0),o=_6e(e,t),s=V0(e,t);return z0(e,o,a,t),B0(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function f6e(e,t,n){let r={};return B0(r,V0(e,t)),e.create(t,e.Fragment,r,n)}function p6e(e,t){return t.value}function z0(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function B0(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function m6e(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function h6e(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=A0(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function g6e(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&L0.call(t.properties,i)){let a=v6e(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&o6e.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function _6e(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else U0(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else U0(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function V0(e,t){let n=[],r=-1,i=e.passKeys?new Map:r6e;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=R0(e,a,o);s!==void 0&&n.push(s)}return n}function v6e(e,t,n){let r=K3e(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?P3e(n):X3e(n)),r.property===`style`){let t=typeof n==`object`?n:y6e(e,String(n));return e.stylePropertyNameCase===`css`&&(t=b6e(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?U3e[r.property]||r.property:r.attribute,n]}}function y6e(e,t){try{return(0,n6e.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new I0("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function H0(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=r0(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=r0(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return L0.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);U0(e)}function U0(e,t){let n=new I0("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function b6e(e){let t={},n;for(n in e)L0.call(e,n)&&(t[x6e(n)]=e[n]);return t}function x6e(e){let t=e.replace(i6e,S6e);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function S6e(e){return`-`+e.toLowerCase()}var W0={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},C6e={};function G0(e,t){let n=t||C6e;return K0(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function K0(e,t,n){if(w6e(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return q0(e.children,t,n)}return Array.isArray(e)?q0(e,t,n):``}function q0(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=K0(e[i],t,n);return r.join(``)}function w6e(e){return!!(e&&typeof e==`object`)}var J0=document.createElement(`i`);function Y0(e){let t=`&`+e+`;`;J0.innerHTML=t;let n=J0.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function X0(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Z0(e,t){return e.length>0?(X0(e,e.length,0,t),e):t}var Q0={}.hasOwnProperty;function $0(e){let t={},n=-1;for(;++n<e.length;)T6e(t,e[n]);return t}function T6e(e,t){let n;for(n in t){let r=(Q0.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Q0.call(r,a)||(r[a]=[]);let e=i[a];E6e(r[a],Array.isArray(e)?e:e?[e]:[])}}}function E6e(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);X0(e,0,0,r)}function e2(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function t2(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var n2=d2(/[A-Za-z]/),r2=d2(/[\dA-Za-z]/),D6e=d2(/[#-'*+\--9=?A-Z^-~]/);function i2(e){return e!==null&&(e<32||e===127)}var a2=d2(/\d/),O6e=d2(/[\dA-Fa-f]/),k6e=d2(/[!-/:-@[-`{-~]/);function o2(e){return e!==null&&e<-2}function s2(e){return e!==null&&(e<0||e===32)}function c2(e){return e===-2||e===-1||e===32}var l2=d2(/\p{P}|\p{S}/u),u2=d2(/\s/);function d2(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function f2(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&r2(e.charCodeAt(n+1))&&r2(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function p2(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return c2(r)?(e.enter(n),s(r)):t(r)}function s(r){return c2(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var A6e={tokenize:j6e};function j6e(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),p2(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return o2(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var M6e={tokenize:N6e},m2={tokenize:P6e};function N6e(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return X0(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(m2,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(m2,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return o2(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;X0(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function P6e(e,t,n){return p2(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function h2(e){if(e===null||s2(e)||u2(e))return 1;if(l2(e))return 2}function g2(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var _2={name:`attention`,resolveAll:F6e,tokenize:I6e};function F6e(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};v2(d,-c),v2(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Z0(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Z0(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Z0(l,g2(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Z0(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Z0(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,X0(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function I6e(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=h2(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=h2(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function v2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var L6e={name:`autolink`,tokenize:R6e};function R6e(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return n2(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||r2(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||r2(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||i2(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):D6e(t)?(e.consume(t),l):n(t)}function u(e){return r2(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||r2(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var y2={partial:!0,tokenize:z6e};function z6e(e,t,n){return r;function r(t){return c2(t)?p2(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||o2(e)?t(e):n(e)}}var b2={continuation:{tokenize:V6e},exit:H6e,name:`blockQuote`,tokenize:B6e};function B6e(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return c2(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function V6e(e,t,n){let r=this;return i;function i(t){return c2(t)?p2(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(b2,t,n)(r)}}function H6e(e){e.exit(`blockQuote`)}var x2={name:`characterEscape`,tokenize:U6e};function U6e(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return k6e(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var S2={name:`characterReference`,tokenize:W6e};function W6e(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=r2,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=O6e,u):(e.enter(`characterReferenceValue`),a=7,o=a2,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===r2&&!Y0(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var C2={partial:!0,tokenize:K6e},w2={concrete:!0,name:`codeFenced`,tokenize:G6e};function G6e(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),c2(t)?p2(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||o2(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(C2,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||o2(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):c2(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),p2(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||o2(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||o2(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&c2(t)?p2(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||o2(t)?e.check(C2,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||o2(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),c2(t)?p2(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),c2(t)?p2(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||o2(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function K6e(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var T2={name:`codeIndented`,tokenize:J6e},q6e={partial:!0,tokenize:Y6e};function J6e(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),p2(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):o2(t)?e.attempt(q6e,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||o2(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Y6e(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):o2(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):p2(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):o2(e)?i(e):n(e)}}var X6e={name:`codeText`,previous:Q6e,resolve:Z6e,tokenize:$6e};function Z6e(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Q6e(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function $6e(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):o2(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||o2(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var e8e=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&E2(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),E2(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),E2(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);E2(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);E2(this.left,t.reverse())}}};function E2(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function D2(e){let t={},n=-1,r,i,a,o,s,c,l,u=new e8e(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,t8e(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return X0(e,0,1/0,u.slice(0)),!l}function t8e(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var n8e={resolve:i8e,tokenize:a8e},r8e={partial:!0,tokenize:o8e};function i8e(e){return D2(e),e}function a8e(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):o2(t)?e.check(r8e,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function o8e(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p2(e,a,`linePrefix`)}function a(i){if(i===null||o2(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function O2(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||i2(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||o2(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||s2(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||i2(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function k2(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):o2(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||o2(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!c2(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function A2(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):o2(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p2(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||o2(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function j2(e,t){let n;return r;function r(i){return o2(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):c2(i)?p2(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var s8e={name:`definition`,tokenize:l8e},c8e={partial:!0,tokenize:u8e};function l8e(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return k2.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=t2(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return s2(t)?j2(e,l)(t):l(t)}function l(t){return O2(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(c8e,d,d)(t)}function d(t){return c2(t)?p2(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||o2(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function u8e(e,t,n){return r;function r(t){return s2(t)?j2(e,i)(t):n(t)}function i(t){return A2(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return c2(t)?p2(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||o2(e)?t(e):n(e)}}var d8e={name:`hardBreakEscape`,tokenize:f8e};function f8e(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return o2(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var p8e={name:`headingAtx`,resolve:m8e,tokenize:h8e};function m8e(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},X0(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function h8e(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||s2(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||o2(n)?(e.exit(`atxHeading`),t(n)):c2(n)?p2(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||s2(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var g8e=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),M2=[`pre`,`script`,`style`,`textarea`],_8e={concrete:!0,name:`htmlFlow`,resolveTo:b8e,tokenize:x8e},v8e={partial:!0,tokenize:C8e},y8e={partial:!0,tokenize:S8e};function b8e(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function x8e(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:M):n2(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):n2(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return n2(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||s2(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&M2.includes(l)?(i=1,r.interrupt?t(s):O(s)):g8e.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||r2(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return c2(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||n2(t)?(e.consume(t),b):c2(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||r2(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):c2(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):c2(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||o2(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||s2(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||c2(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||o2(t)?O(t):c2(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ie):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),re):o2(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(v8e,ae,ee)(t)):t===null||o2(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(y8e,te,ae)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return t===null||o2(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),M):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return M2.includes(n)?(e.consume(t),ie):O(t)}return n2(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),M):O(t)}function M(t){return t===62?(e.consume(t),ie):t===45&&i===2?(e.consume(t),M):O(t)}function ie(t){return t===null||o2(t)?(e.exit(`htmlFlowData`),ae(t)):(e.consume(t),ie)}function ae(n){return e.exit(`htmlFlow`),t(n)}}function S8e(e,t,n){let r=this;return i;function i(t){return o2(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function C8e(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(y2,t,n)}}var w8e={name:`htmlText`,tokenize:T8e};function T8e(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):n2(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):n2(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):o2(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):o2(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):o2(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):o2(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return n2(t)?(e.consume(t),S):n(t)}function S(t){return t===45||r2(t)?(e.consume(t),S):C(t)}function C(t){return o2(t)?(o=C,j(t)):c2(t)?(e.consume(t),C):A(t)}function w(t){return t===45||r2(t)?(e.consume(t),w):t===47||t===62||s2(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||n2(t)?(e.consume(t),E):o2(t)?(o=T,j(t)):c2(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||r2(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):o2(t)?(o=D,j(t)):c2(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):o2(t)?(o=O,j(t)):c2(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,k):t===null?n(t):o2(t)?(o=ee,j(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||s2(t)?T(t):(e.consume(t),te)}function k(e){return e===47||e===62||s2(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return c2(t)?p2(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var N2={name:`labelEnd`,resolveAll:k8e,resolveTo:A8e,tokenize:j8e},E8e={tokenize:M8e},D8e={tokenize:N8e},O8e={tokenize:P8e};function k8e(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&X0(e,0,e.length,n),e}function A8e(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Z0(s,e.slice(a+1,a+r+3)),s=Z0(s,[[`enter`,u,t]]),s=Z0(s,g2(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Z0(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Z0(s,e.slice(o+1)),s=Z0(s,[[`exit`,c,t]]),X0(e,a,e.length,s),e}function j8e(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(t2(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(E8e,u,o?u:d)(t):t===91?e.attempt(D8e,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(O8e,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function M8e(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return s2(t)?j2(e,a)(t):a(t)}function a(t){return t===41?u(t):O2(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return s2(t)?j2(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?A2(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return s2(t)?j2(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function N8e(e,t,n){let r=this;return i;function i(t){return k2.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(t2(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function P8e(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var F8e={name:`labelStartImage`,resolveAll:N2.resolveAll,tokenize:I8e};function I8e(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var L8e={name:`labelStartLink`,resolveAll:N2.resolveAll,tokenize:R8e};function R8e(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var P2={name:`lineEnding`,tokenize:z8e};function z8e(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),p2(e,t,`linePrefix`)}}var F2={name:`thematicBreak`,tokenize:B8e};function B8e(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||o2(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),c2(t)?p2(e,s,`whitespace`)(t):s(t))}}var I2={continuation:{tokenize:W8e},exit:K8e,name:`list`,tokenize:U8e},V8e={partial:!0,tokenize:q8e},H8e={partial:!0,tokenize:G8e};function U8e(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:a2(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(F2,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return a2(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(y2,r.interrupt?n:u,e.attempt(V8e,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return c2(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function W8e(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(y2,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,p2(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!c2(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(H8e,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,p2(e,e.attempt(I2,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function G8e(e,t,n){let r=this;return p2(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function K8e(e){e.exit(this.containerState.type)}function q8e(e,t,n){let r=this;return p2(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!c2(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var L2={name:`setextUnderline`,resolveTo:J8e,tokenize:Y8e};function J8e(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Y8e(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),c2(t)?p2(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||o2(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var X8e={tokenize:Z8e};function Z8e(e){let t=this,n=e.attempt(y2,r,e.attempt(this.parser.constructs.flowInitial,i,p2(e,e.attempt(this.parser.constructs.flow,i,e.attempt(n8e,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Q8e={resolveAll:z2()},$8e=R2(`string`),e5e=R2(`text`);function R2(e){return{resolveAll:z2(e===`text`?t5e:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function z2(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function t5e(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var n5e=s({attentionMarkers:()=>u5e,contentInitial:()=>i5e,disable:()=>d5e,document:()=>r5e,flow:()=>o5e,flowInitial:()=>a5e,insideSpan:()=>l5e,string:()=>s5e,text:()=>c5e}),r5e={42:I2,43:I2,45:I2,48:I2,49:I2,50:I2,51:I2,52:I2,53:I2,54:I2,55:I2,56:I2,57:I2,62:b2},i5e={91:s8e},a5e={[-2]:T2,[-1]:T2,32:T2},o5e={35:p8e,42:F2,45:[L2,F2],60:_8e,61:L2,95:F2,96:w2,126:w2},s5e={38:S2,92:x2},c5e={[-5]:P2,[-4]:P2,[-3]:P2,33:F8e,38:S2,42:_2,60:[L6e,w8e],91:L8e,92:[d8e,x2],93:N2,95:_2,96:X6e},l5e={null:[_2,Q8e]},u5e={null:[42,95]},d5e={null:[]};function f5e(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Z0(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=g2(a,l.events,l),l.events):[]}function f(e,t){return m5e(p(e),t)}function p(e){return p5e(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){o2(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&X0(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function p5e(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function m5e(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
129
|
+
`}function D2e(e,t={}){let n={title:t.title?.trim()||TQ(),exportedAt:t.exportedAt??null,truncated:!!t.truncated,messageCount:e.length,messages:e.map(e=>({role:e.role,createdAt:e.createdAt,text:e.text,attachments:t$(e.parts)}))};return JSON.stringify(n,null,2)+`
|
|
130
|
+
`}function O2e(e){return((e??``).trim()||`conversation`).toLowerCase().normalize(`NFD`).replace(/[̀-ͯ]/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,60)||`conversation`}function n$(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=n$(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function r$(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=n$(e))&&(r&&(r+=` `),r+=t);return r}var k2e=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},A2e=(e,t)=>({classGroupId:e,validator:t}),i$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),a$=`-`,o$=[],j2e=`arbitrary..`,M2e=e=>{let t=P2e(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return N2e(e);let n=e.split(a$);return s$(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?k2e(i,t):t:i||o$}return n[e]||o$}}},s$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=s$(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(a$):e.slice(t).join(a$),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},N2e=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?j2e+r:void 0})(),P2e=e=>{let{theme:t,classGroups:n}=e;return F2e(n,t)},F2e=(e,t)=>{let n=i$();for(let r in e){let i=e[r];c$(i,n,r,t)}return n},c$=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];I2e(i,t,n,r)}},I2e=(e,t,n,r)=>{if(typeof e==`string`){L2e(e,t,n);return}if(typeof e==`function`){R2e(e,t,n,r);return}z2e(e,t,n,r)},L2e=(e,t,n)=>{let r=e===``?t:l$(t,e);r.classGroupId=n},R2e=(e,t,n,r)=>{if(B2e(e)){c$(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(A2e(n,e))},z2e=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];c$(o,l$(t,a),n,r)}},l$=(e,t)=>{let n=e,r=t.split(a$),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=i$(),n.nextPart.set(t,i)),n=i}return n},B2e=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,V2e=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},u$=`!`,d$=`:`,H2e=[],f$=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),U2e=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===d$){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(u$)?(c=s.slice(0,-1),l=!0):s.startsWith(u$)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return f$(t,l,c,u)};if(t){let e=t+d$,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):f$(H2e,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},W2e=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},G2e=e=>({cache:V2e(e.cacheSize),parseClassName:U2e(e),sortModifiers:W2e(e),postfixLookupClassGroupIds:K2e(e),...M2e(e)}),K2e=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},q2e=/\s+/,J2e=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(q2e),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+u$:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Y2e=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=p$(n))&&(i&&(i+=` `),i+=r);return i},p$=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=p$(e[r]))&&(n&&(n+=` `),n+=t);return n},X2e=(e,...t)=>{let n,r,i,a,o=o=>(n=G2e(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=J2e(e,n);return i(e,a),a};return a=o,(...e)=>a(Y2e(...e))},Z2e=[],m$=e=>{let t=t=>t[e]||Z2e;return t.isThemeGetter=!0,t},h$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,g$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Q2e=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$2e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,e4e=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,t4e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,n4e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r4e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_$=e=>Q2e.test(e),v$=e=>!!e&&!Number.isNaN(Number(e)),y$=e=>!!e&&Number.isInteger(Number(e)),b$=e=>e.endsWith(`%`)&&v$(e.slice(0,-1)),x$=e=>$2e.test(e),S$=()=>!0,i4e=e=>e4e.test(e)&&!t4e.test(e),C$=()=>!1,a4e=e=>n4e.test(e),o4e=e=>r4e.test(e),s4e=e=>!J(e)&&!Y(e),c4e=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),l4e=e=>j$(e,F$,C$),J=e=>h$.test(e),w$=e=>j$(e,I$,i4e),T$=e=>j$(e,_4e,v$),u4e=e=>j$(e,R$,S$),d4e=e=>j$(e,L$,C$),E$=e=>j$(e,N$,C$),f4e=e=>j$(e,P$,o4e),D$=e=>j$(e,z$,a4e),Y=e=>g$.test(e),O$=e=>M$(e,I$),p4e=e=>M$(e,L$),k$=e=>M$(e,N$),m4e=e=>M$(e,F$),h4e=e=>M$(e,P$),A$=e=>M$(e,z$,!0),g4e=e=>M$(e,R$,!0),j$=(e,t,n)=>{let r=h$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},M$=(e,t,n=!1)=>{let r=g$.exec(e);return r?r[1]?t(r[1]):n:!1},N$=e=>e===`position`||e===`percentage`,P$=e=>e===`image`||e===`url`,F$=e=>e===`length`||e===`size`||e===`bg-size`,I$=e=>e===`length`,_4e=e=>e===`number`,L$=e=>e===`family-name`,R$=e=>e===`number`||e===`weight`,z$=e=>e===`shadow`,v4e=X2e(()=>{let e=m$(`color`),t=m$(`font`),n=m$(`text`),r=m$(`font-weight`),i=m$(`tracking`),a=m$(`leading`),o=m$(`breakpoint`),s=m$(`container`),c=m$(`spacing`),l=m$(`radius`),u=m$(`shadow`),d=m$(`inset-shadow`),f=m$(`text-shadow`),p=m$(`drop-shadow`),m=m$(`blur`),h=m$(`perspective`),g=m$(`aspect`),_=m$(`ease`),v=m$(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,J,c],T=()=>[_$,`full`,`auto`,...w()],E=()=>[y$,`none`,`subgrid`,Y,J],D=()=>[`auto`,{span:[`full`,y$,Y,J]},y$,Y,J],O=()=>[y$,`auto`,Y,J],ee=()=>[`auto`,`min`,`max`,`fr`,Y,J],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[_$,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[_$,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[_$,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,Y,J],ie=()=>[...b(),k$,E$,{position:[Y,J]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,m4e,l4e,{size:[Y,J]}],se=()=>[b$,O$,w$],ce=()=>[``,`none`,`full`,l,Y,J],le=()=>[``,v$,O$,w$],ue=()=>[`solid`,`dashed`,`dotted`,`double`],de=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],fe=()=>[v$,b$,k$,E$],pe=()=>[``,`none`,m,Y,J],me=()=>[`none`,v$,Y,J],he=()=>[`none`,v$,Y,J],ge=()=>[v$,Y,J],_e=()=>[_$,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[x$],breakpoint:[x$],color:[S$],container:[x$],"drop-shadow":[x$],ease:[`in`,`out`,`in-out`],font:[s4e],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[x$],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[x$],shadow:[x$],spacing:[`px`,v$],text:[x$],"text-shadow":[x$],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,_$,J,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,J]}],"container-named":[c4e],columns:[{columns:[v$,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[y$,`auto`,Y,J]}],basis:[{basis:[_$,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[v$,_$,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,v$,Y,J]}],shrink:[{shrink:[``,v$,Y,J]}],order:[{order:[y$,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,...j()]}],"font-size":[{text:[`base`,n,O$,w$]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,g4e,u4e]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,b$,J]}],"font-family":[{font:[p4e,d4e,t]}],"font-features":[{"font-features":[J]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Y,J]}],"line-clamp":[{"line-clamp":[v$,`none`,Y,T$]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ue(),`wavy`]}],"text-decoration-thickness":[{decoration:[v$,`from-font`,`auto`,Y,w$]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[v$,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[y$,Y,J]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},y$,Y,J],radial:[``,Y,J],conic:[y$,Y,J]},h4e,f4e]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-bs":[{"border-bs":le()}],"border-w-be":[{"border-be":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":le()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ue(),`hidden`,`none`]}],"divide-style":[{divide:[...ue(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...ue(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[v$,Y,J]}],"outline-w":[{outline:[``,v$,O$,w$]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,A$,D$]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,A$,D$]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:le()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[v$,w$]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,A$,D$]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[v$,Y,J]}],"mix-blend":[{"mix-blend":[...de(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[v$]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[v$]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:pe()}],brightness:[{brightness:[v$,Y,J]}],contrast:[{contrast:[v$,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,A$,D$]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,v$,Y,J]}],"hue-rotate":[{"hue-rotate":[v$,Y,J]}],invert:[{invert:[``,v$,Y,J]}],saturate:[{saturate:[v$,Y,J]}],sepia:[{sepia:[``,v$,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[v$,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[v$,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,v$,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v$,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,v$,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[v$,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[v$,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,v$,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[v$,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[v$,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":[`scale-3d`],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":[`translate-none`],zoom:[{zoom:[y$,Y,J]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Y,J]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Y,J]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[v$,O$,w$,T$]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function B$(...e){return v4e(r$(e))}function V$(e){return(0,I.jsx)(nle,{"data-slot":`dropdown-menu`,...e})}function H$(e){return(0,I.jsx)(rle,{"data-slot":`dropdown-menu-trigger`,...e})}function U$({className:e,sideOffset:t=4,...n}){return(0,I.jsx)(ile,{children:(0,I.jsx)(ale,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:B$(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,e),...n})})}function W$({className:e,inset:t,variant:n=`default`,...r}){return(0,I.jsx)(sle,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:B$(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function G$({className:e,inset:t,...n}){return(0,I.jsx)(ole,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:B$(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function K$({className:e,...t}){return(0,I.jsx)(dle,{"data-slot":`dropdown-menu-separator`,className:B$(`bg-border -mx-1 my-1 h-px`,e),...t})}function y4e(e){return(0,I.jsx)(cle,{"data-slot":`dropdown-menu-radio-group`,...e})}function q$({className:e,children:t,...n}){return(0,I.jsxs)(lle,{"data-slot":`dropdown-menu-radio-item`,className:B$(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,I.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,I.jsx)(ule,{children:(0,I.jsx)(Cee,{className:`size-2 fill-current`})})}),t]})}function J$({...e}){return(0,I.jsx)(CT,{"data-slot":`popover`,...e})}function Y$({...e}){return(0,I.jsx)(wT,{"data-slot":`popover-trigger`,...e})}function X$({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,I.jsx)(TT,{children:(0,I.jsx)(ET,{"data-slot":`popover-content`,align:t,sideOffset:n,className:B$(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...r})})}var Z$=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Q$=r$,$$=(e,t)=>n=>{if(t?.variants==null)return Q$(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Z$(t)||Z$(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Q$(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},e1=$$(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function X({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,I.jsx)(r?Cy:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:B$(e1({variant:t,size:n,className:e})),...i})}function t1({className:e,type:t,...n}){return(0,I.jsx)(`input`,{type:t,"data-slot":`input`,className:B$(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function n1({...e}){return(0,I.jsx)(Wx,{"data-slot":`alert-dialog`,...e})}function b4e({...e}){return(0,I.jsx)(Gx,{"data-slot":`alert-dialog-portal`,...e})}function x4e({className:e,...t}){return(0,I.jsx)(Kx,{"data-slot":`alert-dialog-overlay`,className:B$(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function r1({className:e,...t}){return(0,I.jsxs)(b4e,{children:[(0,I.jsx)(x4e,{}),(0,I.jsx)(qx,{"data-slot":`alert-dialog-content`,className:B$(`fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-popover bg-clip-padding p-5 text-sm text-popover-foreground shadow-lg duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...t})]})}function i1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:B$(`flex flex-col gap-1.5`,e),...t})}function a1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:B$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function o1({className:e,...t}){return(0,I.jsx)(Xx,{"data-slot":`alert-dialog-title`,className:B$(`text-base font-medium text-foreground`,e),...t})}function s1({className:e,...t}){return(0,I.jsx)(Zx,{"data-slot":`alert-dialog-description`,className:B$(`text-sm text-muted-foreground`,e),...t})}function c1({className:e,...t}){return(0,I.jsx)(Jx,{className:B$(e1(),e),...t})}function l1({className:e,...t}){return(0,I.jsx)(Yx,{className:B$(e1({variant:`outline`}),e),...t})}function u1({...e}){return(0,I.jsx)(xx,{"data-slot":`dialog`,...e})}function S4e({...e}){return(0,I.jsx)(Sx,{"data-slot":`dialog-portal`,...e})}function C4e({className:e,...t}){return(0,I.jsx)(Cx,{"data-slot":`dialog-overlay`,className:B$(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function d1({className:e,children:t,showCloseButton:n=!0,...r}){return(0,I.jsxs)(S4e,{children:[(0,I.jsx)(C4e,{}),(0,I.jsxs)(wx,{"data-slot":`dialog-content`,className:B$(`fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-popover bg-clip-padding p-5 text-sm text-popover-foreground shadow-lg duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,I.jsx)(Dx,{"data-slot":`dialog-close`,asChild:!0,children:(0,I.jsxs)(X,{variant:`ghost`,size:`icon-sm`,className:`absolute top-3 right-3`,children:[(0,I.jsx)(Gm,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:UQ()})]})})]})]})}function f1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-header`,className:B$(`flex flex-col gap-1.5 pr-6`,e),...t})}function p1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-footer`,className:B$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function m1({className:e,...t}){return(0,I.jsx)(Tx,{"data-slot":`dialog-title`,className:B$(`text-base font-medium text-foreground`,e),...t})}function h1({className:e,...t}){return(0,I.jsx)(Ex,{"data-slot":`dialog-description`,className:B$(`text-sm text-muted-foreground`,e),...t})}var g1=N.createContext(null);function w4e({children:e}){let[t,n]=N.useState(null),r=N.useRef(null),i=N.useRef(null),[a,o]=N.useState(``),s=N.useCallback(e=>{let t=r.current;r.current=null,n(null),t&&t(e)},[]),c=N.useMemo(()=>({confirm:e=>new Promise(t=>{r.current=t,o(``),n({kind:`confirm`,opts:e})}),prompt:e=>new Promise(t=>{r.current=t,o(e.defaultValue??``),n({kind:`prompt`,opts:e})})}),[]),l=t?.kind===`confirm`,u=t?.kind===`prompt`,d=t?.kind===`confirm`?t.opts.confirmWord:void 0,f=!d||a.trim().toLowerCase()===d.trim().toLowerCase(),p=a.trim().length>0,m=e=>{e.preventDefault(),requestAnimationFrame(()=>i.current?.focus())};return(0,I.jsxs)(g1.Provider,{value:c,children:[e,(0,I.jsx)(n1,{open:l,onOpenChange:e=>{e||s(!1)},children:l?(0,I.jsxs)(r1,{onOpenAutoFocus:d?m:void 0,...t.opts.description?{}:{"aria-describedby":void 0},children:[(0,I.jsxs)(i1,{children:[(0,I.jsx)(o1,{children:t.opts.title}),t.opts.description?(0,I.jsx)(s1,{children:t.opts.description}):null]}),d?(0,I.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,I.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[`Pour confirmer, saisissez`,` `,(0,I.jsxs)(`span`,{className:`font-medium text-foreground`,children:[`« `,d,` »`]}),` `,`ci-dessous.`]}),(0,I.jsx)(t1,{ref:i,value:a,placeholder:d,autoComplete:`off`,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&f&&(e.preventDefault(),s(!0))}})]}):null,(0,I.jsxs)(a1,{children:[(0,I.jsx)(l1,{onClick:()=>s(!1),children:t.opts.cancelLabel??`Annuler`}),(0,I.jsx)(X,{variant:t.opts.destructive?`destructive`:`default`,disabled:!f,onClick:()=>s(!0),children:t.opts.confirmLabel??`Supprimer`})]})]}):null}),(0,I.jsx)(u1,{open:u,onOpenChange:e=>{e||s(null)},children:u?(0,I.jsxs)(d1,{onOpenAutoFocus:m,...t.opts.description?{}:{"aria-describedby":void 0},children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:t.opts.title}),t.opts.description?(0,I.jsx)(h1,{children:t.opts.description}):null]}),(0,I.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[t.opts.label?(0,I.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:t.opts.label}):null,(0,I.jsx)(t1,{ref:i,value:a,placeholder:t.opts.placeholder,autoComplete:`off`,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p&&(e.preventDefault(),s(a.trim()))}})]}),(0,I.jsxs)(p1,{children:[(0,I.jsx)(X,{variant:`outline`,onClick:()=>s(null),children:t.opts.cancelLabel??`Annuler`}),(0,I.jsx)(X,{disabled:!p,onClick:()=>s(a.trim()),children:t.opts.confirmLabel??`Valider`})]})]}):null})]})}function _1(){let e=N.useContext(g1);if(!e)throw Error(`useConfirm/usePrompt must be used within <DialogsProvider>`);return e}function v1(){return _1().confirm}function y1(){return _1().prompt}var b1=N.createContext(null),T4e=6e3;function x1(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return String(e)}catch{return`Erreur inconnue`}}function E4e({children:e}){let[t,n]=N.useState([]),r=N.useRef(0),i=N.useRef(new Map),a=N.useCallback(e=>{n(t=>t.filter(t=>t.id!==e));let t=i.current.get(e);t!==void 0&&(window.clearTimeout(t),i.current.delete(e))},[]),o=N.useCallback(e=>{let t=r.current++,o={id:t,variant:e.variant??`info`,title:e.title,description:e.description};n(e=>[...e,o]);let s=window.setTimeout(()=>a(t),T4e);i.current.set(t,s)},[a]);N.useEffect(()=>{let e=i.current;return()=>{for(let t of e.values())window.clearTimeout(t);e.clear()}},[]);let s=N.useMemo(()=>({toast:o,error:(e,t)=>o({variant:`error`,title:e,description:t===void 0?void 0:x1(t)}),success:(e,t)=>o({variant:`success`,title:e,description:t})}),[o]);return(0,I.jsxs)(b1.Provider,{value:s,children:[e,(0,I.jsx)(`div`,{className:`oc-toast__viewport`,role:`region`,"aria-label":`Notifications`,children:t.map(e=>(0,I.jsxs)(`div`,{className:B$(`oc-toast`,`oc-toast--${e.variant}`),role:e.variant===`error`?`alert`:`status`,children:[(0,I.jsxs)(`div`,{className:`oc-toast__body`,children:[(0,I.jsx)(`div`,{className:`oc-toast__title`,children:e.title}),e.description?(0,I.jsx)(`div`,{className:`oc-toast__desc`,children:e.description}):null]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-toast__close`,"aria-label":`Fermer`,onClick:()=>a(e.id),children:(0,I.jsx)(Gm,{"aria-hidden":!0})})]},e.id))})]})}function S1(){let e=N.useContext(b1);if(!e)throw Error(`useToast must be used within <ToastProvider>`);return e}function D4e(e){return e.kind===`tool`}function O4e(e){return e.kind===`media`}function k4e(e){return e.kind===`file`}function A4e(e){return e.kind===`reasoning`}var j4e=/---[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?=\.[^.]+$|$)/i;function M4e(e){return e.replace(j4e,``)}function N4e(e,t){let n=e.runId??`norun`;return`${e._id}:${n}:${t}`}function P4e(e,t,n){return{toolCallId:N4e(e,t),toolName:n.name,args:n.input??{},result:n.output,argsText:n.input===void 0?void 0:L4e(n.input),phase:typeof n.phase==`string`?n.phase:void 0}}function F4e(e){return e&&M4e(e)}function I4e(e){return e.url?{type:`file`,mimeType:e.mimeType,data:e.url,filename:F4e(e.filename)}:null}function L4e(e){try{return typeof e==`string`?e:JSON.stringify(e,null,2)}catch{return String(e)}}function R4e(e){let t=[],n=[],r=[];return e.parts.forEach((i,a)=>{A4e(i)?t.push({type:`reasoning`,text:i.text}):D4e(i)?n.push(P4e(e,a,i)):i.kind===`provenance`&&r.push(i)}),e.text&&e.text.length>0&&t.push({type:`text`,text:e.text}),e.parts.forEach(e=>{if(O4e(e)||k4e(e)){let n=I4e(e);n&&t.push(n)}}),t.length===0&&t.push({type:`text`,text:``}),{id:e._id,role:e.role,createdAt:new Date(e.updatedAt??e._creationTime),content:t,metadata:{custom:{messageId:e._id,chatId:e.chatId,status:e.status,runId:e.runId??null,error:e.error??null,toolParts:n,provenanceParts:r,attachedDocCount:e.attachedDocCount??0,rawText:e.text}}}}function z4e(e){return typeof e==`string`&&e.toLowerCase().startsWith(`image/`)}var B4e=128*1024;function V4e(e){let t=e-B4e;return t<=0?0:Math.floor(t/4)*3}function H4e(){return`att_${Math.random().toString(36).slice(2)}_${Date.now()}`}function U4e(e){if(!e)return[];let t=[];for(let n of e){let e=n.convex;e?.storageId&&t.push({storageId:e.storageId,filename:e.filename,mimeType:e.mimeType})}return t}function W4e(e,t,n){return{accept:`*`,async add({file:r}){let i=null;try{i=(await e.query(V.bridgeHealth.getBridgeAvailability,n?{chatId:n}:{}))?.maxInboundBytes??null}catch{}let a=i??V4e(26214400);if(n&&!z4e(r.type))try{let t=await e.query(V.bridge.getChatInboundPolicy,{chatId:n});t?.inboundMediaMode===`shared-fs`&&(a=t.sharedFsMaxBytes)}catch{}if(r.size>a){let e=e=>Math.floor(e/1024/1024),n=hfe({size:e(r.size),max:e(a)});throw t?.(n),Error(n)}return{id:H4e(),type:G4e(r.type),name:r.name,contentType:r.type||`application/octet-stream`,file:r,status:{type:`running`,reason:`uploading`,progress:0}}},async send(t){let n=t.file;AO.report(t.id,0,n.size||1);try{let r;try{r=await e.mutation(V.chats.generateUploadUrl,{})}catch(e){throw console.error(`[attach] generateUploadUrl failed:`,e),e}let i=await new Promise((e,i)=>{let a=new XMLHttpRequest;a.open(`POST`,r),a.setRequestHeader(`Content-Type`,n.type||`application/octet-stream`),a.upload.onprogress=e=>{e.lengthComputable&&AO.report(t.id,e.loaded,e.total)},a.onload=()=>{if(a.status>=200&&a.status<300)try{e(JSON.parse(a.responseText).storageId)}catch(e){i(e)}else i(Error(`Upload failed (${a.status})`))},a.onerror=()=>{console.error(`[attach] upload POST failed (network/CORS/CSP)`),i(Error(`Upload failed (network)`))},a.send(n)});return await e.mutation(V.uploads.registerUpload,{storageId:i}),{id:t.id,type:t.type,name:t.name,contentType:t.contentType,status:{type:`complete`},content:[{type:`text`,text:n.name}],convex:{storageId:i,filename:n.name,mimeType:n.type||`application/octet-stream`}}}finally{AO.clear(t.id)}},async remove(){}}}function G4e(e){return e.startsWith(`image/`)?`image`:`document`}function K4e({chatId:e}){let t=Zn(),n=S1(),r=F(V.send.sendMessage).withOptimisticUpdate((e,t)=>{let n={chatId:t.chatId},r=e.getQuery(V.messages.listByChat,n)??[],i=`optimistic-${t.clientMessageId}`;if(r.some(e=>e._id===i))return;let a=Date.now(),o={_id:i,chatId:t.chatId,_creationTime:a,role:`user`,status:`complete`,runId:void 0,error:void 0,errorCode:void 0,attachedDocCount:void 0,text:t.text,updatedAt:a,parts:[]};e.setQuery(V.messages.listByChat,n,[...r,o])}),i=P(V.messages.listByChat,e?{chatId:e}:`skip`),a=P(V.messages.getStreamingText,e?{chatId:e}:`skip`),o=(0,N.useMemo)(()=>W4e(t,e=>n.error(e),e),[t,n,e]),s=(0,N.useMemo)(()=>{let e=i??[];if(!a||a.length===0)return e;let t=new Map(a.map(e=>[e.messageId,e.text]));return e.map(e=>e.status===`streaming`&&t.has(e._id)?{...e,text:t.get(e._id)}:e)},[i,a]),c=s.length>0?s[s.length-1].role:null,l=s.some(e=>e.status===`streaming`),[u,d]=(0,N.useState)(null);(0,N.useEffect)(()=>{d(null)},[e]),(0,N.useEffect)(()=>{c===`assistant`&&d(null)},[c,s]),(0,N.useEffect)(()=>{if(u===null)return;let e=window.setTimeout(()=>d(null),12e4);return()=>window.clearTimeout(e)},[u]);let f=u!==null||l,p=(0,N.useMemo)(()=>({messages:s,isRunning:f,convertMessage:R4e,onNew:async t=>{if(!e)throw Error(`No chat selected`);let n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(``),i=U4e(t.attachments).map(e=>({storageId:e.storageId,filename:e.filename,mimeType:e.mimeType}));d(Date.now());try{await r({chatId:e,text:n,clientMessageId:crypto.randomUUID(),attachments:i})}catch(e){throw d(null),e}},adapters:{attachments:o}}),[s,f,e,r,o]),m=(0,N.useMemo)(()=>({begin:()=>d(Date.now()),cancel:()=>d(null)}),[]),h=(0,N.useCallback)(async t=>{let i=t.trim();if(!e||i===``)return!1;try{return await r({chatId:e,text:t,clientMessageId:crypto.randomUUID()}),!0}catch(e){return n.error(e?.message?.includes(`QUEUE_FULL`)?HJ():GJ()),!1}},[e,r,n]);return{runtime:hv(p),turnGate:m,queueSend:h}}function C1(e,{key:t,value:n}){let r=e.getQuery(V.me.getMe,{host:xO});if(!r?.ui)return;let i={...r.ui.effective},a={...r.ui.userOverrides},o=t,s=t;n===null?delete a[s]:(i[o]=n,a[s]=n),e.setQuery(V.me.getMe,{host:xO},{...r,ui:{...r.ui,effective:i,userOverrides:a}})}function q4e(e,{messageId:t}){for(let{args:n,value:r}of e.getAllQueries(V.messages.listByChat)){if(r===void 0)continue;let i=r.find(e=>e._id===t);if(i===void 0)continue;let a=i._creationTime;e.setQuery(V.messages.listByChat,n,r.filter(e=>e._creationTime<a))}}function J4e(e,t){if(e===void 0)return`thinking`;switch(e){case`streaming`:return t?`generating`:`thinking`;case`error`:return`error`;case`aborted`:return`aborted`;default:return null}}function Y4e(e){return e?e.some(e=>e?.type===`text`&&typeof e.text==`string`&&e.text.trim().length>0):!1}var X4e={thinking:Ize,generating:zze,error:Hze,aborted:Jze};function Z4e(e,t){let n=J4e(e,t);return n===null?null:{kind:n,label:X4e[n]()}}var Q4e=Y4e;function $4e(e){return e===`stream_orphaned`?Gze():e}function e3e(){let e=$Q(),t=gy(e=>e.metadata?.custom?.status),n=gy(e=>e.metadata?.custom?.runId),r=gy(e=>e.metadata?.custom?.error),i=Z4e(t,gy(e=>Q4e(e.content))),a=i?.kind===`thinking`,[o,s]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{if(!a){s(!1);return}let e=window.setTimeout(()=>s(!0),6e3);return()=>window.clearTimeout(e)},[a]),i?i.kind===`error`?(0,I.jsxs)(`div`,{className:`oc-error-card`,role:`alert`,title:n?`run ${n}`:void 0,children:[(0,I.jsx)(hm,{size:18,className:`oc-error-card__icon`,"aria-hidden":!0}),(0,I.jsxs)(`div`,{className:`oc-error-card__body`,children:[(0,I.jsx)(`span`,{className:`oc-error-card__title`,children:i.label}),r?(0,I.jsx)(`span`,{className:`oc-error-card__msg`,children:$4e(r)}):null]})]}):(0,I.jsxs)(`div`,{className:`oc-run-status oc-run-status--${i.kind}`,role:`status`,title:n?`run ${n}`:void 0,children:[i.kind===`thinking`?(0,I.jsxs)(`span`,{className:`oc-dots`,"aria-hidden":!0,children:[(0,I.jsx)(`span`,{}),(0,I.jsx)(`span`,{}),(0,I.jsx)(`span`,{})]}):i.kind===`generating`?(0,I.jsx)(`span`,{className:`oc-run-status__pulse`,"aria-hidden":!0}):(0,I.jsx)(zee,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-run-status__label`,children:i.kind===`thinking`&&o?C2e(e):i.label})]}):null}var t3e=new Set([`status`,`exitCode`,`durationMs`]);function n3e(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function r3e(e){if(typeof e==`string`)return{kind:`text`,text:e};if(typeof e==`object`&&e&&!Array.isArray(e)){let t=e,n=Object.keys(t);if(typeof t.exitCode==`number`&&n.every(e=>t3e.has(e)))return{kind:`outcome`,status:typeof t.status==`string`?t.status:null,exitCode:t.exitCode,durationMs:typeof t.durationMs==`number`?t.durationMs:null}}return{kind:`json`,text:n3e(e)}}function i3e(e){let t=[(e.exitCode===null?e.status===`completed`:e.exitCode===0)?Jq():Zq()];return e.exitCode!==null&&t.push(eJ({code:e.exitCode})),e.durationMs!==null&&t.push(rJ({ms:e.durationMs})),t.join(` · `)}var a3e=new Set([`complete`,`error`,`aborted`]),o3e=new Set([`completed`,`error`]);function s3e(e,t){if(e.length===0)return!1;if(t===`streaming`)return!0;if(t!==void 0&&a3e.has(t))return!1;let n=e[e.length-1];return n.phase!==void 0&&o3e.has(n.phase)?!1:n.result===void 0||n.result===null}var c3e=[`command`,`query`,`url`,`path`,`pattern`,`file`,`cmd`,`prompt`];function l3e(e,t){let n=``;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;for(let e of c3e){let r=t[e];if(typeof r==`string`&&r.trim()){n=r;break}}}return n||=t??(typeof e==`string`?e:``),n.replace(/\s+/g,` `).trim()}function u3e(e,t){let n=e.length,r=n===1?Hq({count:n}):Gq({count:n});return{count:n,running:s3e(e,t),label:r}}function w1({text:e}){let[t,n]=(0,N.useState)(!1);return(0,I.jsx)(`button`,{type:`button`,className:`oc-copybtn`,title:`Copier`,"aria-label":`Copier le contenu`,onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:t?(0,I.jsx)(um,{size:13,"aria-hidden":!0}):(0,I.jsx)(_m,{size:13,"aria-hidden":!0})})}function d3e(e,t){let n=typeof e==`string`?e:void 0;return n===`error`?`error`:t||n===`completed`?`completed`:`running`}function f3e(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function p3e({toolName:e,args:t,argsText:n,result:r,status:i}){let a=r!=null,o=d3e(i?.type,a),s=n??f3e(t),c=l3e(t,n),l=a?r3e(r):null,u=o===`running`?Cm:o===`error`?hm:xee;return(0,I.jsxs)(`details`,{className:`oc-tool oc-tool--${o}`,children:[(0,I.jsxs)(`summary`,{className:`oc-tool__header`,children:[(0,I.jsx)(u,{className:`oc-tool__status${o===`running`?` oc-tool__status--spin`:``}`,size:14,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-tool__name`,children:e}),c?(0,I.jsx)(`span`,{className:`oc-tool__preview`,title:c,children:c}):null,(0,I.jsx)(`span`,{className:`oc-tool__phase`,children:o}),(0,I.jsx)(fm,{size:15,className:`oc-tool__chevron`,"aria-hidden":!0})]}),(0,I.jsxs)(`div`,{className:`oc-tool__body`,children:[s?(0,I.jsxs)(`details`,{className:`oc-tool__io`,children:[(0,I.jsx)(`summary`,{children:`input`}),(0,I.jsxs)(`div`,{className:`oc-tool__prewrap`,children:[(0,I.jsx)(`pre`,{className:`oc-tool__pre`,children:s}),(0,I.jsx)(w1,{text:s})]})]}):null,l&&l.kind===`outcome`?(0,I.jsxs)(`div`,{className:`oc-tool__outcome`,children:[(0,I.jsx)(`span`,{className:`oc-tool__outcome-label`,children:i3e(l)}),(0,I.jsx)(`span`,{className:`oc-tool__outcome-note`,children:oJ()})]}):l?(0,I.jsxs)(`details`,{className:`oc-tool__io`,open:!0,children:[(0,I.jsx)(`summary`,{children:`output`}),(0,I.jsxs)(`div`,{className:`oc-tool__prewrap`,children:[(0,I.jsx)(`pre`,{className:`oc-tool__pre`,children:l.text}),(0,I.jsx)(w1,{text:l.text})]})]}):null]})]})}function m3e(){let e=gy(e=>e.metadata?.custom?.toolParts),t=gy(e=>e.metadata?.custom?.status),[n,r]=(0,N.useState)(!1);if(!e||e.length===0)return null;let i=n,a=u3e(e,t);return(0,I.jsxs)(`div`,{className:`oc-toolact${i?` is-open`:``}`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-toolact__summary`,"aria-expanded":i,title:i?vJ():hJ(),onClick:()=>r(!i),children:[(0,I.jsx)(Wm,{size:13,className:`oc-toolact__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-toolact__label`,children:a.label}),a.running?(0,I.jsxs)(`span`,{className:`oc-toolact__state`,children:[(0,I.jsx)(Cm,{size:12,className:`oc-toolact__spin`,"aria-hidden":!0}),lJ()]}):(0,I.jsxs)(`span`,{className:`oc-toolact__state oc-toolact__state--done`,children:[(0,I.jsx)(um,{size:12,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-sr-only`,children:fJ()})]}),(0,I.jsx)(fm,{size:14,className:`oc-toolact__chevron`,"aria-hidden":!0})]}),i?(0,I.jsx)(`div`,{className:`oc-toolact__detail`,children:e.map(e=>(0,I.jsx)(p3e,{toolName:e.toolName,args:e.args,argsText:e.argsText,result:e.result,status:e.phase?{type:e.phase}:void 0},e.toolCallId))}):null]})}function T1({className:e,...t}){return(0,I.jsx)(sS,{"data-slot":`checkbox`,className:B$(`peer size-4 shrink-0 rounded-[4px] border border-input bg-background ring-offset-background transition-shadow outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground`,e),...t,children:(0,I.jsx)(lS,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current`,children:t.checked===`indeterminate`?(0,I.jsx)(Om,{className:`size-3.5`}):(0,I.jsx)(um,{className:`size-3.5`})})})}function E1(e,t){return t===`memory`?`memory`:e.context===!0||!e.file_name?`context`:`document`}function D1(e){let t={memory:0,documents:0,context:0};for(let n of e)for(let e of n.items){let r=E1(e,n.group);r===`memory`?t.memory+=1:r===`document`?t.documents+=1:t.context+=1}return t}function h3e(e){return e.memory+e.documents+e.context>0}function O1(e){let t=[];return e.memory>0&&t.push(e.memory===1?zW():HW({count:e.memory})),e.documents>0&&t.push(e.documents===1?GW():JW({count:e.documents})),e.context>0&&t.push(e.context===1?oG():lG({count:e.context})),t.join(` · `)}function k1(e){return e.file_name??e.id??e.type??vG()}function A1(e){let t=[];return e.type&&k1(e)!==e.type&&t.push(e.type),e.date&&t.push(e.date),e.collection&&t.push(e.collection),typeof e.score==`number`&&t.push(hG({score:e.score.toFixed(2)})),t}function j1(e,t){let n=[];return e.forEach((e,r)=>{e.group===t&&e.items.forEach((t,i)=>{n.push({key:`${e.pluginId}|${e.group}|${t.id??t.file_name??`?`}|${r}.${i}`,group:e.group,pluginId:e.pluginId,source:e.source,item:t})})}),n.sort((e,t)=>(t.item.score??0)-(e.item.score??0))}function M1(e,t){let n=t.trim().toLowerCase();return n===``?!0:[F1(e),e.item.text??``,...A1(e.item)].join(` `).toLowerCase().includes(n)}function N1(e){return E1(e.item,e.group)===`document`}function P1(e){return E1(e.item,e.group)===`context`}function F1(e){return P1(e)?fG():k1(e.item)}var I1=(0,N.createContext)(null),g3e=[];function _3e(){let e=gy(e=>e.metadata?.custom?.provenanceParts??g3e),t=gy(e=>e.metadata?.custom?.messageId),n=gy(e=>e.metadata?.custom?.attachedDocCount??0),r=(0,N.useContext)(I1),i=D1(e);if(e.length===0||!h3e(i))return null;let a=r?.activeMessageId===t&&t!==void 0;return(0,I.jsxs)(`button`,{type:`button`,className:`oc-sources-trigger${a?` is-active`:``}`,onClick:()=>t&&r?.openFor(t),"aria-haspopup":`dialog`,"aria-expanded":a,"aria-label":wG(),children:[(0,I.jsx)(bm,{size:13,className:`oc-sources-trigger__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-sources-trigger__label`,children:IW()}),(0,I.jsx)(`span`,{className:`oc-sources-trigger__counts`,children:O1(i)}),n>0?(0,I.jsxs)(`span`,{className:`oc-sources-trigger__attached`,title:GG({count:n}),children:[(0,I.jsx)(vm,{size:12,"aria-hidden":!0}),n]}):null,(0,I.jsx)(fm,{size:14,className:`oc-sources-trigger__chev`,"aria-hidden":!0})]})}function L1({messageId:e,onClose:t}){let n=P(V.messages.getProvenanceParts,{messageId:e}),r=(0,N.useMemo)(()=>n??[],[n]),i=P(V.agents.documentaryAvailable,{}),a=P(V.documentAttachments.getDocumentAttachments,{sourceMessageId:e}),o=F(V.documentAttachments.attachDocuments),s=S1(),c=(0,N.useMemo)(()=>{let e=new Map;for(let t of a??[])e.set(t.entryKey,t);return e},[a]),l=(a??[]).some(e=>e.status===`pending`),[u,d]=(0,N.useState)(``),[f,p]=(0,N.useState)(!1),[m,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(!1),[v,y]=(0,N.useState)(new Set);(0,N.useEffect)(()=>{d(``),p(!1),h(!1),_(!1),y(new Set)},[e]);let b=(0,N.useMemo)(()=>j1(r,`documents`).filter(e=>N1(e)&&M1(e,u)),[r,u]),x=(0,N.useMemo)(()=>j1(r,`documents`).filter(e=>P1(e)&&M1(e,u)),[r,u]),S=(0,N.useMemo)(()=>j1(r,`memory`).filter(e=>M1(e,u)),[r,u]),C=D1(r),w=e=>y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),T=(e,t)=>y(n=>{let r=new Set(n);for(let n of e)t?r.add(n):r.delete(n);return r}),E=(0,N.useMemo)(()=>j1(r,`documents`).filter(e=>N1(e)&&v.has(e.key)),[r,v]),D=i!=null&&E.length>0&&!l;async function O(){if(D)try{await o({sourceMessageId:e,items:E.map(e=>({entryKey:e.key,reference:k1(e.item)}))}),s.success(rK())}catch(e){let t=x1(e);t.includes(`fetch_in_flight`)?s.error(eK()):t.includes(`no_documentary_agent`)?s.error(ZG()):s.error(oK(),e)}}let ee=n===void 0;return(0,I.jsxs)(`div`,{className:`oc-sources-panel`,children:[(0,I.jsxs)(`div`,{className:`oc-sources-panel__head`,children:[(0,I.jsxs)(`div`,{className:`oc-sources-panel__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-sources-panel__title`,children:xG()}),(0,I.jsx)(`p`,{className:`oc-sources-panel__sub`,children:O1(C)})]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn`,onClick:t,"aria-label":wK(),title:wK(),children:(0,I.jsx)(Gm,{size:16,"aria-hidden":!0})})]}),(0,I.jsxs)(`div`,{className:`oc-sources-panel__search`,children:[(0,I.jsx)(Fm,{size:15,"aria-hidden":!0}),(0,I.jsx)(t1,{value:u,onChange:e=>d(e.target.value),placeholder:DG(),"aria-label":DG()})]}),(0,I.jsx)(`div`,{className:`oc-sources-panel__body`,children:ee?(0,I.jsx)(`p`,{className:`oc-sources-panel__empty`,children:(0,I.jsx)(Cm,{size:14,className:`oc-iconbtn__spin`,"aria-hidden":!0})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(R1,{icon:(0,I.jsx)(bm,{size:14,"aria-hidden":!0}),label:eG(),count:b.length,expanded:f,onToggle:()=>p(e=>!e),entries:b,selectable:!0,selected:v,onToggle1:w,onToggleAll:e=>T(b.map(e=>e.key),e),attachmentByKey:c}),(0,I.jsx)(R1,{icon:(0,I.jsx)(jm,{size:14,"aria-hidden":!0}),label:rG(),count:x.length,expanded:m,onToggle:()=>h(e=>!e),entries:x,selectable:!1,selected:v,onToggle1:w,onToggleAll:e=>T(x.map(e=>e.key),e),attachmentByKey:c}),(0,I.jsx)(R1,{icon:(0,I.jsx)(yee,{size:14,"aria-hidden":!0}),label:ZW(),count:S.length,expanded:g,onToggle:()=>_(e=>!e),entries:S,selectable:!1,selected:v,onToggle1:w,onToggleAll:e=>T(S.map(e=>e.key),e),attachmentByKey:c}),b.length===0&&x.length===0&&S.length===0?(0,I.jsx)(`p`,{className:`oc-sources-panel__empty`,children:AG()}):null]})}),E.length>0?(0,I.jsxs)(`div`,{className:`oc-sources-panel__actions`,children:[(0,I.jsxs)(`div`,{className:`oc-sources-panel__actrow`,children:[(0,I.jsx)(`span`,{className:`oc-sources-panel__selcount`,children:IG({count:E.length})}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,disabled:!D,onClick:()=>void O(),children:[l?(0,I.jsx)(Cm,{size:14,className:`oc-iconbtn__spin`,"aria-hidden":!0}):(0,I.jsx)(Ree,{size:14,"aria-hidden":!0}),zG()]})]}),(0,I.jsx)(`p`,{className:`oc-sources-panel__acthint`,children:i==null?ZG():l?eK():HG()})]}):null]})}function R1({icon:e,label:t,count:n,expanded:r,onToggle:i,entries:a,selectable:o,selected:s,onToggle1:c,onToggleAll:l,attachmentByKey:u}){if(n===0)return null;let d=a.every(e=>s.has(e.key));return(0,I.jsxs)(`section`,{className:`oc-srcsec${r?` is-open`:``}`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-srcsec__head`,"aria-expanded":r,onClick:i,children:[r?(0,I.jsx)(dm,{size:14,"aria-hidden":!0}):(0,I.jsx)(fm,{size:14,"aria-hidden":!0}),e,(0,I.jsx)(`span`,{className:`oc-srcsec__label`,children:t}),(0,I.jsx)(`span`,{className:`oc-srcsec__count`,children:n})]}),r?(0,I.jsxs)(`div`,{className:`oc-srcsec__body`,children:[o?(0,I.jsxs)(`label`,{className:`oc-srcsec__all`,children:[(0,I.jsx)(T1,{checked:d,onCheckedChange:e=>l(e===!0)}),(0,I.jsx)(`span`,{children:NG()})]}):null,a.map(e=>(0,I.jsx)(v3e,{entry:e,selectable:o,selected:s.has(e.key),onToggle:()=>c(e.key),attachment:u.get(e.key)},e.key))]}):null]})}function v3e({entry:e,selectable:t,selected:n,onToggle:r,attachment:i}){let[a,o]=(0,N.useState)(!1),s=(0,N.useRef)(null),[c,l]=(0,N.useState)(!1),{item:u}=e;(0,N.useEffect)(()=>{let e=s.current;if(!e)return;let t=()=>l(e.scrollHeight>e.clientHeight+1);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[u.text]);let d=A1(u),f=typeof u.score==`number`?Math.max(0,Math.min(1,u.score)):null,p=N1(e);return(0,I.jsxs)(`div`,{className:`oc-srccard${t&&n?` is-selected`:``}`,children:[t?(0,I.jsx)(`label`,{className:`oc-srccard__pick`,children:(0,I.jsx)(T1,{checked:n,onCheckedChange:r})}):null,(0,I.jsxs)(`div`,{className:`oc-srccard__body`,children:[(0,I.jsx)(`div`,{className:`oc-srccard__title`,children:F1(e)}),d.length>0||f!==null?(0,I.jsxs)(`div`,{className:`oc-srccard__meta`,children:[d.map(e=>(0,I.jsx)(`span`,{className:`oc-srccard__chip`,children:e},e)),f===null?null:(0,I.jsx)(`span`,{className:`oc-srccard__relev`,title:hG({score:f.toFixed(2)}),children:(0,I.jsx)(`span`,{className:`oc-srccard__relev-track`,"aria-hidden":!0,children:(0,I.jsx)(`span`,{className:`oc-srccard__relev-fill`,style:{width:`${Math.round(f*100)}%`}})})})]}):null,u.text?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`blockquote`,{ref:s,className:`oc-srccard__excerpt${a?` is-full`:``}`,children:u.text}),c||a?(0,I.jsx)(`button`,{type:`button`,className:`oc-srccard__more`,onClick:()=>o(e=>!e),children:a?xK():vK()}):null]}):null,p?(0,I.jsx)(y3e,{attachment:i}):null]})]})}function y3e({attachment:e}){if(e?.status===`ready`&&e.url){let t=e.filename??fK();return(0,I.jsxs)(`a`,{className:`oc-srccard__origin oc-srccard__origin--ready`,href:e.url,download:e.filename??void 0,target:`_blank`,rel:`noreferrer`,title:fK(),children:[(0,I.jsx)(vm,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-srccard__origin-name`,children:t})]})}return e?.status===`pending`?(0,I.jsxs)(`div`,{className:`oc-srccard__origin oc-srccard__origin--pending`,children:[(0,I.jsx)(Cm,{size:13,"aria-hidden":!0}),lK()]}):e?.status===`not_found`||e?.status===`failed`?(0,I.jsxs)(`div`,{className:`oc-srccard__origin oc-srccard__origin--missing`,"aria-disabled":!0,children:[(0,I.jsx)(Gm,{size:13,"aria-hidden":!0}),hK()]}):(0,I.jsxs)(`div`,{className:`oc-srccard__origin`,"aria-disabled":!0,children:[(0,I.jsx)(vm,{size:13,"aria-hidden":!0}),JG()]})}var b3e=`oc.sidebar.width`,z1=`oc.sidebar.collapsed`,B1=200,V1=520,x3e=260,H1=`(max-width: 767px)`;function U1(){let[e,t]=(0,N.useState)(()=>typeof window<`u`&&window.matchMedia(H1).matches);return(0,N.useEffect)(()=>{let e=window.matchMedia(H1),n=e=>t(e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}function W1(e){let{storageKey:t,defaultWidth:n,min:r,max:i,edge:a}=e,o=(0,N.useCallback)(e=>Math.min(i,Math.max(r,e)),[r,i]),[s,c]=(0,N.useState)(()=>{let e=Number(localStorage.getItem(t));return e?Math.min(i,Math.max(r,e)):n});(0,N.useEffect)(()=>{localStorage.setItem(t,String(s))},[t,s]);let l=(0,N.useRef)(!1);return{width:s,startResize:(0,N.useCallback)(e=>{e.preventDefault(),l.current=!0;let t=e.clientX,n=s,r=a===`left`?1:-1,i=e=>{l.current&&c(o(n+r*(e.clientX-t)))},u=()=>{l.current=!1,window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,u),document.body.style.cursor=``,document.body.style.userSelect=``};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,u),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[s,a,o]),setWidth:c}}function S3e(){let{width:e,startResize:t}=W1({storageKey:b3e,defaultWidth:x3e,min:B1,max:V1,edge:`left`}),[n,r]=(0,N.useState)(()=>localStorage.getItem(z1)===`1`),i=U1();return(0,N.useEffect)(()=>{localStorage.setItem(z1,n?`1`:`0`)},[n]),(0,N.useEffect)(()=>{i&&r(!0)},[i]),{width:e,collapsed:n,toggleCollapsed:(0,N.useCallback)(()=>r(e=>!e),[]),collapse:(0,N.useCallback)(()=>r(!0),[]),startResize:t,isMobile:i,MIN_WIDTH:B1,MAX_WIDTH:V1}}function G1({...e}){return(0,I.jsx)(xx,{"data-slot":`sheet`,...e})}function C3e({...e}){return(0,I.jsx)(Sx,{"data-slot":`sheet-portal`,...e})}function w3e({className:e,...t}){return(0,I.jsx)(Cx,{"data-slot":`sheet-overlay`,className:B$(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function K1({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,I.jsxs)(C3e,{children:[(0,I.jsx)(w3e,{}),(0,I.jsxs)(wx,{"data-slot":`sheet-content`,"data-side":n,className:B$(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...i,children:[t,r&&(0,I.jsx)(Dx,{"data-slot":`sheet-close`,asChild:!0,children:(0,I.jsxs)(X,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,I.jsx)(Gm,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:UQ()})]})})]})]})}function q1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sheet-header`,className:B$(`flex flex-col gap-0.5 p-4`,e),...t})}function J1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sheet-footer`,className:B$(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function Y1({className:e,...t}){return(0,I.jsx)(Tx,{"data-slot":`sheet-title`,className:B$(`font-heading text-base font-medium text-foreground`,e),...t})}function X1({className:e,...t}){return(0,I.jsx)(Ex,{"data-slot":`sheet-description`,className:B$(`text-sm text-muted-foreground`,e),...t})}function T3e({mimeType:e,data:t,filename:n}){let r=e??``,i=t??``,a=n??`attachment`;return i?r.startsWith(`audio/`)?(0,I.jsxs)(`div`,{className:`oc-media oc-media--audio`,children:[(0,I.jsx)(`audio`,{controls:!0,preload:`metadata`,src:i,className:`oc-media__audio`,children:(0,I.jsx)(`a`,{href:i,download:a,children:`Download audio`})}),(0,I.jsx)(`span`,{className:`oc-media__name`,children:a})]}):r.startsWith(`image/`)?(0,I.jsxs)(`figure`,{className:`oc-media oc-media--image`,children:[(0,I.jsx)(`img`,{src:i,alt:a,className:`oc-media__img`,loading:`lazy`}),(0,I.jsx)(`figcaption`,{className:`oc-media__name`,children:a})]}):r.startsWith(`video/`)?(0,I.jsxs)(`div`,{className:`oc-media oc-media--video`,children:[(0,I.jsx)(`video`,{controls:!0,preload:`metadata`,src:i,className:`oc-media__video`}),(0,I.jsx)(`span`,{className:`oc-media__name`,children:a})]}):(0,I.jsxs)(`a`,{className:`oc-media oc-media--file`,href:i,target:`_blank`,rel:`noopener noreferrer`,children:[(0,I.jsx)(`span`,{className:`oc-media__icon`,"aria-hidden":!0,children:`⬇`}),(0,I.jsx)(`span`,{className:`oc-media__name`,children:a})]}):null}var E3e=(e,t)=>typeof e==`string`?e===t:JSON.stringify(e)===JSON.stringify(t),D3e=(e,t)=>{if(!e||!t)return!1;let n=e=>{let{position:t,data:n,...r}=e||{};return r};return JSON.stringify(n(e.properties))===JSON.stringify(n(t.properties))&&E3e(e.children,t.children)},Z1=(e,t)=>D3e(e.node,t.node),Q1=(0,N.createContext)(null),O3e=()=>(0,N.useContext)(Q1)!==null,k3e=(0,N.memo)(({children:e,...t})=>(0,I.jsx)(Q1.Provider,{value:t,children:e}),Z1),A3e=({node:e,...t})=>(0,I.jsx)(`pre`,{...t}),j3e=({node:e,...t})=>(0,I.jsx)(`code`,{...t}),$1=({node:e,components:{Pre:t,Code:n},code:r})=>(0,I.jsx)(t,{children:(0,I.jsx)(n,{node:e,children:r})}),M3e=()=>null,N3e=({node:e,components:{Pre:t,Code:n,SyntaxHighlighter:r,CodeHeader:i},language:a,code:o})=>{let s=(0,N.useMemo)(()=>({Pre:t,Code:n}),[t,n]);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(i,{node:e,language:a,code:o}),(0,I.jsx)(a?r:$1,{node:e,components:s,language:a??`unknown`,code:o})]})},e0=u(o(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()}))(),1),t0=({className:e,...t})=>({className:n,...r})=>({className:(0,e0.default)(e,n),...t,...r}),P3e=({node:e,components:{Pre:t,Code:n,SyntaxHighlighter:r,CodeHeader:i},componentsByLanguage:a={},children:o,...s})=>{let c=t0((0,N.useContext)(Q1)),l=Py(e=>(0,I.jsx)(t,{...c(e)})),u=t0(s),d=Py(e=>(0,I.jsx)(n,{...u(e)})),f=/language-(\w+)/.exec(s.className||``)?.[1]??``;return typeof o==`string`?(0,I.jsx)(N3e,{node:e,components:{Pre:l,Code:d,SyntaxHighlighter:a[f]?.SyntaxHighlighter??r,CodeHeader:a[f]?.CodeHeader??i},language:f||`unknown`,code:o}):(0,I.jsx)($1,{node:e,components:{Pre:l,Code:d},code:o})},F3e=(0,N.memo)(({node:e,components:t,componentsByLanguage:n,...r})=>O3e()?(0,I.jsx)(P3e,{node:e,components:t,componentsByLanguage:n,...r}):(0,I.jsx)(t.Code,{...r}),(e,t)=>e.components===t.components&&e.componentsByLanguage===t.componentsByLanguage&&Z1(e,t));function I3e(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var L3e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R3e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,z3e={};function n0(e,t){return((t||z3e).jsx?R3e:L3e).test(e)}var B3e=/[ \t\n\f\r]/g;function V3e(e){return typeof e==`object`?e.type===`text`?r0(e.value):!1:r0(e)}function r0(e){return e.replace(B3e,``)===``}var i0=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};i0.prototype.normal={},i0.prototype.property={},i0.prototype.space=void 0;function a0(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new i0(n,r,t)}function o0(e){return e.toLowerCase()}var s0=class{constructor(e,t){this.attribute=t,this.property=e}};s0.prototype.attribute=``,s0.prototype.booleanish=!1,s0.prototype.boolean=!1,s0.prototype.commaOrSpaceSeparated=!1,s0.prototype.commaSeparated=!1,s0.prototype.defined=!1,s0.prototype.mustUseProperty=!1,s0.prototype.number=!1,s0.prototype.overloadedBoolean=!1,s0.prototype.property=``,s0.prototype.spaceSeparated=!1,s0.prototype.space=void 0;var c0=s({boolean:()=>l0,booleanish:()=>u0,commaOrSpaceSeparated:()=>m0,commaSeparated:()=>p0,number:()=>Z,overloadedBoolean:()=>d0,spaceSeparated:()=>f0}),H3e=0,l0=h0(),u0=h0(),d0=h0(),Z=h0(),f0=h0(),p0=h0(),m0=h0();function h0(){return 2**++H3e}var g0=Object.keys(c0),_0=class extends s0{constructor(e,t,n,r){let i=-1;if(super(e,t),v0(this,`space`,r),typeof n==`number`)for(;++i<g0.length;){let e=g0[i];v0(this,g0[i],(n&c0[e])===c0[e])}}};_0.prototype.defined=!0;function v0(e,t,n){n&&(e[t]=n)}function y0(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new _0(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[o0(r)]=r,n[o0(a.attribute)]=r}return new i0(t,n,e.space)}var b0=y0({properties:{ariaActiveDescendant:null,ariaAtomic:u0,ariaAutoComplete:null,ariaBusy:u0,ariaChecked:u0,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:f0,ariaCurrent:null,ariaDescribedBy:f0,ariaDetails:null,ariaDisabled:u0,ariaDropEffect:f0,ariaErrorMessage:null,ariaExpanded:u0,ariaFlowTo:f0,ariaGrabbed:u0,ariaHasPopup:null,ariaHidden:u0,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:f0,ariaLevel:Z,ariaLive:null,ariaModal:u0,ariaMultiLine:u0,ariaMultiSelectable:u0,ariaOrientation:null,ariaOwns:f0,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:u0,ariaReadOnly:u0,ariaRelevant:null,ariaRequired:u0,ariaRoleDescription:f0,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:u0,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function x0(e,t){return t in e?e[t]:t}function S0(e,t){return x0(e,t.toLowerCase())}var U3e=y0({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:p0,acceptCharset:f0,accessKey:f0,action:null,allow:null,allowFullScreen:l0,allowPaymentRequest:l0,allowUserMedia:l0,alpha:l0,alt:null,as:null,async:l0,autoCapitalize:null,autoComplete:f0,autoFocus:l0,autoPlay:l0,blocking:f0,capture:null,charSet:null,checked:l0,cite:null,className:f0,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:u0,controls:l0,controlsList:f0,coords:Z|p0,crossOrigin:null,data:null,dateTime:null,decoding:null,default:l0,defer:l0,dir:null,dirName:null,disabled:l0,download:d0,draggable:u0,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:l0,formTarget:null,headers:f0,height:Z,hidden:d0,high:Z,href:null,hrefLang:null,htmlFor:f0,httpEquiv:f0,id:null,imageSizes:null,imageSrcSet:null,inert:l0,inputMode:null,integrity:null,is:null,isMap:l0,itemId:null,itemProp:f0,itemRef:f0,itemScope:l0,itemType:f0,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:l0,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:l0,muted:l0,name:null,nonce:null,noModule:l0,noValidate:l0,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:l0,optimum:Z,pattern:null,ping:f0,placeholder:null,playsInline:l0,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:l0,referrerPolicy:null,rel:f0,required:l0,reversed:l0,rows:Z,rowSpan:Z,sandbox:f0,scope:null,scoped:l0,seamless:l0,selected:l0,shadowRootClonable:l0,shadowRootCustomElementRegistry:l0,shadowRootDelegatesFocus:l0,shadowRootMode:null,shadowRootSerializable:l0,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:u0,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:l0,useMap:null,value:u0,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:f0,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:l0,declare:l0,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:l0,noHref:l0,noShade:l0,noWrap:l0,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:u0,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:l0,disablePictureInPicture:l0,disableRemotePlayback:l0,exportParts:p0,part:f0,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:S0}),W3e=y0({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:m0,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:f0,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:l0,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:p0,g2:p0,glyphName:p0,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:m0,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:f0,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:m0,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:m0,rev:m0,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:m0,requiredFeatures:m0,requiredFonts:m0,requiredFormats:m0,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:m0,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:m0,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:m0,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:x0}),C0=y0({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),w0=y0({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:S0}),T0=y0({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),G3e={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},K3e=/[A-Z]/g,E0=/-[a-z]/g,q3e=/^data[-\w.:]+$/i;function J3e(e,t){let n=o0(t),r=t,i=s0;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&q3e.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(E0,X3e);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!E0.test(e)){let n=e.replace(K3e,Y3e);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=_0}return new i(r,t)}function Y3e(e){return`-`+e.toLowerCase()}function X3e(e){return e.charAt(1).toUpperCase()}var Z3e=a0([b0,U3e,C0,w0,T0],`html`),D0=a0([b0,W3e,C0,w0,T0],`svg`);function Q3e(e){return e.join(` `).trim()}var $3e=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
131
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),e6e=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t($3e());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),t6e=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),n6e=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e6e()),r=t6e();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),O0=A0(`end`),k0=A0(`start`);function A0(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function r6e(e){let t=k0(e),n=O0(e);if(t&&n)return{start:t,end:n}}function j0(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?N0(e.position):`start`in e||`end`in e?N0(e):`line`in e||`column`in e?M0(e):``}function M0(e){return P0(e&&e.line)+`:`+P0(e&&e.column)}function N0(e){return M0(e&&e.start)+`-`+M0(e&&e.end)}function P0(e){return e&&typeof e==`number`?e:1}var F0=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=j0(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};F0.prototype.file=``,F0.prototype.name=``,F0.prototype.reason=``,F0.prototype.message=``,F0.prototype.stack=``,F0.prototype.column=void 0,F0.prototype.line=void 0,F0.prototype.ancestors=void 0,F0.prototype.cause=void 0,F0.prototype.fatal=void 0,F0.prototype.place=void 0,F0.prototype.ruleId=void 0,F0.prototype.source=void 0;var i6e=u(n6e(),1),I0={}.hasOwnProperty,a6e=new Map,o6e=/[A-Z]/g,s6e=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),c6e=new Set([`td`,`th`]);function l6e(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=_6e(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=g6e(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?D0:Z3e,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=L0(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function L0(e,t,n){if(t.type===`element`)return u6e(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return d6e(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return p6e(e,t,n);if(t.type===`mdxjsEsm`)return f6e(e,t);if(t.type===`root`)return m6e(e,t,n);if(t.type===`text`)return h6e(e,t)}function u6e(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=D0,e.schema=i),e.ancestors.push(t);let a=V0(e,t.tagName,!1),o=v6e(e,t),s=B0(e,t);return s6e.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!V3e(e):!0})),R0(e,o,a,t),z0(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function d6e(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}H0(e,t.position)}function f6e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);H0(e,t.position)}function p6e(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=D0,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:V0(e,t.name,!0),o=y6e(e,t),s=B0(e,t);return R0(e,o,a,t),z0(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function m6e(e,t,n){let r={};return z0(r,B0(e,t)),e.create(t,e.Fragment,r,n)}function h6e(e,t){return t.value}function R0(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function z0(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function g6e(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function _6e(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=k0(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function v6e(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&I0.call(t.properties,i)){let a=b6e(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&c6e.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function y6e(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else H0(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else H0(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function B0(e,t){let n=[],r=-1,i=e.passKeys?new Map:a6e;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=L0(e,a,o);s!==void 0&&n.push(s)}return n}function b6e(e,t,n){let r=J3e(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?I3e(n):Q3e(n)),r.property===`style`){let t=typeof n==`object`?n:x6e(e,String(n));return e.stylePropertyNameCase===`css`&&(t=S6e(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?G3e[r.property]||r.property:r.attribute,n]}}function x6e(e,t){try{return(0,i6e.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new F0("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function V0(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=n0(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=n0(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return I0.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);H0(e)}function H0(e,t){let n=new F0("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function S6e(e){let t={},n;for(n in e)I0.call(e,n)&&(t[C6e(n)]=e[n]);return t}function C6e(e){let t=e.replace(o6e,w6e);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function w6e(e){return`-`+e.toLowerCase()}var U0={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},T6e={};function W0(e,t){let n=t||T6e;return G0(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function G0(e,t,n){if(E6e(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return K0(e.children,t,n)}return Array.isArray(e)?K0(e,t,n):``}function K0(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=G0(e[i],t,n);return r.join(``)}function E6e(e){return!!(e&&typeof e==`object`)}var q0=document.createElement(`i`);function J0(e){let t=`&`+e+`;`;q0.innerHTML=t;let n=q0.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Y0(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function X0(e,t){return e.length>0?(Y0(e,e.length,0,t),e):t}var Z0={}.hasOwnProperty;function Q0(e){let t={},n=-1;for(;++n<e.length;)D6e(t,e[n]);return t}function D6e(e,t){let n;for(n in t){let r=(Z0.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Z0.call(r,a)||(r[a]=[]);let e=i[a];O6e(r[a],Array.isArray(e)?e:e?[e]:[])}}}function O6e(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Y0(e,0,0,r)}function $0(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function e2(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var t2=u2(/[A-Za-z]/),n2=u2(/[\dA-Za-z]/),k6e=u2(/[#-'*+\--9=?A-Z^-~]/);function r2(e){return e!==null&&(e<32||e===127)}var i2=u2(/\d/),A6e=u2(/[\dA-Fa-f]/),j6e=u2(/[!-/:-@[-`{-~]/);function a2(e){return e!==null&&e<-2}function o2(e){return e!==null&&(e<0||e===32)}function s2(e){return e===-2||e===-1||e===32}var c2=u2(/\p{P}|\p{S}/u),l2=u2(/\s/);function u2(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function d2(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&n2(e.charCodeAt(n+1))&&n2(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function f2(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return s2(r)?(e.enter(n),s(r)):t(r)}function s(r){return s2(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var M6e={tokenize:N6e};function N6e(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),f2(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return a2(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var P6e={tokenize:F6e},p2={tokenize:I6e};function F6e(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Y0(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(p2,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(p2,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return a2(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Y0(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function I6e(e,t,n){return f2(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function m2(e){if(e===null||o2(e)||l2(e))return 1;if(c2(e))return 2}function h2(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var g2={name:`attention`,resolveAll:L6e,tokenize:R6e};function L6e(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};_2(d,-c),_2(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=X0(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=X0(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=X0(l,h2(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=X0(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=X0(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Y0(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function R6e(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=m2(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=m2(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function _2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var z6e={name:`autolink`,tokenize:B6e};function B6e(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return t2(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||n2(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||n2(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||r2(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):k6e(t)?(e.consume(t),l):n(t)}function u(e){return n2(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||n2(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var v2={partial:!0,tokenize:V6e};function V6e(e,t,n){return r;function r(t){return s2(t)?f2(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||a2(e)?t(e):n(e)}}var y2={continuation:{tokenize:U6e},exit:W6e,name:`blockQuote`,tokenize:H6e};function H6e(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return s2(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function U6e(e,t,n){let r=this;return i;function i(t){return s2(t)?f2(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(y2,t,n)(r)}}function W6e(e){e.exit(`blockQuote`)}var b2={name:`characterEscape`,tokenize:G6e};function G6e(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return j6e(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var x2={name:`characterReference`,tokenize:K6e};function K6e(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=n2,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=A6e,u):(e.enter(`characterReferenceValue`),a=7,o=i2,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===n2&&!J0(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var S2={partial:!0,tokenize:J6e},C2={concrete:!0,name:`codeFenced`,tokenize:q6e};function q6e(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),s2(t)?f2(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||a2(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(S2,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||a2(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):s2(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),f2(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||a2(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||a2(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&s2(t)?f2(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||a2(t)?e.check(S2,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||a2(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),s2(t)?f2(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),s2(t)?f2(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||a2(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function J6e(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var w2={name:`codeIndented`,tokenize:X6e},Y6e={partial:!0,tokenize:Z6e};function X6e(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),f2(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):a2(t)?e.attempt(Y6e,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||a2(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Z6e(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):a2(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):f2(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):a2(e)?i(e):n(e)}}var Q6e={name:`codeText`,previous:e8e,resolve:$6e,tokenize:t8e};function $6e(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function e8e(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function t8e(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):a2(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||a2(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var n8e=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&T2(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),T2(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),T2(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);T2(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);T2(this.left,t.reverse())}}};function T2(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function E2(e){let t={},n=-1,r,i,a,o,s,c,l,u=new n8e(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,r8e(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Y0(e,0,1/0,u.slice(0)),!l}function r8e(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var i8e={resolve:o8e,tokenize:s8e},a8e={partial:!0,tokenize:c8e};function o8e(e){return E2(e),e}function s8e(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):a2(t)?e.check(a8e,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function c8e(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),f2(e,a,`linePrefix`)}function a(i){if(i===null||a2(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function D2(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||r2(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||a2(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||o2(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||r2(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function O2(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):a2(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||a2(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!s2(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function k2(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):a2(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),f2(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||a2(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function A2(e,t){let n;return r;function r(i){return a2(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):s2(i)?f2(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var l8e={name:`definition`,tokenize:d8e},u8e={partial:!0,tokenize:f8e};function d8e(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return O2.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=e2(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return o2(t)?A2(e,l)(t):l(t)}function l(t){return D2(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(u8e,d,d)(t)}function d(t){return s2(t)?f2(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||a2(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function f8e(e,t,n){return r;function r(t){return o2(t)?A2(e,i)(t):n(t)}function i(t){return k2(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return s2(t)?f2(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||a2(e)?t(e):n(e)}}var p8e={name:`hardBreakEscape`,tokenize:m8e};function m8e(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return a2(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var h8e={name:`headingAtx`,resolve:g8e,tokenize:_8e};function g8e(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Y0(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function _8e(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||o2(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||a2(n)?(e.exit(`atxHeading`),t(n)):s2(n)?f2(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||o2(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var v8e=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),j2=[`pre`,`script`,`style`,`textarea`],y8e={concrete:!0,name:`htmlFlow`,resolveTo:S8e,tokenize:C8e},b8e={partial:!0,tokenize:T8e},x8e={partial:!0,tokenize:w8e};function S8e(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function C8e(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:M):t2(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):t2(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return t2(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||o2(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&j2.includes(l)?(i=1,r.interrupt?t(s):O(s)):v8e.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||n2(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return s2(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||t2(t)?(e.consume(t),b):s2(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||n2(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):s2(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):s2(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||a2(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||o2(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||s2(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||a2(t)?O(t):s2(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ie):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),re):a2(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(b8e,ae,ee)(t)):t===null||a2(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(x8e,te,ae)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return t===null||a2(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),M):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return j2.includes(n)?(e.consume(t),ie):O(t)}return t2(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),M):O(t)}function M(t){return t===62?(e.consume(t),ie):t===45&&i===2?(e.consume(t),M):O(t)}function ie(t){return t===null||a2(t)?(e.exit(`htmlFlowData`),ae(t)):(e.consume(t),ie)}function ae(n){return e.exit(`htmlFlow`),t(n)}}function w8e(e,t,n){let r=this;return i;function i(t){return a2(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function T8e(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(v2,t,n)}}var E8e={name:`htmlText`,tokenize:D8e};function D8e(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):t2(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):t2(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):a2(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):a2(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):a2(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):a2(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return t2(t)?(e.consume(t),S):n(t)}function S(t){return t===45||n2(t)?(e.consume(t),S):C(t)}function C(t){return a2(t)?(o=C,j(t)):s2(t)?(e.consume(t),C):A(t)}function w(t){return t===45||n2(t)?(e.consume(t),w):t===47||t===62||o2(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||t2(t)?(e.consume(t),E):a2(t)?(o=T,j(t)):s2(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||n2(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):a2(t)?(o=D,j(t)):s2(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):a2(t)?(o=O,j(t)):s2(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,k):t===null?n(t):a2(t)?(o=ee,j(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||o2(t)?T(t):(e.consume(t),te)}function k(e){return e===47||e===62||o2(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return s2(t)?f2(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var M2={name:`labelEnd`,resolveAll:j8e,resolveTo:M8e,tokenize:N8e},O8e={tokenize:P8e},k8e={tokenize:F8e},A8e={tokenize:I8e};function j8e(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Y0(e,0,e.length,n),e}function M8e(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=X0(s,e.slice(a+1,a+r+3)),s=X0(s,[[`enter`,u,t]]),s=X0(s,h2(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=X0(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=X0(s,e.slice(o+1)),s=X0(s,[[`exit`,c,t]]),Y0(e,a,e.length,s),e}function N8e(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(e2(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(O8e,u,o?u:d)(t):t===91?e.attempt(k8e,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(A8e,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function P8e(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return o2(t)?A2(e,a)(t):a(t)}function a(t){return t===41?u(t):D2(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return o2(t)?A2(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?k2(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return o2(t)?A2(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function F8e(e,t,n){let r=this;return i;function i(t){return O2.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(e2(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function I8e(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var L8e={name:`labelStartImage`,resolveAll:M2.resolveAll,tokenize:R8e};function R8e(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var z8e={name:`labelStartLink`,resolveAll:M2.resolveAll,tokenize:B8e};function B8e(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var N2={name:`lineEnding`,tokenize:V8e};function V8e(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),f2(e,t,`linePrefix`)}}var P2={name:`thematicBreak`,tokenize:H8e};function H8e(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||a2(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),s2(t)?f2(e,s,`whitespace`)(t):s(t))}}var F2={continuation:{tokenize:K8e},exit:J8e,name:`list`,tokenize:G8e},U8e={partial:!0,tokenize:Y8e},W8e={partial:!0,tokenize:q8e};function G8e(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:i2(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(P2,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return i2(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(v2,r.interrupt?n:u,e.attempt(U8e,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return s2(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function K8e(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(v2,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,f2(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!s2(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(W8e,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,f2(e,e.attempt(F2,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function q8e(e,t,n){let r=this;return f2(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function J8e(e){e.exit(this.containerState.type)}function Y8e(e,t,n){let r=this;return f2(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!s2(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var I2={name:`setextUnderline`,resolveTo:X8e,tokenize:Z8e};function X8e(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Z8e(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),s2(t)?f2(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||a2(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Q8e={tokenize:$8e};function $8e(e){let t=this,n=e.attempt(v2,r,e.attempt(this.parser.constructs.flowInitial,i,f2(e,e.attempt(this.parser.constructs.flow,i,e.attempt(i8e,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var e5e={resolveAll:R2()},t5e=L2(`string`),n5e=L2(`text`);function L2(e){return{resolveAll:R2(e===`text`?r5e:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function R2(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function r5e(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var i5e=s({attentionMarkers:()=>f5e,contentInitial:()=>o5e,disable:()=>p5e,document:()=>a5e,flow:()=>c5e,flowInitial:()=>s5e,insideSpan:()=>d5e,string:()=>l5e,text:()=>u5e}),a5e={42:F2,43:F2,45:F2,48:F2,49:F2,50:F2,51:F2,52:F2,53:F2,54:F2,55:F2,56:F2,57:F2,62:y2},o5e={91:l8e},s5e={[-2]:w2,[-1]:w2,32:w2},c5e={35:h8e,42:P2,45:[I2,P2],60:y8e,61:I2,95:P2,96:C2,126:C2},l5e={38:x2,92:b2},u5e={[-5]:N2,[-4]:N2,[-3]:N2,33:L8e,38:x2,42:g2,60:[z6e,E8e],91:z8e,92:[p8e,b2],93:M2,95:g2,96:Q6e},d5e={null:[g2,e5e]},f5e={null:[42,95]},p5e={null:[]};function m5e(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=X0(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=h2(a,l.events,l),l.events):[]}function f(e,t){return g5e(p(e),t)}function p(e){return h5e(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){a2(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Y0(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function h5e(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function g5e(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
132
132
|
`;break;case-3:o=`\r
|
|
133
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function h5e(e){let t={constructs:$0([n5e,...(e||{}).extensions||[]]),content:n(A6e),defined:[],document:n(M6e),flow:n(X8e),lazy:{},string:n($8e),text:n(e5e)};return t;function n(e){return n;function n(n){return f5e(t,e,n)}}}function g5e(e){for(;!D2(e););return e}var B2=/[\0\t\n\r]/g;function _5e(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(B2.lastIndex=u,c=B2.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var v5e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function y5e(e){return e.replace(v5e,b5e)}function b5e(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return e2(n.slice(t?2:1),t?16:10)}return Y0(n)||e}var V2={}.hasOwnProperty;function x5e(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),S5e(n)(g5e(h5e(n).document().write(_5e()(e,t,!0))))}function S5e(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Se),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ve),blockQuote:a(pe),characterEscape:T,characterReference:T,codeFenced:a(me),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(me,o),codeText:a(he,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ge),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(_e),hardBreakEscape:a(ye),hardBreakTrailing:a(ye),htmlFlow:a(be,o),htmlFlowData:T,htmlText:a(be,o),htmlTextData:T,image:a(xe),label:o,link:a(Se),listItem:a(we),listItemValue:f,listOrdered:a(Ce,d),listUnordered:a(Ce),paragraph:a(Te),reference:oe,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ve),strong:a(Ee),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:fe,autolinkProtocol:de,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:le,characterReference:ue,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(k),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:se,resourceDestinationString:M,resourceTitleString:ie,resource:ae,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};U2(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];V2.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||W2).call(a,void 0,e[0])}for(r.position={start:H2(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:H2(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:H2(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||W2).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+M0({start:e.start,end:e.end})+`): it’s not open`);n.position.end=H2(e.end)}function u(){return G0(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=t2(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=De(),n.position={start:H2(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=H2(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=H2(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=y5e(t),n.identifier=t2(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ae(){this.data.inReference=void 0}function oe(){this.data.referenceType=`collapsed`}function se(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=t2(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ce(e){this.data.characterReferenceType=e.type}function le(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=e2(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Y0(t);let i=this.stack[this.stack.length-1];i.value+=r}function ue(e){let t=this.stack.pop();t.position.end=H2(e.end)}function de(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function fe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function pe(){return{type:`blockquote`,children:[]}}function me(){return{type:`code`,lang:null,meta:null,value:``}}function he(){return{type:`inlineCode`,value:``}}function ge(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function _e(){return{type:`emphasis`,children:[]}}function ve(){return{type:`heading`,depth:0,children:[]}}function ye(){return{type:`break`}}function be(){return{type:`html`,value:``}}function xe(){return{type:`image`,title:null,url:``,alt:null}}function Se(){return{type:`link`,title:null,url:``,children:[]}}function Ce(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function we(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Te(){return{type:`paragraph`,children:[]}}function Ee(){return{type:`strong`,children:[]}}function De(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function H2(e){return{line:e.line,column:e.column,offset:e.offset}}function U2(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?U2(e,r):C5e(e,r)}}function C5e(e,t){let n;for(n in t)if(V2.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function W2(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+M0({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+M0({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+M0({start:t.start,end:t.end})+`) is still open`)}function w5e(e){let t=this;t.parser=n;function n(n){return x5e(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function T5e(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function E5e(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
134
|
-
`}]}function
|
|
135
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function
|
|
133
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function _5e(e){let t={constructs:Q0([i5e,...(e||{}).extensions||[]]),content:n(M6e),defined:[],document:n(P6e),flow:n(Q8e),lazy:{},string:n(t5e),text:n(n5e)};return t;function n(e){return n;function n(n){return m5e(t,e,n)}}}function v5e(e){for(;!E2(e););return e}var z2=/[\0\t\n\r]/g;function y5e(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(z2.lastIndex=u,c=z2.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var b5e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function x5e(e){return e.replace(b5e,S5e)}function S5e(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return $0(n.slice(t?2:1),t?16:10)}return J0(n)||e}var B2={}.hasOwnProperty;function C5e(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),w5e(n)(v5e(_5e(n).document().write(y5e()(e,t,!0))))}function w5e(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Se),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ve),blockQuote:a(pe),characterEscape:T,characterReference:T,codeFenced:a(me),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(me,o),codeText:a(he,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ge),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(_e),hardBreakEscape:a(ye),hardBreakTrailing:a(ye),htmlFlow:a(be,o),htmlFlowData:T,htmlText:a(be,o),htmlTextData:T,image:a(xe),label:o,link:a(Se),listItem:a(we),listItemValue:f,listOrdered:a(Ce,d),listUnordered:a(Ce),paragraph:a(Te),reference:oe,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ve),strong:a(Ee),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:fe,autolinkProtocol:de,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:le,characterReference:ue,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(k),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:se,resourceDestinationString:M,resourceTitleString:ie,resource:ae,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};H2(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];B2.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||U2).call(a,void 0,e[0])}for(r.position={start:V2(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:V2(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:V2(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||U2).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+j0({start:e.start,end:e.end})+`): it’s not open`);n.position.end=V2(e.end)}function u(){return W0(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=e2(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=De(),n.position={start:V2(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=V2(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=V2(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=x5e(t),n.identifier=e2(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ae(){this.data.inReference=void 0}function oe(){this.data.referenceType=`collapsed`}function se(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=e2(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ce(e){this.data.characterReferenceType=e.type}function le(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=$0(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=J0(t);let i=this.stack[this.stack.length-1];i.value+=r}function ue(e){let t=this.stack.pop();t.position.end=V2(e.end)}function de(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function fe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function pe(){return{type:`blockquote`,children:[]}}function me(){return{type:`code`,lang:null,meta:null,value:``}}function he(){return{type:`inlineCode`,value:``}}function ge(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function _e(){return{type:`emphasis`,children:[]}}function ve(){return{type:`heading`,depth:0,children:[]}}function ye(){return{type:`break`}}function be(){return{type:`html`,value:``}}function xe(){return{type:`image`,title:null,url:``,alt:null}}function Se(){return{type:`link`,title:null,url:``,children:[]}}function Ce(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function we(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Te(){return{type:`paragraph`,children:[]}}function Ee(){return{type:`strong`,children:[]}}function De(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function V2(e){return{line:e.line,column:e.column,offset:e.offset}}function H2(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?H2(e,r):T5e(e,r)}}function T5e(e,t){let n;for(n in t)if(B2.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function U2(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+j0({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+j0({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+j0({start:t.start,end:t.end})+`) is still open`)}function E5e(e){let t=this;t.parser=n;function n(n){return C5e(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function D5e(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function O5e(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
134
|
+
`}]}function k5e(e,t){let n=t.value?t.value+`
|
|
135
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function A5e(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function j5e(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function M5e(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=d2(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function N5e(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P5e(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function W2(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function F5e(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W2(e,t);let i={src:d2(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function I5e(e,t){let n={src:d2(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function L5e(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function R5e(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return W2(e,t);let i={href:d2(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function z5e(e,t){let n={href:d2(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function B5e(e,t,n){let r=e.all(t),i=n?V5e(n):G2(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
136
136
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
137
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
137
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function V5e(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=G2(n[r])}return t}function G2(e){return e.spread??e.children.length>1}function H5e(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function U5e(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function W5e(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function G5e(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function K5e(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=k0(t.children[1]),o=O0(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function q5e(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function J5e(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var K2=9,q2=32;function Y5e(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(J2(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(J2(t.slice(i),i>0,!1)),a.join(``)}function J2(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===K2||t===q2;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===K2||t===q2;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function X5e(e,t){let n={type:`text`,value:Y5e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Z5e(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Q5e={blockquote:D5e,break:O5e,code:k5e,delete:A5e,emphasis:j5e,footnoteReference:M5e,heading:N5e,html:P5e,imageReference:F5e,image:I5e,inlineCode:L5e,linkReference:R5e,link:z5e,listItem:B5e,list:H5e,paragraph:U5e,root:W5e,strong:G5e,table:K5e,tableCell:J5e,tableRow:q5e,text:X5e,thematicBreak:Z5e,toml:Y2,yaml:Y2,definition:Y2,footnoteDefinition:Y2};function Y2(){}var $5e=typeof self==`object`?self:globalThis,X2=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new $5e[e](t)},e7e=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(X2(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(X2(a,o),i)};return r},Z2=e=>e7e(new Map,e)(0),Q2=``,{toString:t7e}={},{keys:n7e}=Object,$2=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=t7e.call(e).slice(8,-1);switch(n){case`Array`:return[1,Q2];case`Object`:return[2,Q2];case`Date`:return[3,Q2];case`RegExp`:return[4,Q2];case`Map`:return[5,Q2];case`Set`:return[6,Q2];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},e4=([e,t])=>e===0&&(t===`function`||t===`symbol`),r7e=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=$2(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of n7e(r))(e||!e4($2(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(e4($2(n))||e4($2(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!e4($2(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},t4=(e,{json:t,lossy:n}={})=>{let r=[];return r7e(!(t||n),!!t,new Map,r)(e),r},n4=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Z2(t4(e,t)):structuredClone(e):(e,t)=>Z2(t4(e,t));function i7e(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function a7e(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function o7e(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||i7e,r=e.options.footnoteBackLabel||a7e,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=d2(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...n4(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
138
138
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
139
|
-
`}]}}var
|
|
139
|
+
`}]}}var r4=(function(e){if(e==null)return u7e;if(typeof e==`function`)return i4(e);if(typeof e==`object`)return Array.isArray(e)?s7e(e):c7e(e);if(typeof e==`string`)return l7e(e);throw Error(`Expected function, string, or object as test`)});function s7e(e){let t=[],n=-1;for(;++n<e.length;)t[n]=r4(e[n]);return i4(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function c7e(e){let t=e;return i4(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function l7e(e){return i4(t);function t(t){return t&&t.type===e}}function i4(e){return t;function t(t,n,r){return!!(d7e(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function u7e(){return!0}function d7e(e){return typeof e==`object`&&!!e&&`type`in e}function f7e(e){return e}var a4=[];function o4(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=r4(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+f7e(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=a4,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=p7e(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function p7e(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?a4:[e]}function s4(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),o4(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var c4={}.hasOwnProperty,m7e={};function h7e(e,t){let n=t||m7e,r=new Map,i=new Map,a={all:s,applyData:_7e,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Q5e,...n.handlers},one:o,options:n,patch:g7e,wrap:y7e};return s4(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(c4.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=n4(n);return r.children=a.all(e),r}return n4(e)}return(a.options.unknownHandler||v7e)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=l4(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=l4(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function g7e(e,t){e.position&&(t.position=r6e(e))}function _7e(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,n4(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function v7e(e,t){let n=t.data||{},r=`value`in t&&!(c4.call(n,`hProperties`)||c4.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function y7e(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
140
140
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
141
141
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
142
|
-
`}),n}function
|
|
143
|
-
`},i)),a}function v7e(e,t){return e&&`run`in e?async function(n,r){let i=d4(n,{file:r,...t});await e.run(i,r)}:function(n,r){return d4(n,{file:r,...e||t})}}function f4(e){if(e)throw e}var y7e=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function p4(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function b7e(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?x7e(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function x7e(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var m4={basename:S7e,dirname:C7e,extname:w7e,join:T7e,sep:`/`};function S7e(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);h4(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function C7e(e){if(h4(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function w7e(e){h4(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function T7e(...e){let t=-1,n;for(;++t<e.length;)h4(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:E7e(n)}function E7e(e){h4(e);let t=e.codePointAt(0)===47,n=D7e(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function D7e(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function h4(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var O7e={cwd:k7e};function k7e(){return`/`}function g4(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function A7e(e){if(typeof e==`string`)e=new URL(e);else if(!g4(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return j7e(e)}function j7e(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var _4=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],v4=class{constructor(e){let t;t=e?g4(e)?{path:e}:typeof e==`string`||M7e(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:O7e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<_4.length;){let e=_4[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)_4.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?m4.basename(this.path):void 0}set basename(e){b4(e,`basename`),y4(e,`basename`),this.path=m4.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?m4.dirname(this.path):void 0}set dirname(e){x4(this.basename,`dirname`),this.path=m4.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?m4.extname(this.path):void 0}set extname(e){if(y4(e,`extname`),x4(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=m4.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){g4(e)&&(e=A7e(e)),b4(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?m4.basename(this.path,this.extname):void 0}set stem(e){b4(e,`stem`),y4(e,`stem`),this.path=m4.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new I0(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function y4(e,t){if(e&&e.includes(m4.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+m4.sep+"`")}function b4(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function x4(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function M7e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var N7e=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),S4=u(y7e(),1),P7e={}.hasOwnProperty,F7e=new class e extends N7e{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=b7e()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,S4.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(T4(`data`,this.frozen),this.namespace[e]=t,this):P7e.call(this.namespace,e)&&this.namespace[e]||void 0:e?(T4(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=O4(e),n=this.parser||this.Parser;return C4(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),C4(`process`,this.parser||this.Parser),w4(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=O4(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);L7e(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),C4(`processSync`,this.parser||this.Parser),w4(`processSync`,this.compiler||this.Compiler),this.process(e,r),D4(`processSync`,`process`,t),n;function r(e,r){t=!0,f4(e),n=r}}run(e,t,n){E4(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=O4(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),D4(`runSync`,`run`,n),r;function i(e,t){f4(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=O4(t),r=this.compiler||this.Compiler;return w4(`stringify`,r),E4(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(T4(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,S4.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];p4(o)&&p4(r)&&(r=(0,S4.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function C4(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function w4(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function T4(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function E4(e){if(!p4(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function D4(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function O4(e){return I7e(e)?e:new v4(e)}function I7e(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function L7e(e){return typeof e==`string`||R7e(e)}function R7e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var k4=[],A4={allowDangerousHtml:!0},z7e=/^(https?|ircs?|mailto|xmpp)$/i,B7e=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function V7e(e){let t=H7e(e),n=U7e(e);return W7e(t.runSync(t.parse(n),n),e)}function H7e(e){let t=e.rehypePlugins||k4,n=e.remarkPlugins||k4,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...A4}:A4;return F7e().use(w5e).use(n).use(v7e,r).use(t)}function U7e(e){let t=e.children||``,n=new v4;return typeof t==`string`?n.value=t:``+t,n}function W7e(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||G7e;for(let e of B7e)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return c4(e,l),s6e(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in W0)if(Object.hasOwn(W0,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=W0[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function G7e(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||z7e.test(e.slice(0,t))?e:``}var{useSmooth:K7e,useSmoothStatus:q7e,withSmoothContextProvider:J7e}=Qde,Y7e=({components:e,componentsByLanguage:t,smooth:n=!0,preprocess:r,...i})=>{let a=GD(),{text:o}=K7e((0,N.useMemo)(()=>r?{...a,text:r(a.text)}:a,[a,r]),n),{pre:s=O3e,code:c=k3e,SyntaxHighlighter:l=e0,CodeHeader:u=A3e}=e??{},d=(0,N.useMemo)(()=>({Pre:s,Code:c,SyntaxHighlighter:l,CodeHeader:u}),[s,c,l,u]),f=Py(e=>(0,I.jsx)(N3e,{components:d,componentsByLanguage:t,...e}));return(0,I.jsx)(V7e,{components:(0,N.useMemo)(()=>{let{pre:t,code:n,SyntaxHighlighter:r,CodeHeader:i,...a}=e??{};return{...a,pre:D3e,code:f}},[f,e]),...i,children:o})},j4=(0,N.forwardRef)(({className:e,containerProps:t,containerComponent:n=`div`,...r},i)=>(0,I.jsx)(n,{"data-status":q7e().type,...t,className:(0,t0.default)(e,t?.className),ref:i,children:(0,I.jsx)(Y7e,{...r})}));j4.displayName=`MarkdownTextPrimitive`;var X7e=J7e(j4);function M4(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Z7e(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Q7e(e,t,n){let r=i4((n||{}).ignore||[]),i=$7e(t),a=-1;for(;++a<i.length;)s4(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function $7e(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([e9e(e[0]),t9e(e[1])])}return t}function e9e(e){return typeof e==`string`?new RegExp(Z7e(e),`g`):e}function t9e(e){return typeof e==`function`?e:function(){return e}}var N4=`phrasing`,P4=[`autolink`,`link`,`image`,`label`];function n9e(){return{transforms:[l9e],enter:{literalAutolink:i9e,literalAutolinkEmail:F4,literalAutolinkHttp:F4,literalAutolinkWww:F4},exit:{literalAutolink:c9e,literalAutolinkEmail:s9e,literalAutolinkHttp:a9e,literalAutolinkWww:o9e}}}function r9e(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:N4,notInConstruct:P4},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:N4,notInConstruct:P4},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:N4,notInConstruct:P4}]}}function i9e(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function F4(e){this.config.enter.autolinkProtocol.call(this,e)}function a9e(e){this.config.exit.autolinkProtocol.call(this,e)}function o9e(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function s9e(e){this.config.exit.autolinkEmail.call(this,e)}function c9e(e){this.exit(e)}function l9e(e){Q7e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,u9e],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,d9e]],{ignore:[`link`,`linkReference`]})}function u9e(e,t,n,r,i){let a=``;if(!I4(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!f9e(n)))return!1;let o=p9e(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function d9e(e,t,n,r){return!I4(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function f9e(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function p9e(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=M4(e,`(`),a=M4(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function I4(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||u2(n)||l2(n))&&(!t||n!==47)}L4.peek=S9e;function m9e(){this.buffer()}function h9e(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function g9e(){this.buffer()}function _9e(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function v9e(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=t2(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y9e(e){this.exit(e)}function b9e(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=t2(this.sliceSerialize(e)).toLowerCase(),n.label=t}function x9e(e){this.exit(e)}function S9e(){return`[`}function L4(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function C9e(){return{enter:{gfmFootnoteCallString:m9e,gfmFootnoteCall:h9e,gfmFootnoteDefinitionLabelString:g9e,gfmFootnoteDefinition:_9e},exit:{gfmFootnoteCallString:v9e,gfmFootnoteCall:y9e,gfmFootnoteDefinitionLabelString:b9e,gfmFootnoteDefinition:x9e}}}function w9e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:L4},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
144
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?
|
|
145
|
-
`)}function
|
|
146
|
-
`&&
|
|
147
|
-
`}function
|
|
142
|
+
`}),n}function l4(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function u4(e,t){let n=h7e(e,t),r=n.one(e,void 0),i=o7e(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
143
|
+
`},i)),a}function b7e(e,t){return e&&`run`in e?async function(n,r){let i=u4(n,{file:r,...t});await e.run(i,r)}:function(n,r){return u4(n,{file:r,...e||t})}}function d4(e){if(e)throw e}var x7e=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function f4(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function S7e(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?C7e(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function C7e(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var p4={basename:w7e,dirname:T7e,extname:E7e,join:D7e,sep:`/`};function w7e(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);m4(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function T7e(e){if(m4(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function E7e(e){m4(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function D7e(...e){let t=-1,n;for(;++t<e.length;)m4(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:O7e(n)}function O7e(e){m4(e);let t=e.codePointAt(0)===47,n=k7e(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function k7e(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function m4(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var A7e={cwd:j7e};function j7e(){return`/`}function h4(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function M7e(e){if(typeof e==`string`)e=new URL(e);else if(!h4(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return N7e(e)}function N7e(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var g4=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],_4=class{constructor(e){let t;t=e?h4(e)?{path:e}:typeof e==`string`||P7e(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:A7e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<g4.length;){let e=g4[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)g4.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?p4.basename(this.path):void 0}set basename(e){y4(e,`basename`),v4(e,`basename`),this.path=p4.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?p4.dirname(this.path):void 0}set dirname(e){b4(this.basename,`dirname`),this.path=p4.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?p4.extname(this.path):void 0}set extname(e){if(v4(e,`extname`),b4(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=p4.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){h4(e)&&(e=M7e(e)),y4(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?p4.basename(this.path,this.extname):void 0}set stem(e){y4(e,`stem`),v4(e,`stem`),this.path=p4.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new F0(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function v4(e,t){if(e&&e.includes(p4.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+p4.sep+"`")}function y4(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function b4(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function P7e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var F7e=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),x4=u(x7e(),1),I7e={}.hasOwnProperty,L7e=new class e extends F7e{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=S7e()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,x4.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(w4(`data`,this.frozen),this.namespace[e]=t,this):I7e.call(this.namespace,e)&&this.namespace[e]||void 0:e?(w4(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=D4(e),n=this.parser||this.Parser;return S4(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),S4(`process`,this.parser||this.Parser),C4(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=D4(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);z7e(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),S4(`processSync`,this.parser||this.Parser),C4(`processSync`,this.compiler||this.Compiler),this.process(e,r),E4(`processSync`,`process`,t),n;function r(e,r){t=!0,d4(e),n=r}}run(e,t,n){T4(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=D4(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),E4(`runSync`,`run`,n),r;function i(e,t){d4(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=D4(t),r=this.compiler||this.Compiler;return C4(`stringify`,r),T4(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(w4(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,x4.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];f4(o)&&f4(r)&&(r=(0,x4.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function S4(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function C4(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function w4(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function T4(e){if(!f4(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function E4(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function D4(e){return R7e(e)?e:new _4(e)}function R7e(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function z7e(e){return typeof e==`string`||B7e(e)}function B7e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var O4=[],k4={allowDangerousHtml:!0},V7e=/^(https?|ircs?|mailto|xmpp)$/i,H7e=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function U7e(e){let t=W7e(e),n=G7e(e);return K7e(t.runSync(t.parse(n),n),e)}function W7e(e){let t=e.rehypePlugins||O4,n=e.remarkPlugins||O4,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...k4}:k4;return L7e().use(E5e).use(n).use(b7e,r).use(t)}function G7e(e){let t=e.children||``,n=new _4;return typeof t==`string`?n.value=t:``+t,n}function K7e(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||q7e;for(let e of H7e)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return s4(e,l),l6e(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in U0)if(Object.hasOwn(U0,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=U0[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function q7e(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||V7e.test(e.slice(0,t))?e:``}var{useSmooth:J7e,useSmoothStatus:Y7e,withSmoothContextProvider:X7e}=Qde,Z7e=({components:e,componentsByLanguage:t,smooth:n=!0,preprocess:r,...i})=>{let a=GD(),{text:o}=J7e((0,N.useMemo)(()=>r?{...a,text:r(a.text)}:a,[a,r]),n),{pre:s=A3e,code:c=j3e,SyntaxHighlighter:l=$1,CodeHeader:u=M3e}=e??{},d=(0,N.useMemo)(()=>({Pre:s,Code:c,SyntaxHighlighter:l,CodeHeader:u}),[s,c,l,u]),f=Py(e=>(0,I.jsx)(F3e,{components:d,componentsByLanguage:t,...e}));return(0,I.jsx)(U7e,{components:(0,N.useMemo)(()=>{let{pre:t,code:n,SyntaxHighlighter:r,CodeHeader:i,...a}=e??{};return{...a,pre:k3e,code:f}},[f,e]),...i,children:o})},A4=(0,N.forwardRef)(({className:e,containerProps:t,containerComponent:n=`div`,...r},i)=>(0,I.jsx)(n,{"data-status":Y7e().type,...t,className:(0,e0.default)(e,t?.className),ref:i,children:(0,I.jsx)(Z7e,{...r})}));A4.displayName=`MarkdownTextPrimitive`;var Q7e=X7e(A4);function j4(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function $7e(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function e9e(e,t,n){let r=r4((n||{}).ignore||[]),i=t9e(t),a=-1;for(;++a<i.length;)o4(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function t9e(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([n9e(e[0]),r9e(e[1])])}return t}function n9e(e){return typeof e==`string`?new RegExp($7e(e),`g`):e}function r9e(e){return typeof e==`function`?e:function(){return e}}var M4=`phrasing`,N4=[`autolink`,`link`,`image`,`label`];function i9e(){return{transforms:[d9e],enter:{literalAutolink:o9e,literalAutolinkEmail:P4,literalAutolinkHttp:P4,literalAutolinkWww:P4},exit:{literalAutolink:u9e,literalAutolinkEmail:l9e,literalAutolinkHttp:s9e,literalAutolinkWww:c9e}}}function a9e(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:M4,notInConstruct:N4},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:M4,notInConstruct:N4},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:M4,notInConstruct:N4}]}}function o9e(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function P4(e){this.config.enter.autolinkProtocol.call(this,e)}function s9e(e){this.config.exit.autolinkProtocol.call(this,e)}function c9e(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function l9e(e){this.config.exit.autolinkEmail.call(this,e)}function u9e(e){this.exit(e)}function d9e(e){e9e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,f9e],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,p9e]],{ignore:[`link`,`linkReference`]})}function f9e(e,t,n,r,i){let a=``;if(!F4(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!m9e(n)))return!1;let o=h9e(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function p9e(e,t,n,r){return!F4(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function m9e(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function h9e(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=j4(e,`(`),a=j4(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function F4(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||l2(n)||c2(n))&&(!t||n!==47)}I4.peek=w9e;function g9e(){this.buffer()}function _9e(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function v9e(){this.buffer()}function y9e(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function b9e(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=e2(this.sliceSerialize(e)).toLowerCase(),n.label=t}function x9e(e){this.exit(e)}function S9e(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=e2(this.sliceSerialize(e)).toLowerCase(),n.label=t}function C9e(e){this.exit(e)}function w9e(){return`[`}function I4(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function T9e(){return{enter:{gfmFootnoteCallString:g9e,gfmFootnoteCall:_9e,gfmFootnoteDefinitionLabelString:v9e,gfmFootnoteDefinition:y9e},exit:{gfmFootnoteCallString:b9e,gfmFootnoteCall:x9e,gfmFootnoteDefinitionLabelString:S9e,gfmFootnoteDefinition:C9e}}}function E9e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:I4},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
144
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?L4:D9e))),s(),o}}function D9e(e,t,n){return t===0?e:L4(e,t,n)}function L4(e,t,n){return(n?``:` `)+e}var O9e=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];R4.peek=N9e;function k9e(){return{canContainEols:[`delete`],enter:{strikethrough:j9e},exit:{strikethrough:M9e}}}function A9e(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:O9e}],handlers:{delete:R4}}}function j9e(e){this.enter({type:`delete`,children:[]},e)}function M9e(e){this.exit(e)}function R4(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function N9e(){return`~`}function P9e(e){return e.length}function F9e(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||P9e,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=I9e(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=z4(r[d]);else{let e=z4(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
145
|
+
`)}function I9e(e){return e==null?``:String(e)}function z4(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function L9e(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),R9e);return i(),o}function R9e(e,t,n){return`>`+(n?``:` `)+e}function z9e(e,t){return B4(e,t.inConstruct,!0)&&!B4(e,t.notInConstruct,!1)}function B4(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function V4(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
146
|
+
`&&z9e(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
147
|
+
`}function B9e(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function V9e(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function H9e(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function U9e(e,t,n,r){let i=H9e(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(V9e(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,W9e);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(B9e(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
148
148
|
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
149
149
|
`),a&&(u+=s.move(a+`
|
|
150
|
-
`)),u+=s.move(c),l(),u}function
|
|
151
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function
|
|
150
|
+
`)),u+=s.move(c),l(),u}function W9e(e,t,n){return(n?``:` `)+e}function H4(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function G9e(e,t,n,r){let i=H4(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
151
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function K9e(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function U4(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function W4(e,t,n){let r=m2(e),i=m2(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}G4.peek=q9e;function G4(e,t,n,r){let i=K9e(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=W4(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=U4(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=W4(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+U4(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function q9e(e,t,n){return n.options.emphasis||`*`}function J9e(e,t){let n=!1;return s4(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&W0(e)&&(t.options.setext||n))}function Y9e(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(J9e(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
152
152
|
`,after:`
|
|
153
153
|
`});return r(),t(),o+`
|
|
154
154
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
155
155
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
156
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=
|
|
156
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=U4(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}K4.peek=X9e;function K4(e){return e.value||``}function X9e(){return`<`}q4.peek=Z9e;function q4(e,t,n,r){let i=H4(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Z9e(){return`!`}J4.peek=Q9e;function J4(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Q9e(){return`!`}Y4.peek=$9e;function Y4(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function $9e(){return"`"}function X4(e,t){let n=W0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Z4.peek=eet;function Z4(e,t,n,r){let i=H4(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(X4(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function eet(e,t,n){return X4(e,n)?`<`:`[`}Q4.peek=tet;function Q4(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function tet(){return`[`}function $4(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function net(e){let t=$4(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ret(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function e3(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function iet(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?ret(n):$4(n),s=e.ordered?o===`.`?`)`:`.`:net(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),e3(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function aet(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function oet(e,t,n,r){let i=aet(n),a=n.bulletCurrent||$4(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function set(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var cet=r4([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function uet(e,t,n,r){return(e.children.some(function(e){return cet(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function det(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}t3.peek=fet;function t3(e,t,n,r){let i=det(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=W4(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=U4(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=W4(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+U4(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function fet(e,t,n){return n.options.strong||`*`}function pet(e,t,n,r){return n.safe(e.value,r)}function met(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function het(e,t,n){let r=(e3(n)+(n.options.ruleSpaces?` `:``)).repeat(met(n));return n.options.ruleSpaces?r.slice(0,-1):r}var n3={blockquote:L9e,break:V4,code:U9e,definition:G9e,emphasis:G4,hardBreak:V4,heading:Y9e,html:K4,image:q4,imageReference:J4,inlineCode:Y4,link:Z4,linkReference:Q4,list:iet,listItem:oet,paragraph:set,root:uet,strong:t3,text:pet,thematicBreak:het};function get(){return{enter:{table:_et,tableData:i3,tableHeader:i3,tableRow:yet},exit:{codeText:bet,table:vet,tableData:r3,tableHeader:r3,tableRow:r3}}}function _et(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function vet(e){this.exit(e),this.data.inTable=void 0}function yet(e){this.enter({type:`tableRow`,children:[]},e)}function r3(e){this.exit(e)}function i3(e){this.enter({type:`tableCell`,children:[]},e)}function bet(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,xet));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function xet(e,t){return t===`|`?t:e}function Cet(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
157
157
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
158
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return N9e(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=r3.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function xet(){return{exit:{taskListCheckValueChecked:o3,taskListCheckValueUnchecked:o3,paragraph:wet}}}function Cet(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Tet}}}function o3(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function wet(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Tet(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=r3.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Eet(){return[n9e(),C9e(),D9e(),met(),xet()]}function Det(e){return{extensions:[r9e(),w9e(e),O9e(),bet(e),Cet()]}}var Oet={tokenize:Pet,partial:!0},s3={tokenize:Fet,partial:!0},c3={tokenize:Iet,partial:!0},l3={tokenize:Let,partial:!0},ket={tokenize:Ret,partial:!0},u3={name:`wwwAutolink`,tokenize:Met,previous:h3},d3={name:`protocolAutolink`,tokenize:Net,previous:g3},f3={name:`emailAutolink`,tokenize:jet,previous:_3},p3={};function Aet(){return{text:p3}}for(var m3=48;m3<123;)p3[m3]=f3,m3++,m3===58?m3=65:m3===91&&(m3=97);p3[43]=f3,p3[45]=f3,p3[46]=f3,p3[95]=f3,p3[72]=[f3,d3],p3[104]=[f3,d3],p3[87]=[f3,u3],p3[119]=[f3,u3];function jet(e,t,n){let r=this,i,a;return o;function o(t){return!v3(t)||!_3.call(r,r.previous)||y3(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return v3(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ket,u,l)(t):t===45||t===95||r2(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&n2(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Met(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!h3.call(r,r.previous)||y3(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Oet,e.attempt(s3,e.attempt(c3,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Net(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&g3.call(r,r.previous)&&!y3(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(n2(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||i2(t)||s2(t)||u2(t)||l2(t)?n(t):e.attempt(s3,e.attempt(c3,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Pet(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Fet(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(l3,c,s)(t):t===null||s2(t)||u2(t)||t!==45&&l2(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Iet(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(l3,t,a)(o):o===null||s2(o)||u2(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Let(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||s2(o)||u2(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||s2(e)||u2(e)?t(e):r(e)}function a(e){return n2(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):n2(t)?(e.consume(t),o):n(t)}}function Ret(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return r2(e)?n(e):t(e)}}function h3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||s2(e)}function g3(e){return!n2(e)}function _3(e){return!(e===47||v3(e))}function v3(e){return e===43||e===45||e===46||e===95||r2(e)}function y3(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var zet={tokenize:qet,partial:!0};function Bet(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Wet,continuation:{tokenize:Get},exit:Ket}},text:{91:{name:`gfmFootnoteCall`,tokenize:Uet},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Vet,resolveTo:Het}}}}function Vet(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=t2(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Het(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Uet(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||s2(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(t2(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return s2(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Wet(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||s2(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=t2(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return s2(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),p2(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Get(e,t,n){return e.check(y2,t,e.attempt(zet,t,n))}function Ket(e){e.exit(`gfmFootnoteDefinition`)}function qet(e,t,n){let r=this;return p2(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Jet(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&X0(o,o.length,0,g2(s,e.slice(r+1,n),t)),X0(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),X0(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=h2(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=h2(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Yet=class{constructor(){this.map=[]}add(e,t,n){Xet(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Xet(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Zet(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Qet(){return{flow:{null:{name:`table`,tokenize:$et,resolveAll:ett}}}}function $et(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):o2(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):c2(t)?p2(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||s2(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,c2(t)?p2(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return c2(t)?p2(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||o2(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return c2(t)?p2(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||o2(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||o2(n)?(e.exit(`tableRow`),t(n)):c2(n)?p2(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||s2(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function ett(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Yet;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(x3(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=b3(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=b3(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=b3(f,t,o,i,n,d)):(o[0]=o[1],d=b3(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&x3(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Zet(t.events,n))}return e}function b3(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},S3(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=S3(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=S3(t.events,n[2]),a=S3(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},S3(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function x3(e,t,n,r,i){let a=[],o=S3(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function S3(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var ttt={name:`tasklistCheck`,tokenize:rtt};function ntt(){return{text:{91:ttt}}}function rtt(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return s2(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return o2(r)?t(r):c2(r)?e.check({tokenize:itt},t,n)(r):n(r)}}function itt(e,t,n){return p2(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function att(e){return $0([Aet(),Bet(),Jet(e),Qet(),ntt()])}var ott={};function stt(e){let t=this,n=e||ott,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(att(n)),a.push(Eet()),o.push(Det(n))}function ctt(e){return typeof e==`string`&&/^(https?:|mailto:)/i.test(e.trim())}function ltt({href:e,children:t,...n}){return ctt(e)?(0,I.jsx)(`a`,{...n,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,I.jsx)(`span`,{...n,children:t})}var utt=(0,N.memo)(function(){return(0,I.jsx)(X7e,{remarkPlugins:[stt],className:`oc-md`,components:{a:ltt}})});function C3(e){return(0,I.jsx)(PT,{"data-slot":`select`,...e})}function w3(e){return(0,I.jsx)(RT,{"data-slot":`select-value`,...e})}function T3({className:e,size:t=`default`,children:n,...r}){return(0,I.jsxs)(IT,{"data-slot":`select-trigger`,"data-size":t,className:V$(`flex w-fit items-center justify-between gap-2 rounded-lg border border-input bg-background px-2.5 py-1 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,I.jsx)(zT,{asChild:!0,children:(0,I.jsx)(dm,{className:`size-4 opacity-50`})})]})}function E3({className:e,children:t,position:n=`popper`,...r}){return(0,I.jsx)(VT,{children:(0,I.jsxs)(UT,{"data-slot":`select-content`,className:V$(`relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,I.jsx)(uE,{className:`flex cursor-default items-center justify-center py-1`,children:(0,I.jsx)(pm,{className:`size-4`})}),(0,I.jsx)($T,{className:V$(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,I.jsx)(fE,{className:`flex cursor-default items-center justify-center py-1`,children:(0,I.jsx)(dm,{className:`size-4`})})]})})}function Q({className:e,children:t,...n}){return(0,I.jsxs)(iE,{"data-slot":`select-item`,className:V$(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,I.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,I.jsx)(cE,{children:(0,I.jsx)(um,{className:`size-4`})})}),(0,I.jsx)(oE,{children:t})]})}var D3=1e3;function dtt(){return[{id:`incorrect`,label:dDe()},{id:`incoherence`,label:mDe()},{id:`altered_words`,label:_De()},{id:`formatting`,label:bDe()},{id:`latency`,label:CDe()},{id:`api_error`,label:EDe()},{id:`other`,label:uQ()}]}function ftt(){return[{id:`altered_words`,label:jDe()},{id:`formatting`,label:PDe()},{id:`other`,label:uQ()}]}function ptt(e){return e===`user`?ftt():dtt()}var mtt=[{name:`Grammarly`,selector:`grammarly-desktop-integration, grammarly-extension, [data-grammarly-shadow-root]`},{name:`LanguageTool`,selector:`[data-lt-installed], .lt-toolbar`},{name:`DeepL`,selector:`deepl-inline-translate, .deepl-translator`},{name:`ProWritingAad`,selector:`pwa-shadow-host, .pwa-tag`}];function htt(){let e=[];try{e=Array.from(navigator.plugins??[]).map(e=>e.name).slice(0,40)}catch{e=[]}let t=[];for(let{name:e,selector:n}of mtt)try{document.querySelector(n)&&t.push(e)}catch{}return{plugins:e,extensionsDetected:t}}var O3=N.createContext(null);function gtt(){let e=N.useContext(O3);if(!e)throw Error(`useFeedback must be used within <FeedbackProvider>`);return e}function _tt({children:e}){let t=F(V.feedback.submitFeedback),[n,r]=(0,N.useState)(null),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(``),[c,l]=(0,N.useState)(!1),[u,d]=(0,N.useState)(null),f=N.useCallback(e=>{a(``),s(``),l(!1),d(null),r(e)},[]);function p(e){e||r(null)}async function m(){if(!(!n||!i||c)){l(!0);try{d((await t({chatId:n.chatId,messageId:n.messageId,category:i,comment:o.trim()||void 0,client:{displayedText:n.displayedText,sourceWasOpen:n.sourceWasOpen,userAgent:navigator.userAgent,language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,theme:document.documentElement.classList.contains(`dark`)?`dark`:`light`,...htt()}})).displayedMatchesStored)}catch{l(!1)}}}let h=u!==null,g=n?.role===`user`;return(0,I.jsxs)(O3.Provider,{value:f,children:[e,(0,I.jsx)(d1,{open:n!==null,onOpenChange:p,children:n?(0,I.jsxs)(f1,{className:`sm:max-w-md`,children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:LDe()}),(0,I.jsx)(g1,{children:h?BDe():g?UDe():KDe()})]}),h?(0,I.jsx)(`div`,{className:`oc-feedback__result`,role:`status`,children:n.sourceWasOpen?u===!0?(0,I.jsx)(`p`,{className:`oc-feedback__fidelity is-ok`,children:YDe()}):(0,I.jsx)(`p`,{className:`oc-feedback__fidelity is-warn`,children:QDe()}):(0,I.jsx)(`p`,{className:`oc-feedback__fidelity`,children:tOe()})}):(0,I.jsxs)(`div`,{className:`oc-feedback__form`,children:[(0,I.jsx)(`label`,{className:`oc-feedback__label`,children:iOe()}),(0,I.jsxs)(C3,{value:i,onValueChange:a,children:[(0,I.jsx)(T3,{children:(0,I.jsx)(w3,{placeholder:sOe()})}),(0,I.jsx)(E3,{children:ptt(n.role).map(e=>(0,I.jsx)(Q,{value:e.id,children:e.label},e.id))})]}),(0,I.jsx)(`label`,{className:`oc-feedback__label`,htmlFor:`oc-feedback-comment`,children:uOe()}),(0,I.jsx)(`textarea`,{id:`oc-feedback-comment`,className:`oc-feedback__textarea`,placeholder:pOe(),value:o,maxLength:D3,onChange:e=>s(e.target.value.slice(0,D3)),rows:4}),(0,I.jsxs)(`div`,{className:`oc-feedback__count`,children:[o.length,`/`,D3]})]}),(0,I.jsx)(m1,{children:h?(0,I.jsx)(X,{onClick:()=>p(!1),children:gOe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(X,{variant:`outline`,onClick:()=>p(!1),children:yOe()}),(0,I.jsx)(X,{onClick:()=>void m(),disabled:!i||c,children:c?SOe():TOe()})]})})]}):null})]})}function vtt(e,t){let n=e.closest(`.oc-msg`)?.querySelector(`.oc-msg__source-pre`),r=n?.textContent;return n&&r!=null&&r!==`(aucun texte)`?{displayedText:r,sourceWasOpen:!0}:{displayedText:t,sourceWasOpen:!1}}function k3(){let e=gtt(),t=gy(e=>e.metadata?.custom?.messageId),n=gy(e=>e.metadata?.custom?.chatId),r=gy(e=>e.role),i=gy(e=>e.metadata?.custom?.rawText??``),a=P(V.feedback.myReportedMessageIds,n?{chatId:n}:`skip`);if(!t||!n)return null;let o=(a??[]).includes(t);function s(a){e({chatId:n,messageId:t,role:r,...vtt(a.currentTarget,i)})}return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn${o?` is-on`:``}`,title:o?OOe():jOe(),"aria-label":POe(),onClick:s,children:(0,I.jsx)(Oee,{size:15,"aria-hidden":!0})})}function A3(e,t){return e!=null&&e[t]!==void 0}var ytt=[`inherit`,`fast`,`standard`];function btt(e){return e==null||e.fastMode===void 0?`inherit`:e.fastMode?`fast`:`standard`}function xtt(e){return e===`inherit`?xZe():e===`fast`?JQ():YQ()}function Stt(e){return e===`inherit`?null:e===`fast`}function j3(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function M3(e){return e.length?e[0].toUpperCase()+e.slice(1):e}var Ctt={off:`Off`,minimal:`Min`,low:`Low`,medium:`Med`,high:`High`,xhigh:`XHigh`};function wtt(e,t){return Ctt[e]??t}function N3(e,t){return e==null||!t||t<=0?null:Math.round(e/t*100)}function Ttt(e,t){let n=N3(e,t);return n===null?null:QZe({pct:n,used:j3(e),total:j3(t)})}function Ett(e){return iQe({level:e??`full`})}function Dtt(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?pQe({cost:e.toFixed(2),tokens:j3(t)}):n?gQe({cost:e.toFixed(2)}):r?yQe({tokens:j3(t)}):null}function Ott(e){let t=e.filter(e=>typeof e==`string`&&e.length>0);return t.length>0?t.join(` · `):null}var ktt=new Set([`knobThinkingLevel`,`knobModel`,`knobFastMode`,`knobUnset`,`agentFiles`,`sessionCompact`,`configDefaults`]),Att=new Set([`knobThinkingLevel`,`knobModel`]);function P3(e,t){return ktt.has(t)?e==null?Att.has(t):e[t]===!0:!1}function jtt(e,t){return{model:e(`knobModel`)&&t.hasModels,thinking:e(`knobThinkingLevel`)&&t.hasLevels,speed:e(`knobFastMode`),reset:e(`knobUnset`)}}function F3(e,t){return e===void 0?`loading`:e===null?{blocked:!P3(null,t),gatewayVersion:null}:{blocked:!P3(e.capabilities,t),gatewayVersion:e.gatewayVersion}}function I3(e){let t=P(V.compat.forChat,e===null?`skip`:{chatId:e}),n=t==null?null:t.capabilities;return{can:(0,N.useCallback)(e=>P3(n,e),[n]),loading:t===void 0,gatewayVersion:t?.gatewayVersion??null}}function Mtt(e){let t=F(V.chats.setSessionKnob),[n,r]=(0,N.useState)(null),[i,a]=(0,N.useState)(null);return{apply:(0,N.useCallback)(async(n,i)=>{r(n),a(null);let o={chatId:e};n===`fastMode`?o.fastMode=i:o[n]=i;try{await t(o)}catch{a({field:n,value:i})}finally{r(null)}},[e,t]),pending:n,error:i}}function L3({label:e,overridden:t,onReset:n,pending:r,error:i,onRetry:a,help:o,children:s,resettable:c=!0}){return(0,I.jsxs)(`div`,{className:`oc-spanel__row${t?` is-overridden`:``}`,children:[(0,I.jsxs)(`div`,{className:`oc-spanel__rowhead`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:e}),r?(0,I.jsx)(Cm,{size:13,className:`oc-spanel__spin`,"aria-label":KQ()}):t?c?(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__reset`,title:GQ(),"aria-label":GQ(),onClick:n,children:(0,I.jsx)(Pm,{size:12,"aria-hidden":!0})}):null:(0,I.jsx)(`span`,{className:`oc-spanel__badge`,children:rZe()})]}),(0,I.jsx)(`div`,{className:`oc-spanel__ctl`,children:s}),o?(0,I.jsx)(`p`,{className:`oc-spanel__help`,children:o}):null,i?(0,I.jsxs)(`p`,{className:`oc-spanel__error`,role:`alert`,children:[uZe(),(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__retry`,onClick:a,children:qQ()})]}):null]})}function R3({options:e,value:t,onChange:n,disabled:r}){return(0,I.jsx)(`div`,{className:`oc-spanel__seg`,role:`group`,children:e.map(e=>(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__seg-btn${t===e.id?` is-active`:``}`,"aria-pressed":t===e.id,title:e.title??e.label,"aria-label":e.title??e.label,disabled:r,onClick:()=>{e.id!==t&&n(e.id)},children:e.label},e.id))})}function Ntt({options:e,value:t,onChange:n,disabled:r,ariaLabel:i}){let a=t===null||e.some(e=>e.id===t);return(0,I.jsxs)(`select`,{className:`oc-spanel__select`,value:t??``,disabled:r,"aria-label":i,onChange:e=>{e.target.value&&e.target.value!==t&&n(e.target.value)},children:[t===null?(0,I.jsx)(`option`,{value:``,disabled:!0,hidden:!0}):null,a?null:(0,I.jsx)(`option`,{value:t,children:t}),e.map(e=>(0,I.jsx)(`option`,{value:e.id,children:e.label},e.id))]})}function z3({chatId:e,sm:t,settings:n}){let{apply:r,pending:i,error:a}=Mtt(e),{can:o}=I3(e),s=i!==null,c=(0,N.useCallback)(()=>{a&&r(a.field,a.value)},[r,a]),l=t.thinkingLevels??[],u=t.availableModels??[],d=btt(n),f=jtt(o,{hasModels:u.length>0,hasLevels:l.length>0});return(0,I.jsxs)(I.Fragment,{children:[f.model?(0,I.jsx)(L3,{label:hU(),overridden:A3(n,`model`),onReset:()=>void r(`model`,null),pending:i===`model`,error:a?.field===`model`,onRetry:c,resettable:f.reset,children:u.length<=4?(0,I.jsx)(R3,{options:u,value:t.model??null,onChange:e=>void r(`model`,e),disabled:s}):(0,I.jsx)(Ntt,{options:u,value:t.model??null,onChange:e=>void r(`model`,e),disabled:s,ariaLabel:hU()})}):null,f.thinking?(0,I.jsx)(L3,{label:hZe(),overridden:A3(n,`thinkingLevel`),onReset:()=>void r(`thinkingLevel`,null),pending:i===`thinkingLevel`,error:a?.field===`thinkingLevel`,onRetry:c,resettable:f.reset,children:(0,I.jsx)(R3,{options:l.map(e=>({id:e.id,label:wtt(e.id,M3(e.label)),title:M3(e.label)})),value:t.thinkingLevel??null,onChange:e=>void r(`thinkingLevel`,e),disabled:s})}):null,f.speed?(0,I.jsx)(L3,{label:vZe(),overridden:A3(n,`fastMode`),onReset:()=>void r(`fastMode`,null),pending:i===`fastMode`,error:a?.field===`fastMode`,onRetry:c,resettable:f.reset,children:(0,I.jsx)(R3,{options:ytt.map(e=>({id:e,label:xtt(e)})),value:d,onChange:e=>void r(`fastMode`,Stt(e)),disabled:s})}):null]})}function B3({label:e,state:t,destructive:n,onClick:r,onRetry:i}){return(0,I.jsxs)(`div`,{className:`oc-spanel__action`,children:[(0,I.jsxs)(X,{variant:n?`destructive`:`outline`,size:`sm`,disabled:t===`pending`,onClick:r,children:[t===`pending`?(0,I.jsx)(Cm,{className:`oc-spanel__spin`,"aria-hidden":!0}):null,e]}),t===`done`?(0,I.jsx)(`p`,{className:`oc-spanel__action-note`,role:`status`,children:KQe()}):null,t===`error`?(0,I.jsxs)(`p`,{className:`oc-spanel__error`,role:`alert`,children:[YQe(),(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__retry`,onClick:i,children:qQ()})]}):null]})}function Ptt({chatId:e,open:t,onOpenChange:n}){let r=P(V.messages.getSessionMeta,t?{chatId:e}:`skip`),i=P(V.agents.getChatAgent,t?{chatId:e}:`skip`),a=r?.sessionMeta??null,o=r?.sessionSettings??null,{can:s}=I3(t?e:null),c=y1(),l=$n(V.agentFiles.compactSession),u=F(V.chats.resetSession),[d,f]=(0,N.useState)(`idle`),[p,m]=(0,N.useState)(`idle`);async function h(){f(`pending`);try{await l({chatId:e}),f(`done`)}catch{f(`error`)}}async function g(){m(`pending`);try{await u({chatId:e}),m(`done`)}catch{m(`error`)}}async function _(){await c({title:TQe(),description:OQe(),confirmLabel:jQe(),cancelLabel:fW()})&&await h()}async function v(){await c({title:LQe(),description:BQe(),confirmLabel:UQe(),cancelLabel:fW(),destructive:!0})&&await g()}let y=N3(a?.totalTokens,a?.contextTokens),b=y==null?``:y>=90?`is-critical`:y>=75?`is-warn`:`is-ok`,x=Ttt(a?.totalTokens,a?.contextTokens),S=Dtt(a?.estimatedCostUsd,a?.totalTokens),C=i?.agent??null,w=Ott([C?C.displayName??C.agentId:null,a?.agentRuntime,a?.model]);return(0,I.jsx)(K1,{open:t,onOpenChange:n,children:(0,I.jsxs)(q1,{side:`right`,className:`oc-spanel`,children:[(0,I.jsxs)(J1,{children:[(0,I.jsx)(X1,{children:jZe()}),(0,I.jsx)(Z1,{children:PZe()})]}),(0,I.jsx)(`div`,{className:`oc-spanel__body`,children:r===void 0?(0,I.jsx)(`p`,{className:`oc-spanel__loading`,children:KO()}):(0,I.jsxs)(I.Fragment,{children:[a?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:LZe()}),(0,I.jsx)(z3,{chatId:e,sm:a,settings:o})]}):null,(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:BZe()}),x!==null&&y!==null?(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:YZe()}),(0,I.jsxs)(`span`,{className:`oc-meter oc-spanel__meter ${b}`,children:[(0,I.jsx)(`span`,{className:`oc-meter__track`,children:(0,I.jsx)(`span`,{className:`oc-meter__fill`,style:{width:`${Math.min(y,100)}%`}})}),(0,I.jsx)(`span`,{className:`oc-meter__label`,children:x})]})]}):null,(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:tQe()}),(0,I.jsx)(`span`,{className:`oc-spanel__value`,children:Ett(a?.verboseLevel)}),(0,I.jsx)(`p`,{className:`oc-spanel__help`,children:sQe()})]}),S===null?null:(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:uQe()}),(0,I.jsx)(`span`,{className:`oc-spanel__value`,children:S})]})]}),w===null?null:(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:UZe()}),(0,I.jsx)(`div`,{className:`oc-spanel__static`,children:(0,I.jsx)(`span`,{className:`oc-spanel__value`,children:w})})]})]})}),(0,I.jsxs)(Y1,{className:`oc-spanel__actions`,children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:KZe()}),s(`sessionCompact`)?(0,I.jsx)(B3,{label:SQe(),state:d,onClick:()=>void _(),onRetry:()=>void h()}):null,(0,I.jsx)(B3,{label:PQe(),state:p,destructive:!0,onClick:()=>void v(),onRetry:()=>void g()})]})]})})}var V3={showSource:!0,showReport:!0,copyAssistant:!0,copyUser:!0,showDelete:!0,showTools:!1,voiceInput:!1},H3=(0,N.createContext)(V3);function U3(){return(0,N.useContext)(H3)}var W3=(0,N.createContext)(null),G3=(0,N.createContext)(null);function K3({className:e}){let t=e$();return(0,I.jsx)(`div`,{className:e,"aria-hidden":!0,children:t.logoUrl?(0,I.jsx)(`img`,{className:`oc-avatar__img`,src:t.logoUrl,alt:``}):t.isDefault?(0,I.jsx)(NO,{className:`oc-avatar__mark`}):t.initials})}function q3({chatId:e,focusMessageId:t}){let{runtime:n,turnGate:r,queueSend:i}=W4e({chatId:e}),a=P(V.me.getMe,{host:xO}),o=a?.ui?.effective??V3,s=o.showTools,c=wO(a?.resolvedThemeMode),l=a?.resolvedChartBrand,u=a?.resolvedChartTokens,d=P(V.agents.getChatAgent,e?{chatId:e}:`skip`),f=d?.multiAgent?d.agent:null,p=(0,N.useMemo)(()=>{let e=l?.label??`Atrium`,t=u?.colors?.[c];return{label:e,logoUrl:jO(l,ife(t?.primary,t?.[`primary-foreground`],c)),isDefault:l?.isDefault??!0,initials:afe(e),agentName:f?.displayName??f?.agentId??null,agentEmoji:f?.emoji??null}},[l,c,u,f]),m=F(V.me.setUiPref).withOptimisticUpdate(w1),h=P(V.messages.getSessionMeta,e?{chatId:e}:`skip`),g=e!==null&&h===null,_=W1(),{width:v,startResize:y}=G1({storageKey:`oc.sources.width`,defaultWidth:380,min:300,max:680,edge:`right`}),[b,x]=(0,N.useState)(null);(0,N.useEffect)(()=>{x(null)},[e]);let S=(0,N.useMemo)(()=>({activeMessageId:b,openFor:e=>x(e),close:()=>x(null)}),[b]),C=b!==null;return(0,I.jsx)(_ie,{runtime:n,children:(0,I.jsx)(W3.Provider,{value:r,children:(0,I.jsx)(G3.Provider,{value:i,children:(0,I.jsx)(H3.Provider,{value:o,children:(0,I.jsx)($Q.Provider,{value:p,children:(0,I.jsxs)(L1.Provider,{value:S,children:[(0,I.jsxs)(`div`,{className:`oc-chat`,children:[(0,I.jsx)(`div`,{className:`oc-chat__convo`,children:e?g?(0,I.jsx)(Ftt,{}):(0,I.jsx)(Ltt,{chatId:e,showTools:s,onToggleTools:()=>void m({key:`showTools`,value:!s}),focusMessageId:t??null}):(0,I.jsx)(`div`,{className:`oc-empty`,children:wH()})}),C&&!_?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-sources-resizer`,onPointerDown:y,role:`separator`,"aria-orientation":`vertical`,"aria-label":DK()}),(0,I.jsx)(`aside`,{className:`oc-sources-col`,style:{width:v,flex:`0 0 ${v}px`},children:(0,I.jsx)(R1,{messageId:b,onClose:S.close})})]}):null]}),C&&_?(0,I.jsx)(K1,{open:!0,onOpenChange:e=>{e||S.close()},children:(0,I.jsx)(q1,{side:`right`,className:`oc-sources-panel-sheet`,children:(0,I.jsx)(R1,{messageId:b,onClose:S.close})})}):null]})})})})})})}function Ftt(){let e=ss();return(0,I.jsxs)(`div`,{className:`oc-notfound`,role:`status`,children:[(0,I.jsx)(`div`,{className:`oc-notfound__icon`,"aria-hidden":!0,children:(0,I.jsx)(Fm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-notfound__title`,children:DH()}),(0,I.jsx)(`p`,{className:`oc-notfound__body`,children:AH()}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-notfound__cta`,onClick:()=>void e({to:`/`}),children:[(0,I.jsx)(Nm,{size:16,"aria-hidden":!0}),NH()]})]})}function Itt(e,t){(0,N.useEffect)(()=>{if(!t)return;let e=!1,n=0,r=0,i=()=>{if(e)return;let a=document.querySelector(`[data-message-id="${CSS.escape(t)}"]`);if(a){a.scrollIntoView({block:`center`,behavior:`smooth`}),a.classList.remove(`oc-msg--highlight`),a.offsetWidth,a.classList.add(`oc-msg--highlight`),window.setTimeout(()=>a.classList.remove(`oc-msg--highlight`),2400);return}n++<40&&(r=window.setTimeout(i,150))};return r=window.setTimeout(i,0),()=>{e=!0,window.clearTimeout(r)}},[e,t])}function Ltt({chatId:e,showTools:t,onToggleTools:n,focusMessageId:r}){let i=P(V.bridgeHealth.getBridgeAvailability,{chatId:e}),a=i&&!i.available?i:null,o=P(V.agents.getChatAgent,{chatId:e})?.readOnly===!0;return Itt(e,r),(0,I.jsxs)(bO.Root,{className:`oc-thread`,children:[(0,I.jsx)(Htt,{chatId:e}),(0,I.jsx)(Btt,{chatId:e}),(0,I.jsxs)(bO.Viewport,{className:`oc-thread__viewport`,children:[(0,I.jsx)(bO.Empty,{children:(0,I.jsx)(Vtt,{})}),(0,I.jsx)(bO.Messages,{components:{UserMessage:Ytt,AssistantMessage:Xtt,SystemMessage:Ztt}})]}),(0,I.jsx)(bO.If,{empty:!1,children:(0,I.jsxs)(bO.ScrollToBottom,{className:`oc-scrolldown`,children:[(0,I.jsx)(qtt,{}),(0,I.jsx)(`span`,{children:IH()})]})}),o?(0,I.jsx)(ztt,{}):a?(0,I.jsx)(Rtt,{}):null,(0,I.jsx)(tnt,{showTools:t,onToggleTools:n,unavailable:a!==null||o})]})}function Rtt(){return(0,I.jsxs)(`div`,{className:`oc-chat-banner oc-chat-banner--error`,role:`status`,children:[(0,I.jsx)(hm,{size:16,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:zH()})]})}function ztt(){return(0,I.jsxs)(`div`,{className:`oc-chat-banner oc-chat-banner--error`,role:`status`,children:[(0,I.jsx)(wm,{size:16,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:HH()})]})}function Btt({chatId:e}){let t=P(V.messages.listByChat,{chatId:e}),[n,r]=(0,N.useState)(``),i=(0,N.useRef)(null);return(0,N.useEffect)(()=>{i.current=null,r(``)},[e]),(0,N.useEffect)(()=>{if(!t)return;let e;for(let n of t)n.role===`assistant`&&(e=n);if(!(!e||e.status!==`complete`)){if(i.current===null){i.current=e._id;return}i.current!==e._id&&(i.current=e._id,r(e=>e===GH()?`${GH()} `:GH()))}},[t]),(0,I.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,className:`oc-sr-only`,children:n})}function Vtt(){return(0,I.jsxs)(`div`,{className:`oc-emptystate`,children:[(0,I.jsx)(K3,{className:`oc-emptystate__avatar`}),(0,I.jsx)(`h2`,{className:`oc-emptystate__title`,children:JH()})]})}function J3({sm:e,detail:t=!0}){let n=e.totalTokens!=null&&e.contextTokens&&e.contextTokens>0?Math.round(e.totalTokens/e.contextTokens*100):null;return n==null?null:(0,I.jsxs)(`span`,{className:`oc-meter ${n>=90?`is-critical`:n>=75?`is-warn`:`is-ok`}`,title:NU({pct:n,used:j3(e.totalTokens),total:j3(e.contextTokens)}),children:[(0,I.jsx)(`span`,{className:`oc-meter__track`,children:(0,I.jsx)(`span`,{className:`oc-meter__fill`,style:{width:`${Math.min(n,100)}%`}})}),(0,I.jsxs)(`span`,{className:`oc-meter__label`,children:[n,`%`,t?(0,I.jsxs)(`span`,{className:`oc-meter__detail`,children:[` · `,j3(e.totalTokens),`/`,j3(e.contextTokens)]}):null]})]})}function Htt({chatId:e}){let t=P(V.messages.getSessionMeta,{chatId:e}),n=P(V.agents.getChatAgent,{chatId:e}),r=t?.sessionMeta??null,i=t?.sessionSettings??null,a=n?.multiAgent?n.agent:null,o=U3(),[s,c]=(0,N.useState)(!1),l=(0,N.useRef)(null),u=(0,N.useRef)(null),d=(0,N.useRef)(null),[f,p]=(0,N.useState)(!1),m=!A3(i,`thinkingLevel`),h=(s,l)=>(0,I.jsxs)(I.Fragment,{children:[a?(0,I.jsxs)(`span`,{className:`oc-chip oc-chip--agent${a.state===`ok`?``:` is-warn`}`,title:eU({name:a.displayName??a.agentId})+(a.inheritedDefault?rU():``)+(a.state===`deleted`?oU():a.state===`stale`?lU():``),children:[a.emoji?(0,I.jsx)(`span`,{className:`oc-chip__emoji`,"aria-hidden":!0,children:a.emoji}):(0,I.jsx)(lm,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-chip__label`,children:a.displayName??a.agentId}),o.showTools&&n?.multiInstance?(0,I.jsxs)(`span`,{className:`oc-chip__instance`,title:fU({instance:a.instanceName}),children:[(0,I.jsx)(Im,{size:11,"aria-hidden":!0}),a.instanceName]}):null]}):null,o.showTools&&!s&&r?.model?(0,I.jsxs)(`span`,{className:`oc-chip oc-chip--info`,title:r.modelProvider?vU({provider:r.modelProvider}):hU(),children:[(0,I.jsx)(Gtt,{}),(0,I.jsx)(`span`,{className:`oc-chip__label`,children:r.model})]}):null,o.showTools&&!s&&r?.thinkingLevel?(0,I.jsxs)(`span`,{className:`oc-chip oc-chip--info`,title:m?xU():wU(),children:[(0,I.jsx)(Ktt,{}),(0,I.jsxs)(`span`,{className:`oc-chip__label`,children:[DU(),`\xA0: `,M3(r.thinkingLevel)]}),m?(0,I.jsx)(`span`,{className:`oc-chip__hint`,children:AU()}):null]}):null,o.showTools&&r?(0,I.jsx)(J3,{sm:r,detail:!s}):null,(0,I.jsx)(Utt,{chatId:e,title:t?.title??null,compact:s,ghost:l}),r?(0,I.jsx)(Wtt,{chatId:e,sm:r,settings:i,onOpenPanel:()=>c(!0),compact:s,ghost:l}):null]});return(0,N.useLayoutEffect)(()=>{let e=l.current;if(!e)return;let t=()=>{let t=d.current?.offsetWidth??0;if(t===0)return;let n=Math.min(u.current?.scrollWidth??0,360),r=e.clientWidth-n-16<t;p(e=>e===r?e:r)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[[HU(),eW(),r?.model??``,r?.thinkingLevel??``,a?.displayName??a?.agentId??``,n?.multiInstance?a?.instanceName??``:``,t?.title??``,o.showTools?`1`:`0`].join(`|`)]),(0,I.jsxs)(`header`,{className:`oc-chathead`,ref:l,children:[(0,I.jsx)(`div`,{className:`oc-chathead__title`,title:t?.title??void 0,ref:u,children:t?.title||ZH()}),(0,I.jsx)(`div`,{className:`oc-chathead__meta`,children:h(f,!1)}),(0,I.jsx)(`div`,{className:`oc-chathead-ghost`,"aria-hidden":!0,ref:d,children:h(!1,!0)}),(0,I.jsx)(Ptt,{chatId:e,open:s,onOpenChange:c})]})}function Y3(e,t,n){let r=new Blob([e],{type:`${n};charset=utf-8`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}function Utt({chatId:e,title:t,compact:n=!1,ghost:r=!1}){let i=Zn();async function a(n){let[r,a]=await Promise.all([i.query(V.messages.listByChat,{chatId:e}),i.query(V.messages.getStreamingText,{chatId:e})]),o=new Map(a.map(e=>[e.messageId,e.text])),s=r.map(e=>({role:e.role,text:e.status===`streaming`?o.get(e._id)??e.text:e.text,createdAt:e.updatedAt??e._creationTime,parts:e.parts.map(e=>({kind:e.kind,filename:`filename`in e?e.filename:void 0,name:`name`in e?e.name:void 0}))})),c=r.length>=200,l={title:t??void 0,truncated:c,exportedAt:Date.now()},u=E2e(t);n===`md`?Y3(w2e(s,l),`${u}.md`,`text/markdown`):Y3(T2e(s,l),`${u}.json`,`application/json`)}let o=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(vm,{size:13,"aria-hidden":!0}),n?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-chip__label`,children:HU()}),(0,I.jsx)(dm,{size:13,className:`oc-chip__chev`,"aria-hidden":!0})]})]});return r?(0,I.jsx)(`span`,{className:`oc-chip oc-chip--btn`,children:o}):(0,I.jsxs)(H$,{children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-chip oc-chip--btn`,title:zU(),children:o})}),(0,I.jsxs)(W$,{align:`end`,className:`w-44`,children:[(0,I.jsx)(K$,{children:HU()}),(0,I.jsx)(G$,{onClick:()=>void a(`md`),children:GU()}),(0,I.jsx)(G$,{onClick:()=>void a(`json`),children:JU()})]})]})}function Wtt({chatId:e,sm:t,settings:n,onOpenPanel:r,compact:i=!1,ghost:a=!1}){let[o,s]=(0,N.useState)(!1),c=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Rm,{size:13,"aria-hidden":!0}),i?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-chip__label`,children:eW()}),(0,I.jsx)(dm,{size:13,className:`oc-chip__chev`,"aria-hidden":!0})]})]});return a?(0,I.jsx)(`span`,{className:`oc-chip oc-chip--btn`,children:c}):(0,I.jsxs)(Y$,{open:o,onOpenChange:s,children:[(0,I.jsx)(X$,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-chip oc-chip--btn`,title:ZU(),children:c})}),(0,I.jsxs)(Z$,{align:`end`,className:`oc-spanel-pop w-80 p-2`,children:[t.totalTokens!=null&&t.contextTokens?(0,I.jsxs)(`div`,{className:`oc-spanel-pop__usage`,children:[(0,I.jsx)(`span`,{className:`oc-spanel-pop__usage-label`,children:IU()}),(0,I.jsx)(J3,{sm:t})]}):null,(0,I.jsx)(z3,{chatId:e,sm:t,settings:n}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-spanel-pop__all`,onClick:()=>{s(!1),r()},children:[(0,I.jsx)(Rm,{size:13,"aria-hidden":!0}),OZe(),(0,I.jsx)(fm,{size:13,"aria-hidden":!0})]})]})]})}function Gtt(){return(0,I.jsxs)(`svg`,{className:`oc-chip__icon`,viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,I.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}),(0,I.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`}),(0,I.jsx)(`path`,{d:`M9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3`})]})}function Ktt(){return(0,I.jsxs)(`svg`,{className:`oc-chip__icon`,viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,I.jsx)(`path`,{d:`M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`}),(0,I.jsx)(`path`,{d:`M12 5a3 3 0 1 1 5.997.142 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z`})]})}function X3({children:e}){return(0,I.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:e})}function qtt(){return(0,I.jsx)(X3,{children:(0,I.jsx)(`path`,{d:`M12 5v14M19 12l-7 7-7-7`})})}function Z3(){return(0,I.jsxs)(X3,{children:[(0,I.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),(0,I.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]})}function Q3(){return(0,I.jsx)(X3,{children:(0,I.jsx)(`path`,{d:`M20 6 9 17l-5-5`})})}var $3={File:C3e},Jtt={...$3,Text:utt};function e6({kind:e}){let t=gy(e=>e.metadata?.custom?.messageId),n=F(V.messages.deleteMessage).withOptimisticUpdate(G4e),r=y1(),i=C1(),a=(0,N.useContext)(W3),[o,s]=(0,N.useState)(!1);if(!t)return null;async function c(){if(await r(e===`assistant`?{title:rW(),description:oW(),confirmLabel:lW(),cancelLabel:fW(),destructive:!0}:{title:hW(),description:vW(),confirmLabel:xW(),cancelLabel:fW(),destructive:!0})){s(!0),e===`assistant`&&a?.begin();try{await n({messageId:t})}catch(t){e===`assistant`&&a?.cancel(),i.error(NW(),t)}finally{s(!1)}}}return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn oc-iconbtn--danger`,title:e===`assistant`?wW():DW(),"aria-label":AW(),"aria-busy":o,disabled:o,onClick:()=>void c(),children:o?(0,I.jsx)(Cm,{size:15,className:`oc-iconbtn__spin`,"aria-hidden":!0}):(0,I.jsx)(Bm,{size:15,"aria-hidden":!0})})}function t6(){let e=gy(e=>e.metadata?.custom?.rawText??``),[t,n]=(0,N.useState)(!1),r=[...e].length;return(0,I.jsxs)(`div`,{className:`oc-msg__source`,children:[(0,I.jsxs)(`div`,{className:`oc-msg__source-head`,children:[(0,I.jsx)(`span`,{className:`oc-msg__source-label`,children:r>1?NK({count:r}):AK({count:r})}),(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn`,title:IK(),"aria-label":IK(),onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:t?(0,I.jsx)(Q3,{}):(0,I.jsx)(Z3,{})})]}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:e.length>0?e:zK()})]})}function n6({active:e,onToggle:t}){return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn${e?` is-on`:``}`,onClick:t,"aria-pressed":e,title:e?HK():GK(),"aria-label":JK(),children:(0,I.jsx)(Tee,{size:15,"aria-hidden":!0})})}function Ytt(){let[e,t]=(0,N.useState)(!1),n=U3(),r=gy(e=>e.id.startsWith(`optimistic-`)),i=gy(e=>e.id);return(0,I.jsx)(lO.Root,{className:`oc-msg oc-msg--user${r?` is-sending`:``}`,"data-message-id":i,children:(0,I.jsxs)(`div`,{className:`oc-msg__col oc-msg__col--user`,children:[(0,I.jsx)(`div`,{className:`oc-msg__bubble`,children:e?(0,I.jsx)(t6,{}):(0,I.jsx)(lO.Parts,{components:$3})}),r?(0,I.jsxs)(`span`,{className:`oc-msg__sending`,role:`status`,children:[(0,I.jsx)(`span`,{className:`oc-msg__sending-spin`,"aria-hidden":!0}),eq()]}):(0,I.jsxs)(By.Root,{className:`oc-msg__actions oc-msg__actions--user`,hideWhenRunning:!0,autohide:`not-last`,children:[n.copyUser?(0,I.jsxs)(By.Copy,{className:`oc-iconbtn`,title:ZK(),children:[(0,I.jsx)(lO.If,{copied:!0,children:(0,I.jsx)(Q3,{})}),(0,I.jsx)(lO.If,{copied:!1,children:(0,I.jsx)(Z3,{})})]}):null,n.showSource?(0,I.jsx)(n6,{active:e,onToggle:()=>t(e=>!e)}):null,n.showReport?(0,I.jsx)(k3,{}):null,n.showDelete?(0,I.jsx)(e6,{kind:`user`}):null]})]})})}function Xtt(){let[e,t]=(0,N.useState)(!1),n=U3(),r=e$(),i=gy(e=>e.id);return(0,I.jsxs)(lO.Root,{className:`oc-msg oc-msg--assistant`,"data-message-id":i,children:[(0,I.jsx)(K3,{className:`oc-msg__avatar`}),(0,I.jsxs)(`div`,{className:`oc-msg__col`,children:[(0,I.jsxs)(`div`,{className:`oc-msg__name`,children:[r.agentEmoji?(0,I.jsx)(`span`,{className:`oc-msg__name-emoji`,"aria-hidden":!0,children:r.agentEmoji}):null,b2e(r)]}),(0,I.jsxs)(`div`,{className:`oc-msg__body`,children:[n.showTools?(0,I.jsxs)(`div`,{className:`oc-msg__meta`,children:[(0,I.jsx)(f3e,{}),(0,I.jsx)(h3e,{})]}):null,e?(0,I.jsx)(t6,{}):(0,I.jsx)(lO.Parts,{components:Jtt}),(0,I.jsx)(Q4e,{})]}),(0,I.jsxs)(By.Root,{className:`oc-msg__actions`,hideWhenRunning:!0,autohide:`not-last`,children:[n.copyAssistant?(0,I.jsxs)(By.Copy,{className:`oc-iconbtn`,title:lq(),children:[(0,I.jsx)(lO.If,{copied:!0,children:(0,I.jsx)(Q3,{})}),(0,I.jsx)(lO.If,{copied:!1,children:(0,I.jsx)(Z3,{})})]}):null,n.showSource?(0,I.jsx)(n6,{active:e,onToggle:()=>t(e=>!e)}):null,n.showReport?(0,I.jsx)(k3,{}):null,n.showDelete?(0,I.jsx)(e6,{kind:`assistant`}):null]})]})]})}function Ztt(){let e=gy(e=>e.id);return(0,I.jsx)(lO.Root,{className:`oc-msg oc-msg--system`,"data-message-id":e,children:(0,I.jsx)(`div`,{className:`oc-msg__body`,children:(0,I.jsx)(lO.Parts,{components:$3})})})}function Qtt(){let e=my(e=>e.status?.type),t=my(e=>e.type),n=e===`incomplete`;return(0,I.jsxs)($E.Root,{className:`oc-attach${n?` oc-attach--error`:``}`,"data-status":e,children:[(0,I.jsx)(`span`,{className:`oc-attach__icon`,"aria-hidden":!0,children:n?(0,I.jsx)(hm,{size:14}):t===`image`?(0,I.jsx)(Aee,{size:14}):(0,I.jsx)(Nee,{size:14})}),(0,I.jsx)(`span`,{className:`oc-attach__name`,children:(0,I.jsx)($E.Name,{})}),n?(0,I.jsx)(`span`,{className:`oc-attach__state`,children:xq()}):null,(0,I.jsx)($E.Remove,{className:`oc-attach__remove`,"aria-label":Aq(),children:(0,I.jsx)(Gm,{size:13,"aria-hidden":!0})})]})}function $tt(){let e=(0,N.useSyncExternalStore)(AO.subscribe,AO.getSnapshot);return e.active?(0,I.jsxs)(`div`,{className:`oc-upload`,role:`status`,"aria-live":`polite`,children:[(0,I.jsxs)(`div`,{className:`oc-upload__head`,children:[(0,I.jsx)(Cm,{className:`oc-upload__spin`,size:14,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:e.count>1?Dq({count:e.count,percent:e.percent}):wq({percent:e.percent})})]}),(0,I.jsx)(`div`,{className:`oc-upload__track`,"aria-hidden":!0,children:(0,I.jsx)(`div`,{className:`oc-upload__bar`,style:{width:`${e.percent}%`}})})]}):null}function ent(){let e=(0,N.useContext)(G3),t=hy(),n=Sie(e=>e.text).trim().length>0;return(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__send`,disabled:!n||e===null,"aria-label":IJ(),title:n?zJ():NJ(),onClick:()=>{if(e===null)return;let n=t.getState().text;n.trim()!==``&&e(n).then(e=>{e&&t.setText(``)})},children:(0,I.jsx)(sm,{size:18,"aria-hidden":!0})})}function tnt({showTools:e,onToggleTools:t,unavailable:n=!1}){let r=U3().voiceInput,i=Tie(e=>e.isRunning),a=(0,N.useContext)(G3),o=hy();return(0,I.jsxs)(WD.Root,{className:`oc-composer${n?` oc-composer--disabled`:``}`,children:[(0,I.jsx)(WD.Attachments,{components:{Attachment:Qtt}}),(0,I.jsx)($tt,{}),(0,I.jsx)(WD.Input,{className:`oc-composer__input`,placeholder:n?fq():hq(),autoFocus:!0,rows:1,disabled:n,onKeyDownCapture:e=>{if(!i||a===null||e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing)return;e.preventDefault(),e.stopPropagation();let t=o.getState().text;t.trim()!==``&&a(t).then(e=>{e&&o.setText(``)})},autoCorrect:`off`,autoCapitalize:`off`,autoComplete:`off`,"data-gramm":`false`,"data-gramm_editor":`false`,"data-enable-grammarly":`false`}),(0,I.jsxs)(`div`,{className:`oc-composer__bar`,children:[(0,I.jsxs)(`div`,{className:`oc-composer__group`,children:[(0,I.jsx)(WD.AddAttachment,{className:`oc-composer__icon`,"aria-label":vq(),disabled:i||n,title:i?NJ():void 0,children:(0,I.jsx)(Nm,{size:18,"aria-hidden":!0})}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-composer__tools${e?` is-on`:``}`,onClick:t,"aria-pressed":e,title:e?Nq():Iq(),children:[(0,I.jsx)(Rm,{size:15,"aria-hidden":!0}),zq()]})]}),(0,I.jsxs)(`div`,{className:`oc-composer__group`,children:[r?(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__icon`,title:xJ(),"aria-label":wJ(),children:(0,I.jsx)(Dm,{size:18,"aria-hidden":!0})}):null,n?(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__send`,disabled:!0,"aria-label":DJ(),children:(0,I.jsx)(sm,{size:18,"aria-hidden":!0})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(bO.If,{running:!1,children:(0,I.jsx)(WD.Send,{className:`oc-composer__send`,"aria-label":AJ(),children:(0,I.jsx)(sm,{size:18,"aria-hidden":!0})})}),(0,I.jsx)(bO.If,{running:!0,children:(0,I.jsx)(ent,{})})]})]})]})]})}function nnt(){var e=[...arguments];return(0,N.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var r6=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function i6(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function a6(e){return`nodeType`in e}function o6(e){return e?i6(e)?e:a6(e)?e.ownerDocument?.defaultView??window:window:window}function s6(e){let{Document:t}=o6(e);return e instanceof t}function c6(e){return i6(e)?!1:e instanceof o6(e).HTMLElement}function l6(e){return e instanceof o6(e).SVGElement}function u6(e){return e?i6(e)?e.document:a6(e)?s6(e)?e:c6(e)||l6(e)?e.ownerDocument:document:document:document}var d6=r6?N.useLayoutEffect:N.useEffect;function f6(e){let t=(0,N.useRef)(e);return d6(()=>{t.current=e}),(0,N.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function rnt(){let e=(0,N.useRef)(null);return[(0,N.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,N.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function p6(e,t){t===void 0&&(t=[e]);let n=(0,N.useRef)(e);return d6(()=>{n.current!==e&&(n.current=e)},t),n}function m6(e,t){let n=(0,N.useRef)();return(0,N.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function h6(e){let t=f6(e),n=(0,N.useRef)(null);return[n,(0,N.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function g6(e){let t=(0,N.useRef)();return(0,N.useEffect)(()=>{t.current=e},[e]),t.current}var _6={};function v6(e,t){return(0,N.useMemo)(()=>{if(t)return t;let n=_6[e]==null?0:_6[e]+1;return _6[e]=n,e+`-`+n},[e,t])}function y6(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var b6=y6(1),x6=y6(-1);function int(e){return`clientX`in e&&`clientY`in e}function S6(e){if(!e)return!1;let{KeyboardEvent:t}=o6(e.target);return t&&e instanceof t}function ant(e){if(!e)return!1;let{TouchEvent:t}=o6(e.target);return t&&e instanceof t}function C6(e){if(ant(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return int(e)?{x:e.clientX,y:e.clientY}:null}var w6=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[w6.Translate.toString(e),w6.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),T6=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function ont(e){return e.matches(T6)?e:e.querySelector(T6)}var snt={display:`none`};function cnt(e){let{id:t,value:n}=e;return N.createElement(`div`,{id:t,style:snt},n)}function lnt(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return N.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function unt(){let[e,t]=(0,N.useState)(``);return{announce:(0,N.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var E6=(0,N.createContext)(null);function dnt(e){let t=(0,N.useContext)(E6);(0,N.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function fnt(){let[e]=(0,N.useState)(()=>new Set),t=(0,N.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,N.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var pnt={draggable:`
|
|
158
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return F9e(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=n3.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function wet(){return{exit:{taskListCheckValueChecked:a3,taskListCheckValueUnchecked:a3,paragraph:Eet}}}function Tet(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Det}}}function a3(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Eet(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Det(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=n3.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Oet(){return[i9e(),T9e(),k9e(),get(),wet()]}function ket(e){return{extensions:[a9e(),E9e(e),A9e(),Cet(e),Tet()]}}var Aet={tokenize:Iet,partial:!0},o3={tokenize:Let,partial:!0},s3={tokenize:Ret,partial:!0},c3={tokenize:zet,partial:!0},jet={tokenize:Bet,partial:!0},l3={name:`wwwAutolink`,tokenize:Pet,previous:m3},u3={name:`protocolAutolink`,tokenize:Fet,previous:h3},d3={name:`emailAutolink`,tokenize:Net,previous:g3},f3={};function Met(){return{text:f3}}for(var p3=48;p3<123;)f3[p3]=d3,p3++,p3===58?p3=65:p3===91&&(p3=97);f3[43]=d3,f3[45]=d3,f3[46]=d3,f3[95]=d3,f3[72]=[d3,u3],f3[104]=[d3,u3],f3[87]=[d3,l3],f3[119]=[d3,l3];function Net(e,t,n){let r=this,i,a;return o;function o(t){return!_3(t)||!g3.call(r,r.previous)||v3(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return _3(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(jet,u,l)(t):t===45||t===95||n2(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&t2(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Pet(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!m3.call(r,r.previous)||v3(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Aet,e.attempt(o3,e.attempt(s3,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Fet(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&h3.call(r,r.previous)&&!v3(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(t2(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||r2(t)||o2(t)||l2(t)||c2(t)?n(t):e.attempt(o3,e.attempt(s3,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Iet(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Let(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(c3,c,s)(t):t===null||o2(t)||l2(t)||t!==45&&c2(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Ret(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(c3,t,a)(o):o===null||o2(o)||l2(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function zet(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||o2(o)||l2(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||o2(e)||l2(e)?t(e):r(e)}function a(e){return t2(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):t2(t)?(e.consume(t),o):n(t)}}function Bet(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return n2(e)?n(e):t(e)}}function m3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||o2(e)}function h3(e){return!t2(e)}function g3(e){return!(e===47||_3(e))}function _3(e){return e===43||e===45||e===46||e===95||n2(e)}function v3(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Vet={tokenize:Yet,partial:!0};function Het(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Ket,continuation:{tokenize:qet},exit:Jet}},text:{91:{name:`gfmFootnoteCall`,tokenize:Get},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Uet,resolveTo:Wet}}}}function Uet(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=e2(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Wet(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Get(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||o2(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(e2(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return o2(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Ket(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||o2(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=e2(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return o2(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),f2(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function qet(e,t,n){return e.check(v2,t,e.attempt(Vet,t,n))}function Jet(e){e.exit(`gfmFootnoteDefinition`)}function Yet(e,t,n){let r=this;return f2(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Xet(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Y0(o,o.length,0,h2(s,e.slice(r+1,n),t)),Y0(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Y0(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=m2(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=m2(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Zet=class{constructor(){this.map=[]}add(e,t,n){Qet(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Qet(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function $et(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ett(){return{flow:{null:{name:`table`,tokenize:ttt,resolveAll:ntt}}}}function ttt(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):a2(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):s2(t)?f2(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||o2(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,s2(t)?f2(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return s2(t)?f2(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||a2(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return s2(t)?f2(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||a2(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||a2(n)?(e.exit(`tableRow`),t(n)):s2(n)?f2(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||o2(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function ntt(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Zet;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(b3(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=y3(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=y3(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=y3(f,t,o,i,n,d)):(o[0]=o[1],d=y3(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&b3(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=$et(t.events,n))}return e}function y3(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},x3(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=x3(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=x3(t.events,n[2]),a=x3(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},x3(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function b3(e,t,n,r,i){let a=[],o=x3(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function x3(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var rtt={name:`tasklistCheck`,tokenize:att};function itt(){return{text:{91:rtt}}}function att(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return o2(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return a2(r)?t(r):s2(r)?e.check({tokenize:ott},t,n)(r):n(r)}}function ott(e,t,n){return f2(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function stt(e){return Q0([Met(),Het(),Xet(e),ett(),itt()])}var ctt={};function ltt(e){let t=this,n=e||ctt,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(stt(n)),a.push(Oet()),o.push(ket(n))}function utt(e){return typeof e==`string`&&/^(https?:|mailto:)/i.test(e.trim())}function dtt({href:e,children:t,...n}){return utt(e)?(0,I.jsx)(`a`,{...n,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,I.jsx)(`span`,{...n,children:t})}var ftt=(0,N.memo)(function(){return(0,I.jsx)(Q7e,{remarkPlugins:[ltt],className:`oc-md`,components:{a:dtt}})});function S3(e){return(0,I.jsx)(PT,{"data-slot":`select`,...e})}function C3(e){return(0,I.jsx)(RT,{"data-slot":`select-value`,...e})}function w3({className:e,size:t=`default`,children:n,...r}){return(0,I.jsxs)(IT,{"data-slot":`select-trigger`,"data-size":t,className:B$(`flex w-fit items-center justify-between gap-2 rounded-lg border border-input bg-background px-2.5 py-1 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,I.jsx)(zT,{asChild:!0,children:(0,I.jsx)(dm,{className:`size-4 opacity-50`})})]})}function T3({className:e,children:t,position:n=`popper`,...r}){return(0,I.jsx)(VT,{children:(0,I.jsxs)(UT,{"data-slot":`select-content`,className:B$(`relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,I.jsx)(uE,{className:`flex cursor-default items-center justify-center py-1`,children:(0,I.jsx)(pm,{className:`size-4`})}),(0,I.jsx)($T,{className:B$(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,I.jsx)(fE,{className:`flex cursor-default items-center justify-center py-1`,children:(0,I.jsx)(dm,{className:`size-4`})})]})})}function Q({className:e,children:t,...n}){return(0,I.jsxs)(iE,{"data-slot":`select-item`,className:B$(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,I.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,I.jsx)(cE,{children:(0,I.jsx)(um,{className:`size-4`})})}),(0,I.jsx)(oE,{children:t})]})}var E3=1e3;function ptt(){return[{id:`incorrect`,label:pDe()},{id:`incoherence`,label:gDe()},{id:`altered_words`,label:yDe()},{id:`formatting`,label:SDe()},{id:`latency`,label:TDe()},{id:`api_error`,label:ODe()},{id:`other`,label:lQ()}]}function mtt(){return[{id:`altered_words`,label:NDe()},{id:`formatting`,label:IDe()},{id:`other`,label:lQ()}]}function htt(e){return e===`user`?mtt():ptt()}var gtt=[{name:`Grammarly`,selector:`grammarly-desktop-integration, grammarly-extension, [data-grammarly-shadow-root]`},{name:`LanguageTool`,selector:`[data-lt-installed], .lt-toolbar`},{name:`DeepL`,selector:`deepl-inline-translate, .deepl-translator`},{name:`ProWritingAad`,selector:`pwa-shadow-host, .pwa-tag`}];function _tt(){let e=[];try{e=Array.from(navigator.plugins??[]).map(e=>e.name).slice(0,40)}catch{e=[]}let t=[];for(let{name:e,selector:n}of gtt)try{document.querySelector(n)&&t.push(e)}catch{}return{plugins:e,extensionsDetected:t}}var D3=N.createContext(null);function vtt(){let e=N.useContext(D3);if(!e)throw Error(`useFeedback must be used within <FeedbackProvider>`);return e}function ytt({children:e}){let t=F(V.feedback.submitFeedback),[n,r]=(0,N.useState)(null),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(``),[c,l]=(0,N.useState)(!1),[u,d]=(0,N.useState)(null),f=N.useCallback(e=>{a(``),s(``),l(!1),d(null),r(e)},[]);function p(e){e||r(null)}async function m(){if(!(!n||!i||c)){l(!0);try{d((await t({chatId:n.chatId,messageId:n.messageId,category:i,comment:o.trim()||void 0,client:{displayedText:n.displayedText,sourceWasOpen:n.sourceWasOpen,userAgent:navigator.userAgent,language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,theme:document.documentElement.classList.contains(`dark`)?`dark`:`light`,..._tt()}})).displayedMatchesStored)}catch{l(!1)}}}let h=u!==null,g=n?.role===`user`;return(0,I.jsxs)(D3.Provider,{value:f,children:[e,(0,I.jsx)(u1,{open:n!==null,onOpenChange:p,children:n?(0,I.jsxs)(d1,{className:`sm:max-w-md`,children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:zDe()}),(0,I.jsx)(h1,{children:h?HDe():g?GDe():JDe()})]}),h?(0,I.jsx)(`div`,{className:`oc-feedback__result`,role:`status`,children:n.sourceWasOpen?u===!0?(0,I.jsx)(`p`,{className:`oc-feedback__fidelity is-ok`,children:ZDe()}):(0,I.jsx)(`p`,{className:`oc-feedback__fidelity is-warn`,children:eOe()}):(0,I.jsx)(`p`,{className:`oc-feedback__fidelity`,children:rOe()})}):(0,I.jsxs)(`div`,{className:`oc-feedback__form`,children:[(0,I.jsx)(`label`,{className:`oc-feedback__label`,children:oOe()}),(0,I.jsxs)(S3,{value:i,onValueChange:a,children:[(0,I.jsx)(w3,{children:(0,I.jsx)(C3,{placeholder:lOe()})}),(0,I.jsx)(T3,{children:htt(n.role).map(e=>(0,I.jsx)(Q,{value:e.id,children:e.label},e.id))})]}),(0,I.jsx)(`label`,{className:`oc-feedback__label`,htmlFor:`oc-feedback-comment`,children:fOe()}),(0,I.jsx)(`textarea`,{id:`oc-feedback-comment`,className:`oc-feedback__textarea`,placeholder:hOe(),value:o,maxLength:E3,onChange:e=>s(e.target.value.slice(0,E3)),rows:4}),(0,I.jsxs)(`div`,{className:`oc-feedback__count`,children:[o.length,`/`,E3]})]}),(0,I.jsx)(p1,{children:h?(0,I.jsx)(X,{onClick:()=>p(!1),children:vOe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(X,{variant:`outline`,onClick:()=>p(!1),children:xOe()}),(0,I.jsx)(X,{onClick:()=>void m(),disabled:!i||c,children:c?wOe():DOe()})]})})]}):null})]})}function btt(e,t){let n=e.closest(`.oc-msg`)?.querySelector(`.oc-msg__source-pre`),r=n?.textContent;return n&&r!=null&&r!==`(aucun texte)`?{displayedText:r,sourceWasOpen:!0}:{displayedText:t,sourceWasOpen:!1}}function O3(){let e=vtt(),t=gy(e=>e.metadata?.custom?.messageId),n=gy(e=>e.metadata?.custom?.chatId),r=gy(e=>e.role),i=gy(e=>e.metadata?.custom?.rawText??``),a=P(V.feedback.myReportedMessageIds,n?{chatId:n}:`skip`);if(!t||!n)return null;let o=(a??[]).includes(t);function s(a){e({chatId:n,messageId:t,role:r,...btt(a.currentTarget,i)})}return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn${o?` is-on`:``}`,title:o?AOe():NOe(),"aria-label":IOe(),onClick:s,children:(0,I.jsx)(Oee,{size:15,"aria-hidden":!0})})}function k3(e,t){return e!=null&&e[t]!==void 0}var xtt=[`inherit`,`fast`,`standard`];function Stt(e){return e==null||e.fastMode===void 0?`inherit`:e.fastMode?`fast`:`standard`}function Ctt(e){return e===`inherit`?CZe():e===`fast`?qQ():JQ()}function wtt(e){return e===`inherit`?null:e===`fast`}function A3(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function j3(e){return e.length?e[0].toUpperCase()+e.slice(1):e}var Ttt={off:`Off`,minimal:`Min`,low:`Low`,medium:`Med`,high:`High`,xhigh:`XHigh`};function Ett(e,t){return Ttt[e]??t}function M3(e,t){return e==null||!t||t<=0?null:Math.round(e/t*100)}function Dtt(e,t){let n=M3(e,t);return n===null?null:eQe({pct:n,used:A3(e),total:A3(t)})}function Ott(e){return oQe({level:e??`full`})}function ktt(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?hQe({cost:e.toFixed(2),tokens:A3(t)}):n?vQe({cost:e.toFixed(2)}):r?xQe({tokens:A3(t)}):null}function Att(e){let t=e.filter(e=>typeof e==`string`&&e.length>0);return t.length>0?t.join(` · `):null}var jtt=new Set([`knobThinkingLevel`,`knobModel`,`knobFastMode`,`knobUnset`,`agentFiles`,`sessionCompact`,`configDefaults`]),Mtt=new Set([`knobThinkingLevel`,`knobModel`]);function N3(e,t){return jtt.has(t)?e==null?Mtt.has(t):e[t]===!0:!1}function Ntt(e,t){return{model:e(`knobModel`)&&t.hasModels,thinking:e(`knobThinkingLevel`)&&t.hasLevels,speed:e(`knobFastMode`),reset:e(`knobUnset`)}}function P3(e,t){return e===void 0?`loading`:e===null?{blocked:!N3(null,t),gatewayVersion:null}:{blocked:!N3(e.capabilities,t),gatewayVersion:e.gatewayVersion}}function F3(e){let t=P(V.compat.forChat,e===null?`skip`:{chatId:e}),n=t==null?null:t.capabilities;return{can:(0,N.useCallback)(e=>N3(n,e),[n]),loading:t===void 0,gatewayVersion:t?.gatewayVersion??null}}function Ptt(e){let t=F(V.chats.setSessionKnob),[n,r]=(0,N.useState)(null),[i,a]=(0,N.useState)(null);return{apply:(0,N.useCallback)(async(n,i)=>{r(n),a(null);let o={chatId:e};n===`fastMode`?o.fastMode=i:o[n]=i;try{await t(o)}catch{a({field:n,value:i})}finally{r(null)}},[e,t]),pending:n,error:i}}function I3({label:e,overridden:t,onReset:n,pending:r,error:i,onRetry:a,help:o,children:s,resettable:c=!0}){return(0,I.jsxs)(`div`,{className:`oc-spanel__row${t?` is-overridden`:``}`,children:[(0,I.jsxs)(`div`,{className:`oc-spanel__rowhead`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:e}),r?(0,I.jsx)(Cm,{size:13,className:`oc-spanel__spin`,"aria-label":GQ()}):t?c?(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__reset`,title:WQ(),"aria-label":WQ(),onClick:n,children:(0,I.jsx)(Pm,{size:12,"aria-hidden":!0})}):null:(0,I.jsx)(`span`,{className:`oc-spanel__badge`,children:aZe()})]}),(0,I.jsx)(`div`,{className:`oc-spanel__ctl`,children:s}),o?(0,I.jsx)(`p`,{className:`oc-spanel__help`,children:o}):null,i?(0,I.jsxs)(`p`,{className:`oc-spanel__error`,role:`alert`,children:[fZe(),(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__retry`,onClick:a,children:KQ()})]}):null]})}function L3({options:e,value:t,onChange:n,disabled:r}){return(0,I.jsx)(`div`,{className:`oc-spanel__seg`,role:`group`,children:e.map(e=>(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__seg-btn${t===e.id?` is-active`:``}`,"aria-pressed":t===e.id,title:e.title??e.label,"aria-label":e.title??e.label,disabled:r,onClick:()=>{e.id!==t&&n(e.id)},children:e.label},e.id))})}function Ftt({options:e,value:t,onChange:n,disabled:r,ariaLabel:i}){let a=t===null||e.some(e=>e.id===t);return(0,I.jsxs)(`select`,{className:`oc-spanel__select`,value:t??``,disabled:r,"aria-label":i,onChange:e=>{e.target.value&&e.target.value!==t&&n(e.target.value)},children:[t===null?(0,I.jsx)(`option`,{value:``,disabled:!0,hidden:!0}):null,a?null:(0,I.jsx)(`option`,{value:t,children:t}),e.map(e=>(0,I.jsx)(`option`,{value:e.id,children:e.label},e.id))]})}function R3({chatId:e,sm:t,settings:n}){let{apply:r,pending:i,error:a}=Ptt(e),{can:o}=F3(e),s=i!==null,c=(0,N.useCallback)(()=>{a&&r(a.field,a.value)},[r,a]),l=t.thinkingLevels??[],u=t.availableModels??[],d=Stt(n),f=Ntt(o,{hasModels:u.length>0,hasLevels:l.length>0});return(0,I.jsxs)(I.Fragment,{children:[f.model?(0,I.jsx)(I3,{label:hU(),overridden:k3(n,`model`),onReset:()=>void r(`model`,null),pending:i===`model`,error:a?.field===`model`,onRetry:c,resettable:f.reset,children:u.length<=4?(0,I.jsx)(L3,{options:u,value:t.model??null,onChange:e=>void r(`model`,e),disabled:s}):(0,I.jsx)(Ftt,{options:u,value:t.model??null,onChange:e=>void r(`model`,e),disabled:s,ariaLabel:hU()})}):null,f.thinking?(0,I.jsx)(I3,{label:_Ze(),overridden:k3(n,`thinkingLevel`),onReset:()=>void r(`thinkingLevel`,null),pending:i===`thinkingLevel`,error:a?.field===`thinkingLevel`,onRetry:c,resettable:f.reset,children:(0,I.jsx)(L3,{options:l.map(e=>({id:e.id,label:Ett(e.id,j3(e.label)),title:j3(e.label)})),value:t.thinkingLevel??null,onChange:e=>void r(`thinkingLevel`,e),disabled:s})}):null,f.speed?(0,I.jsx)(I3,{label:bZe(),overridden:k3(n,`fastMode`),onReset:()=>void r(`fastMode`,null),pending:i===`fastMode`,error:a?.field===`fastMode`,onRetry:c,resettable:f.reset,children:(0,I.jsx)(L3,{options:xtt.map(e=>({id:e,label:Ctt(e)})),value:d,onChange:e=>void r(`fastMode`,wtt(e)),disabled:s})}):null]})}function z3({label:e,state:t,destructive:n,onClick:r,onRetry:i}){return(0,I.jsxs)(`div`,{className:`oc-spanel__action`,children:[(0,I.jsxs)(X,{variant:n?`destructive`:`outline`,size:`sm`,disabled:t===`pending`,onClick:r,children:[t===`pending`?(0,I.jsx)(Cm,{className:`oc-spanel__spin`,"aria-hidden":!0}):null,e]}),t===`done`?(0,I.jsx)(`p`,{className:`oc-spanel__action-note`,role:`status`,children:JQe()}):null,t===`error`?(0,I.jsxs)(`p`,{className:`oc-spanel__error`,role:`alert`,children:[ZQe(),(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__retry`,onClick:i,children:KQ()})]}):null]})}function Itt({chatId:e,open:t,onOpenChange:n}){let r=P(V.messages.getSessionMeta,t?{chatId:e}:`skip`),i=P(V.agents.getChatAgent,t?{chatId:e}:`skip`),a=r?.sessionMeta??null,o=r?.sessionSettings??null,{can:s}=F3(t?e:null),c=v1(),l=$n(V.agentFiles.compactSession),u=F(V.chats.resetSession),[d,f]=(0,N.useState)(`idle`),[p,m]=(0,N.useState)(`idle`);async function h(){f(`pending`);try{await l({chatId:e}),f(`done`)}catch{f(`error`)}}async function g(){m(`pending`);try{await u({chatId:e}),m(`done`)}catch{m(`error`)}}async function _(){await c({title:DQe(),description:AQe(),confirmLabel:NQe(),cancelLabel:fW()})&&await h()}async function v(){await c({title:zQe(),description:HQe(),confirmLabel:GQe(),cancelLabel:fW(),destructive:!0})&&await g()}let y=M3(a?.totalTokens,a?.contextTokens),b=y==null?``:y>=90?`is-critical`:y>=75?`is-warn`:`is-ok`,x=Dtt(a?.totalTokens,a?.contextTokens),S=ktt(a?.estimatedCostUsd,a?.totalTokens),C=i?.agent??null,w=Att([C?C.displayName??C.agentId:null,a?.agentRuntime,a?.model]);return(0,I.jsx)(G1,{open:t,onOpenChange:n,children:(0,I.jsxs)(K1,{side:`right`,className:`oc-spanel`,children:[(0,I.jsxs)(q1,{children:[(0,I.jsx)(Y1,{children:NZe()}),(0,I.jsx)(X1,{children:IZe()})]}),(0,I.jsx)(`div`,{className:`oc-spanel__body`,children:r===void 0?(0,I.jsx)(`p`,{className:`oc-spanel__loading`,children:KO()}):(0,I.jsxs)(I.Fragment,{children:[a?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:zZe()}),(0,I.jsx)(R3,{chatId:e,sm:a,settings:o})]}):null,(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:HZe()}),x!==null&&y!==null?(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:ZZe()}),(0,I.jsxs)(`span`,{className:`oc-meter oc-spanel__meter ${b}`,children:[(0,I.jsx)(`span`,{className:`oc-meter__track`,children:(0,I.jsx)(`span`,{className:`oc-meter__fill`,style:{width:`${Math.min(y,100)}%`}})}),(0,I.jsx)(`span`,{className:`oc-meter__label`,children:x})]})]}):null,(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:rQe()}),(0,I.jsx)(`span`,{className:`oc-spanel__value`,children:Ott(a?.verboseLevel)}),(0,I.jsx)(`p`,{className:`oc-spanel__help`,children:lQe()})]}),S===null?null:(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:fQe()}),(0,I.jsx)(`span`,{className:`oc-spanel__value`,children:S})]})]}),w===null?null:(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:GZe()}),(0,I.jsx)(`div`,{className:`oc-spanel__static`,children:(0,I.jsx)(`span`,{className:`oc-spanel__value`,children:w})})]})]})}),(0,I.jsxs)(J1,{className:`oc-spanel__actions`,children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:JZe()}),s(`sessionCompact`)?(0,I.jsx)(z3,{label:wQe(),state:d,onClick:()=>void _(),onRetry:()=>void h()}):null,(0,I.jsx)(z3,{label:IQe(),state:p,destructive:!0,onClick:()=>void v(),onRetry:()=>void g()})]})]})})}var B3={showSource:!0,showReport:!0,copyAssistant:!0,copyUser:!0,showDelete:!0,showTools:!1,voiceInput:!1},V3=(0,N.createContext)(B3);function H3(){return(0,N.useContext)(V3)}var U3=(0,N.createContext)(null),W3=(0,N.createContext)(null);function G3({className:e}){let t=$Q();return(0,I.jsx)(`div`,{className:e,"aria-hidden":!0,children:t.logoUrl?t.logoMasked?(0,I.jsx)(`span`,{className:`oc-avatar__img oc-avatar__img--mask`,style:{"--oc-logo-url":`url("${t.logoUrl}")`}}):(0,I.jsx)(`img`,{className:`oc-avatar__img`,src:t.logoUrl,alt:``}):t.isDefault?(0,I.jsx)(NO,{className:`oc-avatar__mark`}):t.initials})}function K3({chatId:e,focusMessageId:t}){let{runtime:n,turnGate:r,queueSend:i}=K4e({chatId:e}),a=P(V.me.getMe,{host:xO}),o=a?.ui?.effective??B3,s=o.showTools,c=wO(a?.resolvedThemeMode),l=a?.resolvedChartBrand,u=a?.resolvedChartTokens,d=P(V.agents.getChatAgent,e?{chatId:e}:`skip`),f=d?.multiAgent?d.agent:null,p=(0,N.useMemo)(()=>{let e=l?.label??`Atrium`,t=u?.colors?.[c],n=ife(l,afe(t?.primary,t?.[`primary-foreground`],c));return{label:e,logoUrl:n?.url??null,logoMasked:n?.masked??!1,isDefault:l?.isDefault??!0,initials:ofe(e),agentName:f?.displayName??f?.agentId??null,agentEmoji:f?.emoji??null}},[l,c,u,f]),m=F(V.me.setUiPref).withOptimisticUpdate(C1),h=P(V.messages.getSessionMeta,e?{chatId:e}:`skip`),g=e!==null&&h===null,_=U1(),{width:v,startResize:y}=W1({storageKey:`oc.sources.width`,defaultWidth:380,min:300,max:680,edge:`right`}),[b,x]=(0,N.useState)(null);(0,N.useEffect)(()=>{x(null)},[e]);let S=(0,N.useMemo)(()=>({activeMessageId:b,openFor:e=>x(e),close:()=>x(null)}),[b]),C=b!==null;return(0,I.jsx)(_ie,{runtime:n,children:(0,I.jsx)(U3.Provider,{value:r,children:(0,I.jsx)(W3.Provider,{value:i,children:(0,I.jsx)(V3.Provider,{value:o,children:(0,I.jsx)(QQ.Provider,{value:p,children:(0,I.jsxs)(I1.Provider,{value:S,children:[(0,I.jsxs)(`div`,{className:`oc-chat`,children:[(0,I.jsx)(`div`,{className:`oc-chat__convo`,children:e?g?(0,I.jsx)(Ltt,{}):(0,I.jsx)(ztt,{chatId:e,showTools:s,onToggleTools:()=>void m({key:`showTools`,value:!s}),focusMessageId:t??null}):(0,I.jsx)(`div`,{className:`oc-empty`,children:wH()})}),C&&!_?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-sources-resizer`,onPointerDown:y,role:`separator`,"aria-orientation":`vertical`,"aria-label":DK()}),(0,I.jsx)(`aside`,{className:`oc-sources-col`,style:{width:v,flex:`0 0 ${v}px`},children:(0,I.jsx)(L1,{messageId:b,onClose:S.close})})]}):null]}),C&&_?(0,I.jsx)(G1,{open:!0,onOpenChange:e=>{e||S.close()},children:(0,I.jsx)(K1,{side:`right`,className:`oc-sources-panel-sheet`,children:(0,I.jsx)(L1,{messageId:b,onClose:S.close})})}):null]})})})})})})}function Ltt(){let e=ss();return(0,I.jsxs)(`div`,{className:`oc-notfound`,role:`status`,children:[(0,I.jsx)(`div`,{className:`oc-notfound__icon`,"aria-hidden":!0,children:(0,I.jsx)(Fm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-notfound__title`,children:DH()}),(0,I.jsx)(`p`,{className:`oc-notfound__body`,children:AH()}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-notfound__cta`,onClick:()=>void e({to:`/`}),children:[(0,I.jsx)(Nm,{size:16,"aria-hidden":!0}),NH()]})]})}function Rtt(e,t){(0,N.useEffect)(()=>{if(!t)return;let e=!1,n=0,r=0,i=()=>{if(e)return;let a=document.querySelector(`[data-message-id="${CSS.escape(t)}"]`);if(a){a.scrollIntoView({block:`center`,behavior:`smooth`}),a.classList.remove(`oc-msg--highlight`),a.offsetWidth,a.classList.add(`oc-msg--highlight`),window.setTimeout(()=>a.classList.remove(`oc-msg--highlight`),2400);return}n++<40&&(r=window.setTimeout(i,150))};return r=window.setTimeout(i,0),()=>{e=!0,window.clearTimeout(r)}},[e,t])}function ztt({chatId:e,showTools:t,onToggleTools:n,focusMessageId:r}){let i=P(V.bridgeHealth.getBridgeAvailability,{chatId:e}),a=i&&!i.available?i:null,o=P(V.agents.getChatAgent,{chatId:e})?.readOnly===!0;return Rtt(e,r),(0,I.jsxs)(bO.Root,{className:`oc-thread`,children:[(0,I.jsx)(Wtt,{chatId:e}),(0,I.jsx)(Htt,{chatId:e}),(0,I.jsxs)(bO.Viewport,{className:`oc-thread__viewport`,children:[(0,I.jsx)(bO.Empty,{children:(0,I.jsx)(Utt,{})}),(0,I.jsx)(bO.Messages,{components:{UserMessage:Ztt,AssistantMessage:Qtt,SystemMessage:$tt}})]}),(0,I.jsx)(bO.If,{empty:!1,children:(0,I.jsxs)(bO.ScrollToBottom,{className:`oc-scrolldown`,children:[(0,I.jsx)(Ytt,{}),(0,I.jsx)(`span`,{children:IH()})]})}),o?(0,I.jsx)(Vtt,{}):a?(0,I.jsx)(Btt,{}):null,(0,I.jsx)(rnt,{showTools:t,onToggleTools:n,unavailable:a!==null||o})]})}function Btt(){return(0,I.jsxs)(`div`,{className:`oc-chat-banner oc-chat-banner--error`,role:`status`,children:[(0,I.jsx)(hm,{size:16,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:zH()})]})}function Vtt(){return(0,I.jsxs)(`div`,{className:`oc-chat-banner oc-chat-banner--error`,role:`status`,children:[(0,I.jsx)(wm,{size:16,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:HH()})]})}function Htt({chatId:e}){let t=P(V.messages.listByChat,{chatId:e}),[n,r]=(0,N.useState)(``),i=(0,N.useRef)(null);return(0,N.useEffect)(()=>{i.current=null,r(``)},[e]),(0,N.useEffect)(()=>{if(!t)return;let e;for(let n of t)n.role===`assistant`&&(e=n);if(!(!e||e.status!==`complete`)){if(i.current===null){i.current=e._id;return}i.current!==e._id&&(i.current=e._id,r(e=>e===GH()?`${GH()} `:GH()))}},[t]),(0,I.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,className:`oc-sr-only`,children:n})}function Utt(){return(0,I.jsxs)(`div`,{className:`oc-emptystate`,children:[(0,I.jsx)(G3,{className:`oc-emptystate__avatar`}),(0,I.jsx)(`h2`,{className:`oc-emptystate__title`,children:JH()})]})}function q3({sm:e,detail:t=!0}){let n=e.totalTokens!=null&&e.contextTokens&&e.contextTokens>0?Math.round(e.totalTokens/e.contextTokens*100):null;return n==null?null:(0,I.jsxs)(`span`,{className:`oc-meter ${n>=90?`is-critical`:n>=75?`is-warn`:`is-ok`}`,title:NU({pct:n,used:A3(e.totalTokens),total:A3(e.contextTokens)}),children:[(0,I.jsx)(`span`,{className:`oc-meter__track`,children:(0,I.jsx)(`span`,{className:`oc-meter__fill`,style:{width:`${Math.min(n,100)}%`}})}),(0,I.jsxs)(`span`,{className:`oc-meter__label`,children:[n,`%`,t?(0,I.jsxs)(`span`,{className:`oc-meter__detail`,children:[` · `,A3(e.totalTokens),`/`,A3(e.contextTokens)]}):null]})]})}function Wtt({chatId:e}){let t=P(V.messages.getSessionMeta,{chatId:e}),n=P(V.agents.getChatAgent,{chatId:e}),r=t?.sessionMeta??null,i=t?.sessionSettings??null,a=n?.multiAgent?n.agent:null,o=H3(),[s,c]=(0,N.useState)(!1),l=(0,N.useRef)(null),u=(0,N.useRef)(null),d=(0,N.useRef)(null),[f,p]=(0,N.useState)(!1),m=!k3(i,`thinkingLevel`),h=(s,l)=>(0,I.jsxs)(I.Fragment,{children:[a?(0,I.jsxs)(`span`,{className:`oc-chip oc-chip--agent${a.state===`ok`?``:` is-warn`}`,title:eU({name:a.displayName??a.agentId})+(a.inheritedDefault?rU():``)+(a.state===`deleted`?oU():a.state===`stale`?lU():``),children:[a.emoji?(0,I.jsx)(`span`,{className:`oc-chip__emoji`,"aria-hidden":!0,children:a.emoji}):(0,I.jsx)(lm,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-chip__label`,children:a.displayName??a.agentId}),o.showTools&&n?.multiInstance?(0,I.jsxs)(`span`,{className:`oc-chip__instance`,title:fU({instance:a.instanceName}),children:[(0,I.jsx)(Im,{size:11,"aria-hidden":!0}),a.instanceName]}):null]}):null,o.showTools&&!s&&r?.model?(0,I.jsxs)(`span`,{className:`oc-chip oc-chip--info`,title:r.modelProvider?vU({provider:r.modelProvider}):hU(),children:[(0,I.jsx)(qtt,{}),(0,I.jsx)(`span`,{className:`oc-chip__label`,children:r.model})]}):null,o.showTools&&!s&&r?.thinkingLevel?(0,I.jsxs)(`span`,{className:`oc-chip oc-chip--info`,title:m?xU():wU(),children:[(0,I.jsx)(Jtt,{}),(0,I.jsxs)(`span`,{className:`oc-chip__label`,children:[DU(),`\xA0: `,j3(r.thinkingLevel)]}),m?(0,I.jsx)(`span`,{className:`oc-chip__hint`,children:AU()}):null]}):null,o.showTools&&r?(0,I.jsx)(q3,{sm:r,detail:!s}):null,(0,I.jsx)(Gtt,{chatId:e,title:t?.title??null,compact:s,ghost:l}),r?(0,I.jsx)(Ktt,{chatId:e,sm:r,settings:i,onOpenPanel:()=>c(!0),compact:s,ghost:l}):null]});return(0,N.useLayoutEffect)(()=>{let e=l.current;if(!e)return;let t=()=>{let t=d.current?.offsetWidth??0;if(t===0)return;let n=Math.min(u.current?.scrollWidth??0,360),r=e.clientWidth-n-16<t;p(e=>e===r?e:r)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[[HU(),eW(),r?.model??``,r?.thinkingLevel??``,a?.displayName??a?.agentId??``,n?.multiInstance?a?.instanceName??``:``,t?.title??``,o.showTools?`1`:`0`].join(`|`)]),(0,I.jsxs)(`header`,{className:`oc-chathead`,ref:l,children:[(0,I.jsx)(`div`,{className:`oc-chathead__title`,title:t?.title??void 0,ref:u,children:t?.title||ZH()}),(0,I.jsx)(`div`,{className:`oc-chathead__meta`,children:h(f,!1)}),(0,I.jsx)(`div`,{className:`oc-chathead-ghost`,"aria-hidden":!0,ref:d,children:h(!1,!0)}),(0,I.jsx)(Itt,{chatId:e,open:s,onOpenChange:c})]})}function J3(e,t,n){let r=new Blob([e],{type:`${n};charset=utf-8`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}function Gtt({chatId:e,title:t,compact:n=!1,ghost:r=!1}){let i=Zn();async function a(n){let[r,a]=await Promise.all([i.query(V.messages.listByChat,{chatId:e}),i.query(V.messages.getStreamingText,{chatId:e})]),o=new Map(a.map(e=>[e.messageId,e.text])),s=r.map(e=>({role:e.role,text:e.status===`streaming`?o.get(e._id)??e.text:e.text,createdAt:e.updatedAt??e._creationTime,parts:e.parts.map(e=>({kind:e.kind,filename:`filename`in e?e.filename:void 0,name:`name`in e?e.name:void 0}))})),c=r.length>=200,l={title:t??void 0,truncated:c,exportedAt:Date.now()},u=O2e(t);n===`md`?J3(E2e(s,l),`${u}.md`,`text/markdown`):J3(D2e(s,l),`${u}.json`,`application/json`)}let o=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(vm,{size:13,"aria-hidden":!0}),n?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-chip__label`,children:HU()}),(0,I.jsx)(dm,{size:13,className:`oc-chip__chev`,"aria-hidden":!0})]})]});return r?(0,I.jsx)(`span`,{className:`oc-chip oc-chip--btn`,children:o}):(0,I.jsxs)(V$,{children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-chip oc-chip--btn`,title:zU(),children:o})}),(0,I.jsxs)(U$,{align:`end`,className:`w-44`,children:[(0,I.jsx)(G$,{children:HU()}),(0,I.jsx)(W$,{onClick:()=>void a(`md`),children:GU()}),(0,I.jsx)(W$,{onClick:()=>void a(`json`),children:JU()})]})]})}function Ktt({chatId:e,sm:t,settings:n,onOpenPanel:r,compact:i=!1,ghost:a=!1}){let[o,s]=(0,N.useState)(!1),c=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Rm,{size:13,"aria-hidden":!0}),i?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-chip__label`,children:eW()}),(0,I.jsx)(dm,{size:13,className:`oc-chip__chev`,"aria-hidden":!0})]})]});return a?(0,I.jsx)(`span`,{className:`oc-chip oc-chip--btn`,children:c}):(0,I.jsxs)(J$,{open:o,onOpenChange:s,children:[(0,I.jsx)(Y$,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-chip oc-chip--btn`,title:ZU(),children:c})}),(0,I.jsxs)(X$,{align:`end`,className:`oc-spanel-pop w-80 p-2`,children:[t.totalTokens!=null&&t.contextTokens?(0,I.jsxs)(`div`,{className:`oc-spanel-pop__usage`,children:[(0,I.jsx)(`span`,{className:`oc-spanel-pop__usage-label`,children:IU()}),(0,I.jsx)(q3,{sm:t})]}):null,(0,I.jsx)(R3,{chatId:e,sm:t,settings:n}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-spanel-pop__all`,onClick:()=>{s(!1),r()},children:[(0,I.jsx)(Rm,{size:13,"aria-hidden":!0}),AZe(),(0,I.jsx)(fm,{size:13,"aria-hidden":!0})]})]})]})}function qtt(){return(0,I.jsxs)(`svg`,{className:`oc-chip__icon`,viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,I.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}),(0,I.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`}),(0,I.jsx)(`path`,{d:`M9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3`})]})}function Jtt(){return(0,I.jsxs)(`svg`,{className:`oc-chip__icon`,viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,I.jsx)(`path`,{d:`M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`}),(0,I.jsx)(`path`,{d:`M12 5a3 3 0 1 1 5.997.142 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z`})]})}function Y3({children:e}){return(0,I.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:e})}function Ytt(){return(0,I.jsx)(Y3,{children:(0,I.jsx)(`path`,{d:`M12 5v14M19 12l-7 7-7-7`})})}function X3(){return(0,I.jsxs)(Y3,{children:[(0,I.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),(0,I.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]})}function Z3(){return(0,I.jsx)(Y3,{children:(0,I.jsx)(`path`,{d:`M20 6 9 17l-5-5`})})}var Q3={File:T3e},Xtt={...Q3,Text:ftt};function $3({kind:e}){let t=gy(e=>e.metadata?.custom?.messageId),n=F(V.messages.deleteMessage).withOptimisticUpdate(q4e),r=v1(),i=S1(),a=(0,N.useContext)(U3),[o,s]=(0,N.useState)(!1);if(!t)return null;async function c(){if(await r(e===`assistant`?{title:rW(),description:oW(),confirmLabel:lW(),cancelLabel:fW(),destructive:!0}:{title:hW(),description:vW(),confirmLabel:xW(),cancelLabel:fW(),destructive:!0})){s(!0),e===`assistant`&&a?.begin();try{await n({messageId:t})}catch(t){e===`assistant`&&a?.cancel(),i.error(NW(),t)}finally{s(!1)}}}return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn oc-iconbtn--danger`,title:e===`assistant`?wW():DW(),"aria-label":AW(),"aria-busy":o,disabled:o,onClick:()=>void c(),children:o?(0,I.jsx)(Cm,{size:15,className:`oc-iconbtn__spin`,"aria-hidden":!0}):(0,I.jsx)(Bm,{size:15,"aria-hidden":!0})})}function e6(){let e=gy(e=>e.metadata?.custom?.rawText??``),[t,n]=(0,N.useState)(!1),r=[...e].length;return(0,I.jsxs)(`div`,{className:`oc-msg__source`,children:[(0,I.jsxs)(`div`,{className:`oc-msg__source-head`,children:[(0,I.jsx)(`span`,{className:`oc-msg__source-label`,children:r>1?NK({count:r}):AK({count:r})}),(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn`,title:IK(),"aria-label":IK(),onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1200)})},children:t?(0,I.jsx)(Z3,{}):(0,I.jsx)(X3,{})})]}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:e.length>0?e:zK()})]})}function t6({active:e,onToggle:t}){return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn${e?` is-on`:``}`,onClick:t,"aria-pressed":e,title:e?HK():GK(),"aria-label":JK(),children:(0,I.jsx)(Tee,{size:15,"aria-hidden":!0})})}function Ztt(){let[e,t]=(0,N.useState)(!1),n=H3(),r=gy(e=>e.id.startsWith(`optimistic-`)),i=gy(e=>e.id);return(0,I.jsx)(lO.Root,{className:`oc-msg oc-msg--user${r?` is-sending`:``}`,"data-message-id":i,children:(0,I.jsxs)(`div`,{className:`oc-msg__col oc-msg__col--user`,children:[(0,I.jsx)(`div`,{className:`oc-msg__bubble`,children:e?(0,I.jsx)(e6,{}):(0,I.jsx)(lO.Parts,{components:Q3})}),r?(0,I.jsxs)(`span`,{className:`oc-msg__sending`,role:`status`,children:[(0,I.jsx)(`span`,{className:`oc-msg__sending-spin`,"aria-hidden":!0}),eq()]}):(0,I.jsxs)(By.Root,{className:`oc-msg__actions oc-msg__actions--user`,hideWhenRunning:!0,autohide:`not-last`,children:[n.copyUser?(0,I.jsxs)(By.Copy,{className:`oc-iconbtn`,title:ZK(),children:[(0,I.jsx)(lO.If,{copied:!0,children:(0,I.jsx)(Z3,{})}),(0,I.jsx)(lO.If,{copied:!1,children:(0,I.jsx)(X3,{})})]}):null,n.showSource?(0,I.jsx)(t6,{active:e,onToggle:()=>t(e=>!e)}):null,n.showReport?(0,I.jsx)(O3,{}):null,n.showDelete?(0,I.jsx)($3,{kind:`user`}):null]})]})})}function Qtt(){let[e,t]=(0,N.useState)(!1),n=H3(),r=$Q(),i=gy(e=>e.id);return(0,I.jsxs)(lO.Root,{className:`oc-msg oc-msg--assistant`,"data-message-id":i,children:[(0,I.jsx)(G3,{className:`oc-msg__avatar`}),(0,I.jsxs)(`div`,{className:`oc-msg__col`,children:[(0,I.jsxs)(`div`,{className:`oc-msg__name`,children:[r.agentEmoji?(0,I.jsx)(`span`,{className:`oc-msg__name-emoji`,"aria-hidden":!0,children:r.agentEmoji}):null,S2e(r)]}),(0,I.jsxs)(`div`,{className:`oc-msg__body`,children:[n.showTools?(0,I.jsxs)(`div`,{className:`oc-msg__meta`,children:[(0,I.jsx)(m3e,{}),(0,I.jsx)(_3e,{})]}):null,e?(0,I.jsx)(e6,{}):(0,I.jsx)(lO.Parts,{components:Xtt}),(0,I.jsx)(e3e,{})]}),(0,I.jsxs)(By.Root,{className:`oc-msg__actions`,hideWhenRunning:!0,autohide:`not-last`,children:[n.copyAssistant?(0,I.jsxs)(By.Copy,{className:`oc-iconbtn`,title:lq(),children:[(0,I.jsx)(lO.If,{copied:!0,children:(0,I.jsx)(Z3,{})}),(0,I.jsx)(lO.If,{copied:!1,children:(0,I.jsx)(X3,{})})]}):null,n.showSource?(0,I.jsx)(t6,{active:e,onToggle:()=>t(e=>!e)}):null,n.showReport?(0,I.jsx)(O3,{}):null,n.showDelete?(0,I.jsx)($3,{kind:`assistant`}):null]})]})]})}function $tt(){let e=gy(e=>e.id);return(0,I.jsx)(lO.Root,{className:`oc-msg oc-msg--system`,"data-message-id":e,children:(0,I.jsx)(`div`,{className:`oc-msg__body`,children:(0,I.jsx)(lO.Parts,{components:Q3})})})}function ent(){let e=my(e=>e.status?.type),t=my(e=>e.type),n=e===`incomplete`;return(0,I.jsxs)($E.Root,{className:`oc-attach${n?` oc-attach--error`:``}`,"data-status":e,children:[(0,I.jsx)(`span`,{className:`oc-attach__icon`,"aria-hidden":!0,children:n?(0,I.jsx)(hm,{size:14}):t===`image`?(0,I.jsx)(Aee,{size:14}):(0,I.jsx)(Nee,{size:14})}),(0,I.jsx)(`span`,{className:`oc-attach__name`,children:(0,I.jsx)($E.Name,{})}),n?(0,I.jsx)(`span`,{className:`oc-attach__state`,children:xq()}):null,(0,I.jsx)($E.Remove,{className:`oc-attach__remove`,"aria-label":Aq(),children:(0,I.jsx)(Gm,{size:13,"aria-hidden":!0})})]})}function tnt(){let e=(0,N.useSyncExternalStore)(AO.subscribe,AO.getSnapshot);return e.active?(0,I.jsxs)(`div`,{className:`oc-upload`,role:`status`,"aria-live":`polite`,children:[(0,I.jsxs)(`div`,{className:`oc-upload__head`,children:[(0,I.jsx)(Cm,{className:`oc-upload__spin`,size:14,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:e.count>1?Dq({count:e.count,percent:e.percent}):wq({percent:e.percent})})]}),(0,I.jsx)(`div`,{className:`oc-upload__track`,"aria-hidden":!0,children:(0,I.jsx)(`div`,{className:`oc-upload__bar`,style:{width:`${e.percent}%`}})})]}):null}function nnt(){let e=(0,N.useContext)(W3),t=hy(),n=Sie(e=>e.text).trim().length>0;return(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__send`,disabled:!n||e===null,"aria-label":IJ(),title:n?zJ():NJ(),onClick:()=>{if(e===null)return;let n=t.getState().text;n.trim()!==``&&e(n).then(e=>{e&&t.setText(``)})},children:(0,I.jsx)(sm,{size:18,"aria-hidden":!0})})}function rnt({showTools:e,onToggleTools:t,unavailable:n=!1}){let r=H3().voiceInput,i=Tie(e=>e.isRunning),a=(0,N.useContext)(W3),o=hy();return(0,I.jsxs)(WD.Root,{className:`oc-composer${n?` oc-composer--disabled`:``}`,children:[(0,I.jsx)(WD.Attachments,{components:{Attachment:ent}}),(0,I.jsx)(tnt,{}),(0,I.jsx)(WD.Input,{className:`oc-composer__input`,placeholder:n?fq():hq(),autoFocus:!0,rows:1,disabled:n,onKeyDownCapture:e=>{if(!i||a===null||e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing)return;e.preventDefault(),e.stopPropagation();let t=o.getState().text;t.trim()!==``&&a(t).then(e=>{e&&o.setText(``)})},autoCorrect:`off`,autoCapitalize:`off`,autoComplete:`off`,"data-gramm":`false`,"data-gramm_editor":`false`,"data-enable-grammarly":`false`}),(0,I.jsxs)(`div`,{className:`oc-composer__bar`,children:[(0,I.jsxs)(`div`,{className:`oc-composer__group`,children:[(0,I.jsx)(WD.AddAttachment,{className:`oc-composer__icon`,"aria-label":vq(),disabled:i||n,title:i?NJ():void 0,children:(0,I.jsx)(Nm,{size:18,"aria-hidden":!0})}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-composer__tools${e?` is-on`:``}`,onClick:t,"aria-pressed":e,title:e?Nq():Iq(),children:[(0,I.jsx)(Rm,{size:15,"aria-hidden":!0}),zq()]})]}),(0,I.jsxs)(`div`,{className:`oc-composer__group`,children:[r?(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__icon`,title:xJ(),"aria-label":wJ(),children:(0,I.jsx)(Dm,{size:18,"aria-hidden":!0})}):null,n?(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__send`,disabled:!0,"aria-label":DJ(),children:(0,I.jsx)(sm,{size:18,"aria-hidden":!0})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(bO.If,{running:!1,children:(0,I.jsx)(WD.Send,{className:`oc-composer__send`,"aria-label":AJ(),children:(0,I.jsx)(sm,{size:18,"aria-hidden":!0})})}),(0,I.jsx)(bO.If,{running:!0,children:(0,I.jsx)(nnt,{})})]})]})]})]})}function int(){var e=[...arguments];return(0,N.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var n6=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function r6(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function i6(e){return`nodeType`in e}function a6(e){return e?r6(e)?e:i6(e)?e.ownerDocument?.defaultView??window:window:window}function o6(e){let{Document:t}=a6(e);return e instanceof t}function s6(e){return r6(e)?!1:e instanceof a6(e).HTMLElement}function c6(e){return e instanceof a6(e).SVGElement}function l6(e){return e?r6(e)?e.document:i6(e)?o6(e)?e:s6(e)||c6(e)?e.ownerDocument:document:document:document}var u6=n6?N.useLayoutEffect:N.useEffect;function d6(e){let t=(0,N.useRef)(e);return u6(()=>{t.current=e}),(0,N.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function ant(){let e=(0,N.useRef)(null);return[(0,N.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,N.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function f6(e,t){t===void 0&&(t=[e]);let n=(0,N.useRef)(e);return u6(()=>{n.current!==e&&(n.current=e)},t),n}function p6(e,t){let n=(0,N.useRef)();return(0,N.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function m6(e){let t=d6(e),n=(0,N.useRef)(null);return[n,(0,N.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function h6(e){let t=(0,N.useRef)();return(0,N.useEffect)(()=>{t.current=e},[e]),t.current}var g6={};function _6(e,t){return(0,N.useMemo)(()=>{if(t)return t;let n=g6[e]==null?0:g6[e]+1;return g6[e]=n,e+`-`+n},[e,t])}function v6(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var y6=v6(1),b6=v6(-1);function ont(e){return`clientX`in e&&`clientY`in e}function x6(e){if(!e)return!1;let{KeyboardEvent:t}=a6(e.target);return t&&e instanceof t}function snt(e){if(!e)return!1;let{TouchEvent:t}=a6(e.target);return t&&e instanceof t}function S6(e){if(snt(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ont(e)?{x:e.clientX,y:e.clientY}:null}var C6=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[C6.Translate.toString(e),C6.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),w6=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function cnt(e){return e.matches(w6)?e:e.querySelector(w6)}var lnt={display:`none`};function unt(e){let{id:t,value:n}=e;return N.createElement(`div`,{id:t,style:lnt},n)}function dnt(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return N.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function fnt(){let[e,t]=(0,N.useState)(``);return{announce:(0,N.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var T6=(0,N.createContext)(null);function pnt(e){let t=(0,N.useContext)(T6);(0,N.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function mnt(){let[e]=(0,N.useState)(()=>new Set),t=(0,N.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,N.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var hnt={draggable:`
|
|
159
159
|
To pick up a draggable item, press the space bar.
|
|
160
160
|
While dragging, use the arrow keys to move the item.
|
|
161
161
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
162
|
-
`},mnt={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function hnt(e){let{announcements:t=mnt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=pnt}=e,{announce:a,announcement:o}=unt(),s=v6(`DndLiveRegion`),[c,l]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{l(!0)},[]),dnt((0,N.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=N.createElement(N.Fragment,null,N.createElement(cnt,{id:r,value:i.draggable}),N.createElement(lnt,{id:s,announcement:o}));return n?(0,ls.createPortal)(u,n):u}var D6;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(D6||={});function O6(){}function k6(e,t){return(0,N.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function A6(){var e=[...arguments];return(0,N.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var j6=Object.freeze({x:0,y:0});function M6(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function gnt(e,t){let n=C6(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function N6(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function _nt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function P6(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function F6(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function I6(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var vnt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=I6(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=M6(I6(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(N6)},L6=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=P6(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=P6(r),o=i.reduce((e,t,r)=>e+M6(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(N6)};function ynt(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var bnt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=ynt(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(_nt)};function xnt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function R6(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:j6}function Snt(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Cnt=Snt(1);function z6(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function wnt(e,t,n){let r=z6(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Tnt={ignoreTransform:!1};function B6(e,t){t===void 0&&(t=Tnt);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=o6(e).getComputedStyle(e);t&&(n=wnt(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function V6(e){return B6(e,{ignoreTransform:!0})}function Ent(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Dnt(e,t){return t===void 0&&(t=o6(e).getComputedStyle(e)),t.position===`fixed`}function Ont(e,t){t===void 0&&(t=o6(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function H6(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(s6(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!c6(i)||l6(i)||n.includes(i))return n;let a=o6(e).getComputedStyle(i);return i!==e&&Ont(i,a)&&n.push(i),Dnt(i,a)?n:r(i.parentNode)}return e?r(e):n}function U6(e){let[t]=H6(e,1);return t??null}function W6(e){return!r6||!e?null:i6(e)?e:a6(e)?s6(e)||e===u6(e).scrollingElement?window:c6(e)?e:null:null}function G6(e){return i6(e)?e.scrollX:e.scrollLeft}function K6(e){return i6(e)?e.scrollY:e.scrollTop}function q6(e){return{x:G6(e),y:K6(e)}}var J6;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(J6||={});function Y6(e){return!r6||!e?!1:e===document.scrollingElement}function X6(e){let t={x:0,y:0},n=Y6(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var knt={x:.2,y:.2};function Ant(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=knt);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=X6(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=J6.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=J6.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=J6.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=J6.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function jnt(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Z6(e){return e.reduce((e,t)=>b6(e,q6(t)),j6)}function Mnt(e){return e.reduce((e,t)=>e+G6(t),0)}function Nnt(e){return e.reduce((e,t)=>e+K6(t),0)}function Q6(e,t){if(t===void 0&&(t=B6),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);U6(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Pnt=[[`x`,[`left`,`right`],Mnt],[`y`,[`top`,`bottom`],Nnt]],$6=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=H6(t),r=Z6(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Pnt)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},e8=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Fnt(e){let{EventTarget:t}=o6(e);return e instanceof t?e:u6(e)}function t8(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var n8;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(n8||={});function r8(e){e.preventDefault()}function Int(e){e.stopPropagation()}var i8;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(i8||={});var a8={start:[i8.Space,i8.Enter],cancel:[i8.Esc],end:[i8.Space,i8.Enter,i8.Tab]},Lnt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case i8.Right:return{...n,x:n.x+25};case i8.Left:return{...n,x:n.x-25};case i8.Down:return{...n,y:n.y+25};case i8.Up:return{...n,y:n.y-25}}},o8=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new e8(u6(t)),this.windowListeners=new e8(o6(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(n8.Resize,this.handleCancel),this.windowListeners.add(n8.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(n8.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Q6(n),t(j6)}handleKeyDown(e){if(S6(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=a8,coordinateGetter:a=Lnt,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:j6;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=x6(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=X6(n),p=jnt(n),m={x:Math.min(i===i8.Right?p.right-p.width/2:p.right,Math.max(i===i8.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===i8.Down?p.bottom-p.height/2:p.bottom,Math.max(i===i8.Down?p.top:p.top+p.height/2,u.y))},h=i===i8.Right&&!s||i===i8.Left&&!c,g=i===i8.Down&&!l||i===i8.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===i8.Right&&e<=d.x||i===i8.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===i8.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===i8.Down&&e<=d.y||i===i8.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===i8.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,b6(x6(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};o8.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=a8,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function s8(e){return!!(e&&`distance`in e)}function c8(e){return!!(e&&`delay`in e)}var l8=class{constructor(e,t,n){n===void 0&&(n=Fnt(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=u6(i),this.documentListeners=new e8(this.document),this.listeners=new e8(n),this.windowListeners=new e8(o6(i)),this.initialCoordinates=C6(r)??j6,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(n8.Resize,this.handleCancel),this.windowListeners.add(n8.DragStart,r8),this.windowListeners.add(n8.VisibilityChange,this.handleCancel),this.windowListeners.add(n8.ContextMenu,r8),this.documentListeners.add(n8.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(c8(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(s8(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(n8.Click,Int,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(n8.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=C6(e)??j6,s=x6(n,o);if(!t&&a){if(s8(a)){if(a.tolerance!=null&&t8(s,a.tolerance))return this.handleCancel();if(t8(s,a.distance))return this.handleStart()}if(c8(a)&&t8(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===i8.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Rnt={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},u8=class extends l8{constructor(e){let{event:t}=e,n=u6(t.target);super(e,Rnt,n)}};u8.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var znt={move:{name:`mousemove`},end:{name:`mouseup`}},d8;(function(e){e[e.RightClick=2]=`RightClick`})(d8||={});var Bnt=class extends l8{constructor(e){super(e,znt,u6(e.event.target))}};Bnt.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===d8.RightClick?!1:(r?.({event:n}),!0)}}];var f8={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Vnt=class extends l8{constructor(e){super(e,f8)}static setup(){return window.addEventListener(f8.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(f8.move.name,e)};function e(){}}};Vnt.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var p8;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(p8||={});var m8;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(m8||={});function Hnt(e){let{acceleration:t,activator:n=p8.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=m8.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Wnt({delta:d,disabled:!a}),[m,h]=rnt(),g=(0,N.useRef)({x:0,y:0}),_=(0,N.useRef)({x:0,y:0}),v=(0,N.useMemo)(()=>{switch(n){case p8.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case p8.DraggableRect:return i}},[n,i,c]),y=(0,N.useRef)(null),b=(0,N.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,N.useMemo)(()=>s===m8.TreeOrder?[...l].reverse():l,[s,l]);(0,N.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=Ant(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var Unt={x:{[J6.Backward]:!1,[J6.Forward]:!1},y:{[J6.Backward]:!1,[J6.Forward]:!1}};function Wnt(e){let{delta:t,disabled:n}=e,r=g6(t);return m6(e=>{if(n||!r||!e)return Unt;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[J6.Backward]:e.x[J6.Backward]||i.x===-1,[J6.Forward]:e.x[J6.Forward]||i.x===1},y:{[J6.Backward]:e.y[J6.Backward]||i.y===-1,[J6.Forward]:e.y[J6.Forward]||i.y===1}}},[n,t,r])}function Gnt(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return m6(e=>t==null?null:r??e??null,[r,t])}function Knt(e,t){return(0,N.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var h8;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(h8||={});var g8;(function(e){e.Optimized=`optimized`})(g8||={});var _8=new Map;function qnt(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,N.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,N.useRef)(e),d=g(),f=p6(d),p=(0,N.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,N.useRef)(null),h=m6(t=>{if(d&&!n)return _8;if(!t||t===_8||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new $6(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,N.useEffect)(()=>{u.current=e},[e]),(0,N.useEffect)(()=>{d||p()},[n,d]),(0,N.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,N.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case h8.Always:return!1;case h8.BeforeDragging:return n;default:return!n}}}function v8(e,t){return m6(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function Jnt(e,t){return v8(e,t)}function Ynt(e){let{callback:t,disabled:n}=e,r=f6(t),i=(0,N.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,N.useEffect)(()=>()=>i?.disconnect(),[i]),i}function y8(e){let{callback:t,disabled:n}=e,r=f6(t),i=(0,N.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,N.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Xnt(e){return new $6(B6(e),e)}function b8(e,t,n){t===void 0&&(t=Xnt);let[r,i]=(0,N.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Ynt({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=y8({callback:a});return d6(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function Znt(e){return R6(e,v8(e))}var x8=[];function Qnt(e){let t=(0,N.useRef)(e),n=m6(n=>e?n&&n!==x8&&e&&t.current&&e.parentNode===t.current.parentNode?n:H6(e):x8,[e]);return(0,N.useEffect)(()=>{t.current=e},[e]),n}function $nt(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(e),i=(0,N.useCallback)(e=>{let t=W6(e.target);t&&n(e=>e?(e.set(t,q6(t)),new Map(e)):null)},[]);return(0,N.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=W6(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,q6(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{W6(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,N.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>b6(e,t),j6):Z6(e):j6,[e,t])}function S8(e,t){t===void 0&&(t=[]);let n=(0,N.useRef)(null);return(0,N.useEffect)(()=>{n.current=null},t),(0,N.useEffect)(()=>{let t=e!==j6;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?x6(e,n.current):j6}function ert(e){(0,N.useEffect)(()=>{if(!r6)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function trt(e,t){return(0,N.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function C8(e){return(0,N.useMemo)(()=>e?Ent(e):null,[e])}var w8=[];function nrt(e,t){t===void 0&&(t=B6);let[n]=e,r=C8(n?o6(n):null),[i,a]=(0,N.useState)(w8);function o(){a(()=>e.length?e.map(e=>Y6(e)?r:new $6(t(e),e)):w8)}let s=y8({callback:o});return d6(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function T8(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return c6(t)?t:e}function rrt(e){let{measure:t}=e,[n,r]=(0,N.useState)(null),i=y8({callback:(0,N.useCallback)(e=>{for(let{target:n}of e)if(c6(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=h6((0,N.useCallback)(e=>{let n=T8(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,N.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var irt=[{sensor:u8,options:{}},{sensor:o8,options:{}}],art={current:{}},E8={draggable:{measure:V6},droppable:{measure:V6,strategy:h8.WhileDragging,frequency:g8.Optimized},dragOverlay:{measure:B6}},D8=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},ort={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new D8,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:O6},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:E8,measureDroppableContainers:O6,windowRect:null,measuringScheduled:!1},O8={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:O6,draggableNodes:new Map,over:null,measureDroppableContainers:O6},k8=(0,N.createContext)(O8),A8=(0,N.createContext)(ort);function srt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new D8}}}function crt(e,t){switch(t.type){case D6.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case D6.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case D6.DragEnd:case D6.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case D6.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new D8(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case D6.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new D8(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case D6.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new D8(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function lrt(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,N.useContext)(k8),a=g6(r),o=g6(n?.id);return(0,N.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!S6(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=ont(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function j8(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function urt(e){return(0,N.useMemo)(()=>({draggable:{...E8.draggable,...e?.draggable},droppable:{...E8.droppable,...e?.droppable},dragOverlay:{...E8.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function drt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,N.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;d6(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=R6(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=U6(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var M8=(0,N.createContext)({...j6,scaleX:1,scaleY:1}),N8;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(N8||={});var P8=(0,N.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=irt,collisionDetection:o=bnt,measuring:s,modifiers:c,...l}=e,[u,d]=(0,N.useReducer)(crt,void 0,srt),[f,p]=fnt(),[m,h]=(0,N.useState)(N8.Uninitialized),g=m===N8.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,N.useRef)({initial:null,translated:null}),C=(0,N.useMemo)(()=>_==null?null:{id:_,data:x?.data??art,rect:S},[_,x]),w=(0,N.useRef)(null),[T,E]=(0,N.useState)(null),[D,O]=(0,N.useState)(null),ee=p6(l,Object.values(l)),te=v6(`DndDescribedBy`,t),k=(0,N.useMemo)(()=>b.getEnabled(),[b]),A=urt(s),{droppableRects:j,measureDroppableContainers:ne,measuringScheduled:re}=qnt(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),M=Gnt(v,_),ie=(0,N.useMemo)(()=>D?C6(D):null,[D]),ae=Ie(),oe=Jnt(M,A.draggable.measure);drt({activeNode:_==null?null:v.get(_),config:ae.layoutShiftCompensation,initialRect:oe,measure:A.draggable.measure});let se=b8(M,A.draggable.measure,oe),ce=b8(M?M.parentElement:null),le=(0,N.useRef)({activatorEvent:null,active:null,activeNode:M,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ue=b.getNodeFor(le.current.over?.id),de=rrt({measure:A.dragOverlay.measure}),fe=de.nodeRef.current??M,pe=g?de.rect??se:null,me=!!(de.nodeRef.current&&de.rect),he=Znt(me?null:se),ge=C8(fe?o6(fe):null),_e=Qnt(g?ue??M:null),ve=nrt(_e),ye=j8(c,{transform:{x:y.x-he.x,y:y.y-he.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:se,containerNodeRect:ce,draggingNodeRect:pe,over:le.current.over,overlayNodeRect:de.rect,scrollableAncestors:_e,scrollableAncestorRects:ve,windowRect:ge}),be=ie?b6(ie,y):null,xe=$nt(_e),Se=S8(xe),Ce=S8(xe,[se]),we=b6(ye,Se),Te=pe?Cnt(pe,ye):null,Ee=C&&Te?o({active:C,collisionRect:Te,droppableRects:j,droppableContainers:k,pointerCoordinates:be}):null,De=F6(Ee,`id`),[Oe,ke]=(0,N.useState)(null),Ae=xnt(me?ye:b6(ye,Ce),Oe?.rect??null,se),je=(0,N.useRef)(null),Me=(0,N.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent;je.current=new n({active:w.current,activeNode:i,event:a,options:r,context:le,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=ee.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=ee.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=ee.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,ls.unstable_batchedUpdates)(()=>{r?.(i),h(N8.Initializing),d({type:D6.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(je.current),O(a)})},onMove(e){d({type:D6.DragMove,coordinates:e})},onEnd:o(D6.DragEnd),onCancel:o(D6.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=le.current,o=null;if(t&&i){let{cancelDrop:s}=ee.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===D6.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=D6.DragCancel)}w.current=null,(0,ls.unstable_batchedUpdates)(()=>{d({type:e}),h(N8.Uninitialized),ke(null),E(null),O(null),je.current=null;let t=e===D6.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=ee.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Ne=Knt(a,(0,N.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,Me(n,t))},[v,Me]));ert(a),d6(()=>{se&&m===N8.Initializing&&h(N8.Initialized)},[se,m]),(0,N.useEffect)(()=>{let{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=le.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:we.x,y:we.y},over:i};(0,ls.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[we.x,we.y]),(0,N.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=le.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=ee.current,o=r.get(De),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,ls.unstable_batchedUpdates)(()=>{ke(s),a?.(c),f({type:`onDragOver`,event:c})})},[De]),d6(()=>{le.current={activatorEvent:D,active:C,activeNode:M,collisionRect:Te,collisions:Ee,droppableRects:j,draggableNodes:v,draggingNode:fe,draggingNodeRect:pe,droppableContainers:b,over:Oe,scrollableAncestors:_e,scrollAdjustedTranslate:we},S.current={initial:pe,translated:Te}},[C,M,Ee,Te,v,fe,pe,j,b,Oe,_e,we]),Hnt({...ae,delta:y,draggingRect:Te,pointerCoordinates:be,scrollableAncestors:_e,scrollableAncestorRects:ve});let Pe=(0,N.useMemo)(()=>({active:C,activeNode:M,activeNodeRect:se,activatorEvent:D,collisions:Ee,containerNodeRect:ce,dragOverlay:de,draggableNodes:v,droppableContainers:b,droppableRects:j,over:Oe,measureDroppableContainers:ne,scrollableAncestors:_e,scrollableAncestorRects:ve,measuringConfiguration:A,measuringScheduled:re,windowRect:ge}),[C,M,se,D,Ee,ce,de,v,b,j,Oe,ne,_e,ve,A,re,ge]),Fe=(0,N.useMemo)(()=>({activatorEvent:D,activators:Ne,active:C,activeNodeRect:se,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:v,over:Oe,measureDroppableContainers:ne}),[D,Ne,C,se,d,te,v,Oe,ne]);return N.createElement(E6.Provider,{value:p},N.createElement(k8.Provider,{value:Fe},N.createElement(A8.Provider,{value:Pe},N.createElement(M8.Provider,{value:Ae},i)),N.createElement(lrt,{disabled:n?.restoreFocus===!1})),N.createElement(hnt,{...n,hiddenTextDescribedById:te}));function Ie(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),frt=(0,N.createContext)(null),F8=`button`,prt=`Draggable`;function mrt(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=v6(prt),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,N.useContext)(k8),{role:p=F8,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,N.useContext)(g?M8:frt),[v,y]=h6(),[b,x]=h6(),S=trt(o,t),C=p6(n);return d6(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,N.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===F8?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function I8(){return(0,N.useContext)(A8)}var hrt=`Droppable`,grt={timeout:25};function L8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=v6(hrt),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,N.useContext)(k8),u=(0,N.useRef)({disabled:n}),d=(0,N.useRef)(!1),f=(0,N.useRef)(null),p=(0,N.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...grt,...i},_=p6(h??r),v=y8({callback:(0,N.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=h6((0,N.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=p6(t);return(0,N.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,N.useEffect)(()=>(s({type:D6.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:D6.UnregisterDroppable,key:a,id:r})),[r]),(0,N.useEffect)(()=>{n!==u.current.disabled&&(s({type:D6.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function _rt(e){let{animation:t,children:n}=e,[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),s=g6(n);return!n&&!r&&s&&i(s),d6(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),N.createElement(N.Fragment,null,n,r?(0,N.cloneElement)(r,{ref:o}):null)}var vrt={x:0,y:0,scaleX:1,scaleY:1};function yrt(e){let{children:t}=e;return N.createElement(k8.Provider,{value:O8},N.createElement(M8.Provider,{value:vrt},t))}var brt={position:`fixed`,touchAction:`none`},xrt=e=>S6(e)?`transform 250ms ease`:void 0,Srt=(0,N.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=xrt}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...brt,width:s.width,height:s.height,top:s.top,left:s.left,transform:w6.Transform.toString(d),transformOrigin:i&&r?gnt(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return N.createElement(n,{className:o,style:f,ref:t},a)}),Crt={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:w6.Transform.toString(t)},{transform:w6.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function wrt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return f6((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=T8(a);if(!c)return;let{transform:l}=o6(a).getComputedStyle(a),u=z6(l);if(!u)return;let d=typeof t==`function`?t:Trt(t);return Q6(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function Trt(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Crt,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var R8=0;function Ert(e){return(0,N.useMemo)(()=>{if(e!=null)return R8++,R8},[e])}var Drt=N.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=I8(),S=(0,N.useContext)(M8),C=Ert(d?.id),w=j8(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=v8(f),E=wrt({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return N.createElement(yrt,null,N.createElement(_rt,{animation:E},d&&C?N.createElement(Srt,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))}),Ort=e=>{let{transform:t}=e;return{...t,y:0}};function krt(e,t,n){let r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}var Art=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e,i=r[0];return!t||!i?n:krt(n,t,i)},jrt=e=>{let{transform:t}=e;return{...t,x:0}};function z8(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Mrt(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function B8(e){return e!==null&&e>=0}function Nrt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Prt(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var V8={scaleX:1,scaleY:1},Frt=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=Irt(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...V8}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...V8}:a<r&&a>=i?{x:o.width+s,y:0,...V8}:{x:0,y:0,...V8}};function Irt(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var H8=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=z8(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},U8={scaleX:1,scaleY:1},Lrt=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...U8}:null}let s=Rrt(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...U8}:r<t&&r>=a?{x:0,y:o.height+s,...U8}:{x:0,y:0,...U8}};function Rrt(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var W8=`Sortable`,G8=N.createContext({activeIndex:-1,containerId:W8,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:H8,disabled:{draggable:!1,droppable:!1}});function K8(e){let{children:t,id:n,items:r,strategy:i=H8,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=I8(),d=v6(W8,n),f=s.rect!==null,p=(0,N.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,N.useRef)(p),v=!Nrt(p,_.current),y=g!==-1&&h===-1||v,b=Prt(a);d6(()=>{v&&m&&u(p)},[v,p,m,u]),(0,N.useEffect)(()=>{_.current=p},[p]);let x=(0,N.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:Mrt(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return N.createElement(G8.Provider,{value:x},t)}var zrt=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return z8(n,r,i).indexOf(t)},Brt=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Vrt={duration:200,easing:`ease`},q8=`transform`,Hrt=w6.Transition.toString({property:q8,duration:0,easing:`linear`}),Urt={roleDescription:`sortable`};function Wrt(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,N.useState)(null),s=(0,N.useRef)(n);return d6(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=B6(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,N.useEffect)(()=>{a&&o(null)},[a]),a}function J8(e){let{animateLayoutChanges:t=Brt,attributes:n,disabled:r,data:i,getNewIndex:a=zrt,id:o,strategy:s,resizeObserverConfig:c,transition:l=Vrt}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,N.useContext)(G8),y=Grt(r,p),b=u.indexOf(o),x=(0,N.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,N.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=L8({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:ee,attributes:te,setNodeRef:k,listeners:A,isDragging:j,over:ne,setActivatorNodeRef:re,transform:M}=mrt({id:o,data:x,attributes:{...Urt,...n},disabled:y.draggable}),ie=nnt(E,k),ae=!!D,oe=ae&&!m&&B8(f)&&B8(g),se=!_&&j,ce=oe?(se&&oe?M:null)??(s??v)({rects:h,activeNodeRect:ee,activeIndex:f,overIndex:g,index:b}):null,le=B8(f)&&B8(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ue=D?.id,de=(0,N.useRef)({activeId:ue,items:u,newIndex:le,containerId:d}),fe=u!==de.current.items,pe=t({active:D,containerId:d,isDragging:j,isSorting:ae,id:o,index:b,items:u,newIndex:de.current.newIndex,previousItems:de.current.items,previousContainerId:de.current.containerId,transition:l,wasDragging:de.current.activeId!=null}),me=Wrt({disabled:!pe,index:b,node:w,rect:C});return(0,N.useEffect)(()=>{ae&&de.current.newIndex!==le&&(de.current.newIndex=le),d!==de.current.containerId&&(de.current.containerId=d),u!==de.current.items&&(de.current.items=u)},[ae,le,d,u]),(0,N.useEffect)(()=>{if(ue===de.current.activeId)return;if(ue!=null&&de.current.activeId==null){de.current.activeId=ue;return}let e=setTimeout(()=>{de.current.activeId=ue},50);return()=>clearTimeout(e)},[ue]),{active:D,activeIndex:f,attributes:te,data:x,rect:C,index:b,newIndex:le,items:u,isOver:T,isSorting:ae,isDragging:j,listeners:A,node:w,overIndex:g,over:ne,setNodeRef:ie,setActivatorNodeRef:re,setDroppableNodeRef:E,setDraggableNodeRef:k,transform:me??ce,transition:he()};function he(){if(me||fe&&de.current.newIndex===b)return Hrt;if(!(se&&!S6(O)||!l)&&(ae||pe))return w6.Transition.toString({...l,property:q8})}}function Grt(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function Y8(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var Krt=[i8.Down,i8.Right,i8.Up,i8.Left],X8=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(Krt.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case i8.Down:r.top<a.top&&t.push(n);break;case i8.Up:r.top>a.top&&t.push(n);break;case i8.Left:r.left>a.left&&t.push(n);break;case i8.Right:r.left<a.left&&t.push(n);break}});let c=L6({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=F6(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=H6(c).some((e,t)=>s[t]!==e),i=Z8(e,t),a=qrt(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:x6(u,l)}}}};function Z8(e,t){return!Y8(e)||!Y8(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function qrt(e,t){return!Y8(e)||!Y8(t)||!Z8(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Q8({open:e,onOpenChange:t,title:n,description:r,children:i,onSubmit:a,submitLabel:o=`Enregistrer`,submitting:s=!1,canSubmit:c=!0}){let[l,u]=(0,N.useState)(!1),d=s||l;async function f(){if(!(!c||d))try{u(!0),await a()}finally{u(!1)}}return(0,I.jsx)(K1,{open:e,onOpenChange:t,children:(0,I.jsxs)(q1,{side:`right`,className:`w-4/5 sm:max-w-none gap-0 p-0`,children:[(0,I.jsxs)(J1,{className:`border-b px-6 py-4`,children:[(0,I.jsx)(X1,{children:n}),r?(0,I.jsx)(Z1,{children:r}):null]}),(0,I.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:e=>{e.preventDefault(),f()},children:[(0,I.jsx)(`div`,{className:`oc-sheet__body flex-1 overflow-y-auto px-6 py-4`,children:i}),(0,I.jsxs)(Y1,{className:`border-t px-6 py-4`,children:[(0,I.jsxs)(X,{type:`submit`,disabled:!c||d,children:[d?(0,I.jsx)(Cm,{className:`size-4 animate-spin`}):null,o]}),(0,I.jsx)(X,{type:`button`,variant:`ghost`,onClick:()=>t(!1),children:`Annuler`})]})]})]})})}var $8=6e4,e5=60*$8,t5=24*e5,n5=7*t5,r5=30*t5,i5=365*t5;function Jrt(e,t){let n=t-e;if(n<$8)return`maintenant`;if(n<e5)return`${Math.floor(n/$8)}min`;if(n<t5)return`${Math.floor(n/e5)}h`;if(n<n5)return`${Math.floor(n/t5)}j`;if(n<r5)return`${Math.floor(n/n5)}sem`;if(n<i5)return`${Math.floor(n/r5)}mois`;let r=Math.floor(n/i5);return`${r}an${r>1?`s`:``}`}var a5=[{value:`red`,hue:`oklch(0.63 0.21 25)`},{value:`orange`,hue:`oklch(0.7 0.17 50)`},{value:`amber`,hue:`oklch(0.8 0.15 85)`},{value:`green`,hue:`oklch(0.7 0.16 150)`},{value:`teal`,hue:`oklch(0.7 0.12 190)`},{value:`blue`,hue:`oklch(0.62 0.19 250)`},{value:`violet`,hue:`oklch(0.6 0.2 300)`},{value:`pink`,hue:`oklch(0.7 0.2 350)`}],o5=e=>a5.find(t=>t.value===e)?.hue??null,s5=`project:none`,Yrt=e=>`project:${e}`,c5=`oc.noproject.collapsed`;function Xrt({activeChatId:e,onSelect:t,onNewChat:n,newChatShortcut:r}){let i=P(V.messages.listChats,{}),a=P(V.projects.listProjects,{}),o=P(V.me.getMe,{host:xO})?.ui?.effective,s=o?.showChatProvider??!0,c=o?.showChatAge??!0,l=new Set((i??[]).map(e=>e.providerKind).filter(e=>e!=null)),u=s&&l.size>1,[,d]=(0,N.useState)(0);(0,N.useEffect)(()=>{if(!c)return;let e=window.setInterval(()=>d(e=>e+1),6e4);return()=>window.clearInterval(e)},[c]);let f=F(V.projects.createProject),p=F(V.projects.setProjectCollapsed),m=F(V.chats.reorderChat),h=F(V.chats.moveChatToProject),g=b1(),_=fRe(),v=(0,N.useRef)(null),y=(0,N.useRef)(null),b=(0,N.useRef)(null),[x,S]=(0,N.useState)(`full`);(0,N.useLayoutEffect)(()=>{let e=v.current;if(!e)return;let t=()=>{let t=e.clientWidth,n=y.current?.offsetWidth??0,r=b.current?.offsetWidth??0,i=n===0||t>=n?`full`:t>=r?`label`:`icon`;S(e=>e===i?e:i)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[_,r]);let[C,w]=(0,N.useState)(null),T=(0,N.useRef)(!1);(0,N.useEffect)(()=>{!T.current&&i&&w(i)},[i]);let E=C??i??[],[D,O]=(0,N.useState)(null),[ee,te]=(0,N.useState)(()=>localStorage.getItem(c5)===`1`);function k(){te(e=>(localStorage.setItem(c5,e?`0`:`1`),!e))}let A=A6(k6(u8,{activationConstraint:{distance:4}}),k6(o8,{coordinateGetter:X8})),j=E.filter(e=>e.pinned),ne=E.filter(e=>!e.pinned),re=e=>ne.filter(t=>(t.projectId??null)===e);function M(e){return E.find(t=>t._id===e)}async function ie(e){O(null);let{active:t,over:n}=e;if(!n)return;let r=M(String(t.id));if(!r)return;let i=String(n.id);if(i.startsWith(`project:`)){let e=i===s5?null:i.slice(8);if((r.projectId??null)===e)return;T.current=!0,w(t=>(t??E).map(t=>t._id===r._id?{...t,projectId:e}:t));try{await h({chatId:r._id,projectId:e})}finally{T.current=!1}return}let a=M(i);if(!a||t.id===n.id)return;if((a.projectId??null)!==(r.projectId??null)||a.pinned!==r.pinned){if(r.pinned||a.pinned)return;T.current=!0,w(e=>(e??E).map(e=>e._id===r._id?{...e,projectId:a.projectId??null}:e));try{await h({chatId:r._id,projectId:a.projectId??null})}finally{T.current=!1}return}let o=a.pinned?j:re(a.projectId??null),s=o.map(e=>e._id),c=s.indexOf(r._id),l=s.indexOf(a._id);if(c<0||l<0)return;let u=[...o];u.splice(c,1),u.splice(l,0,r);let d=u[l-1]??null,f=u[l+1]??null;T.current=!0,w(e=>[...(e??E).filter(e=>!o.some(t=>t._id===e._id)),...u]);try{await m({chatId:r._id,prevKey:d?d.sortKey:null,nextKey:f?f.sortKey:null})}finally{T.current=!1}}let ae=D?M(D):null;return(0,I.jsxs)(`aside`,{className:`oc-sidebar`,children:[(0,I.jsxs)(`div`,{className:`oc-sidebar__top`,ref:v,children:[(0,I.jsxs)(X,{className:x===`icon`?`oc-newchat flex-1 justify-center`:`oc-newchat flex-1 justify-start`,onClick:n,title:`${_} (${r})`,"aria-label":_,children:[(0,I.jsx)(Nm,{}),x===`icon`?null:(0,I.jsx)(`span`,{className:`oc-newchat__label`,children:_}),x===`full`?(0,I.jsx)(`kbd`,{className:`oc-newchat__kbd`,"aria-hidden":!0,children:r}):null]}),(0,I.jsx)(`div`,{className:`oc-newchat-ghost`,"aria-hidden":!0,children:(0,I.jsxs)(`div`,{className:`oc-newchat-ghost__row`,ref:y,children:[(0,I.jsxs)(X,{className:`oc-newchat justify-start`,tabIndex:-1,children:[(0,I.jsx)(Nm,{}),(0,I.jsx)(`span`,{className:`oc-newchat__label`,children:_}),(0,I.jsx)(`kbd`,{className:`oc-newchat__kbd`,children:r})]}),(0,I.jsx)(X,{variant:`outline`,size:`icon`,tabIndex:-1,children:(0,I.jsx)(xm,{})})]})}),(0,I.jsx)(`div`,{className:`oc-newchat-ghost`,"aria-hidden":!0,children:(0,I.jsxs)(`div`,{className:`oc-newchat-ghost__row`,ref:b,children:[(0,I.jsxs)(X,{className:`oc-newchat justify-start`,tabIndex:-1,children:[(0,I.jsx)(Nm,{}),(0,I.jsx)(`span`,{className:`oc-newchat__label`,children:_})]}),(0,I.jsx)(X,{variant:`outline`,size:`icon`,tabIndex:-1,children:(0,I.jsx)(xm,{})})]})}),(0,I.jsx)(X,{className:`oc-newproject`,variant:`outline`,size:`icon`,"aria-label":xQ(),title:xQ(),onClick:async()=>{let e=await g({title:xQ(),label:_Re(),placeholder:bRe(),confirmLabel:CRe()});e&&await f({name:e})},children:(0,I.jsx)(xm,{})})]}),(0,I.jsxs)(P8,{sensors:A,collisionDetection:L6,modifiers:[jrt,Art],onDragStart:e=>O(e.active.id),onDragCancel:()=>O(null),onDragEnd:ie,children:[(0,I.jsxs)(`div`,{className:`oc-sidebar__scroll`,children:[j.length>0?(0,I.jsx)(l5,{label:ERe(),chats:j,children:j.map(n=>(0,I.jsx)(d5,{chat:n,active:n._id===e,projects:a??[],onSelect:t,showProviderBadge:u},n._id))}):null,(a??[]).map(n=>{let r=re(n._id);return(0,I.jsx)(l5,{label:n.name,dropId:Yrt(n._id),projectId:n._id,chats:r,collapsible:!0,collapsed:n.collapsed,onToggle:()=>void p({projectId:n._id,collapsed:!n.collapsed}),children:n.collapsed?null:r.length===0?(0,I.jsx)(`div`,{className:`oc-sidebar__empty`,children:kRe()}):r.map(n=>(0,I.jsx)(d5,{chat:n,active:n._id===e,projects:a??[],onSelect:t,showProviderBadge:u},n._id))},n._id)}),(0,I.jsx)(l5,{label:MRe(),dropId:s5,chats:re(null),collapsible:!0,collapsed:ee,onToggle:k,children:ee?null:re(null).map(n=>(0,I.jsx)(d5,{chat:n,active:n._id===e,projects:a??[],onSelect:t,showProviderBadge:u},n._id))})]}),(0,I.jsx)(Drt,{children:ae?(0,I.jsxs)(`div`,{className:`oc-chatitem oc-chatitem--overlay`,children:[(0,I.jsx)(Sm,{className:`size-3.5 opacity-60`}),o5(ae.color)?(0,I.jsx)(`span`,{className:`oc-chatitem__dot`,style:{background:o5(ae.color)}}):(0,I.jsx)(`span`,{className:`oc-chatitem__dot oc-chatitem__dot--empty`}),(0,I.jsx)(`span`,{className:`oc-chatitem__label`,children:ae.title||SQ()})]}):null})]})]})}function l5({label:e,dropId:t,projectId:n,chats:r,collapsible:i,collapsed:a,onToggle:o,children:s}){let c=F(V.projects.deleteProject),l=y1(),u=P(V.projects.projectChatCount,n?{projectId:n}:`skip`),{setNodeRef:d,isOver:f}=L8({id:t??`static:${e}`});return(0,I.jsxs)(`div`,{ref:t?d:void 0,className:`oc-sidebar__group`+(f?` oc-sidebar__group--over`:``),children:[(0,I.jsxs)(`div`,{className:`oc-sidebar__group-head`+(i?` oc-sidebar__group-head--btn`:``),...i?{role:`button`,tabIndex:0,onClick:o,onKeyDown:e=>{i&&o&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),o())}}:{},children:[i?a?(0,I.jsx)(fm,{className:`size-3.5`}):(0,I.jsx)(dm,{className:`size-3.5`}):null,(0,I.jsx)(`span`,{className:`oc-sidebar__group-label`,children:e}),n?(0,I.jsx)(`button`,{className:`oc-sidebar__group-del`,"aria-label":wQ(),onClick:async t=>{t.stopPropagation();let r=u??0;await l({title:VRe({name:e}),description:r>0?WRe({count:r}):qRe(),confirmWord:TQ(),confirmLabel:wQ(),destructive:!0})&&await c({projectId:n})},children:(0,I.jsx)(Bm,{className:`size-3.5`})}):null]}),(0,I.jsx)(K8,{items:r.map(e=>e._id),strategy:Lrt,children:s})]})}var u5={openclaw:`OpenClaw`,hermes:`Hermes`};function d5({chat:e,active:t,projects:n,onSelect:r,showProviderBadge:i}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u}=J8({id:e._id}),d=F(V.chats.renameChat),f=F(V.chats.deleteChat),p=F(V.chats.pinChat),m=F(V.chats.setChatColor),h=P(V.me.getMe,{host:xO})?.ui?.effective?.showChatAge??!0,g=y1(),[_,v]=(0,N.useState)(!1),[y,b]=(0,N.useState)(e.title??``),x={transform:w6.Transform.toString(c),transition:l,opacity:+!u},S=o5(e.color);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{ref:s,style:x,className:`oc-chatitem group/row`+(t?` oc-chatitem--active`:``),children:[(0,I.jsx)(`button`,{className:`oc-chatitem__grip`,"aria-label":QRe(),...a,...o,children:(0,I.jsx)(Sm,{className:`size-3.5`})}),S?(0,I.jsx)(`span`,{className:`oc-chatitem__dot`,style:{background:S}}):(0,I.jsx)(`span`,{className:`oc-chatitem__dot oc-chatitem__dot--empty`}),(0,I.jsx)(`button`,{className:`oc-chatitem__label`,onClick:()=>r(e._id),children:e.title||SQ()}),e.readOnly?(0,I.jsx)(`span`,{className:`oc-chatitem__readonly`,title:CQ(),children:(0,I.jsx)(wm,{size:12,"aria-label":CQ()})}):null,i&&e.providerKind?(0,I.jsx)(`span`,{className:`oc-chatitem__bridge oc-chatitem__bridge--${e.providerKind} group-hover/row:opacity-0 group-focus-within/row:opacity-0`,title:Tze({provider:u5[e.providerKind]}),children:u5[e.providerKind]}):null,h?(0,I.jsx)(`span`,{className:`oc-chatitem__age group-hover/row:opacity-0 group-focus-within/row:opacity-0`,title:new Date(e.updatedAt).toLocaleString(`fr-FR`),children:Jrt(e.updatedAt,Date.now())}):null,(0,I.jsxs)(H$,{children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon-xs`,"aria-label":tze(),className:`opacity-0 group-hover/row:opacity-100 group-focus-within/row:opacity-100 aria-expanded:opacity-100`,children:(0,I.jsx)(ym,{})})}),(0,I.jsxs)(W$,{align:`end`,className:`w-48`,children:[(0,I.jsxs)(G$,{onSelect:()=>{b(e.title??``),v(!0)},children:[(0,I.jsx)(Pee,{}),` `,ize()]}),(0,I.jsxs)(G$,{onSelect:()=>void p({chatId:e._id,pinned:!e.pinned}),children:[e.pinned?(0,I.jsx)(Iee,{}):(0,I.jsx)(Fee,{}),e.pinned?sze():uze()]}),(0,I.jsx)(K$,{children:pze()}),(0,I.jsxs)(`div`,{className:`oc-colorgrid`,onClick:e=>e.stopPropagation(),children:[(0,I.jsx)(`button`,{className:`oc-colorgrid__none`,onClick:()=>void m({chatId:e._id,color:null}),"aria-label":gze(),children:`✕`}),a5.map(t=>(0,I.jsx)(`button`,{className:`oc-colorgrid__dot`+(e.color===t.value?` is-selected`:``),style:{background:t.hue},"aria-label":t.value,onClick:()=>void m({chatId:e._id,color:t.value})},t.value))]}),(0,I.jsx)(q$,{}),(0,I.jsxs)(G$,{variant:`destructive`,onSelect:()=>{requestAnimationFrame(async()=>{await g({title:yze(),description:Sze(),confirmLabel:TQ(),destructive:!0})&&await f({chatId:e._id})})},children:[(0,I.jsx)(Bm,{}),` `,TQ()]})]})]})]}),(0,I.jsx)(Q8,{open:_,onOpenChange:v,title:Oze(),canSubmit:y.trim().length>0,onSubmit:async()=>{await d({chatId:e._id,title:y.trim()}),v(!1)},children:(0,I.jsx)(`div`,{className:`oc-form`,children:(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:jze()}),(0,I.jsx)(n1,{value:y,onChange:e=>b(e.target.value),autoFocus:!0})]})})})]})}var Zrt=e1(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function $({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,I.jsx)(n?Cy:`span`,{"data-slot":`badge`,"data-variant":t,className:V$(Zrt({variant:t}),e),...r})}function Qrt(e){let t=new Map;for(let n of e){let e=t.get(n.instanceName);e||(e={instanceName:n.instanceName,kind:n.kind,agents:[]},t.set(n.instanceName,e)),e.agents.push(n)}let n=e=>(e.displayName??e.agentId).toLowerCase();for(let e of t.values())e.agents.sort((e,t)=>e.isDefault===t.isDefault?n(e).localeCompare(n(t)):e.isDefault?-1:1);let r=[...t.values()],i=e=>e.agents.some(e=>e.isDefault);return r.sort((e,t)=>i(e)===i(t)?e.instanceName.localeCompare(t.instanceName):i(e)?-1:1),r}function $rt(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>[e.displayName,e.agentId,e.instanceName,e.model].filter(Boolean).some(e=>e.toLowerCase().includes(n))):e}function eit({open:e,onOpenChange:t,agents:n,onPick:r}){let[i,a]=(0,N.useState)(``),o=(0,N.useMemo)(()=>Qrt($rt(n??[],i)),[n,i]);return(0,I.jsx)(d1,{open:e,onOpenChange:t,children:(0,I.jsxs)(f1,{className:`oc-agentpicker`,children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:IVe()}),(0,I.jsx)(g1,{children:zVe()})]}),n===void 0?(0,I.jsx)(`p`,{className:`oc-agentpicker__hint`,children:HVe()}):n.length===0?(0,I.jsx)(`p`,{className:`oc-agentpicker__hint`,children:GVe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(n1,{autoFocus:!0,value:i,onChange:e=>a(e.target.value),placeholder:JVe(),className:`oc-agentpicker__search`,"aria-label":ZVe()}),(0,I.jsx)(`div`,{className:`oc-agentpicker__list`,role:`listbox`,children:o.map(e=>(0,I.jsxs)(`div`,{className:`oc-agentpicker__group`,children:[(0,I.jsxs)(`div`,{className:`oc-agentpicker__instance`,children:[(0,I.jsx)(Im,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:e.instanceName}),(0,I.jsx)($,{variant:`outline`,className:`oc-agentpicker__kind`,children:e.kind})]}),e.agents.map(e=>(0,I.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":!1,className:`oc-agentpicker__item`,onClick:()=>r(e.instanceName,e.agentId),disabled:e.state===`deleted`,title:e.state===`deleted`?eHe():void 0,children:[(0,I.jsx)(lm,{size:15,"aria-hidden":!0,className:`oc-agentpicker__icon`}),(0,I.jsxs)(`span`,{className:`oc-agentpicker__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,I.jsx)(`span`,{className:`oc-agentpicker__model`,children:e.model}):null,e.isDefault?(0,I.jsx)(zm,{size:13,"aria-label":rHe(),className:`oc-agentpicker__default`}):null]},`${e.instanceName}/${e.agentId}`))]},e.instanceName))})]})]})})}function tit(e){let t=F(V.chats.createChat),n=P(V.agents.listMyAgents),[r,i]=(0,N.useState)(!1),a=(0,N.useCallback)(async(n,r)=>{e(await t({title:`New chat`,instanceName:n,agentId:r}))},[t,e]);return{startNewChat:(0,N.useCallback)(async()=>{let e=n;if(e&&e.length===1&&e[0].state!==`deleted`){await a(e[0].instanceName,e[0].agentId);return}i(!0)},[n,a]),picker:(0,I.jsx)(eit,{open:r,onOpenChange:i,agents:n,onPick:(e,t)=>{i(!1),a(e,t)}})}}var f5=[`admin`,`user`,`pending`];function p5(){let e=P(V.me.authProviders)?.anonymous===!0,[t,n]=(0,N.useState)(!1),r=P(V.dev.listUsersDev,e?{}:`skip`),i=P(V.me.getImpersonation),a=F(V.dev.setMyRole),o=F(V.dev.setRole),s=F(V.admin.startImpersonation),c=F(V.admin.stopImpersonation);if(!e)return null;let l=r?.find(e=>e.isMe),u=l?.role===`admin`,d=i?.impersonating===!0,f=(r??[]).filter(e=>!e.isMe);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-devfab`,onClick:()=>n(!0),title:wLe(),children:[(0,I.jsx)(Wm,{size:13}),`DEV`]}),(0,I.jsx)(d1,{open:t,onOpenChange:n,children:(0,I.jsxs)(f1,{children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:DLe()}),(0,I.jsx)(g1,{children:ALe()})]}),(0,I.jsxs)(`div`,{className:`oc-devsw__me`,children:[(0,I.jsxs)(`span`,{className:`oc-devsw__melabel`,children:[NLe({canonical:l?.canonical??`…`}),` `,(0,I.jsx)($,{variant:`outline`,children:l?.role??`…`})]}),(0,I.jsx)(`div`,{className:`oc-devsw__roles`,children:f5.map(e=>(0,I.jsx)(X,{type:`button`,size:`xs`,variant:l?.role===e?`secondary`:`ghost`,disabled:l?.role===e,onClick:()=>void a({role:e}),children:e===`admin`?ILe():e===`user`?zLe():HLe()},e))})]}),d?(0,I.jsxs)(`div`,{className:`oc-devsw__imp`,children:[GLe(),` `,(0,I.jsx)(`strong`,{children:i.targetLabel}),`.`,(0,I.jsx)(X,{type:`button`,size:`xs`,variant:`outline`,onClick:()=>void c(),children:JLe()})]}):null,(0,I.jsx)(`div`,{className:`oc-devsw__list`,children:f.length===0?(0,I.jsx)(`p`,{className:`oc-devsw__empty`,children:ZLe()}):f.map(e=>(0,I.jsxs)(`div`,{className:`oc-devsw__row`,children:[(0,I.jsx)(`span`,{className:`oc-devsw__label`,children:e.name||e.email||e.canonical||e.userId.slice(0,8)}),(0,I.jsx)(`select`,{className:`oc-devsw__select`,value:e.role,disabled:!e.canonical,onChange:t=>e.canonical&&void o({canonical:e.canonical,role:t.target.value}),children:f5.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))}),(0,I.jsx)(X,{type:`button`,size:`xs`,variant:`ghost`,disabled:!u||e.role===`pending`,title:u?e.role===`pending`?rRe():oRe():eRe(),onClick:()=>{s({profileId:e.profileId}),n(!1)},children:lRe()})]},e.profileId))})]})})]})}function m5({label:e,mode:t,minimal:n=!1}){let{signOut:r}=Ir(),i=F(V.me.setThemeMode).withOptimisticUpdate((e,{mode:t})=>{let n=e.getQuery(V.me.getMe,{host:xO});if(!n)return;let r=t===null?n.defaultThemeMode??`system`:t;e.setQuery(V.me.getMe,{host:xO},{...n,themeMode:t,resolvedThemeMode:r})}),a=t??`default`;return(0,I.jsxs)(H$,{children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsxs)(X,{variant:`ghost`,size:`sm`,className:`gap-1.5`,children:[e,(0,I.jsx)(dm,{className:`opacity-60`})]})}),(0,I.jsx)(W$,{align:`end`,className:`w-52`,children:n?(0,I.jsxs)(G$,{onClick:()=>void r(),children:[(0,I.jsx)(Tm,{}),` `,lk()]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(K$,{children:JO()}),(0,I.jsxs)(_4e,{value:a,onValueChange:e=>void i({mode:e==="default"?null:e}),children:[(0,I.jsxs)(J$,{value:`light`,children:[(0,I.jsx)(Bee,{}),` `,ZO()]}),(0,I.jsxs)(J$,{value:`dark`,children:[(0,I.jsx)(Am,{}),` `,ek()]}),(0,I.jsxs)(J$,{value:`system`,children:[(0,I.jsx)(km,{}),` `,rk()]}),(0,I.jsx)(J$,{value:`default`,children:ok()})]}),(0,I.jsx)(q$,{}),(0,I.jsxs)(G$,{onClick:()=>void r(),children:[(0,I.jsx)(Tm,{}),` `,lk()]})]})})]})}var nit={altered_words:()=>vGe(),incorrect:()=>xGe(),incoherence:()=>wGe(),formatting:()=>DGe(),latency:()=>AGe(),api_error:()=>NGe(),other:()=>IGe()},rit=e=>nit[e]?.()??e,iit={anomaly_open:Vm,anomaly_resolved:gm,feedback_reply:Em};function ait(e){return e.kind===`feedback_reply`?{title:fGe(),body:hGe()}:{title:e.title,body:e.body}}function oit(){let e=P(V.notifications.myUnreadCount)??0,t=P(V.notifications.myNotifications),n=P(V.feedback.myFeedback),r=F(V.notifications.markRead),i=F(V.notifications.markAllRead),a=F(V.notifications.clearOne),o=F(V.notifications.clearAll),s=F(V.feedback.closeMyFeedback),c=ss(),[l,u]=(0,N.useState)(!1),d=e=>{if(e.unread&&r({notificationId:e._id}),!e.href)return;if(u(!1),e.href.startsWith(`/chat/`)){c({to:`/chat/$chatId`,params:{chatId:e.href.slice(6)}});return}let[t,n]=e.href.split(`?`);c({to:t,search:Object.fromEntries(new URLSearchParams(n??``))})};return(0,I.jsxs)(H$,{open:l,onOpenChange:u,children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-bell`,"aria-label":e>0?fWe({count:e}):hWe(),children:[(0,I.jsx)(cm,{size:18,"aria-hidden":!0}),e>0?(0,I.jsx)(`span`,{className:`oc-bell__badge`,"aria-hidden":!0,children:e>9?`9+`:e}):null]})}),(0,I.jsxs)(W$,{align:`end`,className:`oc-notif`,children:[(0,I.jsxs)(`div`,{className:`oc-notif__head`,children:[(0,I.jsx)(`span`,{children:vWe()}),t&&t.length>0?(0,I.jsxs)(`span`,{className:`oc-notif__bulk`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__act`,disabled:e===0,onClick:()=>void i({}),children:xWe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__act`,onClick:()=>void o({}),children:wWe()})]}):null]}),t===void 0?(0,I.jsx)(`div`,{className:`oc-notif__empty`,children:KO()}):t.length===0?(0,I.jsx)(`div`,{className:`oc-notif__empty`,children:DWe()}):(0,I.jsx)(`div`,{className:`oc-notif__list`,children:t.map(e=>{let t=iit[e.kind]??cm,{title:n,body:i}=ait(e);return(0,I.jsxs)(`div`,{className:`oc-notif__item${e.unread?` is-unread`:``}${e.href?` is-link`:``}`,role:e.href?`button`:void 0,tabIndex:e.href?0:void 0,onClick:e.href?()=>d(e):void 0,children:[(0,I.jsxs)(`div`,{className:`oc-notif__item-head`,children:[(0,I.jsx)(t,{size:14,className:`oc-notif__kind oc-notif__kind--${e.kind}`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-notif__title`,children:n}),(0,I.jsxs)(`span`,{className:`oc-notif__row-actions`,children:[e.unread?(0,I.jsx)(`button`,{type:`button`,title:DQ(),"aria-label":DQ(),onClick:t=>{t.stopPropagation(),r({notificationId:e._id})},children:(0,I.jsx)(um,{size:13})}):null,(0,I.jsx)(`button`,{type:`button`,title:OQ(),"aria-label":OQ(),onClick:t=>{t.stopPropagation(),a({notificationId:e._id})},children:(0,I.jsx)(Gm,{size:13})})]})]}),(0,I.jsx)(`p`,{className:`oc-notif__body`,children:i}),(0,I.jsx)(`div`,{className:`oc-notif__when`,children:new Date(e.createdAt).toLocaleString(q())})]},e._id)})}),n&&n.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-notif__head oc-notif__head--sub`,children:PWe()}),(0,I.jsx)(`div`,{className:`oc-notif__list`,children:n.map(e=>(0,I.jsx)(sit,{it:e,onClose:t=>s({feedbackId:e._id,reason:t}),onNavigate:()=>u(!1)},e._id))})]}):null]})]})}function sit({it:e,onClose:t,onNavigate:n}){let r=C1(),[i,a]=(0,N.useState)(!1),[o,s]=(0,N.useState)(!1),[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)(!1);async function f(){d(!0);try{await t(c.trim()||void 0)}catch(e){r.error(kQ(),e)}finally{d(!1)}}return(0,I.jsxs)(`div`,{className:`oc-notif__item`,children:[(0,I.jsxs)(`div`,{className:`oc-notif__item-head`,children:[(0,I.jsx)(`span`,{className:`oc-notif__title`,children:rit(e.category)}),(0,I.jsx)(`span`,{className:`oc-notif__status${e.answered?` is-answered`:``}`,children:e.answered?LWe():BWe()})]}),(0,I.jsx)(`div`,{className:`oc-notif__when`,children:new Date(e.at).toLocaleString(q())}),e.thread.length>0?(0,I.jsx)(`div`,{className:`oc-notif__thread`,children:e.thread.map((e,t)=>(0,I.jsxs)(`div`,{className:`oc-notif__msg oc-notif__msg--${e.authorRole}`,children:[(0,I.jsx)(`span`,{className:`oc-notif__msg-who`,children:e.authorRole===`admin`?UWe():KWe()}),(0,I.jsx)(`span`,{className:`oc-notif__msg-text`,children:e.text})]},t))}):null,e.messageText?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-notif__report-toggle`,"aria-expanded":i,onClick:()=>a(e=>!e),children:[i?(0,I.jsx)(dm,{size:13,"aria-hidden":!0}):(0,I.jsx)(fm,{size:13,"aria-hidden":!0}),QWe()]}),i?(0,I.jsx)(`div`,{className:`oc-notif__report-msg`,children:e.messageText}):null]}):null,(0,I.jsxs)(`div`,{className:`oc-notif__report-actions`,children:[(0,I.jsx)(xs,{to:`/chat/$chatId`,params:{chatId:e.chatId},search:{m:e.messageId},className:`oc-notif__link`,onClick:n,children:YWe()}),o?null:(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__link oc-notif__link--muted`,onClick:()=>s(!0),children:kQ()})]}),o?(0,I.jsxs)(`div`,{className:`oc-notif__close-form`,children:[(0,I.jsx)(`textarea`,{className:`oc-notif__close-input`,rows:2,value:c,onChange:e=>l(e.target.value),placeholder:rGe()}),(0,I.jsxs)(`div`,{className:`oc-notif__close-actions`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__close-confirm`,disabled:u,onClick:()=>void f(),children:oGe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__close-cancel`,onClick:()=>{s(!1),l(``)},children:lGe()})]})]}):null]})}var h5={mod:!0,key:`k`},g5={mod:!0,shift:!0,key:`o`};function cit(e){return/mac/i.test(e)}function lit(){if(typeof navigator>`u`)return``;let e=navigator;return e.userAgentData?.platform||e.platform||e.userAgent||``}var _5=null;function v5(){return _5===null&&(_5=cit(lit())),_5}function y5(e,t){let n=e.key.toUpperCase();if(t){let t=``;return e.alt&&(t+=`⌥`),e.shift&&(t+=`⇧`),e.mod&&(t+=`⌘`),t+n}let r=[];return e.mod&&r.push(`Ctrl`),e.shift&&r.push(`Shift`),e.alt&&r.push(`Alt`),r.push(n),r.join(`+`)}function b5(e,t){let n=e.metaKey||e.ctrlKey;return!!t.mod!==n||!!t.shift!==e.shiftKey||!!t.alt!==e.altKey?!1:e.key.toLowerCase()===t.key.toLowerCase()}var x5=2,uit=180;function dit(){let e=ss(),t=(0,N.useRef)(null),n=(0,N.useRef)(null),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(0),d=(0,N.useMemo)(()=>y5(h5,v5()),[]);(0,N.useEffect)(()=>{let e=setTimeout(()=>c(a),uit);return()=>clearTimeout(e)},[a]);let f=s.trim(),p=P(V.search.searchConversations,f.length>=x5?{query:f}:`skip`),m=p??[],h=f.length>=x5&&p===void 0;(0,N.useEffect)(()=>{let e=e=>{b5(e,h5)&&(e.preventDefault(),i(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,N.useEffect)(()=>{r&&(o(``),c(``),u(0))},[r]),(0,N.useEffect)(()=>{u(0)},[p]),(0,N.useEffect)(()=>{(n.current?.querySelector(`[data-index="${l}"]`))?.scrollIntoView({block:`nearest`})},[l]);let g=(0,N.useCallback)(t=>{i(!1),e({to:`/chat/$chatId`,params:{chatId:t}})},[e]);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-search-trigger`,onClick:()=>i(!0),"aria-label":GBe(),children:[(0,I.jsx)(Fm,{className:`oc-search-trigger__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-search-trigger__label`,children:JBe()}),(0,I.jsx)(`kbd`,{className:`oc-search-trigger__kbd`,children:d})]}),(0,I.jsx)(d1,{open:r,onOpenChange:i,children:(0,I.jsxs)(f1,{showCloseButton:!1,className:`oc-search-palette top-[12vh] translate-y-0 max-w-xl gap-0 overflow-hidden p-0`,onOpenAutoFocus:e=>{e.preventDefault(),t.current?.focus()},children:[(0,I.jsx)(h1,{className:`sr-only`,children:ZBe()}),(0,I.jsxs)(`div`,{className:`oc-search-palette__head`,children:[(0,I.jsx)(Fm,{className:`oc-search-palette__head-icon`,"aria-hidden":!0}),(0,I.jsx)(`input`,{ref:t,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`)e.preventDefault(),u(e=>Math.min(e+1,m.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),u(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=m[l];t&&g(t.chatId)}},placeholder:eVe(),className:`oc-search-palette__field`,autoComplete:`off`,spellCheck:!1,"aria-label":rVe()})]}),(0,I.jsx)(`div`,{className:`oc-search-palette__results`,ref:n,role:`listbox`,children:f.length<x5?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:oVe({count:x5})}):h?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:lVe()}):m.length===0?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:fVe({term:f})}):m.map((e,t)=>(0,I.jsxs)(`button`,{type:`button`,"data-index":t,role:`option`,"aria-selected":t===l,className:V$(`oc-search-result`,t===l&&`is-active`),onMouseMove:()=>u(t),onClick:()=>g(e.chatId),children:[(0,I.jsx)(`span`,{className:`oc-search-result__icon`,"aria-hidden":!0,children:e.matchedIn===`title`?(0,I.jsx)(kee,{size:15}):(0,I.jsx)(Em,{size:15})}),(0,I.jsxs)(`span`,{className:`oc-search-result__body`,children:[(0,I.jsx)(`span`,{className:`oc-search-result__title`,children:e.title||hVe()}),e.snippet?(0,I.jsx)(`span`,{className:`oc-search-result__snippet`,children:e.snippet}):null]}),(0,I.jsx)(`span`,{className:`oc-search-result__tag`,children:e.matchedIn===`title`?vVe():xVe()})]},e.chatId))}),(0,I.jsxs)(`div`,{className:`oc-search-palette__footer`,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↑`}),(0,I.jsx)(`kbd`,{children:`↓`}),` `,wVe()]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↵`}),` `,DVe()]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:AVe()}),` `,NVe()]})]})]})})]})}var S5=[`conversational`,`documentary`],fit=new Set(S5),pit=`conversational`;function mit(e){let t=new Set((e??[]).filter(e=>fit.has(e)));return t.size===0?[pit]:S5.filter(e=>t.has(e))}function hit({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=P(V.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=P(V.agents.listUserAgents,n&&e?{profileId:e}:`skip`),o=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),s=(a??[]).find(e=>e.isDefault)??null,c=s?`${s.instanceName}/${s.agentId}`:null,l=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),u=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!l.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,state:e.state,outOfPool:!0}))],d=new Map;for(let e of u){let t=d.get(e.instanceName)??[];t.push(e),d.set(e.instanceName,t)}return(0,I.jsx)(d1,{open:n,onOpenChange:r,children:(0,I.jsxs)(f1,{className:`oc-access`,children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:mMe({user:t})}),(0,I.jsx)(g1,{children:_Me()})]}),i?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?bMe():CMe()}):null,(0,I.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:EMe()}):u.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:FMe()}):[...d.entries()].map(([t,n])=>(0,I.jsx)(git,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:o,defaultKey:c},t))})]})})}function git({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=F(V.agents.assignAgent),s=F(V.agents.removeAgent),c=F(V.agents.setDefaultAgent),l=C1();if(!e)return null;async function u(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(kMe(),e)}}async function d(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(MMe(),e)}}return(0,I.jsxs)(`div`,{className:`oc-access__group`,children:[(0,I.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,I.jsx)(Im,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:t}),(0,I.jsx)($,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`;return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(E1,{checked:r,disabled:s&&!r,onCheckedChange:()=>void u(e.agentId,r),"aria-label":RMe({name:e.displayName??e.agentId})}),(0,I.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,I.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:VMe()}):null,e.outOfPool?(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:WMe()}):null,r?o?(0,I.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":pQ(),title:pQ(),children:(0,I.jsx)(zm,{size:14,fill:`currentColor`})}):(0,I.jsx)(X,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":mQ(),title:mQ(),onClick:()=>void d(e.agentId),children:(0,I.jsx)(zm,{size:14})}):null]},e.agentId)})]})}function _it(e,t){return typeof e==`number`&&typeof t==`number`?e-t:typeof e==`boolean`&&typeof t==`boolean`?!!e-+!!t:String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})}function vit(e,t,n){return[...e].sort((e,r)=>{let i=t(e),a=t(r),o=i==null,s=a==null;if(o||s)return o&&s?0:o?1:-1;let c=_it(i,a);return n===`asc`?c:-c})}function C5({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,I.jsx)(`table`,{"data-slot":`table`,className:V$(`w-full caption-bottom text-sm`,e),...t})})}function w5({className:e,...t}){return(0,I.jsx)(`thead`,{"data-slot":`table-header`,className:V$(`[&_tr]:border-b`,e),...t})}function T5({className:e,...t}){return(0,I.jsx)(`tbody`,{"data-slot":`table-body`,className:V$(`[&_tr:last-child]:border-0`,e),...t})}function E5({className:e,...t}){return(0,I.jsx)(`tr`,{"data-slot":`table-row`,className:V$(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function D5({className:e,...t}){return(0,I.jsx)(`th`,{"data-slot":`table-head`,className:V$(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function O5({className:e,...t}){return(0,I.jsx)(`td`,{"data-slot":`table-cell`,className:V$(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}function k5({title:e,rows:t,columns:n,rowActions:r,onAdd:i,addLabel:a=fHe(),bulkActions:o,emptyHint:s=hHe(),isExpanded:c,renderExpanded:l}){let[u,d]=(0,N.useState)(new Set),[f,p]=(0,N.useState)(null),m=t??[],h=f?n[f.index]:void 0,g=f&&h?.sort?vit(m,h.sort,f.dir):m;function _(e){p(t=>!t||t.index!==e?{index:e,dir:`asc`}:t.dir===`asc`?{index:e,dir:`desc`}:null)}let v=+!!o+n.length+ +!!r,y=m.length>0&&u.size===m.length,b=u.size>0&&!y;function x(){d(y?new Set:new Set(m.map(e=>e._id)))}function S(e){d(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}return(0,I.jsxs)(`div`,{className:`oc-dt`,children:[(0,I.jsxs)(`div`,{className:`oc-dt__bar`,children:[(0,I.jsx)(`h2`,{className:`oc-dt__title`,children:e}),(0,I.jsxs)(`div`,{className:`oc-dt__bar-actions`,children:[u.size>0&&o?o.map(e=>(0,I.jsxs)(X,{size:`sm`,variant:e.variant===`destructive`?`destructive`:`outline`,onClick:()=>{e.onSelect([...u]),d(new Set)},children:[e.variant===`destructive`?(0,I.jsx)(Bm,{}):null,e.label,` (`,u.size,`)`]},e.label)):null,i?(0,I.jsxs)(X,{size:`sm`,onClick:i,children:[(0,I.jsx)(Nm,{}),` `,a]}):null]})]}),t===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:vHe()}):m.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:s}):(0,I.jsxs)(C5,{children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[o?(0,I.jsx)(D5,{className:`w-8`,children:(0,I.jsx)(E1,{"aria-label":xHe(),checked:y?!0:b?`indeterminate`:!1,onCheckedChange:x})}):null,n.map((e,t)=>{let n=f?.index===t;return e.sort?(0,I.jsx)(D5,{className:e.className,"aria-sort":n?f.dir===`asc`?`ascending`:`descending`:`none`,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-dt__sort`,onClick:()=>_(t),"aria-label":AHe({column:e.header}),children:[e.header,n?f.dir===`asc`?(0,I.jsx)(pm,{className:`oc-dt__sort-icon`,"aria-hidden":!0}):(0,I.jsx)(dm,{className:`oc-dt__sort-icon`,"aria-hidden":!0}):(0,I.jsx)(mm,{className:`oc-dt__sort-icon oc-dt__sort-icon--idle`,"aria-hidden":!0})]})},e.header):(0,I.jsx)(D5,{className:e.className,children:e.header},e.header)}),r?(0,I.jsx)(D5,{className:`w-8`}):null]})}),(0,I.jsx)(T5,{children:g.map(e=>{let t=r?.(e)??[],i=c?.(e)??!1;return(0,I.jsxs)(N.Fragment,{children:[(0,I.jsxs)(E5,{className:`group/row`,children:[o?(0,I.jsx)(O5,{children:(0,I.jsx)(E1,{"aria-label":wHe(),checked:u.has(e._id),onCheckedChange:()=>S(e._id)})}):null,n.map(t=>(0,I.jsx)(O5,{className:t.className,children:t.cell(e)},t.header)),r?(0,I.jsx)(O5,{children:t.length>0?(0,I.jsxs)(H$,{children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":DHe(),className:`opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 aria-expanded:opacity-100`,children:(0,I.jsx)(ym,{})})}),(0,I.jsx)(W$,{align:`end`,children:t.map((t,n)=>(0,I.jsxs)(`div`,{children:[t.variant===`destructive`&&n>0?(0,I.jsx)(q$,{}):null,(0,I.jsx)(G$,{variant:t.variant,onSelect:()=>t.onSelect(e),children:t.label})]},t.label))})]}):null}):null]}),i&&l?(0,I.jsx)(E5,{className:`oc-dt__expansion`,children:(0,I.jsx)(O5,{colSpan:v,className:`oc-dt__expansion-cell`,children:l(e)})}):null]},e._id)})})]})]})}function A5({icon:e,total:t,items:n}){if(t===0)return(0,I.jsxs)($,{variant:`outline`,className:`oc-group-chip oc-group-chip--empty gap-1`,children:[e,`0`]});let r=t-n.length;return(0,I.jsxs)(`div`,{className:`oc-group-detail`,children:[n.map((e,t)=>(0,I.jsxs)($,{variant:e.highlight?`secondary`:`outline`,className:`oc-group-chip gap-1`,title:e.label,children:[e.marker,(0,I.jsx)(`span`,{className:`oc-group-chip__txt`,children:e.label})]},t)),r>0?(0,I.jsxs)($,{variant:`outline`,className:`oc-group-chip`,children:[`+`,r]}):null]})}function j5({delayDuration:e=0,...t}){return(0,I.jsx)(vue,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function M5({...e}){return(0,I.jsx)(yue,{"data-slot":`tooltip`,...e})}function N5({...e}){return(0,I.jsx)(bue,{"data-slot":`tooltip-trigger`,...e})}function P5({className:e,sideOffset:t=0,children:n,...r}){return(0,I.jsx)(xue,{children:(0,I.jsxs)(Sue,{"data-slot":`tooltip-content`,sideOffset:t,className:V$(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[n,(0,I.jsx)(Cue,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var F5={AGENT_NOT_FOUND:()=>({label:NHe(),hint:IHe()}),AUTH_TOKEN_MISMATCH:()=>({label:zHe(),hint:HHe()}),DEVICE_SIGNING_FAILED:()=>({label:GHe(),hint:JHe()}),SESSION_SCOPE_DENIED:()=>({label:ZHe(),hint:eUe()}),GATEWAY_TIMEOUT:()=>({label:rUe(),hint:oUe()}),GATEWAY_DISCONNECTED:()=>({label:lUe(),hint:fUe()}),ATTACHMENT_TOO_LARGE:()=>({label:xUe(),hint:wUe()}),ATTACHMENT_REJECTED:()=>({label:DUe(),hint:AUe()}),BRIDGE_UNREACHABLE:()=>({label:hUe(),hint:vUe()}),INVALID_REQUEST:()=>({label:NUe(),hint:IUe()}),NOT_CONFIGURED:()=>({label:zUe(),hint:HUe()}),UNROUTED:()=>({label:GUe(),hint:JUe()}),UPSTREAM_ERROR:()=>({label:ZUe(),hint:eWe()}),UNKNOWN:()=>({label:rWe(),hint:oWe()})};function I5(e){return e?F5[e]?.()??{label:e,hint:lWe()}:F5.UNKNOWN()}var yit=[`gateway-http`,`shared-fs`,`off`],bit=[`inline`,`shared-fs`];He.object({mediaMode:He.optional(He.union(He.literal(`gateway-http`),He.literal(`shared-fs`),He.literal(`off`))),inboundMediaMode:He.optional(He.union(He.literal(`inline`),He.literal(`shared-fs`))),rehydration:He.optional(He.boolean()),mediaMaxMb:He.optional(He.number()),inboundAgentMount:He.optional(He.string()),outboundAgentMount:He.optional(He.string())});var L5={mediaMode:`gateway-http`,inboundMediaMode:`inline`,rehydration:!0,mediaMaxMb:1024,inboundAgentMount:`/home/node/.openclaw/media/inbound`,outboundAgentMount:`/home/node/.openclaw/media/outbound`};function xit(e){return{mediaMode:e.mediaMode??L5.mediaMode,inboundMediaMode:e.inboundMediaMode??L5.inboundMediaMode,rehydration:e.rehydration??L5.rehydration,mediaMaxMb:e.mediaMaxMb??L5.mediaMaxMb,inboundAgentMount:e.inboundAgentMount??L5.inboundAgentMount,outboundAgentMount:e.outboundAgentMount??L5.outboundAgentMount}}function Sit(e,t){let n={},r=r=>{(e[r]!==L5[r]||t[r]!==void 0)&&(n[r]=e[r])};return r(`mediaMode`),r(`inboundMediaMode`),r(`rehydration`),r(`mediaMaxMb`),r(`inboundAgentMount`),r(`outboundAgentMount`),n}var R5=e=>typeof e==`string`?e:null;function z5(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function B5(e,t){let n=z5(e),r=z5(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function Cit(e,t){if(e===null||t===null)return!1;let n=B5(t,e.min);return n!==null&&n>=0}function V5(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=R5(e.min),n=R5(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let s=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:s}}function wit(e,t,n){if(e===null)return`unknown`;let{range:r}=V5(n,t);return Cit(r,e)?r!==null&&(B5(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function H5(e){return e===`supported`?i2e():e===`beyond`?s2e():u2e()}function U5(e){return e??QQ()}function W5(e){return e===null?y2e():g2e({version:e})}function Tit(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}function G5(e){return e.filter(e=>e.state===`error`)}function Eit(e){return e.reachable&&G5(e.targets).length===0}function Dit(e){return e.state===`error`&&e.lastErrorCode!==null}function Oit(e){return!!e.lastDownstreamRejectCode}function K5(e){return e.kind??`openclaw`}function kit(e){return[...e].sort((e,t)=>e===`openclaw`?-1:t===`openclaw`?1:e.localeCompare(t))}function Ait(e,t,n){let r=new Map;for(let e of t)e.instanceName&&r.set(e.instanceName,e.provider);for(let e of n)r.set(e.name,K5(e));let i=e=>(e.instanceName?r.get(e.instanceName):void 0)??`openclaw`,a=new Set;for(let e of n)a.add(K5(e));for(let e of t)a.add(e.provider);for(let t of e)a.add(i(t));return kit(a).map(r=>({key:r,connections:e.filter(e=>i(e)===r),compatTargets:t.filter(e=>e.provider===r),instances:n.filter(e=>K5(e)===r)}))}function jit(e){return e===`openclaw`?`OpenClaw`:e===`hermes`?`Hermes`:e.charAt(0).toUpperCase()+e.slice(1)}var q5={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function J5(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=q5[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function Y5(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:J5(e.from,t)??t-q5.h,to:J5(e.to,t)??t}}var X5=[{label:eIe(),from:`now-5m`},{label:rIe(),from:`now-15m`},{label:oIe(),from:`now-30m`},{label:lIe(),from:`now-1h`},{label:fIe(),from:`now-3h`},{label:hIe(),from:`now-6h`},{label:vIe(),from:`now-12h`},{label:xIe(),from:`now-24h`},{label:wIe(),from:`now-2d`},{label:DIe(),from:`now-7d`},{label:AIe(),from:`now-30d`},{label:NIe(),from:`now-90d`}];function Z5(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function Mit(e){if(e.kind===`relative`){let t=X5.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${Z5(e.from)} → ${Z5(e.to)}`}function Q5(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function $5(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function Nit(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}function e7(e){let[t,n]=(0,N.useState)(0);return(0,N.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,N.useMemo)(()=>{let{from:t,to:n}=Y5(e);return e.kind===`absolute`?{from:t,to:n}:{from:t7(t),to:t7(n)}},[e,t])}function t7(e){return Math.floor(e/6e4)*6e4}function n7({value:e,onChange:t}){let[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(``),o=Y5(e),[s,c]=(0,N.useState)(()=>Q5(o.from)),[l,u]=(0,N.useState)(()=>Q5(o.to));function d(t){if(t){let t=Y5(e);c(Q5(t.from)),u(Q5(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=$5(s),n=$5(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,N.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?X5:X5.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=$5(s)!==null&&$5(l)!==null;return(0,I.jsxs)(CT,{open:n,onOpenChange:d,children:[(0,I.jsx)(wT,{asChild:!0,children:(0,I.jsxs)(X,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,I.jsx)(wee,{}),Mit(e)]})}),(0,I.jsx)(TT,{children:(0,I.jsx)(ET,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,I.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,I.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,I.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,I.jsx)(n1,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,I.jsx)(n1,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,I.jsx)(X,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,I.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,I.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,I.jsx)(Fm,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,I.jsx)(n1,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,I.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,I.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,I.jsx)(`li`,{children:(0,I.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>f(t.from),children:t.label})},t.from))})]})]})})})]})}var Pit=250;function r7({q:e,onQChange:t,searchPlaceholder:n=oHe(),children:r,timeRange:i,onTimeRangeChange:a,onReset:o,canReset:s=!0}){let[c,l]=(0,N.useState)(e);(0,N.useEffect)(()=>{l(e)},[e]);let u=(0,N.useRef)(null);function d(e){l(e),u.current!==null&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>t(e),Pit)}(0,N.useEffect)(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]);function f(){u.current!==null&&window.clearTimeout(u.current),o()}return(0,I.jsxs)(`div`,{className:`oc-filterbar`,children:[(0,I.jsxs)(`div`,{className:`oc-filterbar__search`,children:[(0,I.jsx)(Fm,{className:`oc-filterbar__search-icon`,"aria-hidden":!0}),(0,I.jsx)(n1,{value:c,onChange:e=>d(e.target.value),placeholder:n,"aria-label":n})]}),r?(0,I.jsx)(`div`,{className:`oc-filterbar__quick`,children:r}):null,i&&a?(0,I.jsx)(n7,{value:i,onChange:a}):null,(0,I.jsxs)(X,{variant:`ghost`,size:`sm`,className:`oc-filterbar__reset`,onClick:f,disabled:!s,children:[(0,I.jsx)(Pm,{}),lHe()]})]})}var i7=`__all__`,a7={q:``,state:i7,instance:i7,version:i7},o7={connected:0,error:1,idle:2};function Fit(e){return e.q.trim()!==``||e.state!==`__all__`||e.instance!==`__all__`||e.version!==`__all__`}function Iit(e,t){let n=t.q.trim().toLowerCase();return e.filter(e=>!(n&&!`${e.targetLabel} ${e.gatewayHost}`.toLowerCase().includes(n)||t.state!==`__all__`&&e.state!==t.state||t.instance!==`__all__`&&(e.instanceName??``)!==t.instance||t.version!==`__all__`&&(e.gatewayVersion??``)!==t.version))}function s7(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function c7(e,t){return e===`version`?t.gatewayVersion===null:e===`lastOk`?t.lastOkAt===null:!1}function Lit(e,t,n){switch(e){case`state`:return(o7[t.state]??99)-(o7[n.state]??99);case`instance`:return s7(t.instanceLabel??t.instanceName??``,n.instanceLabel??n.instanceName??``);case`host`:return s7(t.gatewayHost,n.gatewayHost);case`version`:{let e=t.gatewayVersion,r=n.gatewayVersion;return B5(e,r)??s7(e,r)}case`lastOk`:return t.lastOkAt-n.lastOkAt;default:return s7(t.targetLabel,n.targetLabel)}}function Rit(e,t){if(!t)return e;let n=t.dir===`asc`?1:-1;return[...e].sort((e,r)=>{let i=c7(t.key,e),a=c7(t.key,r);return i&&a?0:i?1:a?-1:n*Lit(t.key,e,r)})}function zit(e){let t=new Set;for(let n of e)t.add(n.state);return[...t].sort((e,t)=>(o7[e]??99)-(o7[t]??99))}function Bit(e){let t=new Map;for(let n of e)n.instanceName!==null&&(t.has(n.instanceName)||t.set(n.instanceName,n.instanceLabel??n.instanceName));return[...t.entries()].map(([e,t])=>({name:e,label:t})).sort((e,t)=>s7(e.label,t.label))}function Vit(e){let t=new Set;for(let n of e)n.gatewayVersion!==null&&t.add(n.gatewayVersion);return[...t].sort((e,t)=>B5(e,t)??s7(e,t))}function Hit({connections:e,displayByInstance:t}){let[n,r]=(0,N.useState)(a7),[i,a]=(0,N.useState)(null),o=(0,N.useMemo)(()=>e.map((e,n)=>({_id:`${e.key}:${e.canonical}/${e.agentId}:${n}`,targetLabel:`${e.canonical}/${e.agentId}`,state:e.state,instanceName:e.instanceName??null,instanceLabel:e.instanceName?t.get(e.instanceName)??e.instanceName:null,gatewayHost:e.gatewayHost,gatewayVersion:e.gatewayVersion??null,okCount:e.okCount,errorCount:e.errorCount,attempts:e.attempts,lastOkAt:e.lastOkAt??null,lastErrorCode:e.lastErrorCode??null,lastErrorAt:e.lastErrorAt??null,lastDownstreamRejectCode:e.lastDownstreamRejectCode??null,lastDownstreamRejectAt:e.lastDownstreamRejectAt??null})),[e,t]),s=(0,N.useMemo)(()=>zit(o),[o]),c=(0,N.useMemo)(()=>Bit(o),[o]),l=(0,N.useMemo)(()=>Vit(o),[o]),u=(0,N.useMemo)(()=>Rit(Iit(o,n),i),[o,n,i]);function d(e){a(t=>t?.key===e?t.dir===`asc`?{key:e,dir:`desc`}:null:{key:e,dir:`asc`})}return e.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:tFe()}):(0,I.jsxs)(`div`,{className:`oc-conn`,children:[(0,I.jsxs)(r7,{q:n.q,onQChange:e=>r(t=>({...t,q:e})),searchPlaceholder:uFe(),onReset:()=>r(a7),canReset:Fit(n),children:[(0,I.jsxs)(C3,{value:n.state,onValueChange:e=>r(t=>({...t,state:e})),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{placeholder:hFe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:i7,children:_Q()}),s.map(e=>(0,I.jsx)(Q,{value:e,children:Wit(e)},e))]})]}),(0,I.jsxs)(C3,{value:n.instance,onValueChange:e=>r(t=>({...t,instance:e})),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{placeholder:vFe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:i7,children:_Q()}),c.map(e=>(0,I.jsx)(Q,{value:e.name,children:e.label},e.name))]})]}),(0,I.jsxs)(C3,{value:n.version,onValueChange:e=>r(t=>({...t,version:e})),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{placeholder:xFe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:i7,children:_Q()}),l.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),u.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:wFe()}):(0,I.jsxs)(C5,{className:`oc-conn__table`,children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[(0,I.jsx)(l7,{label:DFe(),sortKey:`target`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:AFe(),sortKey:`state`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:NFe(),sortKey:`instance`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:IFe(),sortKey:`host`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:zFe(),sortKey:`version`,sort:i,onSort:d}),(0,I.jsx)(D5,{children:HFe()}),(0,I.jsx)(l7,{label:GFe(),sortKey:`lastOk`,sort:i,onSort:d})]})}),(0,I.jsx)(T5,{children:u.map(e=>(0,I.jsx)(Uit,{r:e},e._id))})]})]})}function l7({label:e,sortKey:t,sort:n,onSort:r}){let i=n?.key===t,a=i?n.dir:null;return(0,I.jsx)(D5,{"aria-sort":i?a===`asc`?`ascending`:`descending`:`none`,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-conn__sort`,onClick:()=>r(t),children:[e,i?a===`asc`?(0,I.jsx)(pm,{size:13,"aria-hidden":!0}):(0,I.jsx)(dm,{size:13,"aria-hidden":!0}):(0,I.jsx)(mm,{size:13,"aria-hidden":!0,className:`oc-conn__sort-idle`})]})})}function Uit({r:e}){let t=Dit(e)?I5(e.lastErrorCode):null,n=Oit(e)?I5(e.lastDownstreamRejectCode):null;return(0,I.jsxs)(N.Fragment,{children:[(0,I.jsxs)(E5,{className:`oc-conn__row oc-conn__row--${e.state}`,children:[(0,I.jsx)(O5,{children:(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.targetLabel})}),(0,I.jsx)(O5,{children:(0,I.jsx)(Git,{state:e.state})}),(0,I.jsx)(O5,{children:e.instanceLabel?(0,I.jsx)(`span`,{className:`oc-bridge-target__instance`,children:e.instanceLabel}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}),(0,I.jsx)(O5,{children:(0,I.jsx)(`span`,{className:`oc-bridge-target__host`,children:e.gatewayHost})}),(0,I.jsx)(O5,{children:e.gatewayVersion?(0,I.jsx)(`span`,{className:`oc-bridge-target__version`,children:e.gatewayVersion}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}),(0,I.jsx)(O5,{children:(0,I.jsx)(`span`,{className:`oc-conn__stats`,children:iFe({ok:e.okCount,errors:e.errorCount,attempts:e.attempts})})}),(0,I.jsx)(O5,{children:e.lastOkAt?(0,I.jsx)(`span`,{className:`oc-traces__mono`,children:new Date(e.lastOkAt).toLocaleTimeString(`fr-FR`)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})})]}),t||n?(0,I.jsx)(E5,{className:`oc-conn__detail-row`,children:(0,I.jsxs)(O5,{colSpan:7,className:`oc-conn__detail-cell`,children:[t?(0,I.jsxs)(`div`,{className:`oc-bridge-target__error`,children:[(0,I.jsx)(`strong`,{children:t.label}),` `,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.lastErrorCode}),e.lastErrorAt?` · ${new Date(e.lastErrorAt).toLocaleTimeString(`fr-FR`)}`:``,(0,I.jsx)(`p`,{className:`oc-bridge-card__hint`,children:t.hint})]}):null,n?(0,I.jsxs)(`div`,{className:`oc-bridge-target__downstream`,children:[sFe({label:n.label}),` `,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.lastDownstreamRejectCode}),e.lastDownstreamRejectAt?` · ${new Date(e.lastDownstreamRejectAt).toLocaleTimeString(`fr-FR`)}`:``]}):null]})}):null]})}function Wit(e){return e===`connected`?vQ():e===`error`?yQ():bQ()}function Git({state:e}){return e===`connected`?(0,I.jsx)($,{variant:`secondary`,children:vQ()}):e===`error`?(0,I.jsx)($,{variant:`destructive`,children:yQ()}):(0,I.jsx)($,{variant:`outline`,children:bQ()})}function Kit(){return P(V.bridgeHealth.getBridgeHealth,{})}function qit(){let e=Kit(),t=P(V.compat.getBridgeCompat,{}),n=P(V.me.getMe,{host:xO})?.role===`admin`,r=P(V.admin.listInstances,n?{}:`skip`),i=ss(),a=()=>void i({to:`/settings/anomalies`,search:{status:`open`}}),o=Ait(e?e.targets:[],t?t.targets:[],r??[]),s=t?.compat??null,c=t===void 0?`loading`:t===null?`nodata`:`ready`,l=s!==null&&Tit(s,`hermes`)&&!o.some(e=>e.key===`hermes`);return(0,I.jsxs)(`div`,{className:`oc-bridge`,children:[(0,I.jsx)(Jit,{health:e,compat:t,onSeeAnomalies:a}),(0,I.jsx)(`p`,{className:`oc-admin__hint oc-bridge__caption`,children:EPe()}),o.map(e=>(0,I.jsx)(Yit,{providerKey:e.key,connections:e.connections,instances:e.instances,manifest:s,compatStatus:c,compatReachable:t?.reachable??!0},e.key)),l?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:p2e()}):null]})}function Jit({health:e,compat:t,onSeeAnomalies:n}){let r=t&&t!==null?(0,I.jsxs)(`span`,{className:`oc-bridge-card__ver`,children:[(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:U5(t.bridgeVersion)}),` · `,k0e(),` `,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:t.protocolVersion===null?QQ():String(t.protocolVersion)})]}):null;if(e===void 0)return(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:gQ()});if(e===null)return(0,I.jsx)(`div`,{className:`oc-bridge-card oc-bridge-card--idle`,children:jPe()});let i=G5(e.targets),a=!e.reachable,o=Eit(e),s=o?`ok`:`error`,c=new Date(e.checkedAt).toLocaleString(`fr-FR`),l=e.startedAt==null?null:new Date(e.startedAt).toLocaleString(`fr-FR`);return(0,I.jsxs)(`div`,{className:`oc-bridge-card oc-bridge-card--${s}`,children:[(0,I.jsx)(`div`,{className:`oc-bridge-card__icon`,"aria-hidden":!0,children:o?(0,I.jsx)(gm,{size:22}):a?(0,I.jsx)(Vee,{size:22}):(0,I.jsx)(Vm,{size:22})}),(0,I.jsxs)(`div`,{className:`oc-bridge-card__body`,children:[(0,I.jsx)(`div`,{className:`oc-bridge-card__title`,children:o?PPe():a?LPe():BPe({count:i.length})}),(0,I.jsxs)(`div`,{className:`oc-bridge-card__meta`,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(Lee,{size:12,"aria-hidden":!0}),` `,UPe({time:c})]}),l?(0,I.jsx)(`span`,{children:KPe({time:l})}):null,r]}),a?(0,I.jsx)(`p`,{className:`oc-bridge-card__hint`,children:I5(e.lastError===`not_configured`?`NOT_CONFIGURED`:`BRIDGE_UNREACHABLE`).hint}):null]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-bridgebar__drill`,onClick:n,children:YPe()})]})}function Yit({providerKey:e,connections:t,instances:n,manifest:r,compatStatus:i,compatReachable:a}){let o=r?V5(r,e):null,s=new Map;for(let e of n)s.set(e.name,e.displayName??e.name);let c=[],l=new Set;for(let n of t){if(!n.instanceName||l.has(n.instanceName))continue;l.add(n.instanceName);let t=n.gatewayVersion??null;c.push({instanceName:n.instanceName,displayName:s.get(n.instanceName)??n.instanceName,version:t,state:wit(t,e,r)})}let u=c.map(e=>e.state),d=u.includes(`beyond`)?`beyond`:u.length>0&&u.every(e=>e===`supported`)?`supported`:null,[f,p]=(0,N.useState)(!1),[m,h]=(0,N.useState)(null),g=m===null?null:n.find(e=>e.name===m)??null,_=new Set(n.map(e=>e.name));return(0,I.jsxs)(`section`,{className:`oc-bridge-provider`,children:[(0,I.jsxs)(`header`,{className:`oc-bridge-provider__head`,children:[(0,I.jsx)(Im,{size:15,"aria-hidden":!0,className:`oc-bridge-provider__icon`}),(0,I.jsx)(`span`,{className:`oc-bridge-provider__name`,children:jit(e)}),d?(0,I.jsx)($,{variant:d===`beyond`?`destructive`:`secondary`,children:H5(d)}):null]}),(0,I.jsx)(`h4`,{className:`oc-bridge-provider__sub`,children:C0e()}),(0,I.jsx)(Xit,{support:o,compatStatus:i,compatReachable:a,manifest:r,instanceRows:c,canConfigure:e=>_.has(e),onConfigure:h}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-bridge-provider__sub oc-bridge-provider__sub--toggle`,"aria-expanded":f,onClick:()=>p(e=>!e),children:[f?(0,I.jsx)(dm,{size:13,"aria-hidden":!0}):(0,I.jsx)(fm,{size:13,"aria-hidden":!0}),QPe({count:t.length})]}),f?(0,I.jsx)(Hit,{connections:t,displayByInstance:s}):null,g?(0,I.jsx)(u7,{instance:g,onClose:()=>h(null)},g._id):null]})}function Xit({support:e,compatStatus:t,compatReachable:n,manifest:r,instanceRows:i,canConfigure:a,onConfigure:o}){return t===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:gQ()}):t===`nodata`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:E0e()}):(0,I.jsxs)(`div`,{className:`oc-compat`,children:[n?null:(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:P0e()}),r===null?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:L0e()}):(0,I.jsxs)(`div`,{className:`oc-compat__support`,children:[(0,I.jsx)(`span`,{className:`oc-compat__label`,children:B0e()}),e&&e.range!==null?(0,I.jsx)(`span`,{children:U0e({min:e.range.min,max:e.range.maxValidated})}):(0,I.jsx)(`span`,{children:QQ()}),e?(0,I.jsx)($it,{versions:e.validatedVersions}):null]}),i.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:t2e()}):(0,I.jsx)(`div`,{className:`oc-compat__targets`,children:i.map(e=>(0,I.jsxs)(`div`,{className:`oc-compat__target`,children:[(0,I.jsx)(`span`,{className:`oc-compat__instance`,children:e.displayName}),(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:U5(e.version)}),(0,I.jsx)($,{variant:e.state===`supported`?`secondary`:e.state===`beyond`?`destructive`:`outline`,children:H5(e.state)}),a(e.instanceName)?(0,I.jsxs)(H$,{children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,className:`oc-compat__target-menu`,"aria-label":hQ(),children:(0,I.jsx)(ym,{size:16,"aria-hidden":!0})})}),(0,I.jsx)(W$,{align:`end`,children:(0,I.jsx)(G$,{onSelect:()=>o(e.instanceName),children:hQ()})})]}):null]},e.instanceName))})]})}function u7({instance:e,onClose:t}){return(0,I.jsx)(d1,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(f1,{className:`oc-bridge-config-dialog`,onOpenAutoFocus:e=>e.preventDefault(),children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:ZMe({instance:e.displayName??e.name})}),(0,I.jsx)(g1,{children:nNe()})]}),(0,I.jsx)(Qit,{instance:e,onClose:t})]})})}function Zit({text:e}){return(0,I.jsx)(j5,{delayDuration:150,children:(0,I.jsxs)(M5,{children:[(0,I.jsx)(N5,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-field__help`,"aria-label":e,onClick:e=>e.preventDefault(),children:(0,I.jsx)(See,{"aria-hidden":!0})})}),(0,I.jsx)(P5,{className:`max-w-xs text-pretty`,children:e})]})})}function d7({label:e,help:t}){return(0,I.jsxs)(`span`,{className:`oc-field__label`,children:[e,(0,I.jsx)(Zit,{text:t})]})}function f7({label:e,result:t}){return t?t.checked?(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row `+(t.ok?`oc-bridge-config__check-row--ok`:`oc-bridge-config__check-row--err`),children:[t.ok?(0,I.jsx)(gm,{"aria-hidden":!0}):(0,I.jsx)(Vm,{"aria-hidden":!0}),(0,I.jsxs)(`span`,{children:[e,` — `,t.ok?mPe():t.detail]})]}):(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--skip`,children:[e,` — `,_Pe()]}):null}function Qit({instance:e,onClose:t}){let n=F(V.admin.upsertInstanceConfig),r=$n(V.bridge.validateMediaPaths),i=C1(),[a,o]=(0,N.useState)(()=>xit(e.config??{})),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(null),p=a.inboundMediaMode===`shared-fs`,m=a.mediaMode===`shared-fs`,h=p||m;async function g(){u(!0),f(null);try{f(await r({instanceName:e.name,inboundMediaMode:a.inboundMediaMode,mediaMode:a.mediaMode}))}catch(e){i.error(nPe(),e)}finally{u(!1)}}async function _(){c(!0);try{let r=e.config??{};await n({instanceId:e._id,config:Sit(a,r)}),t()}catch(e){i.error(CNe(),e)}finally{c(!1)}}return(0,I.jsx)(`div`,{className:`oc-bridge-config`,children:(0,I.jsxs)(`div`,{className:`oc-bridge-config__form`,children:[(0,I.jsxs)(`div`,{className:`oc-bridge-config__grid`,children:[(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:cNe(),help:ENe()}),(0,I.jsxs)(C3,{value:a.mediaMode,onValueChange:e=>o({...a,mediaMode:e}),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-full`,children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:yit.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:dNe(),help:kNe()}),(0,I.jsxs)(C3,{value:a.inboundMediaMode,onValueChange:e=>o({...a,inboundMediaMode:e}),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-full`,children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:bit.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:mNe(),help:MNe()}),(0,I.jsx)(n1,{type:`number`,min:1,max:4096,className:`w-full`,value:a.mediaMaxMb,onChange:e=>o({...a,mediaMaxMb:Math.trunc(Number(e.target.value)||0)})})]})]}),h&&(0,I.jsxs)(`div`,{className:`oc-bridge-config__grid`,children:[p&&(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:RNe(),help:VNe()}),(0,I.jsx)(n1,{className:`w-full`,spellCheck:!1,value:a.inboundAgentMount,onChange:e=>o({...a,inboundAgentMount:e.target.value})})]}),m&&(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:WNe(),help:qNe()}),(0,I.jsx)(n1,{className:`w-full`,spellCheck:!1,value:a.outboundAgentMount,onChange:e=>o({...a,outboundAgentMount:e.target.value})})]})]}),(0,I.jsxs)(`label`,{className:`oc-field--row`,children:[(0,I.jsx)(E1,{checked:a.rehydration,onCheckedChange:e=>o({...a,rehydration:e===!0})}),(0,I.jsx)(d7,{label:_Ne(),help:FNe()})]}),h&&d!==null&&(0,I.jsx)(`div`,{className:`oc-bridge-config__check`,children:d.reachable?!d.inbound&&!d.outbound?(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--err`,children:[(0,I.jsx)(Vm,{"aria-hidden":!0}),CPe({reason:d.reason??`?`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f7,{label:cPe(),result:d.inbound}),(0,I.jsx)(f7,{label:dPe(),result:d.outbound}),(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:aPe()})]}):(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--err`,children:[(0,I.jsx)(Vm,{"aria-hidden":!0}),bPe()]})}),(0,I.jsxs)(`div`,{className:`oc-bridge-config__actions`,children:[h&&(0,I.jsxs)(X,{variant:`outline`,size:`sm`,onClick:()=>void g(),disabled:l,children:[l?(0,I.jsx)(Cm,{className:`size-4 animate-spin`,"aria-hidden":!0}):null,l?$Ne():XNe()]}),(0,I.jsx)(X,{size:`sm`,onClick:()=>void _(),disabled:s,children:bNe()})]})]})})}function $it({versions:e}){if(e.length===0)return null;let t=[...e].reverse();return(0,I.jsxs)(Y$,{children:[(0,I.jsx)(X$,{asChild:!0,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-compat__versions-btn`,children:[e.length===1?K0e():Y0e({count:e.length}),(0,I.jsx)(dm,{size:13,"aria-hidden":!0})]})}),(0,I.jsxs)(Z$,{className:`oc-compat__versions-pop`,align:`start`,children:[(0,I.jsx)(`p`,{className:`oc-compat__versions-title`,children:Q0e()}),(0,I.jsx)(`div`,{className:`oc-compat__versions-list`,children:t.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e},e))})]})]})}var eat=[{value:`eq`,label:`=`},{value:`neq`,label:`≠`},{value:`contains`,label:Yze()},{value:`gt`,label:`>`},{value:`gte`,label:`≥`},{value:`lt`,label:`<`},{value:`lte`,label:`≤`}],p7=1;function tat(){return{id:p7++,field:``,op:`eq`,value:``}}function nat(e){return e.map(e=>({id:p7++,field:e.field,op:e.op,value:String(e.value)}))}function m7({fields:e,seed:t,onChange:n}){let r=(0,N.useRef)(t),i=!!(r.current&&r.current.length>0),[a,o]=(0,N.useState)(i),[s,c]=(0,N.useState)(()=>i?nat(r.current):[]);function l(e){n(e.filter(e=>e.field!==``&&e.value!==``).map(e=>({field:e.field,op:e.op,value:Nit(e.value)})))}function u(e,t){let n=s.map(n=>n.id===e?{...n,...t}:n);c(n),l(n)}function d(){c(e=>[...e,tat()])}function f(e){let t=s.filter(t=>t.id!==e);c(t),l(t)}let p=s.filter(e=>e.field!==``&&e.value!==``).length;return(0,I.jsxs)(`div`,{className:`oc-advfilter`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-advfilter__toggle`,"aria-expanded":a,onClick:()=>o(e=>!e),children:[(0,I.jsx)(dm,{className:`oc-advfilter__chevron`+(a?` is-open`:``),"aria-hidden":!0}),Qze(),p>0?(0,I.jsx)(`span`,{className:`oc-advfilter__count`,children:p}):null]}),a?(0,I.jsxs)(`div`,{className:`oc-advfilter__body`,children:[s.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:tBe()}):(0,I.jsx)(`ul`,{className:`oc-advfilter__rows`,children:s.map(t=>(0,I.jsxs)(`li`,{className:`oc-advfilter__row`,children:[(0,I.jsxs)(C3,{value:t.field||void 0,onValueChange:e=>u(t.id,{field:e}),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{placeholder:iBe()})}),(0,I.jsx)(E3,{children:e.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label},e.value))})]}),(0,I.jsxs)(C3,{value:t.op,onValueChange:e=>u(t.id,{op:e}),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-28`,children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:eat.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label},e.value))})]}),(0,I.jsx)(n1,{className:`oc-advfilter__value`,value:t.value,onChange:e=>u(t.id,{value:e.target.value}),placeholder:sBe()}),(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":uBe(),onClick:()=>f(t.id),children:(0,I.jsx)(Gm,{})})]},t.id))}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,className:`oc-advfilter__add`,onClick:d,children:[(0,I.jsx)(Nm,{}),pBe()]})]}):null]})}var rat=[`eq`,`neq`,`contains`,`gt`,`gte`,`lt`,`lte`],h7=[50,100,200,500],g7=`now-30d`,iat=`now-24h`;function _7(e,t,n=g7,r=`now`){let i=e??n,a=t??r,o=Number(i),s=Number(a);return i!==``&&a!==``&&Number.isFinite(o)&&Number.isFinite(s)?{kind:`absolute`,from:o,to:s}:{kind:`relative`,from:i,to:a}}function v7(e){return e.kind===`absolute`?{from:String(e.from),to:String(e.to)}:{from:e.from,to:e.to}}function y7(e){if(e.length!==0)return JSON.stringify(e)}function b7(e){if(!e)return[];let t;try{t=JSON.parse(e)}catch{return[]}if(!Array.isArray(t))return[];let n=[];for(let e of t){if(typeof e!=`object`||!e)continue;let t=e,r=t.field,i=t.op,a=t.value;typeof r!=`string`||r===``||typeof i!=`string`||!rat.includes(i)||typeof a!=`string`&&typeof a!=`number`&&typeof a!=`boolean`||n.push({field:r,op:i,value:a})}return n}var x7=sp().optional(),S7=sp().optional(),C7=sp().optional(),w7=sp().optional().catch(void 0),aat=Rp({q:x7,kind:sp().default(`all`).catch(`all`),limit:fee().pipe(Bp([Kp(h7[0]),Kp(h7[1]),Kp(h7[2]),Kp(h7[3])])).catch(100),statusClass:Wp([`2xx`,`4xx`,`5xx`]).optional().catch(void 0),principalType:Wp([`user`,`service`,`system`]).optional().catch(void 0),direction:Wp([`inbound`,`outbound`,`internal`]).optional().catch(void 0),roleKey:w7,from:S7,to:S7,adv:C7}),oat=Rp({q:x7,action:w7,impersonated:Wp([`yes`,`no`]).optional().catch(void 0),resource:w7,from:S7,to:S7,adv:C7}),sat=Rp({q:x7,status:Wp([`open`,`acknowledged`,`resolved`,`all`]).default(`open`).catch(`open`),severity:Wp([`info`,`warn`,`critical`]).optional().catch(void 0),kind:w7,from:S7,to:S7}),cat=Rp({from:S7,to:S7}),lat=Rp({q:x7,status:Wp([`active`,`disabled`]).optional().catch(void 0)}),uat=Rp({q:x7,role:w7});Rp({q:x7,mode:Wp([`per-user`,`shared`]).optional().catch(void 0)});var dat={kind:`relative`,from:g7,to:`now`},T7=`__all__`,E7=[`users`,`groups`,`instances`,`bridge`,`serviceAccounts`,`roles`,`access`,`traces`,`kpi`,`anomalies`,`files`,`agentFiles`,`preferences`,`integrations`,`theme`,`chatDefaults`,`audit`,`feedbacks`],D7=[`groups`,`access`,`roles`,`integrations`,`instances`,`bridge`,`theme`,`feedbacks`,`files`,`agentFiles`,`preferences`,`chatDefaults`],O7={groups:`Groupes`,access:`Accès`,serviceAccounts:`Comptes de service`,roles:`Rôles`,traces:`Traces`,kpi:`KPI`,anomalies:`Anomalies`,integrations:`Intégrations`,feedbacks:`Feedbacks`,bridge:`Bridge`,files:`Fichiers`,agentFiles:`Fichiers d'agent`,theme:`Apparence`,preferences:`Préférences`},k7={users:`admin.manage`,groups:`groups.manage`,instances:`admin.manage`,bridge:`bridge.read`,serviceAccounts:`admin.manage`,roles:`admin.manage`,access:`admin.manage`,traces:`traces.read`,kpi:`kpi.read`,anomalies:`anomalies.read`,files:`chats.read`,agentFiles:`agents.files.read`,preferences:`chats.read`,integrations:`admin.manage`,theme:`chats.read`,chatDefaults:`admin.manage`,audit:`admin.manage`,feedbacks:`admin.manage`},A7=[`traces`,`kpi`,`anomalies`,`bridge`,`agentFiles`,`groups`];function j7(e){let t=new Set(e);return E7.filter(e=>t.has(k7[e]))}function M7(e){return`/settings/${e}`}function N7(e){let t=e.split(`/`)[2];return E7.includes(t)?t:void 0}var fat={uiprefs:`preferences`};function pat({granted:e,onToggle:t}){let n=new Set(e),r=A7.filter(e=>n.has(k7[e])).length;return(0,I.jsxs)(H$,{children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsx)(X,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?ohe():lhe({count:r})})}),(0,I.jsxs)(W$,{align:`start`,className:`w-52`,children:[(0,I.jsx)(K$,{children:fhe()}),A7.map(e=>{let r=k7[e];return(0,I.jsxs)(G$,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,I.jsx)(E1,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,I.jsx)(`span`,{children:O7[e]??e})]},e)})]})]})}function mat(){let e=os({from:`/settings/users`}),t=ss({from:`/settings/users`}),n=e.q??``,r=e.role??T7,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),a=e=>void t({search:t=>({...t,role:e===T7?void 0:e})}),o=P(V.admin.listUsers,{filter:{q:n||void 0,role:r===T7?void 0:r},withAgents:!0}),s=P(V.me.getMe,{host:xO}),c=F(V.admin.setRole),l=F(V.admin.setUserPermissions),u=F(V.admin.startImpersonation),d=F(V.admin.deleteUser),f=F(V.admin.setUserName),p=y1(),m=b1(),h=C1(),[g,_]=(0,N.useState)(null),v=(0,N.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of o??[])e.add(t.role);return[...e]},[o]),y=n!==``||r!==T7;function b(){t({search:{},replace:!0})}async function x(e){try{await c(e)}catch(e){h.error(hhe(),e)}}async function S(e){try{await l(e)}catch(e){h.error(vhe(),e)}}async function C(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await p({title:zhe(),description:Hhe({user:t}),confirmWord:Ghe(),confirmLabel:Jhe(),destructive:!0}))try{await d({profileId:e._id}),h.success(ege({user:t}))}catch(e){h.error(Zhe(),e)}}async function w(e){let t=e.email||e.name||e.userId.slice(0,8),n=await m({title:oge(),label:lge({user:t}),placeholder:fge(),defaultValue:e.name??``,confirmLabel:JZ()});if(n!==null)try{await f({profileId:e._id,name:n}),h.success(hge())}catch(e){h.error(vge(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(r7,{q:n,onQChange:i,searchPlaceholder:xhe(),onReset:b,canReset:y,children:(0,I.jsxs)(C3,{value:r,onValueChange:a,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:T7,children:whe()}),v.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})}),(0,I.jsx)(k5,{title:Dhe(),rows:o,emptyHint:Ahe(),rowActions:e=>{let t=[{label:KZ(),onSelect:()=>_({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:rge(),onSelect:()=>void w(e)}];return e.userId!==s?.userId&&t.push({label:Nhe(),onSelect:()=>void u({profileId:e._id})},{label:Ihe(),variant:`destructive`,onSelect:()=>void C(e)}),t},columns:[{header:xge(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,I.jsxs)(`div`,{className:`flex flex-col`,children:[(0,I.jsx)(`span`,{children:t}),n?(0,I.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:wge(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,I.jsxs)(C3,{value:e.role,onValueChange:t=>void x({profileId:e._id,role:t}),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-28`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:`pending`,children:`pending`}),(0,I.jsx)(Q,{value:`user`,children:`user`}),(0,I.jsx)(Q,{value:`admin`,children:`admin`})]})]})},{header:Dge(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,I.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:Age()}):(0,I.jsx)(pat,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),S({profileId:e._id,permissions:[...n]})}})},{header:GZ(),cell:e=>(0,I.jsx)(A5,{icon:(0,I.jsx)(Im,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,I.jsx)(hit,{profileId:g?.profileId??null,userLabel:g?.label??``,open:g!==null,onOpenChange:e=>{e||_(null)}})]})}var P7={name:``,gatewayUrl:``,bridgeUrl:``,displayName:``,kind:`openclaw`,gatewayVersion:``,gatewayHttpUrl:``},hat={openclaw:[`token`,`deviceIdentity`],hermes:[`apiKey`]};function gat(e){return{name:e.name,gatewayUrl:e.gatewayUrl,bridgeUrl:e.bridgeUrl??``,displayName:e.displayName??``,kind:e.kind??`openclaw`,gatewayVersion:e.gatewayVersion??``,gatewayHttpUrl:e.gatewayHttpUrl??``}}function _at(){let e=P(V.admin.listInstances,{}),t=P(V.agents.listAllInstanceAgents,{}),n=F(V.admin.upsertInstance),r=F(V.admin.deleteInstance),i=C1(),[a,o]=(0,N.useState)(!1),[s,c]=(0,N.useState)(P7),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(null),[p,m]=(0,N.useState)(null),[h,g]=(0,N.useState)(null);async function _(){try{await n({instanceId:h??void 0,name:s.name,gatewayUrl:s.gatewayUrl,bridgeUrl:s.bridgeUrl||void 0,displayName:s.displayName||void 0,kind:s.kind,gatewayVersion:s.gatewayVersion||void 0,gatewayHttpUrl:s.gatewayHttpUrl||void 0}),c(P7),g(null),o(!1)}catch(e){i.error(Lge(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[Bge(),(0,I.jsx)(`strong`,{children:Uge()}),Kge()]}),(0,I.jsx)(k5,{title:Yge(),rows:e,addLabel:Qge(),onAdd:()=>{g(null),c(P7),o(!0)},emptyHint:t_e(),columns:[{header:i_e(),cell:e=>e.name,sort:e=>e.name},{header:s_e(),cell:e=>(0,I.jsx)($,{variant:`outline`,children:e.kind??`openclaw`}),sort:e=>e.kind??`openclaw`},{header:u_e(),cell:e=>e.gatewayUrl,sort:e=>e.gatewayUrl},{header:p_e(),cell:e=>e.displayName??`—`,sort:e=>e.displayName??null},{header:GZ(),cell:e=>{let n=(t?.[e.name]??[]).filter(e=>e.presentInLastOk!==!1&&e.enabled);if(n.length===0)return(0,I.jsx)(`span`,{className:`text-muted-foreground`,children:`—`});let r=t=>e.defaultAgentId===t;return(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:[...n].sort((e,t)=>Number(r(t.agentId))-Number(r(e.agentId))).map(e=>(0,I.jsxs)($,{variant:r(e.agentId)?`default`:`outline`,title:r(e.agentId)?nQ():void 0,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]},e.agentId))})}}],rowActions:e=>[{label:w_e(),onSelect:()=>{g(e._id),c(gat(e)),o(!0)}},{label:KZ(),onSelect:()=>u(e.name)},{label:mve(),onSelect:()=>m(e)},{label:g_e(),onSelect:()=>f(e)},{label:qZ(),variant:`destructive`,onSelect:()=>void r({instanceId:e._id})}],bulkActions:[{label:qZ(),variant:`destructive`,onSelect:e=>e.forEach(e=>void r({instanceId:e}))}]}),(0,I.jsx)(Q8,{open:a,onOpenChange:o,title:h?D_e():x_e(),description:N_e(),canSubmit:!!(s.name&&s.gatewayUrl),onSubmit:_,submitLabel:JZ(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(L7,{label:R_e(),children:[(0,I.jsx)(n1,{value:s.name,disabled:h!==null,onChange:e=>c({...s,name:e.target.value})}),h?(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:A_e()}):null]}),(0,I.jsx)(L7,{label:V_e(),children:(0,I.jsxs)(C3,{value:s.kind,onValueChange:e=>c({...s,kind:e}),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:`openclaw`,children:`OpenClaw`}),(0,I.jsx)(Q,{value:`hermes`,children:`Hermes`})]})]})}),(0,I.jsx)(L7,{label:W_e(),children:(0,I.jsx)(n1,{value:s.gatewayUrl,onChange:e=>c({...s,gatewayUrl:e.target.value})})}),(0,I.jsx)(L7,{label:q_e(),children:(0,I.jsx)(n1,{value:s.bridgeUrl,placeholder:X_e(),onChange:e=>c({...s,bridgeUrl:e.target.value})})}),(0,I.jsx)(L7,{label:$_e(),children:(0,I.jsx)(n1,{value:s.displayName,onChange:e=>c({...s,displayName:e.target.value})})}),(0,I.jsx)(L7,{label:nve(),children:(0,I.jsx)(n1,{value:s.gatewayVersion,placeholder:ave(),onChange:e=>c({...s,gatewayVersion:e.target.value})})}),(0,I.jsx)(L7,{label:cve(),children:(0,I.jsx)(n1,{value:s.gatewayHttpUrl,placeholder:dve(),onChange:e=>c({...s,gatewayHttpUrl:e.target.value})})})]})}),(0,I.jsx)(Tat,{instanceName:l,open:l!==null,onOpenChange:e=>{e||u(null)}}),d?(0,I.jsx)(u7,{instance:d,onClose:()=>f(null)},d._id):null,p?(0,I.jsx)(vat,{instance:p,onClose:()=>m(null)},p._id):null]})}function vat({instance:e,onClose:t}){let n=P(V.instanceSecrets.listInstanceSecretStatus,{}),r=hat[e.kind??`openclaw`],i=(0,N.useMemo)(()=>{let t={};for(let r of n??[])r.instanceId===e._id&&(t[r.field]=r.updatedAt);return t},[n,e._id]);return(0,I.jsx)(d1,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(f1,{onOpenAutoFocus:e=>e.preventDefault(),children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:_ve({instance:e.displayName??e.name})}),(0,I.jsx)(g1,{children:bve()})]}),(0,I.jsx)(`div`,{className:`oc-form`,children:r.map(t=>(0,I.jsx)(xat,{instanceId:e._id,field:t,updatedAt:i[t]??null},t))}),(0,I.jsx)(`div`,{className:`oc-bridgesecret`,children:(0,I.jsx)(bat,{instance:e})}),(0,I.jsx)(yat,{instance:e})]})})}function yat({instance:e}){let t=$n(V.instanceSync.forceInstanceSync),n=C1(),[r,i]=(0,N.useState)(!1);async function a(){if(!r){i(!0);try{switch((await t({instanceId:e._id})).status){case`synced`:n.success(Sye());break;case`no_agents`:n.success(Oye());break;case`no_bridge_url`:n.error(jye());break;case`deploy_misconfigured`:n.error(Pye());break;case`unauthorized`:n.error(Bye());break;case`not_served`:n.error(Uye());break;default:n.error(Lye());break}}catch(e){n.error(Tye(),e)}finally{i(!1)}}}return(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Kye()}),(0,I.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,I.jsx)(X,{size:`sm`,variant:`outline`,onClick:()=>void a(),disabled:r,children:r?yye():gye()})})]})}function bat({instance:e}){let t=P(V.bridgeAuth.listBridgeAuthStatus,{}),n=$n(V.bridgeAuth.mintBridgeSecret),r=F(V.bridgeAuth.revokeBridgeSecret),i=C1(),[a,o]=(0,N.useState)(!1),[s,c]=(0,N.useState)(null),[l,u]=(0,N.useState)(!1),d=(t??[]).find(t=>t.instanceId===e._id),f=d!==void 0;async function p(){if(!a){o(!0);try{c((await n({instanceId:e._id})).plaintext),u(!1)}catch(e){i.error($Z(),e)}finally{o(!1)}}}async function m(){if(!a){o(!0);try{await r({instanceId:e._id}),c(null),i.success(ube())}catch(e){i.error($Z(),e)}finally{o(!1)}}}async function h(){if(s)try{await navigator.clipboard.writeText(s),u(!0)}catch{}}return(0,I.jsxs)(L7,{label:Yye(),children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Qye()}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)($,{variant:f?`outline`:`secondary`,children:f?`${YZ()} · ${d.prefix}…${d.lastFour}`:XZ()}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(X,{size:`sm`,onClick:()=>void p(),disabled:a,children:f?ibe():tbe()}),f?(0,I.jsx)(X,{size:`sm`,variant:`destructive`,onClick:()=>void m(),disabled:a,children:sbe()}):null]})]}),s?(0,I.jsxs)(`div`,{className:`oc-bridgesecret__reveal`,children:[(0,I.jsx)(`p`,{className:`oc-sa__minted-warning`,children:hbe()}),(0,I.jsxs)(`div`,{className:`oc-sa__minted-box`,children:[(0,I.jsx)(`code`,{className:`oc-sa__minted-plain`,children:s}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void h(),children:l?JV():ZV()})]}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,onClick:()=>{c(null),u(!1)},children:eQ()})]}):null]})}function xat({instanceId:e,field:t,updatedAt:n}){let r=$n(V.instanceSecrets.setInstanceSecret),i=F(V.instanceSecrets.clearInstanceSecret),a=$n(V.deviceIdentity.generateDeviceIdentity),o=C1(),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(null),[p,m]=(0,N.useState)(!1),h=n!==null,g=t===`deviceIdentity`,_=t===`token`?Cve():t===`deviceIdentity`?Eve():kve();async function v(){if(!(!s.trim()||l)){u(!0);try{await r({instanceId:e,field:t,plaintext:s}),c(``),f(null),m(!1),o.success(Jve())}catch(e){o.error(ZZ(),e)}finally{u(!1)}}}async function y(){if(!l){u(!0);try{await i({instanceId:e,field:t}),f(null),m(!1),o.success($ve())}catch(e){o.error(ZZ(),e)}finally{u(!1)}}}async function b(){if(!l){u(!0);try{f(await a({instanceId:e})),m(!1),o.success(QZ())}catch(e){o.error(pye(),e)}finally{u(!1)}}}let x=d?`openclaw devices approve ${d.id}`:``;async function S(){if(x)try{await navigator.clipboard.writeText(x),m(!0)}catch{}}return(0,I.jsxs)(L7,{label:_,children:[g?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:aye()}):null,(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)($,{variant:h?`outline`:`secondary`,children:h?YZ():XZ()}),(0,I.jsx)(n1,{type:`password`,autoComplete:`off`,className:`flex-1 min-w-32`,value:s,placeholder:h?zve():Ive(),onChange:e=>c(e.target.value)}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(X,{size:`sm`,onClick:()=>void v(),disabled:l||s.trim().length===0,children:Hve()}),g?(0,I.jsx)(X,{size:`sm`,variant:`outline`,onClick:()=>void b(),disabled:l,children:nye()}):null,h?(0,I.jsx)(X,{size:`sm`,variant:`destructive`,onClick:()=>void y(),disabled:l,children:Gve()}):null]})]}),d?(0,I.jsxs)(`div`,{className:`oc-bridgesecret__reveal`,children:[(0,I.jsx)(`p`,{className:`text-sm font-medium`,children:QZ()}),(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:uye()}),(0,I.jsxs)(`div`,{className:`oc-sa__minted-box`,children:[(0,I.jsx)(`code`,{className:`oc-sa__minted-plain`,children:x}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void S(),children:p?JV():ZV()})]}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,onClick:()=>{f(null),m(!1)},children:eQ()})]}):null]})}var Sat={conversational:Bbe,documentary:Kbe},Cat={conversational:Ube,documentary:Ybe},F7=e=>(Sat[e]??(()=>e))(),I7=e=>(Cat[e]??(()=>``))();function wat({agentId:e,types:t,onToggle:n}){return(0,I.jsxs)(`div`,{className:`oc-agentcard__types`,children:[(0,I.jsx)(`span`,{className:`oc-agentcard__types-label`,children:Obe()}),t.map(e=>(0,I.jsx)($,{variant:`secondary`,className:`oc-agenttype__chip`,title:I7(e),children:F7(e)},e)),(0,I.jsxs)(Y$,{children:[(0,I.jsx)(X$,{asChild:!0,children:(0,I.jsx)(X,{type:`button`,variant:`outline`,size:`sm`,className:`h-7`,children:jbe()})}),(0,I.jsxs)(Z$,{align:`start`,className:`oc-agenttypes-pop`,children:[(0,I.jsx)(`p`,{className:`oc-agenttypes-pop__title`,children:Pbe()}),(0,I.jsx)(`p`,{className:`oc-agenttypes-pop__hint`,children:Lbe()}),(0,I.jsx)(`div`,{className:`oc-agenttypes-pop__list`,children:S5.map(r=>{let i=`agtype-${e}-${r}`;return(0,I.jsxs)(`div`,{className:`oc-agenttypes-pop__item`,children:[(0,I.jsx)(E1,{id:i,checked:t.includes(r),onCheckedChange:()=>n(r)}),(0,I.jsxs)(`label`,{htmlFor:i,className:`oc-agenttypes-pop__text`,children:[(0,I.jsx)(`span`,{className:`oc-agenttypes-pop__name`,children:F7(r)}),(0,I.jsx)(`span`,{className:`oc-agenttypes-pop__desc`,children:I7(r)})]})]},r)})})]})]})]})}function Tat({instanceName:e,open:t,onOpenChange:n}){let r=P(V.agents.listAgentsForInstance,t&&e?{instanceName:e}:`skip`),i=F(V.agents.setAgentEnabled).withOptimisticUpdate((e,{instanceName:t,agentId:n,enabled:r})=>{let i=e.getQuery(V.agents.listAgentsForInstance,{instanceName:t});i&&e.setQuery(V.agents.listAgentsForInstance,{instanceName:t},{...i,agents:i.agents.map(e=>e.agentId===n?{...e,enabled:r}:e)})}),a=F(V.agents.setInstanceDefaultAgent).withOptimisticUpdate((e,{instanceName:t,agentId:n})=>{let r=e.getQuery(V.agents.listAgentsForInstance,{instanceName:t});r&&e.setQuery(V.agents.listAgentsForInstance,{instanceName:t},{...r,defaultAgentId:n})}),o=F(V.agents.setAgentTypes).withOptimisticUpdate((e,{instanceName:t,agentId:n,types:r})=>{let i=e.getQuery(V.agents.listAgentsForInstance,{instanceName:t});if(!i)return;let a=mit(r);e.setQuery(V.agents.listAgentsForInstance,{instanceName:t},{...i,agents:i.agents.map(e=>e.agentId===n?{...e,types:a}:e)})}),s=F(V.agents.removeInstanceAgent),c=y1(),l=C1();async function u(t,n){if(e)try{await i({instanceName:e,agentId:t,enabled:n})}catch(e){l.error(tQ(),e)}}async function d(t){if(e)try{await a({instanceName:e,agentId:t})}catch(e){l.error(tQ(),e)}}async function f(t,n,r){if(!e)return;let i=r.includes(n)?r.filter(e=>e!==n):[...r,n];try{await o({instanceName:e,agentId:t,types:i})}catch(e){l.error(tQ(),e)}}async function p(t,n){if(e&&await c({title:ixe({name:n}),description:sxe(),confirmLabel:uxe(),destructive:!0}))try{await s({instanceName:e,agentId:t}),l.success(pxe())}catch(e){l.error(tQ(),e)}}return(0,I.jsx)(d1,{open:t,onOpenChange:n,children:(0,I.jsxs)(f1,{className:`oc-access`,children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:bbe({name:e??``})}),(0,I.jsx)(g1,{children:Cbe()})]}),r===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:gxe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-access__poll`,children:r.discovery===null?yxe():r.discovery.lastPollOk?Sxe():Txe({error:r.discovery.error??`?`})}),r.agents.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Oxe()}):(0,I.jsx)(`div`,{className:`oc-access__list`,children:r.agents.map(e=>{let t=e.presentInLastOk===!1,n=r.defaultAgentId===e.agentId,i=e.displayName??e.agentId,a=e.types??[];return(0,I.jsxs)(`div`,{className:`oc-agentcard`+(e.enabled?``:` oc-agentcard--off`),children:[(0,I.jsxs)(`div`,{className:`oc-agentcard__head`,children:[(0,I.jsx)(E1,{checked:e.enabled,disabled:t,"aria-label":i,onCheckedChange:t=>void u(e.agentId,t===!0)}),(0,I.jsxs)(`span`,{className:`oc-agentcard__name`,title:i,children:[e.emoji?`${e.emoji} `:``,i]}),e.model?(0,I.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,t?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:Nxe()}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,className:`h-7 text-destructive`,onClick:()=>void p(e.agentId,i),children:txe()})]}):n?(0,I.jsx)($,{variant:`default`,children:nQ()}):(0,I.jsx)(X,{size:`sm`,variant:`outline`,className:`h-7`,disabled:!e.enabled,onClick:()=>void d(e.agentId),children:Qbe()})]}),e.enabled?(0,I.jsx)(wat,{agentId:e.agentId,types:a,onToggle:t=>void f(e.agentId,t,a)}):null]},e.agentId)})})]})]})})}function L7({label:e,children:t}){return(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:e}),t]})}var Eat=[{value:`action`,label:`action`},{value:`realLabel`,label:`acteur réel`},{value:`targetLabel`,label:`au nom de`},{value:`impersonated`,label:`usurpation`},{value:`resource`,label:`ressource`},{value:`resourceId`,label:`id ressource`}];function Dat(){let e=os({from:`/settings/audit`}),t=ss({from:`/settings/audit`}),n=e.q??``,r=e.action??T7,i=e.impersonated??T7,a=e.resource??T7,o=_7(e.from,e.to),s=(0,N.useMemo)(()=>b7(e.adv),[e.adv]),{from:c,to:l}=e7(o),u=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),d=e=>void t({search:t=>({...t,action:e===T7?void 0:e})}),f=e=>void t({search:t=>({...t,impersonated:e===T7?void 0:e})}),p=e=>void t({search:t=>({...t,resource:e===T7?void 0:e})}),m=e=>void t({search:t=>({...t,...v7(e)})}),h=e=>void t({search:t=>({...t,adv:y7(e)}),replace:!0}),g=P(V.admin.listAudit,{filter:{q:n||void 0,from:c,to:l,action:r===T7?void 0:r,resource:a===T7?void 0:a,impersonated:i===T7?void 0:i===`yes`,advanced:s.length>0?s:void 0}}),_=(0,N.useMemo)(()=>{let e=new Set;for(let t of g??[])e.add(t.action);return[...e].sort()},[g]),v=(0,N.useMemo)(()=>{let e=new Set;for(let t of g??[])t.resource&&e.add(t.resource);return[...e].sort()},[g]),y=n!==``||r!==T7||i!==T7||a!==T7||s.length>0||o.kind!==`relative`||o.from!==dat.from;function b(){t({search:{},replace:!0})}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[Ixe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:zxe()})]}),(0,I.jsxs)(r7,{q:n,onQChange:u,searchPlaceholder:Hxe(),timeRange:o,onTimeRangeChange:m,onReset:b,canReset:y,children:[(0,I.jsxs)(C3,{value:r,onValueChange:d,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{placeholder:rQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:T7,children:qxe()}),_.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(C3,{value:i,onValueChange:f,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:T7,children:Xxe()}),(0,I.jsx)(Q,{value:`yes`,children:$xe()}),(0,I.jsx)(Q,{value:`no`,children:nSe()})]})]}),(0,I.jsxs)(C3,{value:a,onValueChange:p,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{placeholder:iQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:T7,children:sSe()}),v.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),(0,I.jsx)(m7,{fields:Eat,seed:s,onChange:h}),(0,I.jsx)(k5,{title:uSe(),rows:g,emptyHint:pSe(),columns:[{header:gSe(),cell:e=>new Date(e.at).toLocaleString(`fr-FR`),sort:e=>e.at},{header:rQ(),cell:e=>e.action,sort:e=>e.action},{header:ySe(),cell:e=>e.realLabel,sort:e=>e.realLabel},{header:SSe(),cell:e=>e.targetLabel??`—`,sort:e=>e.targetLabel??null},{header:iQ(),cell:e=>e.resource?e.resource+(e.resourceId?` · ${e.resourceId.slice(0,8)}`:``):`—`,sort:e=>e.resource??null}]})]})}var Oat={pending:awe,user:cwe,admin:dwe,observer:mwe,agent:_we};function R7(e){if(e.builtin){let t=Oat[e.key];if(t)return t()}return e.description}var z7=[{value:`never`,label:()=>rH(),days:null},{value:`30`,label:()=>oH(),days:30},{value:`90`,label:()=>lH(),days:90}],kat=720*60*60*1e3,B7=`__all__`,V7={name:``,roleKey:``,description:``};function Aat(){let e=os({from:`/settings/serviceAccounts`}),t=ss({from:`/settings/serviceAccounts`}),n=e.q??``,r=e.status??B7,[i,a]=(0,N.useState)(B7),o=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),s=e=>void t({search:t=>({...t,status:e===B7?void 0:e})}),c=P(V.apiKeys.listServiceAccounts,{filter:{q:n||void 0,role:i===B7?void 0:i,disabled:r===B7?void 0:r===`disabled`}}),l=P(V.apiKeys.listKeys,{}),u=P(V.apiKeys.listRoles,{}),d=F(V.apiKeys.createServiceAccount),f=F(V.apiKeys.updateServiceAccount),p=F(V.apiKeys.deleteServiceAccount),m=$n(V.apiKeys.mintApiKey),h=F(V.apiKeys.revokeApiKey),g=y1(),_=C1(),v=n!==``||i!==B7||r!==B7;function y(){a(B7),t({search:{},replace:!0})}let[b,x]=(0,N.useState)(!1),[S,C]=(0,N.useState)(V7),[w,T]=(0,N.useState)(null),[E,D]=(0,N.useState)(new Set),[O,ee]=(0,N.useState)(null),te=(0,N.useRef)(!1),[k,A]=(0,N.useState)(new Set),[j,ne]=(0,N.useState)({}),[re,M]=(0,N.useState)(null),ie=(0,N.useMemo)(()=>{let e=new Map;for(let t of l??[]){let n=e.get(t.serviceAccountId)??[];n.push(t),e.set(t.serviceAccountId,n)}return e},[l]);function ae(e){D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async function oe(){try{w?(await f({serviceAccountId:w,name:S.name,roleKey:S.roleKey,description:S.description}),_.success(hB())):await d({name:S.name,roleKey:S.roleKey,description:S.description||void 0}),C(V7),T(null),x(!1)}catch(e){_.error(w?fB():lB(),e)}}function se(e){C({name:e.name,roleKey:e.roleKey,description:e.description??``}),T(e._id),x(!0)}async function ce(e){if(te.current)return;te.current=!0;let t=j[e._id]??`never`,n=z7.find(e=>e.value===t)?.days??null,r=n?Date.now()+n*24*60*60*1e3:void 0;ee(e._id);try{let t=await m({serviceAccountId:e._id,expiresAt:r});M({accountName:e.name,plaintext:t.plaintext,prefix:t.prefix,lastFour:t.lastFour})}catch(e){_.error(vB(),e)}finally{te.current=!1,ee(null)}}async function le(e){if(await g({title:xB(),description:(0,I.jsxs)(I.Fragment,{children:[wB(),` `,(0,I.jsx)(`span`,{className:`font-mono`,children:e.name}),` `,DB(),` `,(0,I.jsx)(`strong`,{children:AB()}),` `,NB()]}),confirmWord:e.name,confirmLabel:IB(),destructive:!0}))try{await p({serviceAccountId:e._id}),_.success(zB(),e.name)}catch(e){_.error(HB(),e)}}async function ue(e){if(await g({title:GB(),description:(0,I.jsxs)(I.Fragment,{children:[JB(),` `,(0,I.jsxs)(`span`,{className:`font-mono`,children:[e.prefix,`…`,e.lastFour]}),` `,ZB()]}),confirmLabel:eV(),destructive:!0})&&!k.has(e._id)){A(t=>new Set(t).add(e._id));try{await h({keyId:e._id})}catch(e){_.error(rV(),e)}finally{A(t=>{let n=new Set(t);return n.delete(e._id),n})}}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:hR()}),(0,I.jsxs)(r7,{q:n,onQChange:o,searchPlaceholder:vR(),onReset:y,canReset:v,children:[(0,I.jsxs)(C3,{value:i,onValueChange:a,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{placeholder:xR()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:B7,children:wR()}),(u??[]).map(e=>(0,I.jsx)(Q,{value:e.key,children:e.key},e._id))]})]}),(0,I.jsxs)(C3,{value:r,onValueChange:s,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:B7,children:DR()}),(0,I.jsx)(Q,{value:`active`,children:AR()}),(0,I.jsx)(Q,{value:`disabled`,children:NR()})]})]})]}),(0,I.jsx)(k5,{title:IR(),rows:c,addLabel:zR(),onAdd:()=>{C(V7),T(null),x(!0)},emptyHint:HR(),isExpanded:e=>E.has(e._id),renderExpanded:e=>(0,I.jsx)(jat,{account:e,keys:ie.get(e._id)??[],onRevoke:ue,revoking:k}),rowActions:e=>[{label:ez(),onSelect:()=>se(e)},{label:GR(),onSelect:()=>void ce(e)},{label:E.has(e._id)?JR():ZR(),onSelect:()=>ae(e._id)},{label:rz(),variant:`destructive`,onSelect:()=>void le(e)}],columns:[{header:``,className:`w-8`,cell:e=>(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":E.has(e._id)?oz():lz(),onClick:()=>ae(e._id),children:E.has(e._id)?(0,I.jsx)(dm,{}):(0,I.jsx)(fm,{})})},{header:fz(),sort:e=>e.name,cell:e=>(0,I.jsxs)(`div`,{className:`flex flex-col`,children:[(0,I.jsx)(`span`,{children:e.name}),e.description?(0,I.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e.description}):null]})},{header:hz(),sort:e=>e.roleKey,cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.roleKey})},{header:vz(),sort:e=>+!!e.disabled,cell:e=>e.disabled?(0,I.jsx)($,{variant:`destructive`,children:NR()}):(0,I.jsx)($,{variant:`outline`,children:AR()})},{header:xz(),cell:e=>(0,I.jsxs)(C3,{value:j[e._id]??`never`,onValueChange:t=>ne(n=>({...n,[e._id]:t})),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:z7.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label()},e.value))})]})},{header:wz(),sort:e=>(ie.get(e._id)??[]).filter(e=>!e.disabled).length,cell:e=>{let t=(ie.get(e._id)??[]).filter(e=>!e.disabled).length;return(0,I.jsx)(`span`,{className:`oc-sa__keycount`,children:O===e._id?Dz():Az({count:t})})}}]}),(0,I.jsx)(Q8,{open:b,onOpenChange:e=>{x(e),e||T(null)},title:w?Nz():Hz(),description:w?Iz():Gz(),canSubmit:!!(S.name&&S.roleKey),onSubmit:oe,submitLabel:w?zz():Jz(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Zz()}),(0,I.jsx)(n1,{value:S.name,onChange:e=>C({...S,name:e.target.value})})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:eB()}),(0,I.jsxs)(C3,{value:S.roleKey||void 0,onValueChange:e=>C({...S,roleKey:e}),children:[(0,I.jsx)(T3,{className:`w-full`,children:(0,I.jsx)(w3,{placeholder:rB()})}),(0,I.jsx)(E3,{children:(u??[]).map(e=>(0,I.jsxs)(Q,{value:e.key,children:[e.name,` (`,e.key,`)`]},e._id))})]}),(()=>{let e=(u??[]).find(e=>e.key===S.roleKey),t=e?R7(e):null;return t?(0,I.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t}):null})()]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:oB()}),(0,I.jsx)(n1,{value:S.description,onChange:e=>C({...S,description:e.target.value})})]})]})}),(0,I.jsx)(Mat,{minted:re,onClose:()=>M(null)})]})}function jat({account:e,keys:t,onRevoke:n,revoking:r}){return(0,I.jsxs)(`div`,{className:`oc-sa__keys`,children:[(0,I.jsxs)(`div`,{className:`oc-sa__keys-head`,children:[oV(),` `,(0,I.jsx)(`span`,{className:`font-medium`,children:e.name})]}),t.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:lV()}):(0,I.jsxs)(`table`,{className:`oc-sa__keytable`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{children:fV()}),(0,I.jsx)(`th`,{children:hV()}),(0,I.jsx)(`th`,{children:vV()}),(0,I.jsx)(`th`,{children:xV()}),(0,I.jsx)(`th`,{children:wV()}),(0,I.jsx)(`th`,{children:DV()}),(0,I.jsx)(`th`,{})]})}),(0,I.jsx)(`tbody`,{children:t.map(t=>(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`td`,{children:(0,I.jsxs)(`code`,{className:`oc-sa__keyid`,children:[t.prefix,`…`,t.lastFour]})}),(0,I.jsx)(`td`,{children:(0,I.jsx)($,{variant:`secondary`,children:e.roleKey})}),(0,I.jsx)(`td`,{children:Nat(t.createdAt)}),(0,I.jsx)(`td`,{className:Pat(t.lastUsedAt)?`oc-sa__stale`:``,children:Fat(t.lastUsedAt)}),(0,I.jsx)(`td`,{children:Iat(t.expiresAt)}),(0,I.jsx)(`td`,{children:Lat(t)}),(0,I.jsx)(`td`,{className:`text-right`,children:t.disabled?null:(0,I.jsx)(X,{variant:`destructive`,size:`sm`,disabled:r.has(t._id),onClick:()=>n(t),children:r.has(t._id)?AV():NV()})})]},t._id))})]})]})}function Mat({minted:e,onClose:t}){let[n,r]=(0,N.useState)(!1);async function i(){if(e)try{await navigator.clipboard.writeText(e.plaintext),r(!0),window.setTimeout(()=>r(!1),2e3)}catch{}}return(0,I.jsx)(d1,{open:e!==null,onOpenChange:e=>{e||(r(!1),t())},children:e?(0,I.jsxs)(f1,{className:`max-w-lg`,showCloseButton:!1,onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:IV()}),(0,I.jsx)(g1,{children:zV({name:e.accountName})})]}),(0,I.jsx)(`div`,{className:`oc-sa__minted-warning`,children:HV()}),(0,I.jsxs)(`div`,{className:`oc-sa__minted-box`,children:[(0,I.jsx)(`code`,{className:`oc-sa__minted-plain`,children:e.plaintext}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,onClick:()=>void i(),"aria-label":GV(),children:[n?(0,I.jsx)(um,{}):(0,I.jsx)(_m,{}),n?JV():ZV()]})]}),(0,I.jsx)(m1,{children:(0,I.jsx)(X,{onClick:()=>{r(!1),t()},children:eH()})})]}):null})}function Nat(e){return new Date(e).toLocaleString(`fr-FR`)}function Pat(e){return e===null?!1:Date.now()-e>kat}function Fat(e){return e===null?fH():new Date(e).toLocaleString(`fr-FR`)}function Iat(e){return e===null?`—`:new Date(e).toLocaleDateString(`fr-FR`)}function Lat(e){return e.disabled?(0,I.jsx)($,{variant:`destructive`,children:hH()}):e.expiresAt!==null&&e.expiresAt<Date.now()?(0,I.jsx)($,{variant:`outline`,children:vH()}):(0,I.jsx)($,{variant:`outline`,children:xH()})}var H7=[{group:()=>TSe(),keys:[{key:`traces.read`,label:()=>aQ()},{key:`traces.read.content`,label:()=>HSe(),phi:!0},{key:`traces.write`,label:()=>oQ()}]},{group:()=>OSe(),keys:[{key:`kpi.read`,label:()=>aQ()},{key:`kpi.write`,label:()=>oQ()}]},{group:()=>jSe(),keys:[{key:`openclaw.query`,label:()=>qSe()},{key:`anomalies.read`,label:()=>XSe()},{key:`anomalies.report`,label:()=>$Se()}]},{group:()=>PSe(),keys:[{key:`chats.read`,label:()=>aQ()},{key:`selfheal`,label:()=>aCe()}]},{group:()=>LSe(),keys:[{key:`admin.manage`,label:()=>nCe()}]}],Rat=H7.flatMap(e=>e.keys.map(e=>e.key));function U7(e){return e.includes(`*`)}var W7={key:``,name:``,description:``};function zat(){let e=P(V.apiKeys.listRoles,{}),t=F(V.apiKeys.createRole),n=F(V.apiKeys.ensureRolesSeeded),r=F(V.apiKeys.updateRolePermissions).withOptimisticUpdate((e,{roleId:t,permissions:n})=>{let r=e.getQuery(V.apiKeys.listRoles,{});r&&e.setQuery(V.apiKeys.listRoles,{},r.map(e=>e._id===t?{...e,permissions:n}:e))}),i=y1(),a=C1(),[o,s]=(0,N.useState)(!1),[c,l]=(0,N.useState)(W7),[u,d]=(0,N.useState)(new Set);(0,N.useEffect)(()=>{n({}).catch(e=>{a.error(dCe(),e)})},[n,a]);let f=e??[];async function p(e,t){if(U7(e.permissions)||u.has(e._id))return;let n=e.permissions.includes(t)?e.permissions.filter(e=>e!==t):[...e.permissions,t];if(!(e.builtin&&!await i({title:mCe({name:e.name}),description:_Ce(),confirmLabel:bCe()}))){d(t=>new Set(t).add(e._id));try{await r({roleId:e._id,permissions:n})}catch(e){a.error(CCe(),e)}finally{d(t=>{let n=new Set(t);return n.delete(e._id),n})}}}async function m(){try{await t({key:c.key,name:c.name,description:c.description||void 0,permissions:[]}),l(W7),s(!1)}catch(e){a.error(ECe(),e)}}let h=e===void 0,g=!h&&f.length===0;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[kCe(),` `,(0,I.jsx)(`code`,{children:`admin`}),` `,MCe(),` `,(0,I.jsx)(`code`,{children:`traces.read.content`}),` `,FCe()]}),(0,I.jsxs)(`div`,{className:`oc-dt`,children:[(0,I.jsxs)(`div`,{className:`oc-dt__bar`,children:[(0,I.jsx)(`h2`,{className:`oc-dt__title`,children:RCe()}),(0,I.jsx)(`div`,{className:`oc-dt__bar-actions`,children:(0,I.jsx)(X,{size:`sm`,onClick:()=>{l(W7),s(!0)},children:VCe()})})]}),h?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:WCe()}):g?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:qCe()}):(0,I.jsx)(`div`,{className:`oc-matrix__scroll`,children:(0,I.jsxs)(`table`,{className:`oc-matrix`,children:[(0,I.jsxs)(`thead`,{children:[(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{className:`oc-matrix__corner`,rowSpan:2,children:XCe()}),H7.map(e=>(0,I.jsx)(`th`,{className:`oc-matrix__group`,colSpan:e.keys.length,children:e.group()},e.group()))]}),(0,I.jsx)(`tr`,{children:H7.flatMap(e=>e.keys.map(e=>(0,I.jsxs)(`th`,{className:`oc-matrix__perm`,title:e.phi?cCe({key:e.key}):e.key,children:[e.label(),e.phi?(0,I.jsx)(`span`,{className:`oc-matrix__phi`,children:` ⚠`}):null]},e.key)))})]}),(0,I.jsx)(`tbody`,{children:f.map(e=>{let t=U7(e.permissions),n=u.has(e._id);return(0,I.jsxs)(`tr`,{children:[(0,I.jsxs)(`th`,{className:`oc-matrix__rolecell`,children:[(0,I.jsxs)(`div`,{className:`oc-matrix__rolename`,children:[(0,I.jsx)(`span`,{children:e.name}),(0,I.jsx)(`code`,{className:`oc-matrix__rolekey`,children:e.key}),e.builtin?(0,I.jsxs)($,{variant:`outline`,className:`gap-1`,children:[(0,I.jsx)(wm,{}),` `,$Ce()]}):(0,I.jsx)($,{variant:`secondary`,children:nwe()})]}),R7(e)?(0,I.jsx)(`p`,{className:`oc-matrix__roledesc`,children:R7(e)}):null]}),Rat.map(r=>(0,I.jsx)(`td`,{className:`oc-matrix__cell`,children:(0,I.jsx)(E1,{checked:t||e.permissions.includes(r),disabled:t||n,"aria-label":`${e.key} · ${r}`,title:t?bwe():n?Cwe():r,onCheckedChange:()=>void p(e,r)})},r))]},e.key)})})]})})]}),(0,I.jsx)(Q8,{open:o,onOpenChange:s,title:Ewe(),description:kwe(),canSubmit:!!(c.key&&c.name),onSubmit:m,submitLabel:Mwe(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Fwe()}),(0,I.jsx)(n1,{value:c.key,placeholder:Rwe(),onChange:e=>l({...c,key:e.target.value})})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Vwe()}),(0,I.jsx)(n1,{value:c.name,onChange:e=>l({...c,name:e.target.value})})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Wwe()}),(0,I.jsx)(n1,{value:c.description,onChange:e=>l({...c,description:e.target.value})})]})]})})]})}function Bat(e,t,n){let r=t.trim().toLowerCase();return[...r?e.filter(e=>[e.email,e.name,e.canonical].some(e=>e!=null&&e.toLowerCase().includes(r))):e.slice()].sort((e,t)=>!n.has(e.userId)-+!n.has(t.userId))}function Vat(e,t){let n=e.filter(e=>e.source===`discovered`),r=t.trim().toLowerCase();return r?n.filter(e=>(e.displayName??e.agentId).toLowerCase().includes(r)||e.agentId.toLowerCase().includes(r)):n}function Hat(e){let t=e.name?.trim()??``,n=e.email?.trim()??``,r=e.canonical?.trim()||`u-${e.userId.slice(0,8)}`;return t?{primary:t,secondary:n||`@${r}`}:n?{primary:n,secondary:null}:{primary:`@${r}`,secondary:null}}function Uat(e){switch(e){case`admin`:return nYe();case`user`:return aYe();case`pending`:return cYe();default:return e}}function G7(e,t){if(e.length===0)return`none`;let n=0;for(let r of e)t(r)&&n++;return n===0?`none`:n===e.length?`all`:`some`}function K7(e,t,n){let r=Math.max(1,Math.ceil(e.length/n)),i=Math.min(Math.max(1,Math.floor(t)),r),a=(i-1)*n;return{pageItems:e.slice(a,a+n),page:i,pageCount:r}}function Wat({className:e,orientation:t=`horizontal`,...n}){return(0,I.jsx)(Qle,{"data-slot":`tabs`,"data-orientation":t,className:V$(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Gat=e1(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Kat({className:e,variant:t=`default`,...n}){return(0,I.jsx)($le,{"data-slot":`tabs-list`,"data-variant":t,className:V$(Gat({variant:t}),e),...n})}function q7({className:e,...t}){return(0,I.jsx)(eue,{"data-slot":`tabs-trigger`,className:V$(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function J7({className:e,...t}){return(0,I.jsx)(tue,{"data-slot":`tabs-content`,className:V$(`flex-1 text-sm outline-none`,e),...t})}var Y7={name:``,description:``};function qat(){let e=P(V.groups.listGroups,{}),t=P(V.me.getMe,{host:xO})?.role===`admin`,n=F(V.groups.createGroup),r=F(V.groups.updateGroup),i=F(V.groups.deleteGroup),a=y1(),o=C1(),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(Y7),[p,m]=(0,N.useState)(null),[h,g]=(0,N.useState)(``),_=(0,N.useMemo)(()=>{if(!e)return e;let t=h.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||(e.description??``).toLowerCase().includes(t)||e.members.some(e=>e.label.toLowerCase().includes(t))||e.agents.some(e=>e.toLowerCase().includes(t))||e.charts.some(e=>e.name.toLowerCase().includes(t))):e},[e,h]);function v(){u(null),f(Y7),c(!0)}function y(e){u(e),f({name:e.name,description:e.description??``}),c(!0)}async function b(){try{l?await r({groupId:l._id,name:d.name,description:d.description}):await n({name:d.name,description:d.description||void 0}),f(Y7),u(null),c(!1)}catch(e){o.error(xXe(),e)}}async function x(e){if(await a({title:hJe({name:e.name}),description:vJe(),confirmWord:e.name,confirmLabel:xJe(),cancelLabel:Zqe(),destructive:!0}))try{await i({groupId:e._id})}catch(e){o.error(wXe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:hqe()}),(0,I.jsx)(r7,{q:h,onQChange:g,onReset:()=>g(``),canReset:h!==``,searchPlaceholder:Iqe()}),(0,I.jsx)(k5,{title:fqe(),rows:_,addLabel:vqe(),onAdd:t?v:void 0,emptyHint:xqe(),columns:[{header:wqe(),cell:e=>e.name,sort:e=>e.name},{header:Dqe(),cell:e=>(0,I.jsx)(A5,{icon:(0,I.jsx)(Um,{size:12,"aria-hidden":!0}),total:e.memberCount,items:e.members.map(e=>({label:e.label,marker:e.manager?(0,I.jsx)(Lm,{size:11,"aria-hidden":!0}):null,highlight:e.manager}))}),sort:e=>e.memberCount},{header:Aqe(),cell:e=>(0,I.jsx)(A5,{icon:(0,I.jsx)(Im,{size:12,"aria-hidden":!0}),total:e.agentCount,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount},{header:Nqe(),cell:e=>(0,I.jsx)(A5,{icon:(0,I.jsx)(Mm,{size:12,"aria-hidden":!0}),total:e.chartCount,items:e.charts.map(e=>({label:e.name,marker:e.isDefault?(0,I.jsx)(zm,{size:11,fill:`currentColor`,"aria-hidden":!0}):null,highlight:e.isDefault}))}),sort:e=>e.chartCount}],rowActions:e=>[{label:zqe(),onSelect:()=>m({groupId:e._id,name:e.name})},...t?[{label:Hqe(),onSelect:()=>y(e)},{label:Gqe(),variant:`destructive`,onSelect:()=>void x(e)}]:[]]}),(0,I.jsx)(Q8,{open:s,onOpenChange:c,title:l?rJe():eJe(),description:oJe(),canSubmit:!!d.name.trim(),onSubmit:b,submitLabel:Jqe(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:lJe()}),(0,I.jsx)(n1,{value:d.name,onChange:e=>f({...d,name:e.target.value})})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:fJe()}),(0,I.jsx)(n1,{value:d.description,onChange:e=>f({...d,description:e.target.value})})]})]})}),(0,I.jsx)(Jat,{groupId:p?.groupId??null,groupName:p?.name??``,open:p!==null,onOpenChange:e=>{e||m(null)}})]})}var X7=8;function Z7({page:e,pageCount:t,onPage:n}){return t<=1?null:(0,I.jsxs)(`div`,{className:`oc-access__pager`,children:[(0,I.jsxs)(X,{type:`button`,variant:`ghost`,size:`sm`,disabled:e<=1,onClick:()=>n(e-1),children:[(0,I.jsx)(bee,{size:14,"aria-hidden":!0}),qJe()]}),(0,I.jsxs)(`span`,{className:`oc-access__pageinfo`,"aria-label":$Je({page:e,pages:t}),children:[e,` / `,t]}),(0,I.jsxs)(X,{type:`button`,variant:`ghost`,size:`sm`,disabled:e>=t,onClick:()=>n(e+1),children:[XJe(),(0,I.jsx)(fm,{size:14,"aria-hidden":!0})]})]})}function Jat({groupId:e,groupName:t,open:n,onOpenChange:r}){let i=P(V.groups.getGroup,n&&e?{groupId:e}:`skip`),a=P(V.groups.listAssignableInstances,n?{}:`skip`),o=P(V.groups.listAssignableUsers,n?{}:`skip`),s=F(V.groups.addMember),c=F(V.groups.removeMember),l=F(V.groups.bulkSetMembers),u=F(V.groups.setGroupManager),d=C1(),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(``),[g,_]=(0,N.useState)(`members`),[v,y]=(0,N.useState)(1),[b,x]=(0,N.useState)(new Set),S=(0,N.useRef)(null),C=(0,N.useMemo)(()=>new Set((i?.members??[]).map(e=>e.userId)),[i]),w=(0,N.useMemo)(()=>new Set((i?.members??[]).filter(e=>e.manager).map(e=>e.userId)),[i]),T=i?.viewerIsAdmin===!0,E=(0,N.useMemo)(()=>new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),[i]);(0,N.useEffect)(()=>{p(``),h(``),_(`members`),y(1),S.current=null},[n,e]),(0,N.useEffect)(()=>{y(1)},[f]),(0,N.useEffect)(()=>{n&&i&&e&&S.current!==e&&(S.current=e,x(new Set((i.members??[]).map(e=>e.userId))))},[n,i,e]);let D=(0,N.useMemo)(()=>o?Bat(o,f,b):[],[o,f,b]);async function O(t,n){if(e)try{n?await c({groupId:e,userId:t}):await s({groupId:e,userId:t})}catch(e){d.error(HQ(),e)}}async function ee(t,n){if(e)try{await u({groupId:e,userId:t,manager:!n})}catch(e){d.error(gXe(),e)}}let te=G7(D,e=>C.has(e.userId)),k=D.filter(e=>C.has(e.userId)).length,A=K7(D,v,X7);async function j(){if(!e||D.length===0)return;let t=D.map(e=>e.userId);try{await l({groupId:e,userIds:t,member:te!==`all`})}catch(e){d.error(HQ(),e)}}return(0,I.jsx)(d1,{open:n,onOpenChange:r,children:(0,I.jsxs)(f1,{className:`oc-access`,children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:wJe({name:t})}),(0,I.jsx)(g1,{children:DJe()})]}),(0,I.jsxs)(Wat,{value:g,onValueChange:_,className:`oc-access__tabs`,children:[(0,I.jsxs)(Kat,{className:`w-full`,children:[(0,I.jsxs)(q7,{value:`members`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Um,{size:13,"aria-hidden":!0}),AJe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:C.size}):null]}),(0,I.jsxs)(q7,{value:`agents`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Im,{size:13,"aria-hidden":!0}),IJe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:E.size}):null]}),(0,I.jsxs)(q7,{value:`charts`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Mm,{size:13,"aria-hidden":!0}),HYe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:i.chartCount}):null]})]}),(0,I.jsx)(J7,{value:`members`,children:o===void 0||i===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:PQ()}):o.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:SYe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(n1,{value:f,onChange:e=>p(e.target.value),placeholder:NJe(),className:`oc-access__search`}),D.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:HJe()}):(0,I.jsxs)(I.Fragment,{children:[D.length>1?(0,I.jsxs)(`div`,{className:`oc-access__row oc-access__selectall`,children:[(0,I.jsx)(E1,{checked:te===`all`?!0:te===`some`?`indeterminate`:!1,onCheckedChange:()=>void j(),"aria-label":NQ()}),(0,I.jsx)(`span`,{className:`oc-access__label`,children:NQ()}),(0,I.jsxs)($,{variant:`outline`,className:`oc-access__count`,children:[k,` / `,D.length]})]}):null,(0,I.jsx)(`div`,{className:`oc-access__list`,children:A.pageItems.map(e=>{let t=C.has(e.userId),n=Hat(e),r=w.has(e.userId);return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(E1,{checked:t,onCheckedChange:()=>void O(e.userId,t),"aria-label":dYe({user:n.primary})}),(0,I.jsxs)(`span`,{className:`oc-access__who`,children:[(0,I.jsx)(`span`,{className:`oc-access__label`,title:n.primary,children:n.primary}),n.secondary?(0,I.jsx)(`span`,{className:`oc-access__sub`,title:n.secondary,children:n.secondary}):null]}),(0,I.jsx)($,{variant:`outline`,className:`oc-access__role`,children:Uat(e.role)}),(0,I.jsx)(`span`,{className:`oc-access__mgrslot`,children:t&&T?(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,className:`shrink-0 oc-access__mgr${r?` oc-access__mgr--on`:``}`,"aria-pressed":r,"aria-label":r?BQ():zQ(),title:r?BQ():zQ(),onClick:()=>void ee(e.userId,r),children:(0,I.jsx)(Lm,{size:15,"aria-hidden":!0})}):t&&r?(0,I.jsx)(`span`,{className:`oc-access__mgr oc-access__mgr--on`,role:`img`,"aria-label":RQ(),title:RQ(),children:(0,I.jsx)(Lm,{size:15,"aria-hidden":!0})}):null})]},e._id)})}),(0,I.jsx)(Z7,{page:A.page,pageCount:A.pageCount,onPage:y})]})]})}),(0,I.jsx)(J7,{value:`agents`,children:a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:PQ()}):a.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:TYe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(n1,{value:m,onChange:e=>h(e.target.value),placeholder:zJe(),className:`oc-access__search`}),(0,I.jsx)(`div`,{className:`oc-access__list`,children:a.map(t=>(0,I.jsx)(Yat,{groupId:e,instanceName:t.name,kind:t.kind??`openclaw`,assigned:E,query:m},`${e}-${t._id}`))})]})}),(0,I.jsx)(J7,{value:`charts`,children:(0,I.jsx)(Xat,{groupId:e})})]})]})})}function Yat({groupId:e,instanceName:t,kind:n,assigned:r,query:i}){let a=P(V.groups.listAssignableAgents,{instanceName:t}),o=F(V.groups.assignAgentToGroup),s=F(V.groups.removeAgentFromGroup),c=F(V.groups.bulkSetGroupAgents),l=C1(),[u,d]=(0,N.useState)(1);if((0,N.useEffect)(()=>{d(1)},[i]),!e)return null;let f=Vat(a?.agents??[],i),p=a?.discovery&&!a.discovery.lastPollOk;if(i.trim()&&f.length===0)return null;let m=f.filter(e=>e.presentInLastOk!==!1),h=G7(m,e=>r.has(`${t}/${e.agentId}`)),g=K7(f,u,X7);async function _(n,r){try{r?await s({groupId:e,instanceName:t,agentId:n}):await o({groupId:e,instanceName:t,agentId:n})}catch(e){l.error(UQ(),e)}}async function v(){if(m.length===0)return;let n=m.map(e=>e.agentId);try{await c({groupId:e,instanceName:t,agentIds:n,assigned:h!==`all`})}catch(e){l.error(UQ(),e)}}return(0,I.jsxs)(`div`,{className:`oc-access__group`,children:[(0,I.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,I.jsx)(Im,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:t}),(0,I.jsx)($,{variant:`outline`,className:`oc-access__kind`,children:n}),p?(0,I.jsx)($,{variant:`outline`,className:`oc-access__stale`,children:PYe()}):null]}),a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:yYe()}):f.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:p?jYe():OYe()}):(0,I.jsxs)(I.Fragment,{children:[m.length>1?(0,I.jsxs)(`div`,{className:`oc-access__row oc-access__selectall`,children:[(0,I.jsx)(E1,{checked:h===`all`?!0:h===`some`?`indeterminate`:!1,onCheckedChange:()=>void v(),"aria-label":NQ()}),(0,I.jsx)(`span`,{className:`oc-access__label`,children:NQ()})]}):null,g.pageItems.map(e=>{let n=`${t}/${e.agentId}`,i=r.has(n),a=e.presentInLastOk===!1;return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(E1,{checked:i,disabled:a&&!i,onCheckedChange:()=>void _(e.agentId,i),"aria-label":mYe({name:e.displayName??e.agentId})}),(0,I.jsxs)(`span`,{className:`oc-access__label`,title:e.displayName??e.agentId,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,I.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,e.isDefaultOnInstance?(0,I.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":FQ(),title:FQ(),children:(0,I.jsx)(zm,{size:14,fill:`currentColor`})}):null,a?(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:LYe()}):null]},e.agentId)}),(0,I.jsx)(Z7,{page:g.page,pageCount:g.pageCount,onPage:d})]})]})}function Xat({groupId:e}){let t=P(V.charts.listGroupChartSelection,e?{groupId:e}:`skip`),n=F(V.charts.assignChartToGroup),r=F(V.charts.removeChartFromGroup),i=F(V.charts.setGroupDefaultChart),a=F(V.charts.addChartToGroupPool),o=F(V.charts.removeChartFromGroupPool),s=C1();if(!e)return null;if(t===void 0)return(0,I.jsx)(`p`,{className:`oc-access__hint`,children:PQ()});let{pool:c,addable:l,canManagePool:u}=t;if(c.length===0&&!u)return(0,I.jsx)(`p`,{className:`oc-access__hint`,children:GYe()});async function d(t,i){try{i?await r({groupId:e,chartKey:t}):await n({groupId:e,chartKey:t})}catch(e){s.error(VQ(),e)}}async function f(t){try{await i({groupId:e,chartKey:t})}catch(e){s.error(VQ(),e)}}async function p(t){try{await a({groupId:e,chartKey:t})}catch(e){s.error(VQ(),e)}}async function m(t){try{await o({groupId:e,chartKey:t})}catch(e){s.error(VQ(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-access__list`,children:c.map(e=>(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(E1,{checked:e.selected,onCheckedChange:()=>void d(e.chartKey,e.selected),"aria-label":nXe({name:e.name})}),(0,I.jsx)(`span`,{className:`oc-access__label`,title:e.name,children:e.name}),e.selected?e.isDefault?(0,I.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":LQ(),title:LQ(),children:(0,I.jsx)(zm,{size:14,fill:`currentColor`})}):(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>void f(e.chartKey),children:sXe()}):null,u?(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":IQ({name:e.name}),title:IQ({name:e.name}),onClick:()=>void m(e.chartKey),children:(0,I.jsx)(Gm,{size:14,"aria-hidden":!0})}):null]},e.chartKey))}),u?l.length>0?(0,I.jsxs)(C3,{value:``,onValueChange:e=>void p(e),children:[(0,I.jsx)(T3,{size:`sm`,className:`oc-access__search`,children:(0,I.jsx)(w3,{placeholder:ZYe()})}),(0,I.jsx)(E3,{children:l.map(e=>(0,I.jsx)(Q,{value:e.chartKey,children:e.name},e.chartKey))})]}):c.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:JYe()}):null:null]})}var Zat=[50,100,200,500],Q7=`all`,$7=`__all__`,Qat=[`2xx`,`4xx`,`5xx`],$at=[`user`,`service`,`system`],eot=[`inbound`,`outbound`,`internal`],tot={kind:`relative`,from:`now-30d`,to:`now`},not=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function rot(){let e=os({from:`/settings/traces`}),t=ss({from:`/settings/traces`}),n=e.limit,r=e.kind,i=e.statusClass??$7,a=e.principalType??$7,o=e.direction??$7,s=e.roleKey??$7,c=e.q??``,l=_7(e.from,e.to),u=(0,N.useMemo)(()=>b7(e.adv),[e.adv]),{from:d,to:f}=e7(l),[p,m]=(0,N.useState)(null),[h,g]=(0,N.useState)(null),_=e=>void t({search:t=>({...t,limit:e})}),v=e=>void t({search:t=>({...t,kind:e})}),y=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),b=e=>void t({search:t=>({...t,statusClass:e===$7?void 0:e})}),x=e=>void t({search:t=>({...t,principalType:e===$7?void 0:e})}),S=e=>void t({search:t=>({...t,direction:e===$7?void 0:e})}),C=e=>void t({search:t=>({...t,roleKey:e===$7?void 0:e})}),w=e=>void t({search:t=>({...t,...v7(e)})}),T=e=>void t({search:t=>({...t,adv:y7(e)}),replace:!0}),E=P(V.observability.listEvents,{limit:n}),D=P(V.observability.listEvents,{limit:n,kind:r===Q7?void 0:r,filter:{q:c||void 0,from:d,to:f,statusClass:i===$7?void 0:i,principalType:a===$7?void 0:a,direction:o===$7?void 0:o,roleKey:s===$7?void 0:s,advanced:u.length>0?u:void 0}}),O=(0,N.useMemo)(()=>{let e=new Set;for(let t of E??[])e.add(t.kind);return[...e].sort()},[E]),ee=(0,N.useMemo)(()=>{let e=new Set;for(let t of E??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[E]),te=c!==``||i!==$7||a!==$7||o!==$7||s!==$7||u.length>0||l.kind!==`relative`||l.from!==tot.from;function k(){t({search:{limit:100,kind:`all`},replace:!0})}let A=p?E?.filter(e=>e.correlationId===p):D;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[LOe(),(0,I.jsx)(`strong`,{children:BOe()}),UOe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:KOe()})]}),(0,I.jsxs)(r7,{q:c,onQChange:y,searchPlaceholder:YOe(),timeRange:l,onTimeRangeChange:w,onReset:k,canReset:te,children:[(0,I.jsxs)(C3,{value:i,onValueChange:b,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(w3,{placeholder:QOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:tke()}),Qat.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(C3,{value:a,onValueChange:x,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(w3,{placeholder:ike()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:ske()}),$at.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(C3,{value:o,onValueChange:S,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(w3,{placeholder:uke()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:pke()}),eot.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(C3,{value:s,onValueChange:C,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{placeholder:gke()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:yke()}),ee.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(C3,{value:r,onValueChange:v,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-44`,children:(0,I.jsx)(w3,{placeholder:Ske()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:Q7,children:Tke()}),O.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(C3,{value:String(n),onValueChange:e=>_(Number(e)),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-28`,children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:Zat.map(e=>(0,I.jsx)(Q,{value:String(e),children:Oke({count:e})},e))})]})]}),(0,I.jsx)(m7,{fields:not,seed:u,onChange:T}),p?(0,I.jsx)(`div`,{className:`oc-traces__followline`,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>m(null),title:jke(),children:[(0,I.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[Pke(),(0,I.jsx)(`code`,{children:e9(p)})]}),(0,I.jsx)(Gm,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`sr-only`,children:Lke()})]})}):null,(0,I.jsx)(k5,{title:Bke(),rows:A,emptyHint:p?Uke():Kke(),columns:[{header:Yke(),sort:e=>e.at,cell:e=>(0,I.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:Qke(),sort:e=>e.kind,cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.kind})},{header:tAe(),sort:e=>t9(e)??null,cell:e=>{let t=t9(e);return t?(0,I.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,I.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":iAe(),children:`✓`})}},{header:sAe(),sort:e=>e.direction,cell:e=>e.direction?(0,I.jsx)($,{variant:`outline`,children:e.direction}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:uAe(),sort:e=>e.principalType,cell:e=>(0,I.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,I.jsx)($,{variant:`outline`,children:e.principalType}),e.principalId?(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e9(e.principalId)}):null]})},{header:pAe(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,I.jsx)($,{variant:`secondary`,children:e.roleKey}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:gAe(),sort:e=>e.route,cell:e=>e.route?(0,I.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,I.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:yAe(),sort:e=>e.status,cell:e=>e.status===null?(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,I.jsx)(`span`,{className:`oc-traces__status ${iot(e.status)}`,children:e.status})},{header:SAe(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,I.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:TAe(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,I.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:OAe(),onClick:()=>m(e.correlationId),children:e9(e.correlationId)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:jAe(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>g(e),children:PAe()}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,I.jsx)(aot,{row:h,onClose:()=>g(null)})]})}function iot(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function e9(e){return e.length>8?e.slice(0,8):e}function t9(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function aot({row:e,onClose:t}){let n=(0,N.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,I.jsx)(d1,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,I.jsxs)(f1,{className:`max-w-lg`,children:[(0,I.jsxs)(p1,{children:[(0,I.jsxs)(h1,{className:`oc-traces__meta-title`,children:[LAe(),` `,(0,I.jsx)(`code`,{children:e.kind}),(0,I.jsx)($,{variant:`outline`,children:BAe()})]}),(0,I.jsx)(g1,{children:UAe()})]}),(0,I.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}function n9({className:e,size:t=`default`,...n}){return(0,I.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:V$(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function r9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-header`,className:V$(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function i9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-title`,className:V$(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function a9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-description`,className:V$(`text-sm text-muted-foreground`,e),...t})}function o9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-content`,className:V$(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function oot({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-footer`,className:V$(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}var s9=[{metric:`api.calls`,label:IIe(),unit:`/h`,group:`API`,isError:!1},{metric:`api.errors`,label:zIe(),unit:`/h`,group:`API`,isError:!0},{metric:`api.latency.avg_ms`,label:HIe(),unit:`ms`,group:`API`,isError:!1},{metric:`openclaw.ingest`,label:GIe(),unit:`/h`,group:`OpenClaw`,isError:!1},{metric:`chat.send`,label:JIe(),unit:`/h`,group:`Chat`,isError:!1},{metric:`assistant.stream.errors`,label:ZIe(),unit:`/h`,group:`Assistant`,isError:!0}],c9=s9.length,sot=[`API`,`OpenClaw`,`Chat`,`Assistant`],cot=1e3,lot=36e5;function uot(e,t){let n=Math.max(1,Math.ceil((t-e)/lot)),r=Math.min(n*c9,cot);return{rowLimit:r,buckets:Math.max(1,Math.floor(r/c9))}}function dot(){let e=os({from:`/settings/kpi`}),t=ss({from:`/settings/kpi`}),n=_7(e.from,e.to,iat,`now`),r=e=>void t({search:t=>({...t,...v7(e)})}),{from:i,to:a}=e7(n),{rowLimit:o,buckets:s}=uot(i,a),c=P(V.kpi.listKpis,{limit:o,filter:{from:i,to:a}}),l=(0,N.useMemo)(()=>{let e=new Map;for(let t of c??[]){let n=e.get(t.metric)??[];n.push({bucket:t.bucket,value:t.value}),e.set(t.metric,n)}for(let[t,n]of e)n.sort((e,t)=>e.bucket<t.bucket?-1:+(e.bucket>t.bucket)),n.length>s&&e.set(t,n.slice(n.length-s));return e},[c,s]),u=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[eLe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:rLe()})]}),(0,I.jsx)(fot,{value:n,onChange:r})]});return c===void 0?(0,I.jsxs)(I.Fragment,{children:[u,(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:oLe()})]}):c.length===0?(0,I.jsxs)(I.Fragment,{children:[u,(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:lLe()})]}):(0,I.jsxs)(I.Fragment,{children:[u,sot.map(e=>{let t=s9.filter(t=>t.group===e);return t.some(e=>(l.get(e.metric)??[]).length>0)?(0,I.jsxs)(`section`,{className:`oc-kpi__group`,children:[(0,I.jsx)(`h2`,{className:`oc-kpi__group-title`,children:e}),(0,I.jsx)(`div`,{className:`oc-kpi__grid`,children:t.map(e=>(0,I.jsx)(pot,{config:e,series:l.get(e.metric)??[]},e.metric))})]},e):null})]})}function fot({value:e,onChange:t}){return(0,I.jsx)(`div`,{className:`oc-kpi__toolbar`,children:(0,I.jsx)(n7,{value:e,onChange:t})})}function pot({config:e,series:t}){let n=t.length>0?t[t.length-1]:null,r=n?n.value:0;return(0,I.jsxs)(n9,{size:`sm`,className:`oc-kpi__card`,children:[(0,I.jsxs)(r9,{children:[(0,I.jsx)(i9,{className:`oc-kpi__card-title`,children:e.label}),(0,I.jsx)(a9,{className:`oc-kpi__card-metric`,children:(0,I.jsx)(`code`,{children:e.metric})})]}),(0,I.jsxs)(o9,{className:`oc-kpi__card-body`,children:[(0,I.jsxs)(`div`,{className:`oc-kpi__value-row`,children:[(0,I.jsx)(`span`,{className:`oc-kpi__value`+(e.isError&&r>0?` oc-kpi__value--error`:``),children:d9(r)}),(0,I.jsx)(`span`,{className:`oc-kpi__unit`,children:e.unit})]}),(0,I.jsx)(hot,{series:t,isError:e.isError,unit:e.unit}),(0,I.jsxs)(`div`,{className:`oc-kpi__axis`,children:[n?(0,I.jsx)(`span`,{className:`oc-kpi__axis-latest`,children:fLe({value:f9(n.bucket)})}):(0,I.jsx)(`span`,{className:`oc-kpi__muted`,children:hLe()}),(0,I.jsx)(`span`,{className:`oc-kpi__muted`,children:vLe({count:t.length})})]})]})]})}var l9=240,u9=48,mot=1;function hot({series:e,isError:t,unit:n}){if(e.length===0)return(0,I.jsx)(`div`,{className:`oc-kpi__chart oc-kpi__chart--empty`,"aria-hidden":!0});let r=e.reduce((e,t)=>t.value>e?t.value:e,0),i=l9/e.length,a=Math.max(i-mot,1);return(0,I.jsx)(`svg`,{className:`oc-kpi__chart`,viewBox:`0 0 ${l9} ${u9}`,preserveAspectRatio:`none`,role:`img`,"aria-label":xLe({max:d9(r),unit:n}),children:e.map((e,o)=>{let s=r>0?e.value/r*(u9-1):0,c=o*i,l=u9-s;return(0,I.jsx)(`rect`,{className:`oc-kpi__bar`+(t&&e.value>0?` oc-kpi__bar--error`:``),x:c,y:l,width:a,height:s,children:(0,I.jsxs)(`title`,{children:[f9(e.bucket),` · `,d9(e.value),` `,n]})},e.bucket)})})}function d9(e){return Number.isFinite(e)?Math.abs(e)>=1e3?(e/1e3).toFixed(e%1e3==0?0:1)+`k`:String(e):`0`}function f9(e){let t=new Date(`${e}:00:00Z`);return Number.isNaN(t.getTime())?e:`${String(t.getUTCDate()).padStart(2,`0`)}/${String(t.getUTCMonth()+1).padStart(2,`0`)} ${String(t.getUTCHours()).padStart(2,`0`)}h`}var p9=`__all__`,got=[{value:`open`},{value:`acknowledged`},{value:`resolved`}];function _ot(e){return e===`open`?qwe():e===`acknowledged`?Xwe():$we()}var vot=[`info`,`warn`,`critical`],yot=[`detector`,`agent`],bot={kind:`relative`,from:`now-30d`,to:`now`},xot=200,m9=`all`;function Sot(){let e=os({from:`/settings/anomalies`}),t=ss({from:`/settings/anomalies`}),n=e.q??``,r=e.status===m9?p9:e.status,i=e.severity??p9,a=e.kind??p9,[o,s]=(0,N.useState)(p9),c=_7(e.from,e.to),{from:l,to:u}=e7(c),d=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),f=e=>void t({search:t=>({...t,status:e===p9?m9:e})}),p=e=>void t({search:t=>({...t,severity:e===p9?void 0:e})}),m=e=>void t({search:t=>({...t,kind:e===p9?void 0:e})}),h=e=>void t({search:t=>({...t,...v7(e)})}),g=y1(),_=C1(),v=F(V.anomalies.resolveAnomaly),y=(P(V.me.getMe,{host:xO})?.permissions??[]).includes(`admin.manage`),b=P(V.anomalies.listAnomalies,{limit:xot,filter:{q:n||void 0,from:l,to:u,anomalyStatus:r===p9?void 0:r,severity:i===p9?void 0:i,source:o===p9?void 0:o,kind:a===p9?void 0:a}}),x=(0,N.useMemo)(()=>{let e=new Set;for(let t of b??[])e.add(t.kind);return[...e].sort()},[b]),S=n!==``||r!==`open`||i!==p9||o!==p9||a!==p9||c.kind!==`relative`||c.from!==bot.from;function C(){s(p9),t({search:{status:`open`},replace:!0})}async function w(e){if(await g({title:nTe(),description:(0,I.jsxs)(I.Fragment,{children:[aTe(),` `,(0,I.jsx)(`span`,{className:`font-mono`,children:e.kind}),` `,cTe(),` `,(0,I.jsx)(`strong`,{children:dTe()}),`.`,` `,mTe()]}),confirmLabel:_Te()}))try{await v({anomalyId:e._id,status:`resolved`}),_.success(bTe(),e.kind)}catch(e){_.error(CTe(),e)}}async function T(e){try{await v({anomalyId:e._id,status:`acknowledged`}),_.success(ETe(),e.kind)}catch(e){_.error(kTe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[MTe(),` `,(0,I.jsx)(`strong`,{children:FTe()}),` `,RTe(),` `,(0,I.jsx)(`strong`,{children:VTe()}),` `,WTe(),` `,(0,I.jsx)(`strong`,{children:qTe()}),` `,XTe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:$Te()})]}),(0,I.jsxs)(r7,{q:n,onQChange:d,searchPlaceholder:nEe(),timeRange:c,onTimeRangeChange:h,onReset:C,canReset:S,children:[(0,I.jsxs)(C3,{value:r,onValueChange:f,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:p9,children:aEe()}),got.map(e=>(0,I.jsx)(Q,{value:e.value,children:_ot(e.value)},e.value))]})]}),(0,I.jsxs)(C3,{value:i,onValueChange:p,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{placeholder:sQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:p9,children:uEe()}),vot.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(C3,{value:o,onValueChange:s,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(w3,{placeholder:cQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:p9,children:hEe()}),yot.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(C3,{value:a,onValueChange:m,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{placeholder:lQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:p9,children:bEe()}),x.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),(0,I.jsx)(k5,{title:CEe(),rows:b,emptyHint:r===`open`?EEe():kEe(),rowActions:e=>y&&e.status===`open`?[{label:MEe(),onSelect:()=>void w(e)},{label:FEe(),onSelect:()=>void T(e)}]:[],columns:[{header:REe(),cell:e=>(0,I.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)}),sort:e=>e.at},{header:lQ(),cell:e=>(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.kind}),sort:e=>e.kind},{header:sQ(),cell:e=>(0,I.jsx)(Tot,{severity:e.severity}),sort:e=>e.severity===`critical`?2:+(e.severity===`warn`)},{header:VEe(),cell:e=>(0,I.jsx)(Eot,{status:e.status}),sort:e=>e.status===`resolved`?2:+(e.status===`acknowledged`)},{header:cQ(),cell:e=>(0,I.jsx)($,{variant:`outline`,children:e.source}),sort:e=>e.source},{header:WEe(),cell:e=>(0,I.jsx)(`span`,{className:`oc-anomaly__msg`,children:e.message}),sort:e=>e.message},{header:qEe(),cell:e=>(0,I.jsx)(wot,{row:e}),sort:e=>e.evidence??null},{header:XEe(),cell:e=>e.correlationId?(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:Dot(e.correlationId)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}),sort:e=>e.correlationId}]})]})}function Cot(e){if(e.kind!==`openclaw.dispatch_failures`||!e.evidence)return{};try{let t=JSON.parse(e.evidence);return{dominantCode:t.dominantCode,sampleCorrelationId:t.sampleCorrelationId}}catch{return{}}}function wot({row:e}){let t=ss(),n=Cot(e);if(!n.dominantCode)return(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`});let r=I5(n.dominantCode),i=n.sampleCorrelationId;return(0,I.jsxs)(`div`,{className:`oc-anomaly__cause`,children:[(0,I.jsxs)(`div`,{className:`oc-anomaly__cause-head`,children:[(0,I.jsx)(`span`,{className:`oc-anomaly__cause-label`,children:r.label}),(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:n.dominantCode})]}),(0,I.jsx)(`p`,{className:`oc-anomaly__cause-hint`,children:r.hint}),i?(0,I.jsxs)(`button`,{type:`button`,className:`oc-anomaly__drill`,onClick:()=>void t({to:`/settings/traces`,search:{q:i,limit:100}}),children:[`↗ `,$Ee()]}):null]})}function Tot({severity:e}){return(0,I.jsx)(`span`,{className:`oc-anomaly__sev oc-anomaly__sev--${e}`,children:e})}function Eot({status:e}){return e===`open`?(0,I.jsx)($,{variant:`destructive`,children:nDe()}):e===`acknowledged`?(0,I.jsx)($,{variant:`secondary`,children:aDe()}):(0,I.jsx)($,{variant:`outline`,children:cDe()})}function Dot(e){return e.length>8?e.slice(0,8):e}function Oot(){let e=P(V.integrations.status.status,{}),t=F(V.admin.setIntegrationConfig),[n,r]=(0,N.useState)(null);if((0,N.useEffect)(()=>{e&&n===null&&r(e.config)},[e,n]),!e||!n)return(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:JJ()});let i=n,a=(e,t,n)=>r({...i,[e]:{...i[e],[t]:n}}),o=(e,n)=>void t({[e]:n});return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[ZJ(),` `,(0,I.jsx)(`strong`,{children:eY()}),` `,rY()]}),(0,I.jsxs)(h9,{title:`Langfuse`,status:e.langfuse.configured?e.langfuse.enabled?(0,I.jsx)($,{variant:`secondary`,children:oY()}):(0,I.jsx)($,{variant:`outline`,children:lY()}):(0,I.jsx)($,{variant:`outline`,children:fY()}),note:vY(),children:[(0,I.jsx)(g9,{label:wY(),children:(0,I.jsx)(n1,{value:i.langfuse.host??``,placeholder:e.langfuse.effectiveHost,onChange:e=>a(`langfuse`,`host`,e.target.value),onBlur:()=>o(`langfuse`,{host:i.langfuse.host??``})})}),(0,I.jsx)(_9,{label:IY(),checked:i.langfuse.enabled??!0,onChange:e=>{a(`langfuse`,`enabled`,e),o(`langfuse`,{enabled:e})}})]}),(0,I.jsxs)(h9,{title:`Opik`,status:e.opik.configured?e.opik.enabled?(0,I.jsx)($,{variant:`secondary`,children:oY()}):(0,I.jsx)($,{variant:`outline`,children:lY()}):(0,I.jsx)($,{variant:`outline`,children:fY()}),note:xY(),children:[(0,I.jsx)(g9,{label:DY(),children:(0,I.jsx)(n1,{value:i.opik.baseUrl??``,placeholder:e.opik.effectiveBaseUrl,onChange:e=>a(`opik`,`baseUrl`,e.target.value),onBlur:()=>o(`opik`,{baseUrl:i.opik.baseUrl??``})})}),(0,I.jsx)(g9,{label:AY(),children:(0,I.jsx)(n1,{value:i.opik.workspace??``,placeholder:e.opik.effectiveWorkspace||NY(),onChange:e=>a(`opik`,`workspace`,e.target.value),onBlur:()=>o(`opik`,{workspace:i.opik.workspace??``})})}),(0,I.jsx)(_9,{label:IY(),checked:i.opik.enabled??!0,onChange:e=>{a(`opik`,`enabled`,e),o(`opik`,{enabled:e})}})]}),(0,I.jsxs)(h9,{title:zY(),status:(0,I.jsx)($,{variant:`outline`,children:hY()}),note:HY(),children:[(0,I.jsx)(g9,{label:GY(),children:(0,I.jsx)(v9,{value:i.tts.auto??`off`,options:[[`off`,JY()],[`always`,ZY()],[`inbound`,eX()],[`tagged`,rX()]],onChange:e=>{a(`tts`,`auto`,e),o(`tts`,{auto:e})}})}),(0,I.jsx)(g9,{label:oX(),children:(0,I.jsx)(v9,{value:i.tts.provider??`openai`,options:[[`openai`,`OpenAI`],[`elevenlabs`,`ElevenLabs`],[`microsoft`,lX()],[`azure`,`Azure Speech`],[`google`,`Google Gemini`]],onChange:e=>{a(`tts`,`provider`,e),o(`tts`,{provider:e})}})}),(0,I.jsx)(g9,{label:fX(),children:(0,I.jsx)(n1,{value:i.tts.model??``,placeholder:`eleven_multilingual_v2`,onChange:e=>a(`tts`,`model`,e.target.value),onBlur:()=>o(`tts`,{model:i.tts.model??``})})}),(0,I.jsx)(g9,{label:hX(),children:(0,I.jsx)(n1,{value:i.tts.voice??``,placeholder:vX(),onChange:e=>a(`tts`,`voice`,e.target.value),onBlur:()=>o(`tts`,{voice:i.tts.voice??``})})})]}),(0,I.jsxs)(h9,{title:xX(),status:(0,I.jsx)($,{variant:`outline`,children:hY()}),note:e.secrets.openai?wX():DX(),children:[(0,I.jsx)(_9,{label:AX(),checked:i.talk.enabled??!1,onChange:e=>{a(`talk`,`enabled`,e),o(`talk`,{enabled:e})}}),(0,I.jsx)(g9,{label:NX(),children:(0,I.jsx)(v9,{value:i.talk.realtimeProvider??`openai`,options:[[`openai`,`OpenAI (gpt-realtime)`],[`google`,`Google`]],onChange:e=>{a(`talk`,`realtimeProvider`,e),o(`talk`,{realtimeProvider:e})}})}),(0,I.jsx)(g9,{label:IX(),children:(0,I.jsx)(n1,{value:i.talk.realtimeModel??``,placeholder:`gpt-realtime-2`,onChange:e=>a(`talk`,`realtimeModel`,e.target.value),onBlur:()=>o(`talk`,{realtimeModel:i.talk.realtimeModel??``})})}),(0,I.jsx)(g9,{label:hX(),children:(0,I.jsx)(n1,{value:i.talk.voice??``,placeholder:`cedar / marin`,onChange:e=>a(`talk`,`voice`,e.target.value),onBlur:()=>o(`talk`,{voice:i.talk.voice??``})})}),(0,I.jsx)(g9,{label:zX(),children:(0,I.jsx)(v9,{value:i.talk.transport??`webrtc`,options:[[`webrtc`,HX()],[`provider-websocket`,`Provider WebSocket`],[`gateway-relay`,`Gateway relay`]],onChange:e=>{a(`talk`,`transport`,e),o(`talk`,{transport:e})}})}),(0,I.jsx)(g9,{label:GX(),children:(0,I.jsx)(n1,{value:i.talk.speechLocale??``,placeholder:`fr-CA`,onChange:e=>a(`talk`,`speechLocale`,e.target.value),onBlur:()=>o(`talk`,{speechLocale:i.talk.speechLocale??``})})}),(0,I.jsx)(_9,{label:JX(),checked:i.talk.interruptOnSpeech??!0,onChange:e=>{a(`talk`,`interruptOnSpeech`,e),o(`talk`,{interruptOnSpeech:e})}})]}),(0,I.jsxs)(`section`,{className:`oc-int__section`,children:[(0,I.jsxs)(`div`,{className:`oc-int__section-head`,children:[(0,I.jsx)(`h3`,{className:`oc-uipa__h`,children:ZX()}),(0,I.jsx)($,{variant:`outline`,children:eZ()})]}),(0,I.jsxs)(`p`,{className:`oc-uipa__note`,children:[rZ(),(0,I.jsx)(`code`,{children:` voicewake.get/set`}),`.`]})]}),(0,I.jsx)(k5,{title:oZ(),rows:e.cursors.map(e=>({...e,_id:e.vendor})),emptyHint:lZ(),columns:[{header:fZ(),cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.vendor}),sort:e=>e.vendor},{header:hZ(),cell:e=>e.lastAt>0?new Date(e.lastAt).toLocaleString(`fr-FR`):`—`,sort:e=>e.lastAt>0?e.lastAt:null},{header:vZ(),cell:e=>String(e.failureCount),sort:e=>e.failureCount},{header:xZ(),cell:e=>e.lastErrorStatus??`—`,sort:e=>e.lastErrorStatus??null},{header:wZ(),cell:e=>e.lastError??`—`,sort:e=>e.lastError??null}]})]})}function h9({title:e,status:t,note:n,children:r}){return(0,I.jsxs)(`section`,{className:`oc-int__section`,children:[(0,I.jsxs)(`div`,{className:`oc-int__section-head`,children:[(0,I.jsx)(`h3`,{className:`oc-uipa__h`,children:e}),t]}),n?(0,I.jsx)(`p`,{className:`oc-uipa__note`,children:n}):null,(0,I.jsx)(`div`,{className:`oc-int__fields`,children:r})]})}function g9({label:e,children:t}){return(0,I.jsxs)(`label`,{className:`oc-int__field`,children:[(0,I.jsx)(`span`,{className:`oc-int__field-label`,children:e}),t]})}function _9({label:e,checked:t,onChange:n}){return(0,I.jsxs)(`label`,{className:`oc-int__toggle`,children:[(0,I.jsx)(E1,{checked:t,onCheckedChange:e=>n(e===!0)}),(0,I.jsx)(`span`,{children:e})]})}function v9({value:e,options:t,onChange:n}){return(0,I.jsxs)(C3,{value:e,onValueChange:n,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-full`,children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:t.map(([e,t])=>(0,I.jsx)(Q,{value:e,children:t},e))})]})}var kot={altered_words:()=>DZ(),incorrect:()=>AZ(),incoherence:()=>NZ(),formatting:()=>IZ(),latency:()=>zZ(),api_error:()=>HZ(),other:()=>yfe()},y9=e=>kot[e]?.()??e;function b9({matches:e,sourceWasOpen:t}){return t?e===!0?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-ok`,children:Tfe()}):e===!1?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-warn`,children:Ofe()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:`—`}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:Sfe()})}function Aot({data:e,closeReason:t}){let n=e.snapshot,r=F(V.feedback.respondToFeedback),[i,a]=(0,N.useState)(e.thread),[o,s]=(0,N.useState)(``),[c,l]=(0,N.useState)(!1);async function u(){let t=o.trim();if(!(!t||c)){l(!0);try{await r({feedbackId:e._id,text:t}),a(e=>[...e,{authorRole:`admin`,text:t,at:Date.now()}]),s(``)}finally{l(!1)}}}let d=[];try{d=n.contextJson?JSON.parse(n.contextJson):[]}catch{d=[]}return(0,I.jsxs)(`div`,{className:`oc-fbadmin__detail`,children:[(0,I.jsxs)(`div`,{className:`oc-fbadmin__row`,children:[(0,I.jsx)(b9,{matches:n.displayedMatchesStored,sourceWasOpen:n.clientInfo?.sourceWasOpen??!1}),(0,I.jsxs)(`span`,{className:`oc-fbadmin__meta`,children:[y9(e.category),` · `,n.messageRole,n.isRegeneration?` · ${jfe()}`:``,n.openclawModel?` · ${n.openclawModel}`:``,n.openclawRuntime?` (${n.openclawRuntime})`:``]})]}),e.comment?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Pfe()}),(0,I.jsx)(`p`,{className:`oc-fbadmin__comment`,children:e.comment})]}):null,t?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:zme()}),(0,I.jsx)(`p`,{className:`oc-fbadmin__comment`,children:t})]}):null,(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Lfe()}),i.length>0?(0,I.jsx)(`div`,{className:`oc-fbadmin__thread`,children:i.map((e,t)=>(0,I.jsxs)(`div`,{className:`oc-notif__msg oc-notif__msg--${e.authorRole}`,children:[(0,I.jsx)(`span`,{className:`oc-notif__msg-who`,children:e.authorRole===`admin`?Bfe():Ufe()}),(0,I.jsx)(`span`,{className:`oc-notif__msg-text`,children:e.text})]},t))}):(0,I.jsx)(`p`,{className:`oc-fbadmin__meta`,children:Kfe()}),(0,I.jsx)(`textarea`,{className:`oc-feedback__textarea`,placeholder:Yfe(),value:o,maxLength:2e3,rows:3,onChange:e=>s(e.target.value.slice(0,2e3))}),(0,I.jsx)(`div`,{className:`oc-fbadmin__row`,style:{justifyContent:`flex-end`},children:(0,I.jsx)(X,{size:`sm`,onClick:()=>void u(),disabled:!o.trim()||c,children:c?Qfe():tpe()})})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:ipe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.messageText||WZ()})]}),n.clientInfo?.sourceWasOpen&&n.displayedText!==void 0?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:lpe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.displayedText||WZ()})]}):null,n.promptText?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:fpe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.promptText})]}):null,d.length>0?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:hpe({count:n.contextCount??d.length,truncated:n.contextTruncated?vpe():``})}),(0,I.jsx)(`div`,{className:`oc-fbadmin__ctx`,children:d.map((e,t)=>(0,I.jsxs)(`div`,{className:`oc-fbadmin__ctx-turn`,children:[(0,I.jsx)(`span`,{className:`oc-fbadmin__ctx-role`,children:e.role}),(0,I.jsx)(`span`,{className:`oc-fbadmin__ctx-text`,children:e.text})]},t))})]}):null,n.outboxAvailable?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:xpe()}),(0,I.jsxs)(`pre`,{className:`oc-msg__source-pre`,children:[n.outboxText??``,n.outboxStatus?`\n[status: ${n.outboxStatus}]`:``]})]}):null,n.clientInfo?.extensionsDetected&&n.clientInfo.extensionsDetected.length>0?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:wpe()}),(0,I.jsx)(`div`,{className:`oc-fbadmin__row`,children:n.clientInfo.extensionsDetected.map(e=>(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-warn`,children:e},e))})]}):null,(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Dpe()}),(0,I.jsxs)(`p`,{className:`oc-fbadmin__env`,children:[[n.clientInfo?.language,n.clientInfo?.timezone,n.clientInfo?.theme?Ape({theme:n.clientInfo.theme}):null,n.runId?`run ${n.runId.slice(0,12)}…`:null].filter(Boolean).join(` · `)||`—`,n.clientInfo?.plugins&&n.clientInfo.plugins.length>0?(0,I.jsxs)(`span`,{className:`oc-fbadmin__plugins`,children:[Npe(),` `,n.clientInfo.plugins.join(`, `),(0,I.jsxs)(`span`,{className:`oc-fbadmin__note`,children:[` `,Ipe()]})]}):null,n.clientInfo?.userAgent?(0,I.jsx)(`span`,{className:`oc-fbadmin__ua`,children:n.clientInfo.userAgent}):null]})]})]})}function jot(){let e=P(V.feedback.listForAdmin,{}),t=F(V.feedback.readSnapshot),n=F(V.feedback.deleteFeedback),r=y1(),[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)({});async function c(e){if(i===e._id){a(null);return}if(!o[e._id]){let n=await t({feedbackId:e._id});s(t=>({...t,[e._id]:n}))}a(e._id)}async function l(e){await r({title:Zme(),description:ehe(),confirmLabel:rhe(),destructive:!0})&&(await n({feedbackId:e._id}),i===e._id&&a(null))}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[zpe(),` `,(0,I.jsx)(`strong`,{children:Hpe()}),` `,Gpe()]}),(0,I.jsx)(k5,{title:Jpe(),rows:e,emptyHint:Zpe(),isExpanded:e=>i===e._id&&!!o[e._id],renderExpanded:e=>o[e._id]?(0,I.jsx)(Aot,{data:o[e._id],closeReason:e.userCloseReason}):null,columns:[{header:eme(),cell:e=>new Date(e.at).toLocaleString(`fr-FR`),sort:e=>e.at},{header:rme(),cell:e=>y9(e.category),sort:e=>y9(e.category)},{header:ome(),cell:e=>e.messageRole===`user`?lme():fme(),sort:e=>e.messageRole},{header:hme(),cell:e=>(e.reporterEmail||e.reporterName||`—`)+(e.impersonated&&e.realOperatorEmail?` ${vme({operator:e.realOperatorEmail})}`:``),sort:e=>e.reporterEmail||e.reporterName||null},{header:xme(),cell:e=>(0,I.jsx)(b9,{matches:e.displayedMatchesStored,sourceWasOpen:e.sourceWasOpen}),sort:e=>e.displayedMatchesStored===!1?0:e.displayedMatchesStored===!0?1:2},{header:wme(),cell:e=>e.hasComment?`✎`:`—`,sort:e=>+!!e.hasComment},{header:Dme(),cell:e=>e.userClosedAt==null?e.answered?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-ok`,children:Ame()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:Nme()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-closed`,children:Ime()}),sort:e=>e.userClosedAt==null?+!!e.answered:2}],rowActions:e=>[{label:i===e._id?Hme():Gme(),onSelect:()=>void c(e)},{label:Jme(),onSelect:()=>void l(e),variant:`destructive`}]})]})}var x9=`all`;function S9(e){switch(e){case`image`:return IA();case`audio`:return zA();case`video`:return HA();case`pdf`:return GA();case`document`:return JA();case`archive`:return ZA();default:return ej()}}function Mot(){let[e,t]=(0,N.useState)(x9),[n,r]=(0,N.useState)(x9),[i,a]=(0,N.useState)(x9),[o,s]=(0,N.useState)(x9),[c,l]=(0,N.useState)(null),u=F(V.files.softDelete),d=C1();function f(){t(x9),r(x9),a(x9),s(x9)}async function p(){let e=c;if(l(null),e)try{await u({fileId:e.id}),d.success(Nj())}catch(e){d.error(Ij(),e)}}let m=P(V.files.listMine,{direction:e===x9?void 0:e,chatId:n===x9?void 0:n,instanceName:i===x9?void 0:i,category:o===x9?void 0:o}),h=(0,N.useMemo)(()=>new Intl.DateTimeFormat(q(),{dateStyle:`medium`,timeStyle:`short`}),[]);if(m===void 0)return(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()});let{files:g,facets:_,truncated:v,cap:y}=m,b=e!==x9||n!==x9||i!==x9||o!==x9;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:rA()}),(0,I.jsxs)(`div`,{className:`oc-files__filters`,style:{display:`flex`,flexWrap:`wrap`,gap:8,margin:`12px 0`},children:[(0,I.jsxs)(C3,{value:e,onValueChange:t,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":oA(),children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:x9,children:lA()}),(0,I.jsx)(Q,{value:`inbound`,children:fA()}),(0,I.jsx)(Q,{value:`outbound`,children:hA()})]})]}),(0,I.jsxs)(C3,{value:n,onValueChange:r,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":vA(),children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:x9,children:xA()}),_.chats.map(e=>(0,I.jsx)(Q,{value:e.id,children:e.title},e.id))]})]}),_.multiProvider?(0,I.jsxs)(C3,{value:i,onValueChange:a,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":wA(),children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:x9,children:DA()}),_.instances.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}):null,(0,I.jsxs)(C3,{value:o,onValueChange:s,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":AA(),children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:x9,children:NA()}),_.categories.map(e=>(0,I.jsx)(Q,{value:e,children:S9(e)},e))]})]}),b?(0,I.jsxs)(X,{variant:`ghost`,size:`sm`,onClick:f,style:{display:`inline-flex`,alignItems:`center`,gap:4,marginLeft:`auto`},children:[(0,I.jsx)(Pm,{size:14,"aria-hidden":!0}),wj()]}):null]}),g.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:b?Zj():Jj()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(C5,{children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[(0,I.jsx)(D5,{children:rj()}),(0,I.jsx)(D5,{children:oj()}),(0,I.jsx)(D5,{children:lj()}),(0,I.jsx)(D5,{children:fj()}),(0,I.jsx)(D5,{children:hj()}),(0,I.jsx)(D5,{className:`text-right`,children:vj()})]})}),(0,I.jsx)(T5,{children:g.map(e=>(0,I.jsxs)(E5,{children:[(0,I.jsx)(O5,{className:`font-medium`,style:{maxWidth:280,overflow:`hidden`,textOverflow:`ellipsis`},title:e.filename,children:e.filename}),(0,I.jsx)(O5,{title:e.mimeType,children:S9(e.category)}),(0,I.jsx)(O5,{children:(0,I.jsx)($,{variant:`secondary`,children:e.direction===`inbound`?fA():hA()})}),(0,I.jsx)(O5,{style:{maxWidth:220,overflow:`hidden`,textOverflow:`ellipsis`},title:e.chatTitle,children:e.chatTitle}),(0,I.jsx)(O5,{className:`whitespace-nowrap text-muted-foreground`,children:h.format(e.createdAt)}),(0,I.jsx)(O5,{className:`text-right`,children:(0,I.jsxs)(H$,{children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":Dj(),children:(0,I.jsx)(ym,{size:16})})}),(0,I.jsxs)(W$,{align:`end`,children:[e.url?(0,I.jsx)(G$,{asChild:!0,children:(0,I.jsxs)(`a`,{href:e.url,download:e.filename,target:`_blank`,rel:`noopener noreferrer`,children:[(0,I.jsx)(vm,{size:14}),xj()]})}):(0,I.jsxs)(G$,{disabled:!0,children:[(0,I.jsx)(vm,{size:14}),Gj()]}),(0,I.jsxs)(G$,{variant:`destructive`,onSelect:()=>l({id:e._id,filename:e.filename}),children:[(0,I.jsx)(Bm,{size:14}),Aj()]})]})]})})]},e._id))})]}),v?(0,I.jsx)(`p`,{className:`oc-admin__hint`,style:{marginTop:8},children:eM({cap:y})}):null]}),(0,I.jsx)(r1,{open:c!==null,onOpenChange:e=>!e&&l(null),children:(0,I.jsxs)(i1,{children:[(0,I.jsxs)(a1,{children:[(0,I.jsx)(s1,{children:zj()}),(0,I.jsx)(c1,{children:Hj()})]}),(0,I.jsxs)(o1,{children:[(0,I.jsx)(u1,{children:fW()}),(0,I.jsx)(l1,{onClick:()=>void p(),children:Aj()})]})]})})]})}var C9=2e4,w9=6e4;function Not(e){return typeof e!=`number`||e<=0?0:Math.round(e/C9*100)}function Pot(e){return e<=0?0:Math.round(e/w9*100)}function T9(e,t){let n=(typeof e==`number`&&e>0?e:0)/1e3;return new Intl.NumberFormat(t,{minimumFractionDigits:1,maximumFractionDigits:1}).format(n)}function E9(e){return e.reduce((e,t)=>e+(typeof t.size==`number`&&t.size>0?t.size:0),0)}var D9=3;function Fot(e,t){let n=new Map;for(let t of e.split(`
|
|
162
|
+
`},gnt={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function _nt(e){let{announcements:t=gnt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=hnt}=e,{announce:a,announcement:o}=fnt(),s=_6(`DndLiveRegion`),[c,l]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{l(!0)},[]),pnt((0,N.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=N.createElement(N.Fragment,null,N.createElement(unt,{id:r,value:i.draggable}),N.createElement(dnt,{id:s,announcement:o}));return n?(0,ls.createPortal)(u,n):u}var E6;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(E6||={});function D6(){}function O6(e,t){return(0,N.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function k6(){var e=[...arguments];return(0,N.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var A6=Object.freeze({x:0,y:0});function j6(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function vnt(e,t){let n=S6(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function M6(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ynt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function N6(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function P6(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function F6(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var bnt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=F6(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=j6(F6(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(M6)},I6=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=N6(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=N6(r),o=i.reduce((e,t,r)=>e+j6(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(M6)};function xnt(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Snt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=xnt(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(ynt)};function Cnt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function L6(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:A6}function wnt(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Tnt=wnt(1);function R6(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Ent(e,t,n){let r=R6(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Dnt={ignoreTransform:!1};function z6(e,t){t===void 0&&(t=Dnt);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=a6(e).getComputedStyle(e);t&&(n=Ent(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function B6(e){return z6(e,{ignoreTransform:!0})}function Ont(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function knt(e,t){return t===void 0&&(t=a6(e).getComputedStyle(e)),t.position===`fixed`}function Ant(e,t){t===void 0&&(t=a6(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function V6(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(o6(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!s6(i)||c6(i)||n.includes(i))return n;let a=a6(e).getComputedStyle(i);return i!==e&&Ant(i,a)&&n.push(i),knt(i,a)?n:r(i.parentNode)}return e?r(e):n}function H6(e){let[t]=V6(e,1);return t??null}function U6(e){return!n6||!e?null:r6(e)?e:i6(e)?o6(e)||e===l6(e).scrollingElement?window:s6(e)?e:null:null}function W6(e){return r6(e)?e.scrollX:e.scrollLeft}function G6(e){return r6(e)?e.scrollY:e.scrollTop}function K6(e){return{x:W6(e),y:G6(e)}}var q6;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(q6||={});function J6(e){return!n6||!e?!1:e===document.scrollingElement}function Y6(e){let t={x:0,y:0},n=J6(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var jnt={x:.2,y:.2};function Mnt(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=jnt);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=Y6(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=q6.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=q6.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=q6.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=q6.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function Nnt(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function X6(e){return e.reduce((e,t)=>y6(e,K6(t)),A6)}function Pnt(e){return e.reduce((e,t)=>e+W6(t),0)}function Fnt(e){return e.reduce((e,t)=>e+G6(t),0)}function Z6(e,t){if(t===void 0&&(t=z6),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);H6(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Int=[[`x`,[`left`,`right`],Pnt],[`y`,[`top`,`bottom`],Fnt]],Q6=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=V6(t),r=X6(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Int)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},$6=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Lnt(e){let{EventTarget:t}=a6(e);return e instanceof t?e:l6(e)}function e8(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var t8;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(t8||={});function n8(e){e.preventDefault()}function Rnt(e){e.stopPropagation()}var r8;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(r8||={});var i8={start:[r8.Space,r8.Enter],cancel:[r8.Esc],end:[r8.Space,r8.Enter,r8.Tab]},znt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case r8.Right:return{...n,x:n.x+25};case r8.Left:return{...n,x:n.x-25};case r8.Down:return{...n,y:n.y+25};case r8.Up:return{...n,y:n.y-25}}},a8=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new $6(l6(t)),this.windowListeners=new $6(a6(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(t8.Resize,this.handleCancel),this.windowListeners.add(t8.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(t8.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Z6(n),t(A6)}handleKeyDown(e){if(x6(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=i8,coordinateGetter:a=znt,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:A6;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=b6(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=Y6(n),p=Nnt(n),m={x:Math.min(i===r8.Right?p.right-p.width/2:p.right,Math.max(i===r8.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===r8.Down?p.bottom-p.height/2:p.bottom,Math.max(i===r8.Down?p.top:p.top+p.height/2,u.y))},h=i===r8.Right&&!s||i===r8.Left&&!c,g=i===r8.Down&&!l||i===r8.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===r8.Right&&e<=d.x||i===r8.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===r8.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===r8.Down&&e<=d.y||i===r8.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===r8.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,y6(b6(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};a8.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=i8,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function o8(e){return!!(e&&`distance`in e)}function s8(e){return!!(e&&`delay`in e)}var c8=class{constructor(e,t,n){n===void 0&&(n=Lnt(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=l6(i),this.documentListeners=new $6(this.document),this.listeners=new $6(n),this.windowListeners=new $6(a6(i)),this.initialCoordinates=S6(r)??A6,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(t8.Resize,this.handleCancel),this.windowListeners.add(t8.DragStart,n8),this.windowListeners.add(t8.VisibilityChange,this.handleCancel),this.windowListeners.add(t8.ContextMenu,n8),this.documentListeners.add(t8.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(s8(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(o8(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(t8.Click,Rnt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(t8.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=S6(e)??A6,s=b6(n,o);if(!t&&a){if(o8(a)){if(a.tolerance!=null&&e8(s,a.tolerance))return this.handleCancel();if(e8(s,a.distance))return this.handleStart()}if(s8(a)&&e8(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===r8.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},Bnt={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},l8=class extends c8{constructor(e){let{event:t}=e,n=l6(t.target);super(e,Bnt,n)}};l8.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var Vnt={move:{name:`mousemove`},end:{name:`mouseup`}},u8;(function(e){e[e.RightClick=2]=`RightClick`})(u8||={});var Hnt=class extends c8{constructor(e){super(e,Vnt,l6(e.event.target))}};Hnt.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===u8.RightClick?!1:(r?.({event:n}),!0)}}];var d8={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},Unt=class extends c8{constructor(e){super(e,d8)}static setup(){return window.addEventListener(d8.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(d8.move.name,e)};function e(){}}};Unt.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var f8;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(f8||={});var p8;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(p8||={});function Wnt(e){let{acceleration:t,activator:n=f8.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=p8.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=Knt({delta:d,disabled:!a}),[m,h]=ant(),g=(0,N.useRef)({x:0,y:0}),_=(0,N.useRef)({x:0,y:0}),v=(0,N.useMemo)(()=>{switch(n){case f8.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case f8.DraggableRect:return i}},[n,i,c]),y=(0,N.useRef)(null),b=(0,N.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,N.useMemo)(()=>s===p8.TreeOrder?[...l].reverse():l,[s,l]);(0,N.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=Mnt(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var Gnt={x:{[q6.Backward]:!1,[q6.Forward]:!1},y:{[q6.Backward]:!1,[q6.Forward]:!1}};function Knt(e){let{delta:t,disabled:n}=e,r=h6(t);return p6(e=>{if(n||!r||!e)return Gnt;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[q6.Backward]:e.x[q6.Backward]||i.x===-1,[q6.Forward]:e.x[q6.Forward]||i.x===1},y:{[q6.Backward]:e.y[q6.Backward]||i.y===-1,[q6.Forward]:e.y[q6.Forward]||i.y===1}}},[n,t,r])}function qnt(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return p6(e=>t==null?null:r??e??null,[r,t])}function Jnt(e,t){return(0,N.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var m8;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(m8||={});var h8;(function(e){e.Optimized=`optimized`})(h8||={});var g8=new Map;function Ynt(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,N.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,N.useRef)(e),d=g(),f=f6(d),p=(0,N.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,N.useRef)(null),h=p6(t=>{if(d&&!n)return g8;if(!t||t===g8||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Q6(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,N.useEffect)(()=>{u.current=e},[e]),(0,N.useEffect)(()=>{d||p()},[n,d]),(0,N.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,N.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case m8.Always:return!1;case m8.BeforeDragging:return n;default:return!n}}}function _8(e,t){return p6(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function Xnt(e,t){return _8(e,t)}function Znt(e){let{callback:t,disabled:n}=e,r=d6(t),i=(0,N.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,N.useEffect)(()=>()=>i?.disconnect(),[i]),i}function v8(e){let{callback:t,disabled:n}=e,r=d6(t),i=(0,N.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,N.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Qnt(e){return new Q6(z6(e),e)}function y8(e,t,n){t===void 0&&(t=Qnt);let[r,i]=(0,N.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Znt({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=v8({callback:a});return u6(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function $nt(e){return L6(e,_8(e))}var b8=[];function ert(e){let t=(0,N.useRef)(e),n=p6(n=>e?n&&n!==b8&&e&&t.current&&e.parentNode===t.current.parentNode?n:V6(e):b8,[e]);return(0,N.useEffect)(()=>{t.current=e},[e]),n}function trt(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(e),i=(0,N.useCallback)(e=>{let t=U6(e.target);t&&n(e=>e?(e.set(t,K6(t)),new Map(e)):null)},[]);return(0,N.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=U6(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,K6(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{U6(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,N.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>y6(e,t),A6):X6(e):A6,[e,t])}function x8(e,t){t===void 0&&(t=[]);let n=(0,N.useRef)(null);return(0,N.useEffect)(()=>{n.current=null},t),(0,N.useEffect)(()=>{let t=e!==A6;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?b6(e,n.current):A6}function nrt(e){(0,N.useEffect)(()=>{if(!n6)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function rrt(e,t){return(0,N.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function S8(e){return(0,N.useMemo)(()=>e?Ont(e):null,[e])}var C8=[];function irt(e,t){t===void 0&&(t=z6);let[n]=e,r=S8(n?a6(n):null),[i,a]=(0,N.useState)(C8);function o(){a(()=>e.length?e.map(e=>J6(e)?r:new Q6(t(e),e)):C8)}let s=v8({callback:o});return u6(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function w8(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return s6(t)?t:e}function art(e){let{measure:t}=e,[n,r]=(0,N.useState)(null),i=v8({callback:(0,N.useCallback)(e=>{for(let{target:n}of e)if(s6(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=m6((0,N.useCallback)(e=>{let n=w8(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,N.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var ort=[{sensor:l8,options:{}},{sensor:a8,options:{}}],srt={current:{}},T8={draggable:{measure:B6},droppable:{measure:B6,strategy:m8.WhileDragging,frequency:h8.Optimized},dragOverlay:{measure:z6}},E8=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},crt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new E8,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:D6},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:T8,measureDroppableContainers:D6,windowRect:null,measuringScheduled:!1},D8={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:D6,draggableNodes:new Map,over:null,measureDroppableContainers:D6},O8=(0,N.createContext)(D8),k8=(0,N.createContext)(crt);function lrt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new E8}}}function urt(e,t){switch(t.type){case E6.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case E6.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case E6.DragEnd:case E6.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case E6.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new E8(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case E6.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new E8(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case E6.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new E8(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function drt(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,N.useContext)(O8),a=h6(r),o=h6(n?.id);return(0,N.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!x6(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=cnt(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function A8(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function frt(e){return(0,N.useMemo)(()=>({draggable:{...T8.draggable,...e?.draggable},droppable:{...T8.droppable,...e?.droppable},dragOverlay:{...T8.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function prt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,N.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;u6(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=L6(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=H6(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var j8=(0,N.createContext)({...A6,scaleX:1,scaleY:1}),M8;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(M8||={});var N8=(0,N.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=ort,collisionDetection:o=Snt,measuring:s,modifiers:c,...l}=e,[u,d]=(0,N.useReducer)(urt,void 0,lrt),[f,p]=mnt(),[m,h]=(0,N.useState)(M8.Uninitialized),g=m===M8.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,N.useRef)({initial:null,translated:null}),C=(0,N.useMemo)(()=>_==null?null:{id:_,data:x?.data??srt,rect:S},[_,x]),w=(0,N.useRef)(null),[T,E]=(0,N.useState)(null),[D,O]=(0,N.useState)(null),ee=f6(l,Object.values(l)),te=_6(`DndDescribedBy`,t),k=(0,N.useMemo)(()=>b.getEnabled(),[b]),A=frt(s),{droppableRects:j,measureDroppableContainers:ne,measuringScheduled:re}=Ynt(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),M=qnt(v,_),ie=(0,N.useMemo)(()=>D?S6(D):null,[D]),ae=Ie(),oe=Xnt(M,A.draggable.measure);prt({activeNode:_==null?null:v.get(_),config:ae.layoutShiftCompensation,initialRect:oe,measure:A.draggable.measure});let se=y8(M,A.draggable.measure,oe),ce=y8(M?M.parentElement:null),le=(0,N.useRef)({activatorEvent:null,active:null,activeNode:M,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ue=b.getNodeFor(le.current.over?.id),de=art({measure:A.dragOverlay.measure}),fe=de.nodeRef.current??M,pe=g?de.rect??se:null,me=!!(de.nodeRef.current&&de.rect),he=$nt(me?null:se),ge=S8(fe?a6(fe):null),_e=ert(g?ue??M:null),ve=irt(_e),ye=A8(c,{transform:{x:y.x-he.x,y:y.y-he.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:se,containerNodeRect:ce,draggingNodeRect:pe,over:le.current.over,overlayNodeRect:de.rect,scrollableAncestors:_e,scrollableAncestorRects:ve,windowRect:ge}),be=ie?y6(ie,y):null,xe=trt(_e),Se=x8(xe),Ce=x8(xe,[se]),we=y6(ye,Se),Te=pe?Tnt(pe,ye):null,Ee=C&&Te?o({active:C,collisionRect:Te,droppableRects:j,droppableContainers:k,pointerCoordinates:be}):null,De=P6(Ee,`id`),[Oe,ke]=(0,N.useState)(null),Ae=Cnt(me?ye:y6(ye,Ce),Oe?.rect??null,se),je=(0,N.useRef)(null),Me=(0,N.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent;je.current=new n({active:w.current,activeNode:i,event:a,options:r,context:le,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=ee.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=ee.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=ee.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,ls.unstable_batchedUpdates)(()=>{r?.(i),h(M8.Initializing),d({type:E6.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(je.current),O(a)})},onMove(e){d({type:E6.DragMove,coordinates:e})},onEnd:o(E6.DragEnd),onCancel:o(E6.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=le.current,o=null;if(t&&i){let{cancelDrop:s}=ee.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===E6.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=E6.DragCancel)}w.current=null,(0,ls.unstable_batchedUpdates)(()=>{d({type:e}),h(M8.Uninitialized),ke(null),E(null),O(null),je.current=null;let t=e===E6.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=ee.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),Ne=Jnt(a,(0,N.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,Me(n,t))},[v,Me]));nrt(a),u6(()=>{se&&m===M8.Initializing&&h(M8.Initialized)},[se,m]),(0,N.useEffect)(()=>{let{onDragMove:e}=ee.current,{active:t,activatorEvent:n,collisions:r,over:i}=le.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:we.x,y:we.y},over:i};(0,ls.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[we.x,we.y]),(0,N.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=le.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=ee.current,o=r.get(De),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,ls.unstable_batchedUpdates)(()=>{ke(s),a?.(c),f({type:`onDragOver`,event:c})})},[De]),u6(()=>{le.current={activatorEvent:D,active:C,activeNode:M,collisionRect:Te,collisions:Ee,droppableRects:j,draggableNodes:v,draggingNode:fe,draggingNodeRect:pe,droppableContainers:b,over:Oe,scrollableAncestors:_e,scrollAdjustedTranslate:we},S.current={initial:pe,translated:Te}},[C,M,Ee,Te,v,fe,pe,j,b,Oe,_e,we]),Wnt({...ae,delta:y,draggingRect:Te,pointerCoordinates:be,scrollableAncestors:_e,scrollableAncestorRects:ve});let Pe=(0,N.useMemo)(()=>({active:C,activeNode:M,activeNodeRect:se,activatorEvent:D,collisions:Ee,containerNodeRect:ce,dragOverlay:de,draggableNodes:v,droppableContainers:b,droppableRects:j,over:Oe,measureDroppableContainers:ne,scrollableAncestors:_e,scrollableAncestorRects:ve,measuringConfiguration:A,measuringScheduled:re,windowRect:ge}),[C,M,se,D,Ee,ce,de,v,b,j,Oe,ne,_e,ve,A,re,ge]),Fe=(0,N.useMemo)(()=>({activatorEvent:D,activators:Ne,active:C,activeNodeRect:se,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:v,over:Oe,measureDroppableContainers:ne}),[D,Ne,C,se,d,te,v,Oe,ne]);return N.createElement(T6.Provider,{value:p},N.createElement(O8.Provider,{value:Fe},N.createElement(k8.Provider,{value:Pe},N.createElement(j8.Provider,{value:Ae},i)),N.createElement(drt,{disabled:n?.restoreFocus===!1})),N.createElement(_nt,{...n,hiddenTextDescribedById:te}));function Ie(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),mrt=(0,N.createContext)(null),P8=`button`,hrt=`Draggable`;function grt(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=_6(hrt),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,N.useContext)(O8),{role:p=P8,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,N.useContext)(g?j8:mrt),[v,y]=m6(),[b,x]=m6(),S=rrt(o,t),C=f6(n);return u6(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,N.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===P8?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function F8(){return(0,N.useContext)(k8)}var _rt=`Droppable`,vrt={timeout:25};function I8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=_6(_rt),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,N.useContext)(O8),u=(0,N.useRef)({disabled:n}),d=(0,N.useRef)(!1),f=(0,N.useRef)(null),p=(0,N.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...vrt,...i},_=f6(h??r),v=v8({callback:(0,N.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=m6((0,N.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=f6(t);return(0,N.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,N.useEffect)(()=>(s({type:E6.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:E6.UnregisterDroppable,key:a,id:r})),[r]),(0,N.useEffect)(()=>{n!==u.current.disabled&&(s({type:E6.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function yrt(e){let{animation:t,children:n}=e,[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),s=h6(n);return!n&&!r&&s&&i(s),u6(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),N.createElement(N.Fragment,null,n,r?(0,N.cloneElement)(r,{ref:o}):null)}var brt={x:0,y:0,scaleX:1,scaleY:1};function xrt(e){let{children:t}=e;return N.createElement(O8.Provider,{value:D8},N.createElement(j8.Provider,{value:brt},t))}var Srt={position:`fixed`,touchAction:`none`},Crt=e=>x6(e)?`transform 250ms ease`:void 0,wrt=(0,N.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=Crt}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...Srt,width:s.width,height:s.height,top:s.top,left:s.left,transform:C6.Transform.toString(d),transformOrigin:i&&r?vnt(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return N.createElement(n,{className:o,style:f,ref:t},a)}),Trt={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:C6.Transform.toString(t)},{transform:C6.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function Ert(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return d6((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=w8(a);if(!c)return;let{transform:l}=a6(a).getComputedStyle(a),u=R6(l);if(!u)return;let d=typeof t==`function`?t:Drt(t);return Z6(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function Drt(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Trt,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var L8=0;function Ort(e){return(0,N.useMemo)(()=>{if(e!=null)return L8++,L8},[e])}var krt=N.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=F8(),S=(0,N.useContext)(j8),C=Ort(d?.id),w=A8(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=_8(f),E=Ert({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return N.createElement(xrt,null,N.createElement(yrt,{animation:E},d&&C?N.createElement(wrt,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))}),Art=e=>{let{transform:t}=e;return{...t,y:0}};function jrt(e,t,n){let r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}var Mrt=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e,i=r[0];return!t||!i?n:jrt(n,t,i)},Nrt=e=>{let{transform:t}=e;return{...t,x:0}};function R8(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Prt(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function z8(e){return e!==null&&e>=0}function Frt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Irt(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var B8={scaleX:1,scaleY:1},Lrt=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=Rrt(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...B8}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...B8}:a<r&&a>=i?{x:o.width+s,y:0,...B8}:{x:0,y:0,...B8}};function Rrt(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var V8=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=R8(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},H8={scaleX:1,scaleY:1},zrt=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...H8}:null}let s=Brt(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...H8}:r<t&&r>=a?{x:0,y:o.height+s,...H8}:{x:0,y:0,...H8}};function Brt(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var U8=`Sortable`,W8=N.createContext({activeIndex:-1,containerId:U8,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:V8,disabled:{draggable:!1,droppable:!1}});function G8(e){let{children:t,id:n,items:r,strategy:i=V8,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=F8(),d=_6(U8,n),f=s.rect!==null,p=(0,N.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,N.useRef)(p),v=!Frt(p,_.current),y=g!==-1&&h===-1||v,b=Irt(a);u6(()=>{v&&m&&u(p)},[v,p,m,u]),(0,N.useEffect)(()=>{_.current=p},[p]);let x=(0,N.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:Prt(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return N.createElement(W8.Provider,{value:x},t)}var Vrt=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return R8(n,r,i).indexOf(t)},Hrt=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Urt={duration:200,easing:`ease`},K8=`transform`,Wrt=C6.Transition.toString({property:K8,duration:0,easing:`linear`}),Grt={roleDescription:`sortable`};function Krt(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,N.useState)(null),s=(0,N.useRef)(n);return u6(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=z6(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,N.useEffect)(()=>{a&&o(null)},[a]),a}function q8(e){let{animateLayoutChanges:t=Hrt,attributes:n,disabled:r,data:i,getNewIndex:a=Vrt,id:o,strategy:s,resizeObserverConfig:c,transition:l=Urt}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,N.useContext)(W8),y=qrt(r,p),b=u.indexOf(o),x=(0,N.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,N.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=I8({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:O,activeNodeRect:ee,attributes:te,setNodeRef:k,listeners:A,isDragging:j,over:ne,setActivatorNodeRef:re,transform:M}=grt({id:o,data:x,attributes:{...Grt,...n},disabled:y.draggable}),ie=int(E,k),ae=!!D,oe=ae&&!m&&z8(f)&&z8(g),se=!_&&j,ce=oe?(se&&oe?M:null)??(s??v)({rects:h,activeNodeRect:ee,activeIndex:f,overIndex:g,index:b}):null,le=z8(f)&&z8(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ue=D?.id,de=(0,N.useRef)({activeId:ue,items:u,newIndex:le,containerId:d}),fe=u!==de.current.items,pe=t({active:D,containerId:d,isDragging:j,isSorting:ae,id:o,index:b,items:u,newIndex:de.current.newIndex,previousItems:de.current.items,previousContainerId:de.current.containerId,transition:l,wasDragging:de.current.activeId!=null}),me=Krt({disabled:!pe,index:b,node:w,rect:C});return(0,N.useEffect)(()=>{ae&&de.current.newIndex!==le&&(de.current.newIndex=le),d!==de.current.containerId&&(de.current.containerId=d),u!==de.current.items&&(de.current.items=u)},[ae,le,d,u]),(0,N.useEffect)(()=>{if(ue===de.current.activeId)return;if(ue!=null&&de.current.activeId==null){de.current.activeId=ue;return}let e=setTimeout(()=>{de.current.activeId=ue},50);return()=>clearTimeout(e)},[ue]),{active:D,activeIndex:f,attributes:te,data:x,rect:C,index:b,newIndex:le,items:u,isOver:T,isSorting:ae,isDragging:j,listeners:A,node:w,overIndex:g,over:ne,setNodeRef:ie,setActivatorNodeRef:re,setDroppableNodeRef:E,setDraggableNodeRef:k,transform:me??ce,transition:he()};function he(){if(me||fe&&de.current.newIndex===b)return Wrt;if(!(se&&!x6(O)||!l)&&(ae||pe))return C6.Transition.toString({...l,property:K8})}}function qrt(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function J8(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var Jrt=[r8.Down,r8.Right,r8.Up,r8.Left],Y8=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(Jrt.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case r8.Down:r.top<a.top&&t.push(n);break;case r8.Up:r.top>a.top&&t.push(n);break;case r8.Left:r.left>a.left&&t.push(n);break;case r8.Right:r.left<a.left&&t.push(n);break}});let c=I6({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=P6(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=V6(c).some((e,t)=>s[t]!==e),i=X8(e,t),a=Yrt(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:b6(u,l)}}}};function X8(e,t){return!J8(e)||!J8(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Yrt(e,t){return!J8(e)||!J8(t)||!X8(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Z8({open:e,onOpenChange:t,title:n,description:r,children:i,onSubmit:a,submitLabel:o=`Enregistrer`,submitting:s=!1,canSubmit:c=!0}){let[l,u]=(0,N.useState)(!1),d=s||l;async function f(){if(!(!c||d))try{u(!0),await a()}finally{u(!1)}}return(0,I.jsx)(G1,{open:e,onOpenChange:t,children:(0,I.jsxs)(K1,{side:`right`,className:`w-4/5 sm:max-w-none gap-0 p-0`,children:[(0,I.jsxs)(q1,{className:`border-b px-6 py-4`,children:[(0,I.jsx)(Y1,{children:n}),r?(0,I.jsx)(X1,{children:r}):null]}),(0,I.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:e=>{e.preventDefault(),f()},children:[(0,I.jsx)(`div`,{className:`oc-sheet__body flex-1 overflow-y-auto px-6 py-4`,children:i}),(0,I.jsxs)(J1,{className:`border-t px-6 py-4`,children:[(0,I.jsxs)(X,{type:`submit`,disabled:!c||d,children:[d?(0,I.jsx)(Cm,{className:`size-4 animate-spin`}):null,o]}),(0,I.jsx)(X,{type:`button`,variant:`ghost`,onClick:()=>t(!1),children:`Annuler`})]})]})]})})}var Q8=6e4,$8=60*Q8,e5=24*$8,t5=7*e5,n5=30*e5,r5=365*e5;function Xrt(e,t){let n=t-e;if(n<Q8)return`maintenant`;if(n<$8)return`${Math.floor(n/Q8)}min`;if(n<e5)return`${Math.floor(n/$8)}h`;if(n<t5)return`${Math.floor(n/e5)}j`;if(n<n5)return`${Math.floor(n/t5)}sem`;if(n<r5)return`${Math.floor(n/n5)}mois`;let r=Math.floor(n/r5);return`${r}an${r>1?`s`:``}`}var i5=[{value:`red`,hue:`oklch(0.63 0.21 25)`},{value:`orange`,hue:`oklch(0.7 0.17 50)`},{value:`amber`,hue:`oklch(0.8 0.15 85)`},{value:`green`,hue:`oklch(0.7 0.16 150)`},{value:`teal`,hue:`oklch(0.7 0.12 190)`},{value:`blue`,hue:`oklch(0.62 0.19 250)`},{value:`violet`,hue:`oklch(0.6 0.2 300)`},{value:`pink`,hue:`oklch(0.7 0.2 350)`}],a5=e=>i5.find(t=>t.value===e)?.hue??null,o5=`project:none`,Zrt=e=>`project:${e}`,s5=`oc.noproject.collapsed`;function Qrt({activeChatId:e,onSelect:t,onNewChat:n,newChatShortcut:r}){let i=P(V.messages.listChats,{}),a=P(V.projects.listProjects,{}),o=P(V.me.getMe,{host:xO})?.ui?.effective,s=o?.showChatProvider??!0,c=o?.showChatAge??!0,l=new Set((i??[]).map(e=>e.providerKind).filter(e=>e!=null)),u=s&&l.size>1,[,d]=(0,N.useState)(0);(0,N.useEffect)(()=>{if(!c)return;let e=window.setInterval(()=>d(e=>e+1),6e4);return()=>window.clearInterval(e)},[c]);let f=F(V.projects.createProject),p=F(V.projects.setProjectCollapsed),m=F(V.chats.reorderChat),h=F(V.chats.moveChatToProject),g=y1(),_=mRe(),v=(0,N.useRef)(null),y=(0,N.useRef)(null),b=(0,N.useRef)(null),[x,S]=(0,N.useState)(`full`);(0,N.useLayoutEffect)(()=>{let e=v.current;if(!e)return;let t=()=>{let t=e.clientWidth,n=y.current?.offsetWidth??0,r=b.current?.offsetWidth??0,i=n===0||t>=n?`full`:t>=r?`label`:`icon`;S(e=>e===i?e:i)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[_,r]);let[C,w]=(0,N.useState)(null),T=(0,N.useRef)(!1);(0,N.useEffect)(()=>{!T.current&&i&&w(i)},[i]);let E=C??i??[],[D,O]=(0,N.useState)(null),[ee,te]=(0,N.useState)(()=>localStorage.getItem(s5)===`1`);function k(){te(e=>(localStorage.setItem(s5,e?`0`:`1`),!e))}let A=k6(O6(l8,{activationConstraint:{distance:4}}),O6(a8,{coordinateGetter:Y8})),j=E.filter(e=>e.pinned),ne=E.filter(e=>!e.pinned),re=e=>ne.filter(t=>(t.projectId??null)===e);function M(e){return E.find(t=>t._id===e)}async function ie(e){O(null);let{active:t,over:n}=e;if(!n)return;let r=M(String(t.id));if(!r)return;let i=String(n.id);if(i.startsWith(`project:`)){let e=i===o5?null:i.slice(8);if((r.projectId??null)===e)return;T.current=!0,w(t=>(t??E).map(t=>t._id===r._id?{...t,projectId:e}:t));try{await h({chatId:r._id,projectId:e})}finally{T.current=!1}return}let a=M(i);if(!a||t.id===n.id)return;if((a.projectId??null)!==(r.projectId??null)||a.pinned!==r.pinned){if(r.pinned||a.pinned)return;T.current=!0,w(e=>(e??E).map(e=>e._id===r._id?{...e,projectId:a.projectId??null}:e));try{await h({chatId:r._id,projectId:a.projectId??null})}finally{T.current=!1}return}let o=a.pinned?j:re(a.projectId??null),s=o.map(e=>e._id),c=s.indexOf(r._id),l=s.indexOf(a._id);if(c<0||l<0)return;let u=[...o];u.splice(c,1),u.splice(l,0,r);let d=u[l-1]??null,f=u[l+1]??null;T.current=!0,w(e=>[...(e??E).filter(e=>!o.some(t=>t._id===e._id)),...u]);try{await m({chatId:r._id,prevKey:d?d.sortKey:null,nextKey:f?f.sortKey:null})}finally{T.current=!1}}let ae=D?M(D):null;return(0,I.jsxs)(`aside`,{className:`oc-sidebar`,children:[(0,I.jsxs)(`div`,{className:`oc-sidebar__top`,ref:v,children:[(0,I.jsxs)(X,{className:x===`icon`?`oc-newchat flex-1 justify-center`:`oc-newchat flex-1 justify-start`,onClick:n,title:`${_} (${r})`,"aria-label":_,children:[(0,I.jsx)(Nm,{}),x===`icon`?null:(0,I.jsx)(`span`,{className:`oc-newchat__label`,children:_}),x===`full`?(0,I.jsx)(`kbd`,{className:`oc-newchat__kbd`,"aria-hidden":!0,children:r}):null]}),(0,I.jsx)(`div`,{className:`oc-newchat-ghost`,"aria-hidden":!0,children:(0,I.jsxs)(`div`,{className:`oc-newchat-ghost__row`,ref:y,children:[(0,I.jsxs)(X,{className:`oc-newchat justify-start`,tabIndex:-1,children:[(0,I.jsx)(Nm,{}),(0,I.jsx)(`span`,{className:`oc-newchat__label`,children:_}),(0,I.jsx)(`kbd`,{className:`oc-newchat__kbd`,children:r})]}),(0,I.jsx)(X,{variant:`outline`,size:`icon`,tabIndex:-1,children:(0,I.jsx)(xm,{})})]})}),(0,I.jsx)(`div`,{className:`oc-newchat-ghost`,"aria-hidden":!0,children:(0,I.jsxs)(`div`,{className:`oc-newchat-ghost__row`,ref:b,children:[(0,I.jsxs)(X,{className:`oc-newchat justify-start`,tabIndex:-1,children:[(0,I.jsx)(Nm,{}),(0,I.jsx)(`span`,{className:`oc-newchat__label`,children:_})]}),(0,I.jsx)(X,{variant:`outline`,size:`icon`,tabIndex:-1,children:(0,I.jsx)(xm,{})})]})}),(0,I.jsx)(X,{className:`oc-newproject`,variant:`outline`,size:`icon`,"aria-label":bQ(),title:bQ(),onClick:async()=>{let e=await g({title:bQ(),label:yRe(),placeholder:SRe(),confirmLabel:TRe()});e&&await f({name:e})},children:(0,I.jsx)(xm,{})})]}),(0,I.jsxs)(N8,{sensors:A,collisionDetection:I6,modifiers:[Nrt,Mrt],onDragStart:e=>O(e.active.id),onDragCancel:()=>O(null),onDragEnd:ie,children:[(0,I.jsxs)(`div`,{className:`oc-sidebar__scroll`,children:[j.length>0?(0,I.jsx)(c5,{label:ORe(),chats:j,children:j.map(n=>(0,I.jsx)(u5,{chat:n,active:n._id===e,projects:a??[],onSelect:t,showProviderBadge:u},n._id))}):null,(a??[]).map(n=>{let r=re(n._id);return(0,I.jsx)(c5,{label:n.name,dropId:Zrt(n._id),projectId:n._id,chats:r,collapsible:!0,collapsed:n.collapsed,onToggle:()=>void p({projectId:n._id,collapsed:!n.collapsed}),children:n.collapsed?null:r.length===0?(0,I.jsx)(`div`,{className:`oc-sidebar__empty`,children:jRe()}):r.map(n=>(0,I.jsx)(u5,{chat:n,active:n._id===e,projects:a??[],onSelect:t,showProviderBadge:u},n._id))},n._id)}),(0,I.jsx)(c5,{label:PRe(),dropId:o5,chats:re(null),collapsible:!0,collapsed:ee,onToggle:k,children:ee?null:re(null).map(n=>(0,I.jsx)(u5,{chat:n,active:n._id===e,projects:a??[],onSelect:t,showProviderBadge:u},n._id))})]}),(0,I.jsx)(krt,{children:ae?(0,I.jsxs)(`div`,{className:`oc-chatitem oc-chatitem--overlay`,children:[(0,I.jsx)(Sm,{className:`size-3.5 opacity-60`}),a5(ae.color)?(0,I.jsx)(`span`,{className:`oc-chatitem__dot`,style:{background:a5(ae.color)}}):(0,I.jsx)(`span`,{className:`oc-chatitem__dot oc-chatitem__dot--empty`}),(0,I.jsx)(`span`,{className:`oc-chatitem__label`,children:ae.title||xQ()})]}):null})]})]})}function c5({label:e,dropId:t,projectId:n,chats:r,collapsible:i,collapsed:a,onToggle:o,children:s}){let c=F(V.projects.deleteProject),l=v1(),u=P(V.projects.projectChatCount,n?{projectId:n}:`skip`),{setNodeRef:d,isOver:f}=I8({id:t??`static:${e}`});return(0,I.jsxs)(`div`,{ref:t?d:void 0,className:`oc-sidebar__group`+(f?` oc-sidebar__group--over`:``),children:[(0,I.jsxs)(`div`,{className:`oc-sidebar__group-head`+(i?` oc-sidebar__group-head--btn`:``),...i?{role:`button`,tabIndex:0,onClick:o,onKeyDown:e=>{i&&o&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),o())}}:{},children:[i?a?(0,I.jsx)(fm,{className:`size-3.5`}):(0,I.jsx)(dm,{className:`size-3.5`}):null,(0,I.jsx)(`span`,{className:`oc-sidebar__group-label`,children:e}),n?(0,I.jsx)(`button`,{className:`oc-sidebar__group-del`,"aria-label":CQ(),onClick:async t=>{t.stopPropagation();let r=u??0;await l({title:URe({name:e}),description:r>0?KRe({count:r}):YRe(),confirmWord:wQ(),confirmLabel:CQ(),destructive:!0})&&await c({projectId:n})},children:(0,I.jsx)(Bm,{className:`size-3.5`})}):null]}),(0,I.jsx)(G8,{items:r.map(e=>e._id),strategy:zrt,children:s})]})}var l5={openclaw:`OpenClaw`,hermes:`Hermes`};function u5({chat:e,active:t,projects:n,onSelect:r,showProviderBadge:i}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u}=q8({id:e._id}),d=F(V.chats.renameChat),f=F(V.chats.deleteChat),p=F(V.chats.pinChat),m=F(V.chats.setChatColor),h=P(V.me.getMe,{host:xO})?.ui?.effective?.showChatAge??!0,g=v1(),[_,v]=(0,N.useState)(!1),[y,b]=(0,N.useState)(e.title??``),x={transform:C6.Transform.toString(c),transition:l,opacity:+!u},S=a5(e.color);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{ref:s,style:x,className:`oc-chatitem group/row`+(t?` oc-chatitem--active`:``),children:[(0,I.jsx)(`button`,{className:`oc-chatitem__grip`,"aria-label":eze(),...a,...o,children:(0,I.jsx)(Sm,{className:`size-3.5`})}),S?(0,I.jsx)(`span`,{className:`oc-chatitem__dot`,style:{background:S}}):(0,I.jsx)(`span`,{className:`oc-chatitem__dot oc-chatitem__dot--empty`}),(0,I.jsx)(`button`,{className:`oc-chatitem__label`,onClick:()=>r(e._id),children:e.title||xQ()}),e.readOnly?(0,I.jsx)(`span`,{className:`oc-chatitem__readonly`,title:SQ(),children:(0,I.jsx)(wm,{size:12,"aria-label":SQ()})}):null,i&&e.providerKind?(0,I.jsx)(`span`,{className:`oc-chatitem__bridge oc-chatitem__bridge--${e.providerKind} group-hover/row:opacity-0 group-focus-within/row:opacity-0`,title:Dze({provider:l5[e.providerKind]}),children:l5[e.providerKind]}):null,h?(0,I.jsx)(`span`,{className:`oc-chatitem__age group-hover/row:opacity-0 group-focus-within/row:opacity-0`,title:new Date(e.updatedAt).toLocaleString(`fr-FR`),children:Xrt(e.updatedAt,Date.now())}):null,(0,I.jsxs)(V$,{children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon-xs`,"aria-label":rze(),className:`opacity-0 group-hover/row:opacity-100 group-focus-within/row:opacity-100 aria-expanded:opacity-100`,children:(0,I.jsx)(ym,{})})}),(0,I.jsxs)(U$,{align:`end`,className:`w-48`,children:[(0,I.jsxs)(W$,{onSelect:()=>{b(e.title??``),v(!0)},children:[(0,I.jsx)(Pee,{}),` `,oze()]}),(0,I.jsxs)(W$,{onSelect:()=>void p({chatId:e._id,pinned:!e.pinned}),children:[e.pinned?(0,I.jsx)(Iee,{}):(0,I.jsx)(Fee,{}),e.pinned?lze():fze()]}),(0,I.jsx)(G$,{children:hze()}),(0,I.jsxs)(`div`,{className:`oc-colorgrid`,onClick:e=>e.stopPropagation(),children:[(0,I.jsx)(`button`,{className:`oc-colorgrid__none`,onClick:()=>void m({chatId:e._id,color:null}),"aria-label":vze(),children:`✕`}),i5.map(t=>(0,I.jsx)(`button`,{className:`oc-colorgrid__dot`+(e.color===t.value?` is-selected`:``),style:{background:t.hue},"aria-label":t.value,onClick:()=>void m({chatId:e._id,color:t.value})},t.value))]}),(0,I.jsx)(K$,{}),(0,I.jsxs)(W$,{variant:`destructive`,onSelect:()=>{requestAnimationFrame(async()=>{await g({title:xze(),description:wze(),confirmLabel:wQ(),destructive:!0})&&await f({chatId:e._id})})},children:[(0,I.jsx)(Bm,{}),` `,wQ()]})]})]})]}),(0,I.jsx)(Z8,{open:_,onOpenChange:v,title:Aze(),canSubmit:y.trim().length>0,onSubmit:async()=>{await d({chatId:e._id,title:y.trim()}),v(!1)},children:(0,I.jsx)(`div`,{className:`oc-form`,children:(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Nze()}),(0,I.jsx)(t1,{value:y,onChange:e=>b(e.target.value),autoFocus:!0})]})})})]})}var $rt=$$(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function $({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,I.jsx)(n?Cy:`span`,{"data-slot":`badge`,"data-variant":t,className:B$($rt({variant:t}),e),...r})}function eit(e){let t=new Map;for(let n of e){let e=t.get(n.instanceName);e||(e={instanceName:n.instanceName,kind:n.kind,agents:[]},t.set(n.instanceName,e)),e.agents.push(n)}let n=e=>(e.displayName??e.agentId).toLowerCase();for(let e of t.values())e.agents.sort((e,t)=>e.isDefault===t.isDefault?n(e).localeCompare(n(t)):e.isDefault?-1:1);let r=[...t.values()],i=e=>e.agents.some(e=>e.isDefault);return r.sort((e,t)=>i(e)===i(t)?e.instanceName.localeCompare(t.instanceName):i(e)?-1:1),r}function tit(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>[e.displayName,e.agentId,e.instanceName,e.model].filter(Boolean).some(e=>e.toLowerCase().includes(n))):e}function nit({open:e,onOpenChange:t,agents:n,onPick:r}){let[i,a]=(0,N.useState)(``),o=(0,N.useMemo)(()=>eit(tit(n??[],i)),[n,i]);return(0,I.jsx)(u1,{open:e,onOpenChange:t,children:(0,I.jsxs)(d1,{className:`oc-agentpicker`,children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:RVe()}),(0,I.jsx)(h1,{children:VVe()})]}),n===void 0?(0,I.jsx)(`p`,{className:`oc-agentpicker__hint`,children:WVe()}):n.length===0?(0,I.jsx)(`p`,{className:`oc-agentpicker__hint`,children:qVe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(t1,{autoFocus:!0,value:i,onChange:e=>a(e.target.value),placeholder:XVe(),className:`oc-agentpicker__search`,"aria-label":$Ve()}),(0,I.jsx)(`div`,{className:`oc-agentpicker__list`,role:`listbox`,children:o.map(e=>(0,I.jsxs)(`div`,{className:`oc-agentpicker__group`,children:[(0,I.jsxs)(`div`,{className:`oc-agentpicker__instance`,children:[(0,I.jsx)(Im,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:e.instanceName}),(0,I.jsx)($,{variant:`outline`,className:`oc-agentpicker__kind`,children:e.kind})]}),e.agents.map(e=>(0,I.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":!1,className:`oc-agentpicker__item`,onClick:()=>r(e.instanceName,e.agentId),disabled:e.state===`deleted`,title:e.state===`deleted`?nHe():void 0,children:[(0,I.jsx)(lm,{size:15,"aria-hidden":!0,className:`oc-agentpicker__icon`}),(0,I.jsxs)(`span`,{className:`oc-agentpicker__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,I.jsx)(`span`,{className:`oc-agentpicker__model`,children:e.model}):null,e.isDefault?(0,I.jsx)(zm,{size:13,"aria-label":aHe(),className:`oc-agentpicker__default`}):null]},`${e.instanceName}/${e.agentId}`))]},e.instanceName))})]})]})})}function rit(e){let t=F(V.chats.createChat),n=P(V.agents.listMyAgents),[r,i]=(0,N.useState)(!1),a=(0,N.useCallback)(async(n,r)=>{e(await t({title:`New chat`,instanceName:n,agentId:r}))},[t,e]);return{startNewChat:(0,N.useCallback)(async()=>{let e=n;if(e&&e.length===1&&e[0].state!==`deleted`){await a(e[0].instanceName,e[0].agentId);return}i(!0)},[n,a]),picker:(0,I.jsx)(nit,{open:r,onOpenChange:i,agents:n,onPick:(e,t)=>{i(!1),a(e,t)}})}}var d5=[`admin`,`user`,`pending`];function f5(){let e=P(V.me.authProviders)?.anonymous===!0,[t,n]=(0,N.useState)(!1),r=P(V.dev.listUsersDev,e?{}:`skip`),i=P(V.me.getImpersonation),a=F(V.dev.setMyRole),o=F(V.dev.setRole),s=F(V.admin.startImpersonation),c=F(V.admin.stopImpersonation);if(!e)return null;let l=r?.find(e=>e.isMe),u=l?.role===`admin`,d=i?.impersonating===!0,f=(r??[]).filter(e=>!e.isMe);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-devfab`,onClick:()=>n(!0),title:ELe(),children:[(0,I.jsx)(Wm,{size:13}),`DEV`]}),(0,I.jsx)(u1,{open:t,onOpenChange:n,children:(0,I.jsxs)(d1,{children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:kLe()}),(0,I.jsx)(h1,{children:MLe()})]}),(0,I.jsxs)(`div`,{className:`oc-devsw__me`,children:[(0,I.jsxs)(`span`,{className:`oc-devsw__melabel`,children:[FLe({canonical:l?.canonical??`…`}),` `,(0,I.jsx)($,{variant:`outline`,children:l?.role??`…`})]}),(0,I.jsx)(`div`,{className:`oc-devsw__roles`,children:d5.map(e=>(0,I.jsx)(X,{type:`button`,size:`xs`,variant:l?.role===e?`secondary`:`ghost`,disabled:l?.role===e,onClick:()=>void a({role:e}),children:e===`admin`?RLe():e===`user`?VLe():WLe()},e))})]}),d?(0,I.jsxs)(`div`,{className:`oc-devsw__imp`,children:[qLe(),` `,(0,I.jsx)(`strong`,{children:i.targetLabel}),`.`,(0,I.jsx)(X,{type:`button`,size:`xs`,variant:`outline`,onClick:()=>void c(),children:XLe()})]}):null,(0,I.jsx)(`div`,{className:`oc-devsw__list`,children:f.length===0?(0,I.jsx)(`p`,{className:`oc-devsw__empty`,children:$Le()}):f.map(e=>(0,I.jsxs)(`div`,{className:`oc-devsw__row`,children:[(0,I.jsx)(`span`,{className:`oc-devsw__label`,children:e.name||e.email||e.canonical||e.userId.slice(0,8)}),(0,I.jsx)(`select`,{className:`oc-devsw__select`,value:e.role,disabled:!e.canonical,onChange:t=>e.canonical&&void o({canonical:e.canonical,role:t.target.value}),children:d5.map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))}),(0,I.jsx)(X,{type:`button`,size:`xs`,variant:`ghost`,disabled:!u||e.role===`pending`,title:u?e.role===`pending`?aRe():cRe():nRe(),onClick:()=>{s({profileId:e.profileId}),n(!1)},children:dRe()})]},e.profileId))})]})})]})}function p5({label:e,mode:t,minimal:n=!1}){let{signOut:r}=Ir(),i=F(V.me.setThemeMode).withOptimisticUpdate((e,{mode:t})=>{let n=e.getQuery(V.me.getMe,{host:xO});if(!n)return;let r=t===null?n.defaultThemeMode??`system`:t;e.setQuery(V.me.getMe,{host:xO},{...n,themeMode:t,resolvedThemeMode:r})}),a=t??`default`;return(0,I.jsxs)(V$,{children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsxs)(X,{variant:`ghost`,size:`sm`,className:`gap-1.5`,children:[e,(0,I.jsx)(dm,{className:`opacity-60`})]})}),(0,I.jsx)(U$,{align:`end`,className:`w-52`,children:n?(0,I.jsxs)(W$,{onClick:()=>void r(),children:[(0,I.jsx)(Tm,{}),` `,lk()]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(G$,{children:JO()}),(0,I.jsxs)(y4e,{value:a,onValueChange:e=>void i({mode:e==="default"?null:e}),children:[(0,I.jsxs)(q$,{value:`light`,children:[(0,I.jsx)(Bee,{}),` `,ZO()]}),(0,I.jsxs)(q$,{value:`dark`,children:[(0,I.jsx)(Am,{}),` `,ek()]}),(0,I.jsxs)(q$,{value:`system`,children:[(0,I.jsx)(km,{}),` `,rk()]}),(0,I.jsx)(q$,{value:`default`,children:ok()})]}),(0,I.jsx)(K$,{}),(0,I.jsxs)(W$,{onClick:()=>void r(),children:[(0,I.jsx)(Tm,{}),` `,lk()]})]})})]})}var iit={altered_words:()=>bGe(),incorrect:()=>CGe(),incoherence:()=>EGe(),formatting:()=>kGe(),latency:()=>MGe(),api_error:()=>FGe(),other:()=>RGe()},ait=e=>iit[e]?.()??e,oit={anomaly_open:Vm,anomaly_resolved:gm,feedback_reply:Em};function sit(e){return e.kind===`feedback_reply`?{title:mGe(),body:_Ge()}:{title:e.title,body:e.body}}function m5(){let e=P(V.notifications.myUnreadCount)??0,t=P(V.notifications.myNotifications),n=P(V.feedback.myFeedback),r=F(V.notifications.markRead),i=F(V.notifications.markAllRead),a=F(V.notifications.clearOne),o=F(V.notifications.clearAll),s=F(V.feedback.closeMyFeedback),c=ss(),[l,u]=(0,N.useState)(!1),d=e=>{if(e.unread&&r({notificationId:e._id}),!e.href)return;if(u(!1),e.href.startsWith(`/chat/`)){c({to:`/chat/$chatId`,params:{chatId:e.href.slice(6)}});return}let[t,n]=e.href.split(`?`);c({to:t,search:Object.fromEntries(new URLSearchParams(n??``))})};return(0,I.jsxs)(V$,{open:l,onOpenChange:u,children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-bell`,"aria-label":e>0?mWe({count:e}):_We(),children:[(0,I.jsx)(cm,{size:18,"aria-hidden":!0}),e>0?(0,I.jsx)(`span`,{className:`oc-bell__badge`,"aria-hidden":!0,children:e>9?`9+`:e}):null]})}),(0,I.jsxs)(U$,{align:`end`,className:`oc-notif`,children:[(0,I.jsxs)(`div`,{className:`oc-notif__head`,children:[(0,I.jsx)(`span`,{children:bWe()}),t&&t.length>0?(0,I.jsxs)(`span`,{className:`oc-notif__bulk`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__act`,disabled:e===0,onClick:()=>void i({}),children:CWe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__act`,onClick:()=>void o({}),children:EWe()})]}):null]}),t===void 0?(0,I.jsx)(`div`,{className:`oc-notif__empty`,children:KO()}):t.length===0?(0,I.jsx)(`div`,{className:`oc-notif__empty`,children:kWe()}):(0,I.jsx)(`div`,{className:`oc-notif__list`,children:t.map(e=>{let t=oit[e.kind]??cm,{title:n,body:i}=sit(e);return(0,I.jsxs)(`div`,{className:`oc-notif__item${e.unread?` is-unread`:``}${e.href?` is-link`:``}`,role:e.href?`button`:void 0,tabIndex:e.href?0:void 0,onClick:e.href?()=>d(e):void 0,children:[(0,I.jsxs)(`div`,{className:`oc-notif__item-head`,children:[(0,I.jsx)(t,{size:14,className:`oc-notif__kind oc-notif__kind--${e.kind}`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-notif__title`,children:n}),(0,I.jsxs)(`span`,{className:`oc-notif__row-actions`,children:[e.unread?(0,I.jsx)(`button`,{type:`button`,title:EQ(),"aria-label":EQ(),onClick:t=>{t.stopPropagation(),r({notificationId:e._id})},children:(0,I.jsx)(um,{size:13})}):null,(0,I.jsx)(`button`,{type:`button`,title:DQ(),"aria-label":DQ(),onClick:t=>{t.stopPropagation(),a({notificationId:e._id})},children:(0,I.jsx)(Gm,{size:13})})]})]}),(0,I.jsx)(`p`,{className:`oc-notif__body`,children:i}),(0,I.jsx)(`div`,{className:`oc-notif__when`,children:new Date(e.createdAt).toLocaleString(q())})]},e._id)})}),n&&n.length>0?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-notif__head oc-notif__head--sub`,children:IWe()}),(0,I.jsx)(`div`,{className:`oc-notif__list`,children:n.map(e=>(0,I.jsx)(cit,{it:e,onClose:t=>s({feedbackId:e._id,reason:t}),onNavigate:()=>u(!1)},e._id))})]}):null]})]})}function cit({it:e,onClose:t,onNavigate:n}){let r=S1(),[i,a]=(0,N.useState)(!1),[o,s]=(0,N.useState)(!1),[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)(!1);async function f(){d(!0);try{await t(c.trim()||void 0)}catch(e){r.error(OQ(),e)}finally{d(!1)}}return(0,I.jsxs)(`div`,{className:`oc-notif__item`,children:[(0,I.jsxs)(`div`,{className:`oc-notif__item-head`,children:[(0,I.jsx)(`span`,{className:`oc-notif__title`,children:ait(e.category)}),(0,I.jsx)(`span`,{className:`oc-notif__status${e.answered?` is-answered`:``}`,children:e.answered?zWe():HWe()})]}),(0,I.jsx)(`div`,{className:`oc-notif__when`,children:new Date(e.at).toLocaleString(q())}),e.thread.length>0?(0,I.jsx)(`div`,{className:`oc-notif__thread`,children:e.thread.map((e,t)=>(0,I.jsxs)(`div`,{className:`oc-notif__msg oc-notif__msg--${e.authorRole}`,children:[(0,I.jsx)(`span`,{className:`oc-notif__msg-who`,children:e.authorRole===`admin`?GWe():JWe()}),(0,I.jsx)(`span`,{className:`oc-notif__msg-text`,children:e.text})]},t))}):null,e.messageText?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-notif__report-toggle`,"aria-expanded":i,onClick:()=>a(e=>!e),children:[i?(0,I.jsx)(dm,{size:13,"aria-hidden":!0}):(0,I.jsx)(fm,{size:13,"aria-hidden":!0}),eGe()]}),i?(0,I.jsx)(`div`,{className:`oc-notif__report-msg`,children:e.messageText}):null]}):null,(0,I.jsxs)(`div`,{className:`oc-notif__report-actions`,children:[(0,I.jsx)(xs,{to:`/chat/$chatId`,params:{chatId:e.chatId},search:{m:e.messageId},className:`oc-notif__link`,onClick:n,children:ZWe()}),o?null:(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__link oc-notif__link--muted`,onClick:()=>s(!0),children:OQ()})]}),o?(0,I.jsxs)(`div`,{className:`oc-notif__close-form`,children:[(0,I.jsx)(`textarea`,{className:`oc-notif__close-input`,rows:2,value:c,onChange:e=>l(e.target.value),placeholder:aGe()}),(0,I.jsxs)(`div`,{className:`oc-notif__close-actions`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__close-confirm`,disabled:u,onClick:()=>void f(),children:cGe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__close-cancel`,onClick:()=>{s(!1),l(``)},children:dGe()})]})]}):null]})}var h5={mod:!0,key:`k`},g5={mod:!0,shift:!0,key:`o`};function lit(e){return/mac/i.test(e)}function uit(){if(typeof navigator>`u`)return``;let e=navigator;return e.userAgentData?.platform||e.platform||e.userAgent||``}var _5=null;function v5(){return _5===null&&(_5=lit(uit())),_5}function y5(e,t){let n=e.key.toUpperCase();if(t){let t=``;return e.alt&&(t+=`⌥`),e.shift&&(t+=`⇧`),e.mod&&(t+=`⌘`),t+n}let r=[];return e.mod&&r.push(`Ctrl`),e.shift&&r.push(`Shift`),e.alt&&r.push(`Alt`),r.push(n),r.join(`+`)}function b5(e,t){let n=e.metaKey||e.ctrlKey;return!!t.mod!==n||!!t.shift!==e.shiftKey||!!t.alt!==e.altKey?!1:e.key.toLowerCase()===t.key.toLowerCase()}var x5=2,dit=180;function fit(){let e=ss(),t=(0,N.useRef)(null),n=(0,N.useRef)(null),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(0),d=(0,N.useMemo)(()=>y5(h5,v5()),[]);(0,N.useEffect)(()=>{let e=setTimeout(()=>c(a),dit);return()=>clearTimeout(e)},[a]);let f=s.trim(),p=P(V.search.searchConversations,f.length>=x5?{query:f}:`skip`),m=p??[],h=f.length>=x5&&p===void 0;(0,N.useEffect)(()=>{let e=e=>{b5(e,h5)&&(e.preventDefault(),i(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,N.useEffect)(()=>{r&&(o(``),c(``),u(0))},[r]),(0,N.useEffect)(()=>{u(0)},[p]),(0,N.useEffect)(()=>{(n.current?.querySelector(`[data-index="${l}"]`))?.scrollIntoView({block:`nearest`})},[l]);let g=(0,N.useCallback)(t=>{i(!1),e({to:`/chat/$chatId`,params:{chatId:t}})},[e]);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-search-trigger`,onClick:()=>i(!0),"aria-label":qBe(),children:[(0,I.jsx)(Fm,{className:`oc-search-trigger__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-search-trigger__label`,children:XBe()}),(0,I.jsx)(`kbd`,{className:`oc-search-trigger__kbd`,children:d})]}),(0,I.jsx)(u1,{open:r,onOpenChange:i,children:(0,I.jsxs)(d1,{showCloseButton:!1,className:`oc-search-palette top-[12vh] translate-y-0 max-w-xl gap-0 overflow-hidden p-0`,onOpenAutoFocus:e=>{e.preventDefault(),t.current?.focus()},children:[(0,I.jsx)(m1,{className:`sr-only`,children:$Be()}),(0,I.jsxs)(`div`,{className:`oc-search-palette__head`,children:[(0,I.jsx)(Fm,{className:`oc-search-palette__head-icon`,"aria-hidden":!0}),(0,I.jsx)(`input`,{ref:t,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{if(e.key===`ArrowDown`)e.preventDefault(),u(e=>Math.min(e+1,m.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),u(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=m[l];t&&g(t.chatId)}},placeholder:nVe(),className:`oc-search-palette__field`,autoComplete:`off`,spellCheck:!1,"aria-label":aVe()})]}),(0,I.jsx)(`div`,{className:`oc-search-palette__results`,ref:n,role:`listbox`,children:f.length<x5?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:cVe({count:x5})}):h?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:dVe()}):m.length===0?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:mVe({term:f})}):m.map((e,t)=>(0,I.jsxs)(`button`,{type:`button`,"data-index":t,role:`option`,"aria-selected":t===l,className:B$(`oc-search-result`,t===l&&`is-active`),onMouseMove:()=>u(t),onClick:()=>g(e.chatId),children:[(0,I.jsx)(`span`,{className:`oc-search-result__icon`,"aria-hidden":!0,children:e.matchedIn===`title`?(0,I.jsx)(kee,{size:15}):(0,I.jsx)(Em,{size:15})}),(0,I.jsxs)(`span`,{className:`oc-search-result__body`,children:[(0,I.jsx)(`span`,{className:`oc-search-result__title`,children:e.title||_Ve()}),e.snippet?(0,I.jsx)(`span`,{className:`oc-search-result__snippet`,children:e.snippet}):null]}),(0,I.jsx)(`span`,{className:`oc-search-result__tag`,children:e.matchedIn===`title`?bVe():CVe()})]},e.chatId))}),(0,I.jsxs)(`div`,{className:`oc-search-palette__footer`,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↑`}),(0,I.jsx)(`kbd`,{children:`↓`}),` `,EVe()]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↵`}),` `,kVe()]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:MVe()}),` `,FVe()]})]})]})})]})}var S5=[`conversational`,`documentary`],pit=new Set(S5),mit=`conversational`;function hit(e){let t=new Set((e??[]).filter(e=>pit.has(e)));return t.size===0?[mit]:S5.filter(e=>t.has(e))}function git({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=P(V.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=P(V.agents.listUserAgents,n&&e?{profileId:e}:`skip`),o=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),s=(a??[]).find(e=>e.isDefault)??null,c=s?`${s.instanceName}/${s.agentId}`:null,l=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),u=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!l.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,state:e.state,outOfPool:!0}))],d=new Map;for(let e of u){let t=d.get(e.instanceName)??[];t.push(e),d.set(e.instanceName,t)}return(0,I.jsx)(u1,{open:n,onOpenChange:r,children:(0,I.jsxs)(d1,{className:`oc-access`,children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:gMe({user:t})}),(0,I.jsx)(h1,{children:yMe()})]}),i?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?SMe():TMe()}):null,(0,I.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:OMe()}):u.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:LMe()}):[...d.entries()].map(([t,n])=>(0,I.jsx)(_it,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:o,defaultKey:c},t))})]})})}function _it({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=F(V.agents.assignAgent),s=F(V.agents.removeAgent),c=F(V.agents.setDefaultAgent),l=S1();if(!e)return null;async function u(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(jMe(),e)}}async function d(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(PMe(),e)}}return(0,I.jsxs)(`div`,{className:`oc-access__group`,children:[(0,I.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,I.jsx)(Im,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:t}),(0,I.jsx)($,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`;return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(T1,{checked:r,disabled:s&&!r,onCheckedChange:()=>void u(e.agentId,r),"aria-label":BMe({name:e.displayName??e.agentId})}),(0,I.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,I.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:UMe()}):null,e.outOfPool?(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:KMe()}):null,r?o?(0,I.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":fQ(),title:fQ(),children:(0,I.jsx)(zm,{size:14,fill:`currentColor`})}):(0,I.jsx)(X,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":pQ(),title:pQ(),onClick:()=>void d(e.agentId),children:(0,I.jsx)(zm,{size:14})}):null]},e.agentId)})]})}function vit(e,t){return typeof e==`number`&&typeof t==`number`?e-t:typeof e==`boolean`&&typeof t==`boolean`?!!e-+!!t:String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})}function yit(e,t,n){return[...e].sort((e,r)=>{let i=t(e),a=t(r),o=i==null,s=a==null;if(o||s)return o&&s?0:o?1:-1;let c=vit(i,a);return n===`asc`?c:-c})}function C5({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,I.jsx)(`table`,{"data-slot":`table`,className:B$(`w-full caption-bottom text-sm`,e),...t})})}function w5({className:e,...t}){return(0,I.jsx)(`thead`,{"data-slot":`table-header`,className:B$(`[&_tr]:border-b`,e),...t})}function T5({className:e,...t}){return(0,I.jsx)(`tbody`,{"data-slot":`table-body`,className:B$(`[&_tr:last-child]:border-0`,e),...t})}function E5({className:e,...t}){return(0,I.jsx)(`tr`,{"data-slot":`table-row`,className:B$(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function D5({className:e,...t}){return(0,I.jsx)(`th`,{"data-slot":`table-head`,className:B$(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function O5({className:e,...t}){return(0,I.jsx)(`td`,{"data-slot":`table-cell`,className:B$(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}function k5({title:e,rows:t,columns:n,rowActions:r,onAdd:i,addLabel:a=mHe(),bulkActions:o,emptyHint:s=_He(),isExpanded:c,renderExpanded:l}){let[u,d]=(0,N.useState)(new Set),[f,p]=(0,N.useState)(null),m=t??[],h=f?n[f.index]:void 0,g=f&&h?.sort?yit(m,h.sort,f.dir):m;function _(e){p(t=>!t||t.index!==e?{index:e,dir:`asc`}:t.dir===`asc`?{index:e,dir:`desc`}:null)}let v=+!!o+n.length+ +!!r,y=m.length>0&&u.size===m.length,b=u.size>0&&!y;function x(){d(y?new Set:new Set(m.map(e=>e._id)))}function S(e){d(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}return(0,I.jsxs)(`div`,{className:`oc-dt`,children:[(0,I.jsxs)(`div`,{className:`oc-dt__bar`,children:[(0,I.jsx)(`h2`,{className:`oc-dt__title`,children:e}),(0,I.jsxs)(`div`,{className:`oc-dt__bar-actions`,children:[u.size>0&&o?o.map(e=>(0,I.jsxs)(X,{size:`sm`,variant:e.variant===`destructive`?`destructive`:`outline`,onClick:()=>{e.onSelect([...u]),d(new Set)},children:[e.variant===`destructive`?(0,I.jsx)(Bm,{}):null,e.label,` (`,u.size,`)`]},e.label)):null,i?(0,I.jsxs)(X,{size:`sm`,onClick:i,children:[(0,I.jsx)(Nm,{}),` `,a]}):null]})]}),t===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:bHe()}):m.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:s}):(0,I.jsxs)(C5,{children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[o?(0,I.jsx)(D5,{className:`w-8`,children:(0,I.jsx)(T1,{"aria-label":CHe(),checked:y?!0:b?`indeterminate`:!1,onCheckedChange:x})}):null,n.map((e,t)=>{let n=f?.index===t;return e.sort?(0,I.jsx)(D5,{className:e.className,"aria-sort":n?f.dir===`asc`?`ascending`:`descending`:`none`,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-dt__sort`,onClick:()=>_(t),"aria-label":MHe({column:e.header}),children:[e.header,n?f.dir===`asc`?(0,I.jsx)(pm,{className:`oc-dt__sort-icon`,"aria-hidden":!0}):(0,I.jsx)(dm,{className:`oc-dt__sort-icon`,"aria-hidden":!0}):(0,I.jsx)(mm,{className:`oc-dt__sort-icon oc-dt__sort-icon--idle`,"aria-hidden":!0})]})},e.header):(0,I.jsx)(D5,{className:e.className,children:e.header},e.header)}),r?(0,I.jsx)(D5,{className:`w-8`}):null]})}),(0,I.jsx)(T5,{children:g.map(e=>{let t=r?.(e)??[],i=c?.(e)??!1;return(0,I.jsxs)(N.Fragment,{children:[(0,I.jsxs)(E5,{className:`group/row`,children:[o?(0,I.jsx)(O5,{children:(0,I.jsx)(T1,{"aria-label":EHe(),checked:u.has(e._id),onCheckedChange:()=>S(e._id)})}):null,n.map(t=>(0,I.jsx)(O5,{className:t.className,children:t.cell(e)},t.header)),r?(0,I.jsx)(O5,{children:t.length>0?(0,I.jsxs)(V$,{children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":kHe(),className:`opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 aria-expanded:opacity-100`,children:(0,I.jsx)(ym,{})})}),(0,I.jsx)(U$,{align:`end`,children:t.map((t,n)=>(0,I.jsxs)(`div`,{children:[t.variant===`destructive`&&n>0?(0,I.jsx)(K$,{}):null,(0,I.jsx)(W$,{variant:t.variant,onSelect:()=>t.onSelect(e),children:t.label})]},t.label))})]}):null}):null]}),i&&l?(0,I.jsx)(E5,{className:`oc-dt__expansion`,children:(0,I.jsx)(O5,{colSpan:v,className:`oc-dt__expansion-cell`,children:l(e)})}):null]},e._id)})})]})]})}function A5({icon:e,total:t,items:n}){if(t===0)return(0,I.jsxs)($,{variant:`outline`,className:`oc-group-chip oc-group-chip--empty gap-1`,children:[e,`0`]});let r=t-n.length;return(0,I.jsxs)(`div`,{className:`oc-group-detail`,children:[n.map((e,t)=>(0,I.jsxs)($,{variant:e.highlight?`secondary`:`outline`,className:`oc-group-chip gap-1`,title:e.label,children:[e.marker,(0,I.jsx)(`span`,{className:`oc-group-chip__txt`,children:e.label})]},t)),r>0?(0,I.jsxs)($,{variant:`outline`,className:`oc-group-chip`,children:[`+`,r]}):null]})}function j5({delayDuration:e=0,...t}){return(0,I.jsx)(vue,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function M5({...e}){return(0,I.jsx)(yue,{"data-slot":`tooltip`,...e})}function N5({...e}){return(0,I.jsx)(bue,{"data-slot":`tooltip-trigger`,...e})}function P5({className:e,sideOffset:t=0,children:n,...r}){return(0,I.jsx)(xue,{children:(0,I.jsxs)(Sue,{"data-slot":`tooltip-content`,sideOffset:t,className:B$(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[n,(0,I.jsx)(Cue,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var F5={AGENT_NOT_FOUND:()=>({label:FHe(),hint:RHe()}),AUTH_TOKEN_MISMATCH:()=>({label:VHe(),hint:WHe()}),DEVICE_SIGNING_FAILED:()=>({label:qHe(),hint:XHe()}),SESSION_SCOPE_DENIED:()=>({label:$He(),hint:nUe()}),GATEWAY_TIMEOUT:()=>({label:aUe(),hint:cUe()}),GATEWAY_DISCONNECTED:()=>({label:dUe(),hint:mUe()}),ATTACHMENT_TOO_LARGE:()=>({label:CUe(),hint:EUe()}),ATTACHMENT_REJECTED:()=>({label:kUe(),hint:MUe()}),BRIDGE_UNREACHABLE:()=>({label:_Ue(),hint:bUe()}),INVALID_REQUEST:()=>({label:FUe(),hint:RUe()}),NOT_CONFIGURED:()=>({label:VUe(),hint:WUe()}),UNROUTED:()=>({label:qUe(),hint:XUe()}),UPSTREAM_ERROR:()=>({label:$Ue(),hint:nWe()}),UNKNOWN:()=>({label:aWe(),hint:cWe()})};function I5(e){return e?F5[e]?.()??{label:e,hint:dWe()}:F5.UNKNOWN()}var bit=[`gateway-http`,`shared-fs`,`off`],xit=[`inline`,`shared-fs`];He.object({mediaMode:He.optional(He.union(He.literal(`gateway-http`),He.literal(`shared-fs`),He.literal(`off`))),inboundMediaMode:He.optional(He.union(He.literal(`inline`),He.literal(`shared-fs`))),rehydration:He.optional(He.boolean()),mediaMaxMb:He.optional(He.number()),inboundAgentMount:He.optional(He.string()),outboundAgentMount:He.optional(He.string())});var L5={mediaMode:`gateway-http`,inboundMediaMode:`inline`,rehydration:!0,mediaMaxMb:1024,inboundAgentMount:`/home/node/.openclaw/media/inbound`,outboundAgentMount:`/home/node/.openclaw/media/outbound`};function Sit(e){return{mediaMode:e.mediaMode??L5.mediaMode,inboundMediaMode:e.inboundMediaMode??L5.inboundMediaMode,rehydration:e.rehydration??L5.rehydration,mediaMaxMb:e.mediaMaxMb??L5.mediaMaxMb,inboundAgentMount:e.inboundAgentMount??L5.inboundAgentMount,outboundAgentMount:e.outboundAgentMount??L5.outboundAgentMount}}function Cit(e,t){let n={},r=r=>{(e[r]!==L5[r]||t[r]!==void 0)&&(n[r]=e[r])};return r(`mediaMode`),r(`inboundMediaMode`),r(`rehydration`),r(`mediaMaxMb`),r(`inboundAgentMount`),r(`outboundAgentMount`),n}var R5=e=>typeof e==`string`?e:null;function z5(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function B5(e,t){let n=z5(e),r=z5(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function wit(e,t){if(e===null||t===null)return!1;let n=B5(t,e.min);return n!==null&&n>=0}function V5(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=R5(e.min),n=R5(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let s=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:s}}function Tit(e,t,n){if(e===null)return`unknown`;let{range:r}=V5(n,t);return wit(r,e)?r!==null&&(B5(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function H5(e){return e===`supported`?o2e():e===`beyond`?l2e():f2e()}function U5(e){return e??ZQ()}function W5(e){return e===null?x2e():v2e({version:e})}function Eit(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}function G5(e){return e.filter(e=>e.state===`error`)}function Dit(e){return e.reachable&&G5(e.targets).length===0}function Oit(e){return e.state===`error`&&e.lastErrorCode!==null}function kit(e){return!!e.lastDownstreamRejectCode}function K5(e){return e.kind??`openclaw`}function Ait(e){return[...e].sort((e,t)=>e===`openclaw`?-1:t===`openclaw`?1:e.localeCompare(t))}function jit(e,t,n){let r=new Map;for(let e of t)e.instanceName&&r.set(e.instanceName,e.provider);for(let e of n)r.set(e.name,K5(e));let i=e=>(e.instanceName?r.get(e.instanceName):void 0)??`openclaw`,a=new Set;for(let e of n)a.add(K5(e));for(let e of t)a.add(e.provider);for(let t of e)a.add(i(t));return Ait(a).map(r=>({key:r,connections:e.filter(e=>i(e)===r),compatTargets:t.filter(e=>e.provider===r),instances:n.filter(e=>K5(e)===r)}))}function Mit(e){return e===`openclaw`?`OpenClaw`:e===`hermes`?`Hermes`:e.charAt(0).toUpperCase()+e.slice(1)}var q5={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function J5(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=q5[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function Y5(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:J5(e.from,t)??t-q5.h,to:J5(e.to,t)??t}}var X5=[{label:nIe(),from:`now-5m`},{label:aIe(),from:`now-15m`},{label:cIe(),from:`now-30m`},{label:dIe(),from:`now-1h`},{label:mIe(),from:`now-3h`},{label:_Ie(),from:`now-6h`},{label:bIe(),from:`now-12h`},{label:CIe(),from:`now-24h`},{label:EIe(),from:`now-2d`},{label:kIe(),from:`now-7d`},{label:MIe(),from:`now-30d`},{label:FIe(),from:`now-90d`}];function Z5(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function Nit(e){if(e.kind===`relative`){let t=X5.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${Z5(e.from)} → ${Z5(e.to)}`}function Q5(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function $5(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function Pit(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}function e7(e){let[t,n]=(0,N.useState)(0);return(0,N.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,N.useMemo)(()=>{let{from:t,to:n}=Y5(e);return e.kind===`absolute`?{from:t,to:n}:{from:t7(t),to:t7(n)}},[e,t])}function t7(e){return Math.floor(e/6e4)*6e4}function n7({value:e,onChange:t}){let[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(``),o=Y5(e),[s,c]=(0,N.useState)(()=>Q5(o.from)),[l,u]=(0,N.useState)(()=>Q5(o.to));function d(t){if(t){let t=Y5(e);c(Q5(t.from)),u(Q5(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=$5(s),n=$5(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,N.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?X5:X5.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=$5(s)!==null&&$5(l)!==null;return(0,I.jsxs)(CT,{open:n,onOpenChange:d,children:[(0,I.jsx)(wT,{asChild:!0,children:(0,I.jsxs)(X,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,I.jsx)(wee,{}),Nit(e)]})}),(0,I.jsx)(TT,{children:(0,I.jsx)(ET,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,I.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,I.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,I.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,I.jsx)(t1,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,I.jsx)(t1,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,I.jsx)(X,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,I.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,I.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,I.jsx)(Fm,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,I.jsx)(t1,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,I.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,I.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,I.jsx)(`li`,{children:(0,I.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>f(t.from),children:t.label})},t.from))})]})]})})})]})}var Fit=250;function r7({q:e,onQChange:t,searchPlaceholder:n=cHe(),children:r,timeRange:i,onTimeRangeChange:a,onReset:o,canReset:s=!0}){let[c,l]=(0,N.useState)(e);(0,N.useEffect)(()=>{l(e)},[e]);let u=(0,N.useRef)(null);function d(e){l(e),u.current!==null&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>t(e),Fit)}(0,N.useEffect)(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]);function f(){u.current!==null&&window.clearTimeout(u.current),o()}return(0,I.jsxs)(`div`,{className:`oc-filterbar`,children:[(0,I.jsxs)(`div`,{className:`oc-filterbar__search`,children:[(0,I.jsx)(Fm,{className:`oc-filterbar__search-icon`,"aria-hidden":!0}),(0,I.jsx)(t1,{value:c,onChange:e=>d(e.target.value),placeholder:n,"aria-label":n})]}),r?(0,I.jsx)(`div`,{className:`oc-filterbar__quick`,children:r}):null,i&&a?(0,I.jsx)(n7,{value:i,onChange:a}):null,(0,I.jsxs)(X,{variant:`ghost`,size:`sm`,className:`oc-filterbar__reset`,onClick:f,disabled:!s,children:[(0,I.jsx)(Pm,{}),dHe()]})]})}var i7=`__all__`,a7={q:``,state:i7,instance:i7,version:i7},o7={connected:0,error:1,idle:2};function Iit(e){return e.q.trim()!==``||e.state!==`__all__`||e.instance!==`__all__`||e.version!==`__all__`}function Lit(e,t){let n=t.q.trim().toLowerCase();return e.filter(e=>!(n&&!`${e.targetLabel} ${e.gatewayHost}`.toLowerCase().includes(n)||t.state!==`__all__`&&e.state!==t.state||t.instance!==`__all__`&&(e.instanceName??``)!==t.instance||t.version!==`__all__`&&(e.gatewayVersion??``)!==t.version))}function s7(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function c7(e,t){return e===`version`?t.gatewayVersion===null:e===`lastOk`?t.lastOkAt===null:!1}function Rit(e,t,n){switch(e){case`state`:return(o7[t.state]??99)-(o7[n.state]??99);case`instance`:return s7(t.instanceLabel??t.instanceName??``,n.instanceLabel??n.instanceName??``);case`host`:return s7(t.gatewayHost,n.gatewayHost);case`version`:{let e=t.gatewayVersion,r=n.gatewayVersion;return B5(e,r)??s7(e,r)}case`lastOk`:return t.lastOkAt-n.lastOkAt;default:return s7(t.targetLabel,n.targetLabel)}}function zit(e,t){if(!t)return e;let n=t.dir===`asc`?1:-1;return[...e].sort((e,r)=>{let i=c7(t.key,e),a=c7(t.key,r);return i&&a?0:i?1:a?-1:n*Rit(t.key,e,r)})}function Bit(e){let t=new Set;for(let n of e)t.add(n.state);return[...t].sort((e,t)=>(o7[e]??99)-(o7[t]??99))}function Vit(e){let t=new Map;for(let n of e)n.instanceName!==null&&(t.has(n.instanceName)||t.set(n.instanceName,n.instanceLabel??n.instanceName));return[...t.entries()].map(([e,t])=>({name:e,label:t})).sort((e,t)=>s7(e.label,t.label))}function Hit(e){let t=new Set;for(let n of e)n.gatewayVersion!==null&&t.add(n.gatewayVersion);return[...t].sort((e,t)=>B5(e,t)??s7(e,t))}function Uit({connections:e,displayByInstance:t}){let[n,r]=(0,N.useState)(a7),[i,a]=(0,N.useState)(null),o=(0,N.useMemo)(()=>e.map((e,n)=>({_id:`${e.key}:${e.canonical}/${e.agentId}:${n}`,targetLabel:`${e.canonical}/${e.agentId}`,state:e.state,instanceName:e.instanceName??null,instanceLabel:e.instanceName?t.get(e.instanceName)??e.instanceName:null,gatewayHost:e.gatewayHost,gatewayVersion:e.gatewayVersion??null,okCount:e.okCount,errorCount:e.errorCount,attempts:e.attempts,lastOkAt:e.lastOkAt??null,lastErrorCode:e.lastErrorCode??null,lastErrorAt:e.lastErrorAt??null,lastDownstreamRejectCode:e.lastDownstreamRejectCode??null,lastDownstreamRejectAt:e.lastDownstreamRejectAt??null})),[e,t]),s=(0,N.useMemo)(()=>Bit(o),[o]),c=(0,N.useMemo)(()=>Vit(o),[o]),l=(0,N.useMemo)(()=>Hit(o),[o]),u=(0,N.useMemo)(()=>zit(Lit(o,n),i),[o,n,i]);function d(e){a(t=>t?.key===e?t.dir===`asc`?{key:e,dir:`desc`}:null:{key:e,dir:`asc`})}return e.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:rFe()}):(0,I.jsxs)(`div`,{className:`oc-conn`,children:[(0,I.jsxs)(r7,{q:n.q,onQChange:e=>r(t=>({...t,q:e})),searchPlaceholder:fFe(),onReset:()=>r(a7),canReset:Iit(n),children:[(0,I.jsxs)(S3,{value:n.state,onValueChange:e=>r(t=>({...t,state:e})),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{placeholder:_Fe()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:i7,children:gQ()}),s.map(e=>(0,I.jsx)(Q,{value:e,children:Git(e)},e))]})]}),(0,I.jsxs)(S3,{value:n.instance,onValueChange:e=>r(t=>({...t,instance:e})),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(C3,{placeholder:bFe()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:i7,children:gQ()}),c.map(e=>(0,I.jsx)(Q,{value:e.name,children:e.label},e.name))]})]}),(0,I.jsxs)(S3,{value:n.version,onValueChange:e=>r(t=>({...t,version:e})),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{placeholder:CFe()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:i7,children:gQ()}),l.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),u.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:EFe()}):(0,I.jsxs)(C5,{className:`oc-conn__table`,children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[(0,I.jsx)(l7,{label:kFe(),sortKey:`target`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:MFe(),sortKey:`state`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:FFe(),sortKey:`instance`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:RFe(),sortKey:`host`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:VFe(),sortKey:`version`,sort:i,onSort:d}),(0,I.jsx)(D5,{children:WFe()}),(0,I.jsx)(l7,{label:qFe(),sortKey:`lastOk`,sort:i,onSort:d})]})}),(0,I.jsx)(T5,{children:u.map(e=>(0,I.jsx)(Wit,{r:e},e._id))})]})]})}function l7({label:e,sortKey:t,sort:n,onSort:r}){let i=n?.key===t,a=i?n.dir:null;return(0,I.jsx)(D5,{"aria-sort":i?a===`asc`?`ascending`:`descending`:`none`,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-conn__sort`,onClick:()=>r(t),children:[e,i?a===`asc`?(0,I.jsx)(pm,{size:13,"aria-hidden":!0}):(0,I.jsx)(dm,{size:13,"aria-hidden":!0}):(0,I.jsx)(mm,{size:13,"aria-hidden":!0,className:`oc-conn__sort-idle`})]})})}function Wit({r:e}){let t=Oit(e)?I5(e.lastErrorCode):null,n=kit(e)?I5(e.lastDownstreamRejectCode):null;return(0,I.jsxs)(N.Fragment,{children:[(0,I.jsxs)(E5,{className:`oc-conn__row oc-conn__row--${e.state}`,children:[(0,I.jsx)(O5,{children:(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.targetLabel})}),(0,I.jsx)(O5,{children:(0,I.jsx)(Kit,{state:e.state})}),(0,I.jsx)(O5,{children:e.instanceLabel?(0,I.jsx)(`span`,{className:`oc-bridge-target__instance`,children:e.instanceLabel}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}),(0,I.jsx)(O5,{children:(0,I.jsx)(`span`,{className:`oc-bridge-target__host`,children:e.gatewayHost})}),(0,I.jsx)(O5,{children:e.gatewayVersion?(0,I.jsx)(`span`,{className:`oc-bridge-target__version`,children:e.gatewayVersion}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}),(0,I.jsx)(O5,{children:(0,I.jsx)(`span`,{className:`oc-conn__stats`,children:oFe({ok:e.okCount,errors:e.errorCount,attempts:e.attempts})})}),(0,I.jsx)(O5,{children:e.lastOkAt?(0,I.jsx)(`span`,{className:`oc-traces__mono`,children:new Date(e.lastOkAt).toLocaleTimeString(`fr-FR`)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})})]}),t||n?(0,I.jsx)(E5,{className:`oc-conn__detail-row`,children:(0,I.jsxs)(O5,{colSpan:7,className:`oc-conn__detail-cell`,children:[t?(0,I.jsxs)(`div`,{className:`oc-bridge-target__error`,children:[(0,I.jsx)(`strong`,{children:t.label}),` `,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.lastErrorCode}),e.lastErrorAt?` · ${new Date(e.lastErrorAt).toLocaleTimeString(`fr-FR`)}`:``,(0,I.jsx)(`p`,{className:`oc-bridge-card__hint`,children:t.hint})]}):null,n?(0,I.jsxs)(`div`,{className:`oc-bridge-target__downstream`,children:[lFe({label:n.label}),` `,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.lastDownstreamRejectCode}),e.lastDownstreamRejectAt?` · ${new Date(e.lastDownstreamRejectAt).toLocaleTimeString(`fr-FR`)}`:``]}):null]})}):null]})}function Git(e){return e===`connected`?_Q():e===`error`?vQ():yQ()}function Kit({state:e}){return e===`connected`?(0,I.jsx)($,{variant:`secondary`,children:_Q()}):e===`error`?(0,I.jsx)($,{variant:`destructive`,children:vQ()}):(0,I.jsx)($,{variant:`outline`,children:yQ()})}function qit(){return P(V.bridgeHealth.getBridgeHealth,{})}function Jit(){let e=qit(),t=P(V.compat.getBridgeCompat,{}),n=P(V.me.getMe,{host:xO})?.role===`admin`,r=P(V.admin.listInstances,n?{}:`skip`),i=ss(),a=()=>void i({to:`/settings/anomalies`,search:{status:`open`}}),o=jit(e?e.targets:[],t?t.targets:[],r??[]),s=t?.compat??null,c=t===void 0?`loading`:t===null?`nodata`:`ready`,l=s!==null&&Eit(s,`hermes`)&&!o.some(e=>e.key===`hermes`);return(0,I.jsxs)(`div`,{className:`oc-bridge`,children:[(0,I.jsx)(Yit,{health:e,compat:t,onSeeAnomalies:a}),(0,I.jsx)(`p`,{className:`oc-admin__hint oc-bridge__caption`,children:OPe()}),o.map(e=>(0,I.jsx)(Xit,{providerKey:e.key,connections:e.connections,instances:e.instances,manifest:s,compatStatus:c,compatReachable:t?.reachable??!0},e.key)),l?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:h2e()}):null]})}function Yit({health:e,compat:t,onSeeAnomalies:n}){let r=t&&t!==null?(0,I.jsxs)(`span`,{className:`oc-bridge-card__ver`,children:[(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:U5(t.bridgeVersion)}),` · `,j0e(),` `,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:t.protocolVersion===null?ZQ():String(t.protocolVersion)})]}):null;if(e===void 0)return(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:hQ()});if(e===null)return(0,I.jsx)(`div`,{className:`oc-bridge-card oc-bridge-card--idle`,children:NPe()});let i=G5(e.targets),a=!e.reachable,o=Dit(e),s=o?`ok`:`error`,c=new Date(e.checkedAt).toLocaleString(`fr-FR`),l=e.startedAt==null?null:new Date(e.startedAt).toLocaleString(`fr-FR`);return(0,I.jsxs)(`div`,{className:`oc-bridge-card oc-bridge-card--${s}`,children:[(0,I.jsx)(`div`,{className:`oc-bridge-card__icon`,"aria-hidden":!0,children:o?(0,I.jsx)(gm,{size:22}):a?(0,I.jsx)(Vee,{size:22}):(0,I.jsx)(Vm,{size:22})}),(0,I.jsxs)(`div`,{className:`oc-bridge-card__body`,children:[(0,I.jsx)(`div`,{className:`oc-bridge-card__title`,children:o?IPe():a?zPe():HPe({count:i.length})}),(0,I.jsxs)(`div`,{className:`oc-bridge-card__meta`,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(Lee,{size:12,"aria-hidden":!0}),` `,GPe({time:c})]}),l?(0,I.jsx)(`span`,{children:JPe({time:l})}):null,r]}),a?(0,I.jsx)(`p`,{className:`oc-bridge-card__hint`,children:I5(e.lastError===`not_configured`?`NOT_CONFIGURED`:`BRIDGE_UNREACHABLE`).hint}):null]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-bridgebar__drill`,onClick:n,children:ZPe()})]})}function Xit({providerKey:e,connections:t,instances:n,manifest:r,compatStatus:i,compatReachable:a}){let o=r?V5(r,e):null,s=new Map;for(let e of n)s.set(e.name,e.displayName??e.name);let c=[],l=new Set;for(let n of t){if(!n.instanceName||l.has(n.instanceName))continue;l.add(n.instanceName);let t=n.gatewayVersion??null;c.push({instanceName:n.instanceName,displayName:s.get(n.instanceName)??n.instanceName,version:t,state:Tit(t,e,r)})}let u=c.map(e=>e.state),d=u.includes(`beyond`)?`beyond`:u.length>0&&u.every(e=>e===`supported`)?`supported`:null,[f,p]=(0,N.useState)(!1),[m,h]=(0,N.useState)(null),g=m===null?null:n.find(e=>e.name===m)??null,_=new Set(n.map(e=>e.name));return(0,I.jsxs)(`section`,{className:`oc-bridge-provider`,children:[(0,I.jsxs)(`header`,{className:`oc-bridge-provider__head`,children:[(0,I.jsx)(Im,{size:15,"aria-hidden":!0,className:`oc-bridge-provider__icon`}),(0,I.jsx)(`span`,{className:`oc-bridge-provider__name`,children:Mit(e)}),d?(0,I.jsx)($,{variant:d===`beyond`?`destructive`:`secondary`,children:H5(d)}):null]}),(0,I.jsx)(`h4`,{className:`oc-bridge-provider__sub`,children:T0e()}),(0,I.jsx)(Zit,{support:o,compatStatus:i,compatReachable:a,manifest:r,instanceRows:c,canConfigure:e=>_.has(e),onConfigure:h}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-bridge-provider__sub oc-bridge-provider__sub--toggle`,"aria-expanded":f,onClick:()=>p(e=>!e),children:[f?(0,I.jsx)(dm,{size:13,"aria-hidden":!0}):(0,I.jsx)(fm,{size:13,"aria-hidden":!0}),eFe({count:t.length})]}),f?(0,I.jsx)(Uit,{connections:t,displayByInstance:s}):null,g?(0,I.jsx)(u7,{instance:g,onClose:()=>h(null)},g._id):null]})}function Zit({support:e,compatStatus:t,compatReachable:n,manifest:r,instanceRows:i,canConfigure:a,onConfigure:o}){return t===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:hQ()}):t===`nodata`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:O0e()}):(0,I.jsxs)(`div`,{className:`oc-compat`,children:[n?null:(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:I0e()}),r===null?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:z0e()}):(0,I.jsxs)(`div`,{className:`oc-compat__support`,children:[(0,I.jsx)(`span`,{className:`oc-compat__label`,children:H0e()}),e&&e.range!==null?(0,I.jsx)(`span`,{children:G0e({min:e.range.min,max:e.range.maxValidated})}):(0,I.jsx)(`span`,{children:ZQ()}),e?(0,I.jsx)(eat,{versions:e.validatedVersions}):null]}),i.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:r2e()}):(0,I.jsx)(`div`,{className:`oc-compat__targets`,children:i.map(e=>(0,I.jsxs)(`div`,{className:`oc-compat__target`,children:[(0,I.jsx)(`span`,{className:`oc-compat__instance`,children:e.displayName}),(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:U5(e.version)}),(0,I.jsx)($,{variant:e.state===`supported`?`secondary`:e.state===`beyond`?`destructive`:`outline`,children:H5(e.state)}),a(e.instanceName)?(0,I.jsxs)(V$,{children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,className:`oc-compat__target-menu`,"aria-label":mQ(),children:(0,I.jsx)(ym,{size:16,"aria-hidden":!0})})}),(0,I.jsx)(U$,{align:`end`,children:(0,I.jsx)(W$,{onSelect:()=>o(e.instanceName),children:mQ()})})]}):null]},e.instanceName))})]})}function u7({instance:e,onClose:t}){return(0,I.jsx)(u1,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(d1,{className:`oc-bridge-config-dialog`,onOpenAutoFocus:e=>e.preventDefault(),children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:$Me({instance:e.displayName??e.name})}),(0,I.jsx)(h1,{children:iNe()})]}),(0,I.jsx)($it,{instance:e,onClose:t})]})})}function Qit({text:e}){return(0,I.jsx)(j5,{delayDuration:150,children:(0,I.jsxs)(M5,{children:[(0,I.jsx)(N5,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-field__help`,"aria-label":e,onClick:e=>e.preventDefault(),children:(0,I.jsx)(See,{"aria-hidden":!0})})}),(0,I.jsx)(P5,{className:`max-w-xs text-pretty`,children:e})]})})}function d7({label:e,help:t}){return(0,I.jsxs)(`span`,{className:`oc-field__label`,children:[e,(0,I.jsx)(Qit,{text:t})]})}function f7({label:e,result:t}){return t?t.checked?(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row `+(t.ok?`oc-bridge-config__check-row--ok`:`oc-bridge-config__check-row--err`),children:[t.ok?(0,I.jsx)(gm,{"aria-hidden":!0}):(0,I.jsx)(Vm,{"aria-hidden":!0}),(0,I.jsxs)(`span`,{children:[e,` — `,t.ok?gPe():t.detail]})]}):(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--skip`,children:[e,` — `,yPe()]}):null}function $it({instance:e,onClose:t}){let n=F(V.admin.upsertInstanceConfig),r=$n(V.bridge.validateMediaPaths),i=S1(),[a,o]=(0,N.useState)(()=>Sit(e.config??{})),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(null),p=a.inboundMediaMode===`shared-fs`,m=a.mediaMode===`shared-fs`,h=p||m;async function g(){u(!0),f(null);try{f(await r({instanceName:e.name,inboundMediaMode:a.inboundMediaMode,mediaMode:a.mediaMode}))}catch(e){i.error(iPe(),e)}finally{u(!1)}}async function _(){c(!0);try{let r=e.config??{};await n({instanceId:e._id,config:Cit(a,r)}),t()}catch(e){i.error(TNe(),e)}finally{c(!1)}}return(0,I.jsx)(`div`,{className:`oc-bridge-config`,children:(0,I.jsxs)(`div`,{className:`oc-bridge-config__form`,children:[(0,I.jsxs)(`div`,{className:`oc-bridge-config__grid`,children:[(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:uNe(),help:ONe()}),(0,I.jsxs)(S3,{value:a.mediaMode,onValueChange:e=>o({...a,mediaMode:e}),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-full`,children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:bit.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:pNe(),help:jNe()}),(0,I.jsxs)(S3,{value:a.inboundMediaMode,onValueChange:e=>o({...a,inboundMediaMode:e}),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-full`,children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:xit.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:gNe(),help:PNe()}),(0,I.jsx)(t1,{type:`number`,min:1,max:4096,className:`w-full`,value:a.mediaMaxMb,onChange:e=>o({...a,mediaMaxMb:Math.trunc(Number(e.target.value)||0)})})]})]}),h&&(0,I.jsxs)(`div`,{className:`oc-bridge-config__grid`,children:[p&&(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:BNe(),help:UNe()}),(0,I.jsx)(t1,{className:`w-full`,spellCheck:!1,value:a.inboundAgentMount,onChange:e=>o({...a,inboundAgentMount:e.target.value})})]}),m&&(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:KNe(),help:YNe()}),(0,I.jsx)(t1,{className:`w-full`,spellCheck:!1,value:a.outboundAgentMount,onChange:e=>o({...a,outboundAgentMount:e.target.value})})]})]}),(0,I.jsxs)(`label`,{className:`oc-field--row`,children:[(0,I.jsx)(T1,{checked:a.rehydration,onCheckedChange:e=>o({...a,rehydration:e===!0})}),(0,I.jsx)(d7,{label:yNe(),help:LNe()})]}),h&&d!==null&&(0,I.jsx)(`div`,{className:`oc-bridge-config__check`,children:d.reachable?!d.inbound&&!d.outbound?(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--err`,children:[(0,I.jsx)(Vm,{"aria-hidden":!0}),TPe({reason:d.reason??`?`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f7,{label:uPe(),result:d.inbound}),(0,I.jsx)(f7,{label:pPe(),result:d.outbound}),(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:sPe()})]}):(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--err`,children:[(0,I.jsx)(Vm,{"aria-hidden":!0}),SPe()]})}),(0,I.jsxs)(`div`,{className:`oc-bridge-config__actions`,children:[h&&(0,I.jsxs)(X,{variant:`outline`,size:`sm`,onClick:()=>void g(),disabled:l,children:[l?(0,I.jsx)(Cm,{className:`size-4 animate-spin`,"aria-hidden":!0}):null,l?tPe():QNe()]}),(0,I.jsx)(X,{size:`sm`,onClick:()=>void _(),disabled:s,children:SNe()})]})]})})}function eat({versions:e}){if(e.length===0)return null;let t=[...e].reverse();return(0,I.jsxs)(J$,{children:[(0,I.jsx)(Y$,{asChild:!0,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-compat__versions-btn`,children:[e.length===1?J0e():Z0e({count:e.length}),(0,I.jsx)(dm,{size:13,"aria-hidden":!0})]})}),(0,I.jsxs)(X$,{className:`oc-compat__versions-pop`,align:`start`,children:[(0,I.jsx)(`p`,{className:`oc-compat__versions-title`,children:e2e()}),(0,I.jsx)(`div`,{className:`oc-compat__versions-list`,children:t.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e},e))})]})]})}var tat=[{value:`eq`,label:`=`},{value:`neq`,label:`≠`},{value:`contains`,label:Zze()},{value:`gt`,label:`>`},{value:`gte`,label:`≥`},{value:`lt`,label:`<`},{value:`lte`,label:`≤`}],p7=1;function nat(){return{id:p7++,field:``,op:`eq`,value:``}}function rat(e){return e.map(e=>({id:p7++,field:e.field,op:e.op,value:String(e.value)}))}function m7({fields:e,seed:t,onChange:n}){let r=(0,N.useRef)(t),i=!!(r.current&&r.current.length>0),[a,o]=(0,N.useState)(i),[s,c]=(0,N.useState)(()=>i?rat(r.current):[]);function l(e){n(e.filter(e=>e.field!==``&&e.value!==``).map(e=>({field:e.field,op:e.op,value:Pit(e.value)})))}function u(e,t){let n=s.map(n=>n.id===e?{...n,...t}:n);c(n),l(n)}function d(){c(e=>[...e,nat()])}function f(e){let t=s.filter(t=>t.id!==e);c(t),l(t)}let p=s.filter(e=>e.field!==``&&e.value!==``).length;return(0,I.jsxs)(`div`,{className:`oc-advfilter`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`oc-advfilter__toggle`,"aria-expanded":a,onClick:()=>o(e=>!e),children:[(0,I.jsx)(dm,{className:`oc-advfilter__chevron`+(a?` is-open`:``),"aria-hidden":!0}),eBe(),p>0?(0,I.jsx)(`span`,{className:`oc-advfilter__count`,children:p}):null]}),a?(0,I.jsxs)(`div`,{className:`oc-advfilter__body`,children:[s.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:rBe()}):(0,I.jsx)(`ul`,{className:`oc-advfilter__rows`,children:s.map(t=>(0,I.jsxs)(`li`,{className:`oc-advfilter__row`,children:[(0,I.jsxs)(S3,{value:t.field||void 0,onValueChange:e=>u(t.id,{field:e}),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(C3,{placeholder:oBe()})}),(0,I.jsx)(T3,{children:e.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label},e.value))})]}),(0,I.jsxs)(S3,{value:t.op,onValueChange:e=>u(t.id,{op:e}),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-28`,children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:tat.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label},e.value))})]}),(0,I.jsx)(t1,{className:`oc-advfilter__value`,value:t.value,onChange:e=>u(t.id,{value:e.target.value}),placeholder:lBe()}),(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":fBe(),onClick:()=>f(t.id),children:(0,I.jsx)(Gm,{})})]},t.id))}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,className:`oc-advfilter__add`,onClick:d,children:[(0,I.jsx)(Nm,{}),hBe()]})]}):null]})}var iat=[`eq`,`neq`,`contains`,`gt`,`gte`,`lt`,`lte`],h7=[50,100,200,500],g7=`now-30d`,aat=`now-24h`;function _7(e,t,n=g7,r=`now`){let i=e??n,a=t??r,o=Number(i),s=Number(a);return i!==``&&a!==``&&Number.isFinite(o)&&Number.isFinite(s)?{kind:`absolute`,from:o,to:s}:{kind:`relative`,from:i,to:a}}function v7(e){return e.kind===`absolute`?{from:String(e.from),to:String(e.to)}:{from:e.from,to:e.to}}function y7(e){if(e.length!==0)return JSON.stringify(e)}function b7(e){if(!e)return[];let t;try{t=JSON.parse(e)}catch{return[]}if(!Array.isArray(t))return[];let n=[];for(let e of t){if(typeof e!=`object`||!e)continue;let t=e,r=t.field,i=t.op,a=t.value;typeof r!=`string`||r===``||typeof i!=`string`||!iat.includes(i)||typeof a!=`string`&&typeof a!=`number`&&typeof a!=`boolean`||n.push({field:r,op:i,value:a})}return n}var x7=sp().optional(),S7=sp().optional(),C7=sp().optional(),w7=sp().optional().catch(void 0),oat=Rp({q:x7,kind:sp().default(`all`).catch(`all`),limit:fee().pipe(Bp([Kp(h7[0]),Kp(h7[1]),Kp(h7[2]),Kp(h7[3])])).catch(100),statusClass:Wp([`2xx`,`4xx`,`5xx`]).optional().catch(void 0),principalType:Wp([`user`,`service`,`system`]).optional().catch(void 0),direction:Wp([`inbound`,`outbound`,`internal`]).optional().catch(void 0),roleKey:w7,from:S7,to:S7,adv:C7}),sat=Rp({q:x7,action:w7,impersonated:Wp([`yes`,`no`]).optional().catch(void 0),resource:w7,from:S7,to:S7,adv:C7}),cat=Rp({q:x7,status:Wp([`open`,`acknowledged`,`resolved`,`all`]).default(`open`).catch(`open`),severity:Wp([`info`,`warn`,`critical`]).optional().catch(void 0),kind:w7,from:S7,to:S7}),lat=Rp({from:S7,to:S7}),uat=Rp({q:x7,status:Wp([`active`,`disabled`]).optional().catch(void 0)}),dat=Rp({q:x7,role:w7});Rp({q:x7,mode:Wp([`per-user`,`shared`]).optional().catch(void 0)});var fat={kind:`relative`,from:g7,to:`now`},T7=`__all__`,E7=[`users`,`groups`,`instances`,`bridge`,`serviceAccounts`,`roles`,`access`,`traces`,`kpi`,`anomalies`,`files`,`agentFiles`,`preferences`,`integrations`,`theme`,`chatDefaults`,`audit`,`feedbacks`],D7=[`groups`,`access`,`roles`,`integrations`,`instances`,`bridge`,`theme`,`feedbacks`,`files`,`agentFiles`,`preferences`,`chatDefaults`],O7={groups:`Groupes`,access:`Accès`,serviceAccounts:`Comptes de service`,roles:`Rôles`,traces:`Traces`,kpi:`KPI`,anomalies:`Anomalies`,integrations:`Intégrations`,feedbacks:`Feedbacks`,bridge:`Bridge`,files:`Fichiers`,agentFiles:`Fichiers d'agent`,theme:`Apparence`,preferences:`Préférences`},k7={users:`admin.manage`,groups:`groups.manage`,instances:`admin.manage`,bridge:`bridge.read`,serviceAccounts:`admin.manage`,roles:`admin.manage`,access:`admin.manage`,traces:`traces.read`,kpi:`kpi.read`,anomalies:`anomalies.read`,files:`chats.read`,agentFiles:`agents.files.read`,preferences:`chats.read`,integrations:`admin.manage`,theme:`chats.read`,chatDefaults:`admin.manage`,audit:`admin.manage`,feedbacks:`admin.manage`},A7=[`traces`,`kpi`,`anomalies`,`bridge`,`agentFiles`,`groups`];function j7(e){let t=new Set(e);return E7.filter(e=>t.has(k7[e]))}function M7(e){return`/settings/${e}`}function N7(e){let t=e.split(`/`)[2];return E7.includes(t)?t:void 0}var pat={uiprefs:`preferences`};function mat({granted:e,onToggle:t}){let n=new Set(e),r=A7.filter(e=>n.has(k7[e])).length;return(0,I.jsxs)(V$,{children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsx)(X,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?che():dhe({count:r})})}),(0,I.jsxs)(U$,{align:`start`,className:`w-52`,children:[(0,I.jsx)(G$,{children:mhe()}),A7.map(e=>{let r=k7[e];return(0,I.jsxs)(W$,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,I.jsx)(T1,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,I.jsx)(`span`,{children:O7[e]??e})]},e)})]})]})}function hat(){let e=os({from:`/settings/users`}),t=ss({from:`/settings/users`}),n=e.q??``,r=e.role??T7,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),a=e=>void t({search:t=>({...t,role:e===T7?void 0:e})}),o=P(V.admin.listUsers,{filter:{q:n||void 0,role:r===T7?void 0:r},withAgents:!0}),s=P(V.me.getMe,{host:xO}),c=F(V.admin.setRole),l=F(V.admin.setUserPermissions),u=F(V.admin.startImpersonation),d=F(V.admin.deleteUser),f=F(V.admin.setUserName),p=v1(),m=y1(),h=S1(),[g,_]=(0,N.useState)(null),v=(0,N.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of o??[])e.add(t.role);return[...e]},[o]),y=n!==``||r!==T7;function b(){t({search:{},replace:!0})}async function x(e){try{await c(e)}catch(e){h.error(_he(),e)}}async function S(e){try{await l(e)}catch(e){h.error(bhe(),e)}}async function C(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await p({title:Vhe(),description:Whe({user:t}),confirmWord:qhe(),confirmLabel:Xhe(),destructive:!0}))try{await d({profileId:e._id}),h.success(nge({user:t}))}catch(e){h.error($he(),e)}}async function w(e){let t=e.email||e.name||e.userId.slice(0,8),n=await m({title:cge(),label:dge({user:t}),placeholder:mge(),defaultValue:e.name??``,confirmLabel:qZ()});if(n!==null)try{await f({profileId:e._id,name:n}),h.success(_ge())}catch(e){h.error(bge(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(r7,{q:n,onQChange:i,searchPlaceholder:Che(),onReset:b,canReset:y,children:(0,I.jsxs)(S3,{value:r,onValueChange:a,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:T7,children:Ehe()}),v.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})}),(0,I.jsx)(k5,{title:khe(),rows:o,emptyHint:Mhe(),rowActions:e=>{let t=[{label:GZ(),onSelect:()=>_({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:age(),onSelect:()=>void w(e)}];return e.userId!==s?.userId&&t.push({label:Fhe(),onSelect:()=>void u({profileId:e._id})},{label:Rhe(),variant:`destructive`,onSelect:()=>void C(e)}),t},columns:[{header:Cge(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,I.jsxs)(`div`,{className:`flex flex-col`,children:[(0,I.jsx)(`span`,{children:t}),n?(0,I.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:Ege(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,I.jsxs)(S3,{value:e.role,onValueChange:t=>void x({profileId:e._id,role:t}),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-28`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:`pending`,children:`pending`}),(0,I.jsx)(Q,{value:`user`,children:`user`}),(0,I.jsx)(Q,{value:`admin`,children:`admin`})]})]})},{header:kge(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,I.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:Mge()}):(0,I.jsx)(mat,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),S({profileId:e._id,permissions:[...n]})}})},{header:WZ(),cell:e=>(0,I.jsx)(A5,{icon:(0,I.jsx)(Im,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,I.jsx)(git,{profileId:g?.profileId??null,userLabel:g?.label??``,open:g!==null,onOpenChange:e=>{e||_(null)}})]})}var P7={name:``,gatewayUrl:``,bridgeUrl:``,displayName:``,kind:`openclaw`,gatewayVersion:``,gatewayHttpUrl:``},gat={openclaw:[`token`,`deviceIdentity`],hermes:[`apiKey`]};function _at(e){return{name:e.name,gatewayUrl:e.gatewayUrl,bridgeUrl:e.bridgeUrl??``,displayName:e.displayName??``,kind:e.kind??`openclaw`,gatewayVersion:e.gatewayVersion??``,gatewayHttpUrl:e.gatewayHttpUrl??``}}function vat(){let e=P(V.admin.listInstances,{}),t=P(V.agents.listAllInstanceAgents,{}),n=F(V.admin.upsertInstance),r=F(V.admin.deleteInstance),i=S1(),[a,o]=(0,N.useState)(!1),[s,c]=(0,N.useState)(P7),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(null),[p,m]=(0,N.useState)(null),[h,g]=(0,N.useState)(null);async function _(){try{await n({instanceId:h??void 0,name:s.name,gatewayUrl:s.gatewayUrl,bridgeUrl:s.bridgeUrl||void 0,displayName:s.displayName||void 0,kind:s.kind,gatewayVersion:s.gatewayVersion||void 0,gatewayHttpUrl:s.gatewayHttpUrl||void 0}),c(P7),g(null),o(!1)}catch(e){i.error(zge(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[Hge(),(0,I.jsx)(`strong`,{children:Gge()}),Jge()]}),(0,I.jsx)(k5,{title:Zge(),rows:e,addLabel:e_e(),onAdd:()=>{g(null),c(P7),o(!0)},emptyHint:r_e(),columns:[{header:o_e(),cell:e=>e.name,sort:e=>e.name},{header:l_e(),cell:e=>(0,I.jsx)($,{variant:`outline`,children:e.kind??`openclaw`}),sort:e=>e.kind??`openclaw`},{header:f_e(),cell:e=>e.gatewayUrl,sort:e=>e.gatewayUrl},{header:h_e(),cell:e=>e.displayName??`—`,sort:e=>e.displayName??null},{header:WZ(),cell:e=>{let n=(t?.[e.name]??[]).filter(e=>e.presentInLastOk!==!1&&e.enabled);if(n.length===0)return(0,I.jsx)(`span`,{className:`text-muted-foreground`,children:`—`});let r=t=>e.defaultAgentId===t;return(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:[...n].sort((e,t)=>Number(r(t.agentId))-Number(r(e.agentId))).map(e=>(0,I.jsxs)($,{variant:r(e.agentId)?`default`:`outline`,title:r(e.agentId)?tQ():void 0,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]},e.agentId))})}}],rowActions:e=>[{label:E_e(),onSelect:()=>{g(e._id),c(_at(e)),o(!0)}},{label:GZ(),onSelect:()=>u(e.name)},{label:gve(),onSelect:()=>m(e)},{label:v_e(),onSelect:()=>f(e)},{label:KZ(),variant:`destructive`,onSelect:()=>void r({instanceId:e._id})}],bulkActions:[{label:KZ(),variant:`destructive`,onSelect:e=>e.forEach(e=>void r({instanceId:e}))}]}),(0,I.jsx)(Z8,{open:a,onOpenChange:o,title:h?k_e():C_e(),description:F_e(),canSubmit:!!(s.name&&s.gatewayUrl),onSubmit:_,submitLabel:qZ(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(L7,{label:B_e(),children:[(0,I.jsx)(t1,{value:s.name,disabled:h!==null,onChange:e=>c({...s,name:e.target.value})}),h?(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:M_e()}):null]}),(0,I.jsx)(L7,{label:U_e(),children:(0,I.jsxs)(S3,{value:s.kind,onValueChange:e=>c({...s,kind:e}),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:`openclaw`,children:`OpenClaw`}),(0,I.jsx)(Q,{value:`hermes`,children:`Hermes`})]})]})}),(0,I.jsx)(L7,{label:K_e(),children:(0,I.jsx)(t1,{value:s.gatewayUrl,onChange:e=>c({...s,gatewayUrl:e.target.value})})}),(0,I.jsx)(L7,{label:Y_e(),children:(0,I.jsx)(t1,{value:s.bridgeUrl,placeholder:Q_e(),onChange:e=>c({...s,bridgeUrl:e.target.value})})}),(0,I.jsx)(L7,{label:tve(),children:(0,I.jsx)(t1,{value:s.displayName,onChange:e=>c({...s,displayName:e.target.value})})}),(0,I.jsx)(L7,{label:ive(),children:(0,I.jsx)(t1,{value:s.gatewayVersion,placeholder:sve(),onChange:e=>c({...s,gatewayVersion:e.target.value})})}),(0,I.jsx)(L7,{label:uve(),children:(0,I.jsx)(t1,{value:s.gatewayHttpUrl,placeholder:pve(),onChange:e=>c({...s,gatewayHttpUrl:e.target.value})})})]})}),(0,I.jsx)(Eat,{instanceName:l,open:l!==null,onOpenChange:e=>{e||u(null)}}),d?(0,I.jsx)(u7,{instance:d,onClose:()=>f(null)},d._id):null,p?(0,I.jsx)(yat,{instance:p,onClose:()=>m(null)},p._id):null]})}function yat({instance:e,onClose:t}){let n=P(V.instanceSecrets.listInstanceSecretStatus,{}),r=gat[e.kind??`openclaw`],i=(0,N.useMemo)(()=>{let t={};for(let r of n??[])r.instanceId===e._id&&(t[r.field]=r.updatedAt);return t},[n,e._id]);return(0,I.jsx)(u1,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(d1,{onOpenAutoFocus:e=>e.preventDefault(),children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:yve({instance:e.displayName??e.name})}),(0,I.jsx)(h1,{children:Sve()})]}),(0,I.jsx)(`div`,{className:`oc-form`,children:r.map(t=>(0,I.jsx)(Sat,{instanceId:e._id,field:t,updatedAt:i[t]??null},t))}),(0,I.jsx)(`div`,{className:`oc-bridgesecret`,children:(0,I.jsx)(xat,{instance:e})}),(0,I.jsx)(bat,{instance:e})]})})}function bat({instance:e}){let t=$n(V.instanceSync.forceInstanceSync),n=S1(),[r,i]=(0,N.useState)(!1);async function a(){if(!r){i(!0);try{switch((await t({instanceId:e._id})).status){case`synced`:n.success(wye());break;case`no_agents`:n.success(Aye());break;case`no_bridge_url`:n.error(Nye());break;case`deploy_misconfigured`:n.error(Iye());break;case`unauthorized`:n.error(Hye());break;case`not_served`:n.error(Gye());break;default:n.error(zye());break}}catch(e){n.error(Dye(),e)}finally{i(!1)}}}return(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Jye()}),(0,I.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,I.jsx)(X,{size:`sm`,variant:`outline`,onClick:()=>void a(),disabled:r,children:r?xye():vye()})})]})}function xat({instance:e}){let t=P(V.bridgeAuth.listBridgeAuthStatus,{}),n=$n(V.bridgeAuth.mintBridgeSecret),r=F(V.bridgeAuth.revokeBridgeSecret),i=S1(),[a,o]=(0,N.useState)(!1),[s,c]=(0,N.useState)(null),[l,u]=(0,N.useState)(!1),d=(t??[]).find(t=>t.instanceId===e._id),f=d!==void 0;async function p(){if(!a){o(!0);try{c((await n({instanceId:e._id})).plaintext),u(!1)}catch(e){i.error(QZ(),e)}finally{o(!1)}}}async function m(){if(!a){o(!0);try{await r({instanceId:e._id}),c(null),i.success(fbe())}catch(e){i.error(QZ(),e)}finally{o(!1)}}}async function h(){if(s)try{await navigator.clipboard.writeText(s),u(!0)}catch{}}return(0,I.jsxs)(L7,{label:Zye(),children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:ebe()}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)($,{variant:f?`outline`:`secondary`,children:f?`${JZ()} · ${d.prefix}…${d.lastFour}`:YZ()}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(X,{size:`sm`,onClick:()=>void p(),disabled:a,children:f?obe():rbe()}),f?(0,I.jsx)(X,{size:`sm`,variant:`destructive`,onClick:()=>void m(),disabled:a,children:lbe()}):null]})]}),s?(0,I.jsxs)(`div`,{className:`oc-bridgesecret__reveal`,children:[(0,I.jsx)(`p`,{className:`oc-sa__minted-warning`,children:_be()}),(0,I.jsxs)(`div`,{className:`oc-sa__minted-box`,children:[(0,I.jsx)(`code`,{className:`oc-sa__minted-plain`,children:s}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void h(),children:l?JV():ZV()})]}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,onClick:()=>{c(null),u(!1)},children:$Z()})]}):null]})}function Sat({instanceId:e,field:t,updatedAt:n}){let r=$n(V.instanceSecrets.setInstanceSecret),i=F(V.instanceSecrets.clearInstanceSecret),a=$n(V.deviceIdentity.generateDeviceIdentity),o=S1(),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(null),[p,m]=(0,N.useState)(!1),h=n!==null,g=t===`deviceIdentity`,_=t===`token`?Tve():t===`deviceIdentity`?Ove():jve();async function v(){if(!(!s.trim()||l)){u(!0);try{await r({instanceId:e,field:t,plaintext:s}),c(``),f(null),m(!1),o.success(Xve())}catch(e){o.error(XZ(),e)}finally{u(!1)}}}async function y(){if(!l){u(!0);try{await i({instanceId:e,field:t}),f(null),m(!1),o.success(tye())}catch(e){o.error(XZ(),e)}finally{u(!1)}}}async function b(){if(!l){u(!0);try{f(await a({instanceId:e})),m(!1),o.success(ZZ())}catch(e){o.error(hye(),e)}finally{u(!1)}}}let x=d?`openclaw devices approve ${d.id}`:``;async function S(){if(x)try{await navigator.clipboard.writeText(x),m(!0)}catch{}}return(0,I.jsxs)(L7,{label:_,children:[g?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:sye()}):null,(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)($,{variant:h?`outline`:`secondary`,children:h?JZ():YZ()}),(0,I.jsx)(t1,{type:`password`,autoComplete:`off`,className:`flex-1 min-w-32`,value:s,placeholder:h?Vve():Rve(),onChange:e=>c(e.target.value)}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(X,{size:`sm`,onClick:()=>void v(),disabled:l||s.trim().length===0,children:Wve()}),g?(0,I.jsx)(X,{size:`sm`,variant:`outline`,onClick:()=>void b(),disabled:l,children:iye()}):null,h?(0,I.jsx)(X,{size:`sm`,variant:`destructive`,onClick:()=>void y(),disabled:l,children:qve()}):null]})]}),d?(0,I.jsxs)(`div`,{className:`oc-bridgesecret__reveal`,children:[(0,I.jsx)(`p`,{className:`text-sm font-medium`,children:ZZ()}),(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:fye()}),(0,I.jsxs)(`div`,{className:`oc-sa__minted-box`,children:[(0,I.jsx)(`code`,{className:`oc-sa__minted-plain`,children:x}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void S(),children:p?JV():ZV()})]}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,onClick:()=>{f(null),m(!1)},children:$Z()})]}):null]})}var Cat={conversational:Hbe,documentary:Jbe},wat={conversational:Gbe,documentary:Zbe},F7=e=>(Cat[e]??(()=>e))(),I7=e=>(wat[e]??(()=>``))();function Tat({agentId:e,types:t,onToggle:n}){return(0,I.jsxs)(`div`,{className:`oc-agentcard__types`,children:[(0,I.jsx)(`span`,{className:`oc-agentcard__types-label`,children:Abe()}),t.map(e=>(0,I.jsx)($,{variant:`secondary`,className:`oc-agenttype__chip`,title:I7(e),children:F7(e)},e)),(0,I.jsxs)(J$,{children:[(0,I.jsx)(Y$,{asChild:!0,children:(0,I.jsx)(X,{type:`button`,variant:`outline`,size:`sm`,className:`h-7`,children:Nbe()})}),(0,I.jsxs)(X$,{align:`start`,className:`oc-agenttypes-pop`,children:[(0,I.jsx)(`p`,{className:`oc-agenttypes-pop__title`,children:Ibe()}),(0,I.jsx)(`p`,{className:`oc-agenttypes-pop__hint`,children:zbe()}),(0,I.jsx)(`div`,{className:`oc-agenttypes-pop__list`,children:S5.map(r=>{let i=`agtype-${e}-${r}`;return(0,I.jsxs)(`div`,{className:`oc-agenttypes-pop__item`,children:[(0,I.jsx)(T1,{id:i,checked:t.includes(r),onCheckedChange:()=>n(r)}),(0,I.jsxs)(`label`,{htmlFor:i,className:`oc-agenttypes-pop__text`,children:[(0,I.jsx)(`span`,{className:`oc-agenttypes-pop__name`,children:F7(r)}),(0,I.jsx)(`span`,{className:`oc-agenttypes-pop__desc`,children:I7(r)})]})]},r)})})]})]})]})}function Eat({instanceName:e,open:t,onOpenChange:n}){let r=P(V.agents.listAgentsForInstance,t&&e?{instanceName:e}:`skip`),i=F(V.agents.setAgentEnabled).withOptimisticUpdate((e,{instanceName:t,agentId:n,enabled:r})=>{let i=e.getQuery(V.agents.listAgentsForInstance,{instanceName:t});i&&e.setQuery(V.agents.listAgentsForInstance,{instanceName:t},{...i,agents:i.agents.map(e=>e.agentId===n?{...e,enabled:r}:e)})}),a=F(V.agents.setInstanceDefaultAgent).withOptimisticUpdate((e,{instanceName:t,agentId:n})=>{let r=e.getQuery(V.agents.listAgentsForInstance,{instanceName:t});r&&e.setQuery(V.agents.listAgentsForInstance,{instanceName:t},{...r,defaultAgentId:n})}),o=F(V.agents.setAgentTypes).withOptimisticUpdate((e,{instanceName:t,agentId:n,types:r})=>{let i=e.getQuery(V.agents.listAgentsForInstance,{instanceName:t});if(!i)return;let a=hit(r);e.setQuery(V.agents.listAgentsForInstance,{instanceName:t},{...i,agents:i.agents.map(e=>e.agentId===n?{...e,types:a}:e)})}),s=F(V.agents.removeInstanceAgent),c=v1(),l=S1();async function u(t,n){if(e)try{await i({instanceName:e,agentId:t,enabled:n})}catch(e){l.error(eQ(),e)}}async function d(t){if(e)try{await a({instanceName:e,agentId:t})}catch(e){l.error(eQ(),e)}}async function f(t,n,r){if(!e)return;let i=r.includes(n)?r.filter(e=>e!==n):[...r,n];try{await o({instanceName:e,agentId:t,types:i})}catch(e){l.error(eQ(),e)}}async function p(t,n){if(e&&await c({title:oxe({name:n}),description:lxe(),confirmLabel:fxe(),destructive:!0}))try{await s({instanceName:e,agentId:t}),l.success(hxe())}catch(e){l.error(eQ(),e)}}return(0,I.jsx)(u1,{open:t,onOpenChange:n,children:(0,I.jsxs)(d1,{className:`oc-access`,children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:Sbe({name:e??``})}),(0,I.jsx)(h1,{children:Tbe()})]}),r===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:vxe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-access__poll`,children:r.discovery===null?xxe():r.discovery.lastPollOk?wxe():Dxe({error:r.discovery.error??`?`})}),r.agents.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Axe()}):(0,I.jsx)(`div`,{className:`oc-access__list`,children:r.agents.map(e=>{let t=e.presentInLastOk===!1,n=r.defaultAgentId===e.agentId,i=e.displayName??e.agentId,a=e.types??[];return(0,I.jsxs)(`div`,{className:`oc-agentcard`+(e.enabled?``:` oc-agentcard--off`),children:[(0,I.jsxs)(`div`,{className:`oc-agentcard__head`,children:[(0,I.jsx)(T1,{checked:e.enabled,disabled:t,"aria-label":i,onCheckedChange:t=>void u(e.agentId,t===!0)}),(0,I.jsxs)(`span`,{className:`oc-agentcard__name`,title:i,children:[e.emoji?`${e.emoji} `:``,i]}),e.model?(0,I.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,t?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:Fxe()}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,className:`h-7 text-destructive`,onClick:()=>void p(e.agentId,i),children:rxe()})]}):n?(0,I.jsx)($,{variant:`default`,children:tQ()}):(0,I.jsx)(X,{size:`sm`,variant:`outline`,className:`h-7`,disabled:!e.enabled,onClick:()=>void d(e.agentId),children:exe()})]}),e.enabled?(0,I.jsx)(Tat,{agentId:e.agentId,types:a,onToggle:t=>void f(e.agentId,t,a)}):null]},e.agentId)})})]})]})})}function L7({label:e,children:t}){return(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:e}),t]})}var Dat=[{value:`action`,label:`action`},{value:`realLabel`,label:`acteur réel`},{value:`targetLabel`,label:`au nom de`},{value:`impersonated`,label:`usurpation`},{value:`resource`,label:`ressource`},{value:`resourceId`,label:`id ressource`}];function Oat(){let e=os({from:`/settings/audit`}),t=ss({from:`/settings/audit`}),n=e.q??``,r=e.action??T7,i=e.impersonated??T7,a=e.resource??T7,o=_7(e.from,e.to),s=(0,N.useMemo)(()=>b7(e.adv),[e.adv]),{from:c,to:l}=e7(o),u=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),d=e=>void t({search:t=>({...t,action:e===T7?void 0:e})}),f=e=>void t({search:t=>({...t,impersonated:e===T7?void 0:e})}),p=e=>void t({search:t=>({...t,resource:e===T7?void 0:e})}),m=e=>void t({search:t=>({...t,...v7(e)})}),h=e=>void t({search:t=>({...t,adv:y7(e)}),replace:!0}),g=P(V.admin.listAudit,{filter:{q:n||void 0,from:c,to:l,action:r===T7?void 0:r,resource:a===T7?void 0:a,impersonated:i===T7?void 0:i===`yes`,advanced:s.length>0?s:void 0}}),_=(0,N.useMemo)(()=>{let e=new Set;for(let t of g??[])e.add(t.action);return[...e].sort()},[g]),v=(0,N.useMemo)(()=>{let e=new Set;for(let t of g??[])t.resource&&e.add(t.resource);return[...e].sort()},[g]),y=n!==``||r!==T7||i!==T7||a!==T7||s.length>0||o.kind!==`relative`||o.from!==fat.from;function b(){t({search:{},replace:!0})}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[Rxe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:Vxe()})]}),(0,I.jsxs)(r7,{q:n,onQChange:u,searchPlaceholder:Wxe(),timeRange:o,onTimeRangeChange:m,onReset:b,canReset:y,children:[(0,I.jsxs)(S3,{value:r,onValueChange:d,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(C3,{placeholder:nQ()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:T7,children:Yxe()}),_.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(S3,{value:i,onValueChange:f,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:T7,children:Qxe()}),(0,I.jsx)(Q,{value:`yes`,children:tSe()}),(0,I.jsx)(Q,{value:`no`,children:iSe()})]})]}),(0,I.jsxs)(S3,{value:a,onValueChange:p,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(C3,{placeholder:rQ()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:T7,children:lSe()}),v.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),(0,I.jsx)(m7,{fields:Dat,seed:s,onChange:h}),(0,I.jsx)(k5,{title:fSe(),rows:g,emptyHint:hSe(),columns:[{header:vSe(),cell:e=>new Date(e.at).toLocaleString(`fr-FR`),sort:e=>e.at},{header:nQ(),cell:e=>e.action,sort:e=>e.action},{header:xSe(),cell:e=>e.realLabel,sort:e=>e.realLabel},{header:wSe(),cell:e=>e.targetLabel??`—`,sort:e=>e.targetLabel??null},{header:rQ(),cell:e=>e.resource?e.resource+(e.resourceId?` · ${e.resourceId.slice(0,8)}`:``):`—`,sort:e=>e.resource??null}]})]})}var kat={pending:swe,user:uwe,admin:pwe,observer:gwe,agent:ywe};function R7(e){if(e.builtin){let t=kat[e.key];if(t)return t()}return e.description}var z7=[{value:`never`,label:()=>rH(),days:null},{value:`30`,label:()=>oH(),days:30},{value:`90`,label:()=>lH(),days:90}],Aat=720*60*60*1e3,B7=`__all__`,V7={name:``,roleKey:``,description:``};function jat(){let e=os({from:`/settings/serviceAccounts`}),t=ss({from:`/settings/serviceAccounts`}),n=e.q??``,r=e.status??B7,[i,a]=(0,N.useState)(B7),o=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),s=e=>void t({search:t=>({...t,status:e===B7?void 0:e})}),c=P(V.apiKeys.listServiceAccounts,{filter:{q:n||void 0,role:i===B7?void 0:i,disabled:r===B7?void 0:r===`disabled`}}),l=P(V.apiKeys.listKeys,{}),u=P(V.apiKeys.listRoles,{}),d=F(V.apiKeys.createServiceAccount),f=F(V.apiKeys.updateServiceAccount),p=F(V.apiKeys.deleteServiceAccount),m=$n(V.apiKeys.mintApiKey),h=F(V.apiKeys.revokeApiKey),g=v1(),_=S1(),v=n!==``||i!==B7||r!==B7;function y(){a(B7),t({search:{},replace:!0})}let[b,x]=(0,N.useState)(!1),[S,C]=(0,N.useState)(V7),[w,T]=(0,N.useState)(null),[E,D]=(0,N.useState)(new Set),[O,ee]=(0,N.useState)(null),te=(0,N.useRef)(!1),[k,A]=(0,N.useState)(new Set),[j,ne]=(0,N.useState)({}),[re,M]=(0,N.useState)(null),ie=(0,N.useMemo)(()=>{let e=new Map;for(let t of l??[]){let n=e.get(t.serviceAccountId)??[];n.push(t),e.set(t.serviceAccountId,n)}return e},[l]);function ae(e){D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async function oe(){try{w?(await f({serviceAccountId:w,name:S.name,roleKey:S.roleKey,description:S.description}),_.success(hB())):await d({name:S.name,roleKey:S.roleKey,description:S.description||void 0}),C(V7),T(null),x(!1)}catch(e){_.error(w?fB():lB(),e)}}function se(e){C({name:e.name,roleKey:e.roleKey,description:e.description??``}),T(e._id),x(!0)}async function ce(e){if(te.current)return;te.current=!0;let t=j[e._id]??`never`,n=z7.find(e=>e.value===t)?.days??null,r=n?Date.now()+n*24*60*60*1e3:void 0;ee(e._id);try{let t=await m({serviceAccountId:e._id,expiresAt:r});M({accountName:e.name,plaintext:t.plaintext,prefix:t.prefix,lastFour:t.lastFour})}catch(e){_.error(vB(),e)}finally{te.current=!1,ee(null)}}async function le(e){if(await g({title:xB(),description:(0,I.jsxs)(I.Fragment,{children:[wB(),` `,(0,I.jsx)(`span`,{className:`font-mono`,children:e.name}),` `,DB(),` `,(0,I.jsx)(`strong`,{children:AB()}),` `,NB()]}),confirmWord:e.name,confirmLabel:IB(),destructive:!0}))try{await p({serviceAccountId:e._id}),_.success(zB(),e.name)}catch(e){_.error(HB(),e)}}async function ue(e){if(await g({title:GB(),description:(0,I.jsxs)(I.Fragment,{children:[JB(),` `,(0,I.jsxs)(`span`,{className:`font-mono`,children:[e.prefix,`…`,e.lastFour]}),` `,ZB()]}),confirmLabel:eV(),destructive:!0})&&!k.has(e._id)){A(t=>new Set(t).add(e._id));try{await h({keyId:e._id})}catch(e){_.error(rV(),e)}finally{A(t=>{let n=new Set(t);return n.delete(e._id),n})}}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:hR()}),(0,I.jsxs)(r7,{q:n,onQChange:o,searchPlaceholder:vR(),onReset:y,canReset:v,children:[(0,I.jsxs)(S3,{value:i,onValueChange:a,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(C3,{placeholder:xR()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:B7,children:wR()}),(u??[]).map(e=>(0,I.jsx)(Q,{value:e.key,children:e.key},e._id))]})]}),(0,I.jsxs)(S3,{value:r,onValueChange:s,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:B7,children:DR()}),(0,I.jsx)(Q,{value:`active`,children:AR()}),(0,I.jsx)(Q,{value:`disabled`,children:NR()})]})]})]}),(0,I.jsx)(k5,{title:IR(),rows:c,addLabel:zR(),onAdd:()=>{C(V7),T(null),x(!0)},emptyHint:HR(),isExpanded:e=>E.has(e._id),renderExpanded:e=>(0,I.jsx)(Mat,{account:e,keys:ie.get(e._id)??[],onRevoke:ue,revoking:k}),rowActions:e=>[{label:ez(),onSelect:()=>se(e)},{label:GR(),onSelect:()=>void ce(e)},{label:E.has(e._id)?JR():ZR(),onSelect:()=>ae(e._id)},{label:rz(),variant:`destructive`,onSelect:()=>void le(e)}],columns:[{header:``,className:`w-8`,cell:e=>(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":E.has(e._id)?oz():lz(),onClick:()=>ae(e._id),children:E.has(e._id)?(0,I.jsx)(dm,{}):(0,I.jsx)(fm,{})})},{header:fz(),sort:e=>e.name,cell:e=>(0,I.jsxs)(`div`,{className:`flex flex-col`,children:[(0,I.jsx)(`span`,{children:e.name}),e.description?(0,I.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e.description}):null]})},{header:hz(),sort:e=>e.roleKey,cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.roleKey})},{header:vz(),sort:e=>+!!e.disabled,cell:e=>e.disabled?(0,I.jsx)($,{variant:`destructive`,children:NR()}):(0,I.jsx)($,{variant:`outline`,children:AR()})},{header:xz(),cell:e=>(0,I.jsxs)(S3,{value:j[e._id]??`never`,onValueChange:t=>ne(n=>({...n,[e._id]:t})),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:z7.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label()},e.value))})]})},{header:wz(),sort:e=>(ie.get(e._id)??[]).filter(e=>!e.disabled).length,cell:e=>{let t=(ie.get(e._id)??[]).filter(e=>!e.disabled).length;return(0,I.jsx)(`span`,{className:`oc-sa__keycount`,children:O===e._id?Dz():Az({count:t})})}}]}),(0,I.jsx)(Z8,{open:b,onOpenChange:e=>{x(e),e||T(null)},title:w?Nz():Hz(),description:w?Iz():Gz(),canSubmit:!!(S.name&&S.roleKey),onSubmit:oe,submitLabel:w?zz():Jz(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Zz()}),(0,I.jsx)(t1,{value:S.name,onChange:e=>C({...S,name:e.target.value})})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:eB()}),(0,I.jsxs)(S3,{value:S.roleKey||void 0,onValueChange:e=>C({...S,roleKey:e}),children:[(0,I.jsx)(w3,{className:`w-full`,children:(0,I.jsx)(C3,{placeholder:rB()})}),(0,I.jsx)(T3,{children:(u??[]).map(e=>(0,I.jsxs)(Q,{value:e.key,children:[e.name,` (`,e.key,`)`]},e._id))})]}),(()=>{let e=(u??[]).find(e=>e.key===S.roleKey),t=e?R7(e):null;return t?(0,I.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t}):null})()]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:oB()}),(0,I.jsx)(t1,{value:S.description,onChange:e=>C({...S,description:e.target.value})})]})]})}),(0,I.jsx)(Nat,{minted:re,onClose:()=>M(null)})]})}function Mat({account:e,keys:t,onRevoke:n,revoking:r}){return(0,I.jsxs)(`div`,{className:`oc-sa__keys`,children:[(0,I.jsxs)(`div`,{className:`oc-sa__keys-head`,children:[oV(),` `,(0,I.jsx)(`span`,{className:`font-medium`,children:e.name})]}),t.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:lV()}):(0,I.jsxs)(`table`,{className:`oc-sa__keytable`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{children:fV()}),(0,I.jsx)(`th`,{children:hV()}),(0,I.jsx)(`th`,{children:vV()}),(0,I.jsx)(`th`,{children:xV()}),(0,I.jsx)(`th`,{children:wV()}),(0,I.jsx)(`th`,{children:DV()}),(0,I.jsx)(`th`,{})]})}),(0,I.jsx)(`tbody`,{children:t.map(t=>(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`td`,{children:(0,I.jsxs)(`code`,{className:`oc-sa__keyid`,children:[t.prefix,`…`,t.lastFour]})}),(0,I.jsx)(`td`,{children:(0,I.jsx)($,{variant:`secondary`,children:e.roleKey})}),(0,I.jsx)(`td`,{children:Pat(t.createdAt)}),(0,I.jsx)(`td`,{className:Fat(t.lastUsedAt)?`oc-sa__stale`:``,children:Iat(t.lastUsedAt)}),(0,I.jsx)(`td`,{children:Lat(t.expiresAt)}),(0,I.jsx)(`td`,{children:Rat(t)}),(0,I.jsx)(`td`,{className:`text-right`,children:t.disabled?null:(0,I.jsx)(X,{variant:`destructive`,size:`sm`,disabled:r.has(t._id),onClick:()=>n(t),children:r.has(t._id)?AV():NV()})})]},t._id))})]})]})}function Nat({minted:e,onClose:t}){let[n,r]=(0,N.useState)(!1);async function i(){if(e)try{await navigator.clipboard.writeText(e.plaintext),r(!0),window.setTimeout(()=>r(!1),2e3)}catch{}}return(0,I.jsx)(u1,{open:e!==null,onOpenChange:e=>{e||(r(!1),t())},children:e?(0,I.jsxs)(d1,{className:`max-w-lg`,showCloseButton:!1,onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:IV()}),(0,I.jsx)(h1,{children:zV({name:e.accountName})})]}),(0,I.jsx)(`div`,{className:`oc-sa__minted-warning`,children:HV()}),(0,I.jsxs)(`div`,{className:`oc-sa__minted-box`,children:[(0,I.jsx)(`code`,{className:`oc-sa__minted-plain`,children:e.plaintext}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,onClick:()=>void i(),"aria-label":GV(),children:[n?(0,I.jsx)(um,{}):(0,I.jsx)(_m,{}),n?JV():ZV()]})]}),(0,I.jsx)(p1,{children:(0,I.jsx)(X,{onClick:()=>{r(!1),t()},children:eH()})})]}):null})}function Pat(e){return new Date(e).toLocaleString(`fr-FR`)}function Fat(e){return e===null?!1:Date.now()-e>Aat}function Iat(e){return e===null?fH():new Date(e).toLocaleString(`fr-FR`)}function Lat(e){return e===null?`—`:new Date(e).toLocaleDateString(`fr-FR`)}function Rat(e){return e.disabled?(0,I.jsx)($,{variant:`destructive`,children:hH()}):e.expiresAt!==null&&e.expiresAt<Date.now()?(0,I.jsx)($,{variant:`outline`,children:vH()}):(0,I.jsx)($,{variant:`outline`,children:xH()})}var H7=[{group:()=>DSe(),keys:[{key:`traces.read`,label:()=>iQ()},{key:`traces.read.content`,label:()=>WSe(),phi:!0},{key:`traces.write`,label:()=>aQ()}]},{group:()=>ASe(),keys:[{key:`kpi.read`,label:()=>iQ()},{key:`kpi.write`,label:()=>aQ()}]},{group:()=>NSe(),keys:[{key:`openclaw.query`,label:()=>YSe()},{key:`anomalies.read`,label:()=>QSe()},{key:`anomalies.report`,label:()=>tCe()}]},{group:()=>ISe(),keys:[{key:`chats.read`,label:()=>iQ()},{key:`selfheal`,label:()=>sCe()}]},{group:()=>zSe(),keys:[{key:`admin.manage`,label:()=>iCe()}]}],zat=H7.flatMap(e=>e.keys.map(e=>e.key));function U7(e){return e.includes(`*`)}var W7={key:``,name:``,description:``};function Bat(){let e=P(V.apiKeys.listRoles,{}),t=F(V.apiKeys.createRole),n=F(V.apiKeys.ensureRolesSeeded),r=F(V.apiKeys.updateRolePermissions).withOptimisticUpdate((e,{roleId:t,permissions:n})=>{let r=e.getQuery(V.apiKeys.listRoles,{});r&&e.setQuery(V.apiKeys.listRoles,{},r.map(e=>e._id===t?{...e,permissions:n}:e))}),i=v1(),a=S1(),[o,s]=(0,N.useState)(!1),[c,l]=(0,N.useState)(W7),[u,d]=(0,N.useState)(new Set);(0,N.useEffect)(()=>{n({}).catch(e=>{a.error(pCe(),e)})},[n,a]);let f=e??[];async function p(e,t){if(U7(e.permissions)||u.has(e._id))return;let n=e.permissions.includes(t)?e.permissions.filter(e=>e!==t):[...e.permissions,t];if(!(e.builtin&&!await i({title:gCe({name:e.name}),description:yCe(),confirmLabel:SCe()}))){d(t=>new Set(t).add(e._id));try{await r({roleId:e._id,permissions:n})}catch(e){a.error(TCe(),e)}finally{d(t=>{let n=new Set(t);return n.delete(e._id),n})}}}async function m(){try{await t({key:c.key,name:c.name,description:c.description||void 0,permissions:[]}),l(W7),s(!1)}catch(e){a.error(OCe(),e)}}let h=e===void 0,g=!h&&f.length===0;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[jCe(),` `,(0,I.jsx)(`code`,{children:`admin`}),` `,PCe(),` `,(0,I.jsx)(`code`,{children:`traces.read.content`}),` `,LCe()]}),(0,I.jsxs)(`div`,{className:`oc-dt`,children:[(0,I.jsxs)(`div`,{className:`oc-dt__bar`,children:[(0,I.jsx)(`h2`,{className:`oc-dt__title`,children:BCe()}),(0,I.jsx)(`div`,{className:`oc-dt__bar-actions`,children:(0,I.jsx)(X,{size:`sm`,onClick:()=>{l(W7),s(!0)},children:UCe()})})]}),h?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KCe()}):g?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:YCe()}):(0,I.jsx)(`div`,{className:`oc-matrix__scroll`,children:(0,I.jsxs)(`table`,{className:`oc-matrix`,children:[(0,I.jsxs)(`thead`,{children:[(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{className:`oc-matrix__corner`,rowSpan:2,children:QCe()}),H7.map(e=>(0,I.jsx)(`th`,{className:`oc-matrix__group`,colSpan:e.keys.length,children:e.group()},e.group()))]}),(0,I.jsx)(`tr`,{children:H7.flatMap(e=>e.keys.map(e=>(0,I.jsxs)(`th`,{className:`oc-matrix__perm`,title:e.phi?uCe({key:e.key}):e.key,children:[e.label(),e.phi?(0,I.jsx)(`span`,{className:`oc-matrix__phi`,children:` ⚠`}):null]},e.key)))})]}),(0,I.jsx)(`tbody`,{children:f.map(e=>{let t=U7(e.permissions),n=u.has(e._id);return(0,I.jsxs)(`tr`,{children:[(0,I.jsxs)(`th`,{className:`oc-matrix__rolecell`,children:[(0,I.jsxs)(`div`,{className:`oc-matrix__rolename`,children:[(0,I.jsx)(`span`,{children:e.name}),(0,I.jsx)(`code`,{className:`oc-matrix__rolekey`,children:e.key}),e.builtin?(0,I.jsxs)($,{variant:`outline`,className:`gap-1`,children:[(0,I.jsx)(wm,{}),` `,twe()]}):(0,I.jsx)($,{variant:`secondary`,children:iwe()})]}),R7(e)?(0,I.jsx)(`p`,{className:`oc-matrix__roledesc`,children:R7(e)}):null]}),zat.map(r=>(0,I.jsx)(`td`,{className:`oc-matrix__cell`,children:(0,I.jsx)(T1,{checked:t||e.permissions.includes(r),disabled:t||n,"aria-label":`${e.key} · ${r}`,title:t?Swe():n?Twe():r,onCheckedChange:()=>void p(e,r)})},r))]},e.key)})})]})})]}),(0,I.jsx)(Z8,{open:o,onOpenChange:s,title:Owe(),description:jwe(),canSubmit:!!(c.key&&c.name),onSubmit:m,submitLabel:Pwe(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Lwe()}),(0,I.jsx)(t1,{value:c.key,placeholder:Bwe(),onChange:e=>l({...c,key:e.target.value})})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Uwe()}),(0,I.jsx)(t1,{value:c.name,onChange:e=>l({...c,name:e.target.value})})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:Kwe()}),(0,I.jsx)(t1,{value:c.description,onChange:e=>l({...c,description:e.target.value})})]})]})})]})}function Vat(e,t,n){let r=t.trim().toLowerCase();return[...r?e.filter(e=>[e.email,e.name,e.canonical].some(e=>e!=null&&e.toLowerCase().includes(r))):e.slice()].sort((e,t)=>!n.has(e.userId)-+!n.has(t.userId))}function Hat(e,t){let n=e.filter(e=>e.source===`discovered`),r=t.trim().toLowerCase();return r?n.filter(e=>(e.displayName??e.agentId).toLowerCase().includes(r)||e.agentId.toLowerCase().includes(r)):n}function Uat(e){let t=e.name?.trim()??``,n=e.email?.trim()??``,r=e.canonical?.trim()||`u-${e.userId.slice(0,8)}`;return t?{primary:t,secondary:n||`@${r}`}:n?{primary:n,secondary:null}:{primary:`@${r}`,secondary:null}}function Wat(e){switch(e){case`admin`:return iYe();case`user`:return sYe();case`pending`:return uYe();default:return e}}function G7(e,t){if(e.length===0)return`none`;let n=0;for(let r of e)t(r)&&n++;return n===0?`none`:n===e.length?`all`:`some`}function K7(e,t,n){let r=Math.max(1,Math.ceil(e.length/n)),i=Math.min(Math.max(1,Math.floor(t)),r),a=(i-1)*n;return{pageItems:e.slice(a,a+n),page:i,pageCount:r}}function Gat({className:e,orientation:t=`horizontal`,...n}){return(0,I.jsx)(Qle,{"data-slot":`tabs`,"data-orientation":t,className:B$(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Kat=$$(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function qat({className:e,variant:t=`default`,...n}){return(0,I.jsx)($le,{"data-slot":`tabs-list`,"data-variant":t,className:B$(Kat({variant:t}),e),...n})}function q7({className:e,...t}){return(0,I.jsx)(eue,{"data-slot":`tabs-trigger`,className:B$(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function J7({className:e,...t}){return(0,I.jsx)(tue,{"data-slot":`tabs-content`,className:B$(`flex-1 text-sm outline-none`,e),...t})}var Y7={name:``,description:``};function Jat(){let e=P(V.groups.listGroups,{}),t=P(V.me.getMe,{host:xO})?.role===`admin`,n=F(V.groups.createGroup),r=F(V.groups.updateGroup),i=F(V.groups.deleteGroup),a=v1(),o=S1(),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(Y7),[p,m]=(0,N.useState)(null),[h,g]=(0,N.useState)(``),_=(0,N.useMemo)(()=>{if(!e)return e;let t=h.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||(e.description??``).toLowerCase().includes(t)||e.members.some(e=>e.label.toLowerCase().includes(t))||e.agents.some(e=>e.toLowerCase().includes(t))||e.charts.some(e=>e.name.toLowerCase().includes(t))):e},[e,h]);function v(){u(null),f(Y7),c(!0)}function y(e){u(e),f({name:e.name,description:e.description??``}),c(!0)}async function b(){try{l?await r({groupId:l._id,name:d.name,description:d.description}):await n({name:d.name,description:d.description||void 0}),f(Y7),u(null),c(!1)}catch(e){o.error(CXe(),e)}}async function x(e){if(await a({title:_Je({name:e.name}),description:bJe(),confirmWord:e.name,confirmLabel:CJe(),cancelLabel:$qe(),destructive:!0}))try{await i({groupId:e._id})}catch(e){o.error(EXe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:_qe()}),(0,I.jsx)(r7,{q:h,onQChange:g,onReset:()=>g(``),canReset:h!==``,searchPlaceholder:Rqe()}),(0,I.jsx)(k5,{title:mqe(),rows:_,addLabel:bqe(),onAdd:t?v:void 0,emptyHint:Cqe(),columns:[{header:Eqe(),cell:e=>e.name,sort:e=>e.name},{header:kqe(),cell:e=>(0,I.jsx)(A5,{icon:(0,I.jsx)(Um,{size:12,"aria-hidden":!0}),total:e.memberCount,items:e.members.map(e=>({label:e.label,marker:e.manager?(0,I.jsx)(Lm,{size:11,"aria-hidden":!0}):null,highlight:e.manager}))}),sort:e=>e.memberCount},{header:Mqe(),cell:e=>(0,I.jsx)(A5,{icon:(0,I.jsx)(Im,{size:12,"aria-hidden":!0}),total:e.agentCount,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount},{header:Fqe(),cell:e=>(0,I.jsx)(A5,{icon:(0,I.jsx)(Mm,{size:12,"aria-hidden":!0}),total:e.chartCount,items:e.charts.map(e=>({label:e.name,marker:e.isDefault?(0,I.jsx)(zm,{size:11,fill:`currentColor`,"aria-hidden":!0}):null,highlight:e.isDefault}))}),sort:e=>e.chartCount}],rowActions:e=>[{label:Vqe(),onSelect:()=>m({groupId:e._id,name:e.name})},...t?[{label:Wqe(),onSelect:()=>y(e)},{label:qqe(),variant:`destructive`,onSelect:()=>void x(e)}]:[]]}),(0,I.jsx)(Z8,{open:s,onOpenChange:c,title:l?aJe():nJe(),description:cJe(),canSubmit:!!d.name.trim(),onSubmit:b,submitLabel:Xqe(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:dJe()}),(0,I.jsx)(t1,{value:d.name,onChange:e=>f({...d,name:e.target.value})})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(`span`,{className:`oc-field__label`,children:mJe()}),(0,I.jsx)(t1,{value:d.description,onChange:e=>f({...d,description:e.target.value})})]})]})}),(0,I.jsx)(Yat,{groupId:p?.groupId??null,groupName:p?.name??``,open:p!==null,onOpenChange:e=>{e||m(null)}})]})}var X7=8;function Z7({page:e,pageCount:t,onPage:n}){return t<=1?null:(0,I.jsxs)(`div`,{className:`oc-access__pager`,children:[(0,I.jsxs)(X,{type:`button`,variant:`ghost`,size:`sm`,disabled:e<=1,onClick:()=>n(e-1),children:[(0,I.jsx)(bee,{size:14,"aria-hidden":!0}),YJe()]}),(0,I.jsxs)(`span`,{className:`oc-access__pageinfo`,"aria-label":tYe({page:e,pages:t}),children:[e,` / `,t]}),(0,I.jsxs)(X,{type:`button`,variant:`ghost`,size:`sm`,disabled:e>=t,onClick:()=>n(e+1),children:[QJe(),(0,I.jsx)(fm,{size:14,"aria-hidden":!0})]})]})}function Yat({groupId:e,groupName:t,open:n,onOpenChange:r}){let i=P(V.groups.getGroup,n&&e?{groupId:e}:`skip`),a=P(V.groups.listAssignableInstances,n?{}:`skip`),o=P(V.groups.listAssignableUsers,n?{}:`skip`),s=F(V.groups.addMember),c=F(V.groups.removeMember),l=F(V.groups.bulkSetMembers),u=F(V.groups.setGroupManager),d=S1(),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(``),[g,_]=(0,N.useState)(`members`),[v,y]=(0,N.useState)(1),[b,x]=(0,N.useState)(new Set),S=(0,N.useRef)(null),C=(0,N.useMemo)(()=>new Set((i?.members??[]).map(e=>e.userId)),[i]),w=(0,N.useMemo)(()=>new Set((i?.members??[]).filter(e=>e.manager).map(e=>e.userId)),[i]),T=i?.viewerIsAdmin===!0,E=(0,N.useMemo)(()=>new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),[i]);(0,N.useEffect)(()=>{p(``),h(``),_(`members`),y(1),S.current=null},[n,e]),(0,N.useEffect)(()=>{y(1)},[f]),(0,N.useEffect)(()=>{n&&i&&e&&S.current!==e&&(S.current=e,x(new Set((i.members??[]).map(e=>e.userId))))},[n,i,e]);let D=(0,N.useMemo)(()=>o?Vat(o,f,b):[],[o,f,b]);async function O(t,n){if(e)try{n?await c({groupId:e,userId:t}):await s({groupId:e,userId:t})}catch(e){d.error(VQ(),e)}}async function ee(t,n){if(e)try{await u({groupId:e,userId:t,manager:!n})}catch(e){d.error(vXe(),e)}}let te=G7(D,e=>C.has(e.userId)),k=D.filter(e=>C.has(e.userId)).length,A=K7(D,v,X7);async function j(){if(!e||D.length===0)return;let t=D.map(e=>e.userId);try{await l({groupId:e,userIds:t,member:te!==`all`})}catch(e){d.error(VQ(),e)}}return(0,I.jsx)(u1,{open:n,onOpenChange:r,children:(0,I.jsxs)(d1,{className:`oc-access`,children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:EJe({name:t})}),(0,I.jsx)(h1,{children:kJe()})]}),(0,I.jsxs)(Gat,{value:g,onValueChange:_,className:`oc-access__tabs`,children:[(0,I.jsxs)(qat,{className:`w-full`,children:[(0,I.jsxs)(q7,{value:`members`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Um,{size:13,"aria-hidden":!0}),MJe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:C.size}):null]}),(0,I.jsxs)(q7,{value:`agents`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Im,{size:13,"aria-hidden":!0}),RJe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:E.size}):null]}),(0,I.jsxs)(q7,{value:`charts`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Mm,{size:13,"aria-hidden":!0}),WYe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:i.chartCount}):null]})]}),(0,I.jsx)(J7,{value:`members`,children:o===void 0||i===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:NQ()}):o.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:wYe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(t1,{value:f,onChange:e=>p(e.target.value),placeholder:FJe(),className:`oc-access__search`}),D.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:WJe()}):(0,I.jsxs)(I.Fragment,{children:[D.length>1?(0,I.jsxs)(`div`,{className:`oc-access__row oc-access__selectall`,children:[(0,I.jsx)(T1,{checked:te===`all`?!0:te===`some`?`indeterminate`:!1,onCheckedChange:()=>void j(),"aria-label":MQ()}),(0,I.jsx)(`span`,{className:`oc-access__label`,children:MQ()}),(0,I.jsxs)($,{variant:`outline`,className:`oc-access__count`,children:[k,` / `,D.length]})]}):null,(0,I.jsx)(`div`,{className:`oc-access__list`,children:A.pageItems.map(e=>{let t=C.has(e.userId),n=Uat(e),r=w.has(e.userId);return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(T1,{checked:t,onCheckedChange:()=>void O(e.userId,t),"aria-label":pYe({user:n.primary})}),(0,I.jsxs)(`span`,{className:`oc-access__who`,children:[(0,I.jsx)(`span`,{className:`oc-access__label`,title:n.primary,children:n.primary}),n.secondary?(0,I.jsx)(`span`,{className:`oc-access__sub`,title:n.secondary,children:n.secondary}):null]}),(0,I.jsx)($,{variant:`outline`,className:`oc-access__role`,children:Wat(e.role)}),(0,I.jsx)(`span`,{className:`oc-access__mgrslot`,children:t&&T?(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,className:`shrink-0 oc-access__mgr${r?` oc-access__mgr--on`:``}`,"aria-pressed":r,"aria-label":r?zQ():RQ(),title:r?zQ():RQ(),onClick:()=>void ee(e.userId,r),children:(0,I.jsx)(Lm,{size:15,"aria-hidden":!0})}):t&&r?(0,I.jsx)(`span`,{className:`oc-access__mgr oc-access__mgr--on`,role:`img`,"aria-label":LQ(),title:LQ(),children:(0,I.jsx)(Lm,{size:15,"aria-hidden":!0})}):null})]},e._id)})}),(0,I.jsx)(Z7,{page:A.page,pageCount:A.pageCount,onPage:y})]})]})}),(0,I.jsx)(J7,{value:`agents`,children:a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:NQ()}):a.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:DYe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(t1,{value:m,onChange:e=>h(e.target.value),placeholder:VJe(),className:`oc-access__search`}),(0,I.jsx)(`div`,{className:`oc-access__list`,children:a.map(t=>(0,I.jsx)(Xat,{groupId:e,instanceName:t.name,kind:t.kind??`openclaw`,assigned:E,query:m},`${e}-${t._id}`))})]})}),(0,I.jsx)(J7,{value:`charts`,children:(0,I.jsx)(Zat,{groupId:e})})]})]})})}function Xat({groupId:e,instanceName:t,kind:n,assigned:r,query:i}){let a=P(V.groups.listAssignableAgents,{instanceName:t}),o=F(V.groups.assignAgentToGroup),s=F(V.groups.removeAgentFromGroup),c=F(V.groups.bulkSetGroupAgents),l=S1(),[u,d]=(0,N.useState)(1);if((0,N.useEffect)(()=>{d(1)},[i]),!e)return null;let f=Hat(a?.agents??[],i),p=a?.discovery&&!a.discovery.lastPollOk;if(i.trim()&&f.length===0)return null;let m=f.filter(e=>e.presentInLastOk!==!1),h=G7(m,e=>r.has(`${t}/${e.agentId}`)),g=K7(f,u,X7);async function _(n,r){try{r?await s({groupId:e,instanceName:t,agentId:n}):await o({groupId:e,instanceName:t,agentId:n})}catch(e){l.error(HQ(),e)}}async function v(){if(m.length===0)return;let n=m.map(e=>e.agentId);try{await c({groupId:e,instanceName:t,agentIds:n,assigned:h!==`all`})}catch(e){l.error(HQ(),e)}}return(0,I.jsxs)(`div`,{className:`oc-access__group`,children:[(0,I.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,I.jsx)(Im,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:t}),(0,I.jsx)($,{variant:`outline`,className:`oc-access__kind`,children:n}),p?(0,I.jsx)($,{variant:`outline`,className:`oc-access__stale`,children:IYe()}):null]}),a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:xYe()}):f.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:p?NYe():AYe()}):(0,I.jsxs)(I.Fragment,{children:[m.length>1?(0,I.jsxs)(`div`,{className:`oc-access__row oc-access__selectall`,children:[(0,I.jsx)(T1,{checked:h===`all`?!0:h===`some`?`indeterminate`:!1,onCheckedChange:()=>void v(),"aria-label":MQ()}),(0,I.jsx)(`span`,{className:`oc-access__label`,children:MQ()})]}):null,g.pageItems.map(e=>{let n=`${t}/${e.agentId}`,i=r.has(n),a=e.presentInLastOk===!1;return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(T1,{checked:i,disabled:a&&!i,onCheckedChange:()=>void _(e.agentId,i),"aria-label":gYe({name:e.displayName??e.agentId})}),(0,I.jsxs)(`span`,{className:`oc-access__label`,title:e.displayName??e.agentId,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,I.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,e.isDefaultOnInstance?(0,I.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":PQ(),title:PQ(),children:(0,I.jsx)(zm,{size:14,fill:`currentColor`})}):null,a?(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:zYe()}):null]},e.agentId)}),(0,I.jsx)(Z7,{page:g.page,pageCount:g.pageCount,onPage:d})]})]})}function Zat({groupId:e}){let t=P(V.charts.listGroupChartSelection,e?{groupId:e}:`skip`),n=F(V.charts.assignChartToGroup),r=F(V.charts.removeChartFromGroup),i=F(V.charts.setGroupDefaultChart),a=F(V.charts.addChartToGroupPool),o=F(V.charts.removeChartFromGroupPool),s=S1();if(!e)return null;if(t===void 0)return(0,I.jsx)(`p`,{className:`oc-access__hint`,children:NQ()});let{pool:c,addable:l,canManagePool:u}=t;if(c.length===0&&!u)return(0,I.jsx)(`p`,{className:`oc-access__hint`,children:qYe()});async function d(t,i){try{i?await r({groupId:e,chartKey:t}):await n({groupId:e,chartKey:t})}catch(e){s.error(BQ(),e)}}async function f(t){try{await i({groupId:e,chartKey:t})}catch(e){s.error(BQ(),e)}}async function p(t){try{await a({groupId:e,chartKey:t})}catch(e){s.error(BQ(),e)}}async function m(t){try{await o({groupId:e,chartKey:t})}catch(e){s.error(BQ(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-access__list`,children:c.map(e=>(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(T1,{checked:e.selected,onCheckedChange:()=>void d(e.chartKey,e.selected),"aria-label":iXe({name:e.name})}),(0,I.jsx)(`span`,{className:`oc-access__label`,title:e.name,children:e.name}),e.selected?e.isDefault?(0,I.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":IQ(),title:IQ(),children:(0,I.jsx)(zm,{size:14,fill:`currentColor`})}):(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>void f(e.chartKey),children:lXe()}):null,u?(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":FQ({name:e.name}),title:FQ({name:e.name}),onClick:()=>void m(e.chartKey),children:(0,I.jsx)(Gm,{size:14,"aria-hidden":!0})}):null]},e.chartKey))}),u?l.length>0?(0,I.jsxs)(S3,{value:``,onValueChange:e=>void p(e),children:[(0,I.jsx)(w3,{size:`sm`,className:`oc-access__search`,children:(0,I.jsx)(C3,{placeholder:$Ye()})}),(0,I.jsx)(T3,{children:l.map(e=>(0,I.jsx)(Q,{value:e.chartKey,children:e.name},e.chartKey))})]}):c.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:XYe()}):null:null]})}var Qat=[50,100,200,500],Q7=`all`,$7=`__all__`,$at=[`2xx`,`4xx`,`5xx`],eot=[`user`,`service`,`system`],tot=[`inbound`,`outbound`,`internal`],not={kind:`relative`,from:`now-30d`,to:`now`},rot=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function iot(){let e=os({from:`/settings/traces`}),t=ss({from:`/settings/traces`}),n=e.limit,r=e.kind,i=e.statusClass??$7,a=e.principalType??$7,o=e.direction??$7,s=e.roleKey??$7,c=e.q??``,l=_7(e.from,e.to),u=(0,N.useMemo)(()=>b7(e.adv),[e.adv]),{from:d,to:f}=e7(l),[p,m]=(0,N.useState)(null),[h,g]=(0,N.useState)(null),_=e=>void t({search:t=>({...t,limit:e})}),v=e=>void t({search:t=>({...t,kind:e})}),y=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),b=e=>void t({search:t=>({...t,statusClass:e===$7?void 0:e})}),x=e=>void t({search:t=>({...t,principalType:e===$7?void 0:e})}),S=e=>void t({search:t=>({...t,direction:e===$7?void 0:e})}),C=e=>void t({search:t=>({...t,roleKey:e===$7?void 0:e})}),w=e=>void t({search:t=>({...t,...v7(e)})}),T=e=>void t({search:t=>({...t,adv:y7(e)}),replace:!0}),E=P(V.observability.listEvents,{limit:n}),D=P(V.observability.listEvents,{limit:n,kind:r===Q7?void 0:r,filter:{q:c||void 0,from:d,to:f,statusClass:i===$7?void 0:i,principalType:a===$7?void 0:a,direction:o===$7?void 0:o,roleKey:s===$7?void 0:s,advanced:u.length>0?u:void 0}}),O=(0,N.useMemo)(()=>{let e=new Set;for(let t of E??[])e.add(t.kind);return[...e].sort()},[E]),ee=(0,N.useMemo)(()=>{let e=new Set;for(let t of E??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[E]),te=c!==``||i!==$7||a!==$7||o!==$7||s!==$7||u.length>0||l.kind!==`relative`||l.from!==not.from;function k(){t({search:{limit:100,kind:`all`},replace:!0})}let A=p?E?.filter(e=>e.correlationId===p):D;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[zOe(),(0,I.jsx)(`strong`,{children:HOe()}),GOe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:JOe()})]}),(0,I.jsxs)(r7,{q:c,onQChange:y,searchPlaceholder:ZOe(),timeRange:l,onTimeRangeChange:w,onReset:k,canReset:te,children:[(0,I.jsxs)(S3,{value:i,onValueChange:b,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(C3,{placeholder:eke()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:$7,children:rke()}),$at.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(S3,{value:a,onValueChange:x,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(C3,{placeholder:oke()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:$7,children:lke()}),eot.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(S3,{value:o,onValueChange:S,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(C3,{placeholder:fke()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:$7,children:hke()}),tot.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(S3,{value:s,onValueChange:C,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{placeholder:vke()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:$7,children:xke()}),ee.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(S3,{value:r,onValueChange:v,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-44`,children:(0,I.jsx)(C3,{placeholder:wke()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:Q7,children:Dke()}),O.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(S3,{value:String(n),onValueChange:e=>_(Number(e)),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-28`,children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:Qat.map(e=>(0,I.jsx)(Q,{value:String(e),children:Ake({count:e})},e))})]})]}),(0,I.jsx)(m7,{fields:rot,seed:u,onChange:T}),p?(0,I.jsx)(`div`,{className:`oc-traces__followline`,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>m(null),title:Nke(),children:[(0,I.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[Ike(),(0,I.jsx)(`code`,{children:e9(p)})]}),(0,I.jsx)(Gm,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`sr-only`,children:zke()})]})}):null,(0,I.jsx)(k5,{title:Hke(),rows:A,emptyHint:p?Gke():Jke(),columns:[{header:Zke(),sort:e=>e.at,cell:e=>(0,I.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:eAe(),sort:e=>e.kind,cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.kind})},{header:rAe(),sort:e=>t9(e)??null,cell:e=>{let t=t9(e);return t?(0,I.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,I.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":oAe(),children:`✓`})}},{header:lAe(),sort:e=>e.direction,cell:e=>e.direction?(0,I.jsx)($,{variant:`outline`,children:e.direction}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:fAe(),sort:e=>e.principalType,cell:e=>(0,I.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,I.jsx)($,{variant:`outline`,children:e.principalType}),e.principalId?(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e9(e.principalId)}):null]})},{header:hAe(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,I.jsx)($,{variant:`secondary`,children:e.roleKey}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:vAe(),sort:e=>e.route,cell:e=>e.route?(0,I.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,I.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:xAe(),sort:e=>e.status,cell:e=>e.status===null?(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,I.jsx)(`span`,{className:`oc-traces__status ${aot(e.status)}`,children:e.status})},{header:wAe(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,I.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:DAe(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,I.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:AAe(),onClick:()=>m(e.correlationId),children:e9(e.correlationId)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:NAe(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>g(e),children:IAe()}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,I.jsx)(oot,{row:h,onClose:()=>g(null)})]})}function aot(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function e9(e){return e.length>8?e.slice(0,8):e}function t9(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function oot({row:e,onClose:t}){let n=(0,N.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,I.jsx)(u1,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,I.jsxs)(d1,{className:`max-w-lg`,children:[(0,I.jsxs)(f1,{children:[(0,I.jsxs)(m1,{className:`oc-traces__meta-title`,children:[zAe(),` `,(0,I.jsx)(`code`,{children:e.kind}),(0,I.jsx)($,{variant:`outline`,children:HAe()})]}),(0,I.jsx)(h1,{children:GAe()})]}),(0,I.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}function n9({className:e,size:t=`default`,...n}){return(0,I.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:B$(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function r9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-header`,className:B$(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function i9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-title`,className:B$(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function a9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-description`,className:B$(`text-sm text-muted-foreground`,e),...t})}function o9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-content`,className:B$(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function sot({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-footer`,className:B$(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}var s9=[{metric:`api.calls`,label:RIe(),unit:`/h`,group:`API`,isError:!1},{metric:`api.errors`,label:VIe(),unit:`/h`,group:`API`,isError:!0},{metric:`api.latency.avg_ms`,label:WIe(),unit:`ms`,group:`API`,isError:!1},{metric:`openclaw.ingest`,label:qIe(),unit:`/h`,group:`OpenClaw`,isError:!1},{metric:`chat.send`,label:XIe(),unit:`/h`,group:`Chat`,isError:!1},{metric:`assistant.stream.errors`,label:$Ie(),unit:`/h`,group:`Assistant`,isError:!0}],c9=s9.length,cot=[`API`,`OpenClaw`,`Chat`,`Assistant`],lot=1e3,uot=36e5;function dot(e,t){let n=Math.max(1,Math.ceil((t-e)/uot)),r=Math.min(n*c9,lot);return{rowLimit:r,buckets:Math.max(1,Math.floor(r/c9))}}function fot(){let e=os({from:`/settings/kpi`}),t=ss({from:`/settings/kpi`}),n=_7(e.from,e.to,aat,`now`),r=e=>void t({search:t=>({...t,...v7(e)})}),{from:i,to:a}=e7(n),{rowLimit:o,buckets:s}=dot(i,a),c=P(V.kpi.listKpis,{limit:o,filter:{from:i,to:a}}),l=(0,N.useMemo)(()=>{let e=new Map;for(let t of c??[]){let n=e.get(t.metric)??[];n.push({bucket:t.bucket,value:t.value}),e.set(t.metric,n)}for(let[t,n]of e)n.sort((e,t)=>e.bucket<t.bucket?-1:+(e.bucket>t.bucket)),n.length>s&&e.set(t,n.slice(n.length-s));return e},[c,s]),u=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[nLe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:aLe()})]}),(0,I.jsx)(pot,{value:n,onChange:r})]});return c===void 0?(0,I.jsxs)(I.Fragment,{children:[u,(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:cLe()})]}):c.length===0?(0,I.jsxs)(I.Fragment,{children:[u,(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:dLe()})]}):(0,I.jsxs)(I.Fragment,{children:[u,cot.map(e=>{let t=s9.filter(t=>t.group===e);return t.some(e=>(l.get(e.metric)??[]).length>0)?(0,I.jsxs)(`section`,{className:`oc-kpi__group`,children:[(0,I.jsx)(`h2`,{className:`oc-kpi__group-title`,children:e}),(0,I.jsx)(`div`,{className:`oc-kpi__grid`,children:t.map(e=>(0,I.jsx)(mot,{config:e,series:l.get(e.metric)??[]},e.metric))})]},e):null})]})}function pot({value:e,onChange:t}){return(0,I.jsx)(`div`,{className:`oc-kpi__toolbar`,children:(0,I.jsx)(n7,{value:e,onChange:t})})}function mot({config:e,series:t}){let n=t.length>0?t[t.length-1]:null,r=n?n.value:0;return(0,I.jsxs)(n9,{size:`sm`,className:`oc-kpi__card`,children:[(0,I.jsxs)(r9,{children:[(0,I.jsx)(i9,{className:`oc-kpi__card-title`,children:e.label}),(0,I.jsx)(a9,{className:`oc-kpi__card-metric`,children:(0,I.jsx)(`code`,{children:e.metric})})]}),(0,I.jsxs)(o9,{className:`oc-kpi__card-body`,children:[(0,I.jsxs)(`div`,{className:`oc-kpi__value-row`,children:[(0,I.jsx)(`span`,{className:`oc-kpi__value`+(e.isError&&r>0?` oc-kpi__value--error`:``),children:d9(r)}),(0,I.jsx)(`span`,{className:`oc-kpi__unit`,children:e.unit})]}),(0,I.jsx)(got,{series:t,isError:e.isError,unit:e.unit}),(0,I.jsxs)(`div`,{className:`oc-kpi__axis`,children:[n?(0,I.jsx)(`span`,{className:`oc-kpi__axis-latest`,children:mLe({value:f9(n.bucket)})}):(0,I.jsx)(`span`,{className:`oc-kpi__muted`,children:_Le()}),(0,I.jsx)(`span`,{className:`oc-kpi__muted`,children:bLe({count:t.length})})]})]})]})}var l9=240,u9=48,hot=1;function got({series:e,isError:t,unit:n}){if(e.length===0)return(0,I.jsx)(`div`,{className:`oc-kpi__chart oc-kpi__chart--empty`,"aria-hidden":!0});let r=e.reduce((e,t)=>t.value>e?t.value:e,0),i=l9/e.length,a=Math.max(i-hot,1);return(0,I.jsx)(`svg`,{className:`oc-kpi__chart`,viewBox:`0 0 ${l9} ${u9}`,preserveAspectRatio:`none`,role:`img`,"aria-label":CLe({max:d9(r),unit:n}),children:e.map((e,o)=>{let s=r>0?e.value/r*(u9-1):0,c=o*i,l=u9-s;return(0,I.jsx)(`rect`,{className:`oc-kpi__bar`+(t&&e.value>0?` oc-kpi__bar--error`:``),x:c,y:l,width:a,height:s,children:(0,I.jsxs)(`title`,{children:[f9(e.bucket),` · `,d9(e.value),` `,n]})},e.bucket)})})}function d9(e){return Number.isFinite(e)?Math.abs(e)>=1e3?(e/1e3).toFixed(e%1e3==0?0:1)+`k`:String(e):`0`}function f9(e){let t=new Date(`${e}:00:00Z`);return Number.isNaN(t.getTime())?e:`${String(t.getUTCDate()).padStart(2,`0`)}/${String(t.getUTCMonth()+1).padStart(2,`0`)} ${String(t.getUTCHours()).padStart(2,`0`)}h`}var p9=`__all__`,_ot=[{value:`open`},{value:`acknowledged`},{value:`resolved`}];function vot(e){return e===`open`?Ywe():e===`acknowledged`?Qwe():tTe()}var yot=[`info`,`warn`,`critical`],bot=[`detector`,`agent`],xot={kind:`relative`,from:`now-30d`,to:`now`},Sot=200,m9=`all`;function Cot(){let e=os({from:`/settings/anomalies`}),t=ss({from:`/settings/anomalies`}),n=e.q??``,r=e.status===m9?p9:e.status,i=e.severity??p9,a=e.kind??p9,[o,s]=(0,N.useState)(p9),c=_7(e.from,e.to),{from:l,to:u}=e7(c),d=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),f=e=>void t({search:t=>({...t,status:e===p9?m9:e})}),p=e=>void t({search:t=>({...t,severity:e===p9?void 0:e})}),m=e=>void t({search:t=>({...t,kind:e===p9?void 0:e})}),h=e=>void t({search:t=>({...t,...v7(e)})}),g=v1(),_=S1(),v=F(V.anomalies.resolveAnomaly),y=(P(V.me.getMe,{host:xO})?.permissions??[]).includes(`admin.manage`),b=P(V.anomalies.listAnomalies,{limit:Sot,filter:{q:n||void 0,from:l,to:u,anomalyStatus:r===p9?void 0:r,severity:i===p9?void 0:i,source:o===p9?void 0:o,kind:a===p9?void 0:a}}),x=(0,N.useMemo)(()=>{let e=new Set;for(let t of b??[])e.add(t.kind);return[...e].sort()},[b]),S=n!==``||r!==`open`||i!==p9||o!==p9||a!==p9||c.kind!==`relative`||c.from!==xot.from;function C(){s(p9),t({search:{status:`open`},replace:!0})}async function w(e){if(await g({title:iTe(),description:(0,I.jsxs)(I.Fragment,{children:[sTe(),` `,(0,I.jsx)(`span`,{className:`font-mono`,children:e.kind}),` `,uTe(),` `,(0,I.jsx)(`strong`,{children:pTe()}),`.`,` `,gTe()]}),confirmLabel:yTe()}))try{await v({anomalyId:e._id,status:`resolved`}),_.success(STe(),e.kind)}catch(e){_.error(TTe(),e)}}async function T(e){try{await v({anomalyId:e._id,status:`acknowledged`}),_.success(OTe(),e.kind)}catch(e){_.error(jTe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[PTe(),` `,(0,I.jsx)(`strong`,{children:LTe()}),` `,BTe(),` `,(0,I.jsx)(`strong`,{children:UTe()}),` `,KTe(),` `,(0,I.jsx)(`strong`,{children:YTe()}),` `,QTe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:tEe()})]}),(0,I.jsxs)(r7,{q:n,onQChange:d,searchPlaceholder:iEe(),timeRange:c,onTimeRangeChange:h,onReset:C,canReset:S,children:[(0,I.jsxs)(S3,{value:r,onValueChange:f,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:p9,children:sEe()}),_ot.map(e=>(0,I.jsx)(Q,{value:e.value,children:vot(e.value)},e.value))]})]}),(0,I.jsxs)(S3,{value:i,onValueChange:p,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{placeholder:oQ()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:p9,children:fEe()}),yot.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(S3,{value:o,onValueChange:s,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-32`,children:(0,I.jsx)(C3,{placeholder:sQ()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:p9,children:_Ee()}),bot.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}),(0,I.jsxs)(S3,{value:a,onValueChange:m,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{placeholder:cQ()})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:p9,children:SEe()}),x.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),(0,I.jsx)(k5,{title:TEe(),rows:b,emptyHint:r===`open`?OEe():jEe(),rowActions:e=>y&&e.status===`open`?[{label:PEe(),onSelect:()=>void w(e)},{label:LEe(),onSelect:()=>void T(e)}]:[],columns:[{header:BEe(),cell:e=>(0,I.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)}),sort:e=>e.at},{header:cQ(),cell:e=>(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.kind}),sort:e=>e.kind},{header:oQ(),cell:e=>(0,I.jsx)(Eot,{severity:e.severity}),sort:e=>e.severity===`critical`?2:+(e.severity===`warn`)},{header:UEe(),cell:e=>(0,I.jsx)(Dot,{status:e.status}),sort:e=>e.status===`resolved`?2:+(e.status===`acknowledged`)},{header:sQ(),cell:e=>(0,I.jsx)($,{variant:`outline`,children:e.source}),sort:e=>e.source},{header:KEe(),cell:e=>(0,I.jsx)(`span`,{className:`oc-anomaly__msg`,children:e.message}),sort:e=>e.message},{header:YEe(),cell:e=>(0,I.jsx)(Tot,{row:e}),sort:e=>e.evidence??null},{header:QEe(),cell:e=>e.correlationId?(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:Oot(e.correlationId)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}),sort:e=>e.correlationId}]})]})}function wot(e){if(e.kind!==`openclaw.dispatch_failures`||!e.evidence)return{};try{let t=JSON.parse(e.evidence);return{dominantCode:t.dominantCode,sampleCorrelationId:t.sampleCorrelationId}}catch{return{}}}function Tot({row:e}){let t=ss(),n=wot(e);if(!n.dominantCode)return(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`});let r=I5(n.dominantCode),i=n.sampleCorrelationId;return(0,I.jsxs)(`div`,{className:`oc-anomaly__cause`,children:[(0,I.jsxs)(`div`,{className:`oc-anomaly__cause-head`,children:[(0,I.jsx)(`span`,{className:`oc-anomaly__cause-label`,children:r.label}),(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:n.dominantCode})]}),(0,I.jsx)(`p`,{className:`oc-anomaly__cause-hint`,children:r.hint}),i?(0,I.jsxs)(`button`,{type:`button`,className:`oc-anomaly__drill`,onClick:()=>void t({to:`/settings/traces`,search:{q:i,limit:100}}),children:[`↗ `,tDe()]}):null]})}function Eot({severity:e}){return(0,I.jsx)(`span`,{className:`oc-anomaly__sev oc-anomaly__sev--${e}`,children:e})}function Dot({status:e}){return e===`open`?(0,I.jsx)($,{variant:`destructive`,children:iDe()}):e===`acknowledged`?(0,I.jsx)($,{variant:`secondary`,children:sDe()}):(0,I.jsx)($,{variant:`outline`,children:uDe()})}function Oot(e){return e.length>8?e.slice(0,8):e}function kot(){let e=P(V.integrations.status.status,{}),t=F(V.admin.setIntegrationConfig),[n,r]=(0,N.useState)(null);if((0,N.useEffect)(()=>{e&&n===null&&r(e.config)},[e,n]),!e||!n)return(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:JJ()});let i=n,a=(e,t,n)=>r({...i,[e]:{...i[e],[t]:n}}),o=(e,n)=>void t({[e]:n});return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[ZJ(),` `,(0,I.jsx)(`strong`,{children:eY()}),` `,rY()]}),(0,I.jsxs)(h9,{title:`Langfuse`,status:e.langfuse.configured?e.langfuse.enabled?(0,I.jsx)($,{variant:`secondary`,children:oY()}):(0,I.jsx)($,{variant:`outline`,children:lY()}):(0,I.jsx)($,{variant:`outline`,children:fY()}),note:vY(),children:[(0,I.jsx)(g9,{label:wY(),children:(0,I.jsx)(t1,{value:i.langfuse.host??``,placeholder:e.langfuse.effectiveHost,onChange:e=>a(`langfuse`,`host`,e.target.value),onBlur:()=>o(`langfuse`,{host:i.langfuse.host??``})})}),(0,I.jsx)(_9,{label:IY(),checked:i.langfuse.enabled??!0,onChange:e=>{a(`langfuse`,`enabled`,e),o(`langfuse`,{enabled:e})}})]}),(0,I.jsxs)(h9,{title:`Opik`,status:e.opik.configured?e.opik.enabled?(0,I.jsx)($,{variant:`secondary`,children:oY()}):(0,I.jsx)($,{variant:`outline`,children:lY()}):(0,I.jsx)($,{variant:`outline`,children:fY()}),note:xY(),children:[(0,I.jsx)(g9,{label:DY(),children:(0,I.jsx)(t1,{value:i.opik.baseUrl??``,placeholder:e.opik.effectiveBaseUrl,onChange:e=>a(`opik`,`baseUrl`,e.target.value),onBlur:()=>o(`opik`,{baseUrl:i.opik.baseUrl??``})})}),(0,I.jsx)(g9,{label:AY(),children:(0,I.jsx)(t1,{value:i.opik.workspace??``,placeholder:e.opik.effectiveWorkspace||NY(),onChange:e=>a(`opik`,`workspace`,e.target.value),onBlur:()=>o(`opik`,{workspace:i.opik.workspace??``})})}),(0,I.jsx)(_9,{label:IY(),checked:i.opik.enabled??!0,onChange:e=>{a(`opik`,`enabled`,e),o(`opik`,{enabled:e})}})]}),(0,I.jsxs)(h9,{title:zY(),status:(0,I.jsx)($,{variant:`outline`,children:hY()}),note:HY(),children:[(0,I.jsx)(g9,{label:GY(),children:(0,I.jsx)(v9,{value:i.tts.auto??`off`,options:[[`off`,JY()],[`always`,ZY()],[`inbound`,eX()],[`tagged`,rX()]],onChange:e=>{a(`tts`,`auto`,e),o(`tts`,{auto:e})}})}),(0,I.jsx)(g9,{label:oX(),children:(0,I.jsx)(v9,{value:i.tts.provider??`openai`,options:[[`openai`,`OpenAI`],[`elevenlabs`,`ElevenLabs`],[`microsoft`,lX()],[`azure`,`Azure Speech`],[`google`,`Google Gemini`]],onChange:e=>{a(`tts`,`provider`,e),o(`tts`,{provider:e})}})}),(0,I.jsx)(g9,{label:fX(),children:(0,I.jsx)(t1,{value:i.tts.model??``,placeholder:`eleven_multilingual_v2`,onChange:e=>a(`tts`,`model`,e.target.value),onBlur:()=>o(`tts`,{model:i.tts.model??``})})}),(0,I.jsx)(g9,{label:hX(),children:(0,I.jsx)(t1,{value:i.tts.voice??``,placeholder:vX(),onChange:e=>a(`tts`,`voice`,e.target.value),onBlur:()=>o(`tts`,{voice:i.tts.voice??``})})})]}),(0,I.jsxs)(h9,{title:xX(),status:(0,I.jsx)($,{variant:`outline`,children:hY()}),note:e.secrets.openai?wX():DX(),children:[(0,I.jsx)(_9,{label:AX(),checked:i.talk.enabled??!1,onChange:e=>{a(`talk`,`enabled`,e),o(`talk`,{enabled:e})}}),(0,I.jsx)(g9,{label:NX(),children:(0,I.jsx)(v9,{value:i.talk.realtimeProvider??`openai`,options:[[`openai`,`OpenAI (gpt-realtime)`],[`google`,`Google`]],onChange:e=>{a(`talk`,`realtimeProvider`,e),o(`talk`,{realtimeProvider:e})}})}),(0,I.jsx)(g9,{label:IX(),children:(0,I.jsx)(t1,{value:i.talk.realtimeModel??``,placeholder:`gpt-realtime-2`,onChange:e=>a(`talk`,`realtimeModel`,e.target.value),onBlur:()=>o(`talk`,{realtimeModel:i.talk.realtimeModel??``})})}),(0,I.jsx)(g9,{label:hX(),children:(0,I.jsx)(t1,{value:i.talk.voice??``,placeholder:`cedar / marin`,onChange:e=>a(`talk`,`voice`,e.target.value),onBlur:()=>o(`talk`,{voice:i.talk.voice??``})})}),(0,I.jsx)(g9,{label:zX(),children:(0,I.jsx)(v9,{value:i.talk.transport??`webrtc`,options:[[`webrtc`,HX()],[`provider-websocket`,`Provider WebSocket`],[`gateway-relay`,`Gateway relay`]],onChange:e=>{a(`talk`,`transport`,e),o(`talk`,{transport:e})}})}),(0,I.jsx)(g9,{label:GX(),children:(0,I.jsx)(t1,{value:i.talk.speechLocale??``,placeholder:`fr-CA`,onChange:e=>a(`talk`,`speechLocale`,e.target.value),onBlur:()=>o(`talk`,{speechLocale:i.talk.speechLocale??``})})}),(0,I.jsx)(_9,{label:JX(),checked:i.talk.interruptOnSpeech??!0,onChange:e=>{a(`talk`,`interruptOnSpeech`,e),o(`talk`,{interruptOnSpeech:e})}})]}),(0,I.jsxs)(`section`,{className:`oc-int__section`,children:[(0,I.jsxs)(`div`,{className:`oc-int__section-head`,children:[(0,I.jsx)(`h3`,{className:`oc-uipa__h`,children:ZX()}),(0,I.jsx)($,{variant:`outline`,children:eZ()})]}),(0,I.jsxs)(`p`,{className:`oc-uipa__note`,children:[rZ(),(0,I.jsx)(`code`,{children:` voicewake.get/set`}),`.`]})]}),(0,I.jsx)(k5,{title:oZ(),rows:e.cursors.map(e=>({...e,_id:e.vendor})),emptyHint:lZ(),columns:[{header:fZ(),cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.vendor}),sort:e=>e.vendor},{header:hZ(),cell:e=>e.lastAt>0?new Date(e.lastAt).toLocaleString(`fr-FR`):`—`,sort:e=>e.lastAt>0?e.lastAt:null},{header:vZ(),cell:e=>String(e.failureCount),sort:e=>e.failureCount},{header:xZ(),cell:e=>e.lastErrorStatus??`—`,sort:e=>e.lastErrorStatus??null},{header:wZ(),cell:e=>e.lastError??`—`,sort:e=>e.lastError??null}]})]})}function h9({title:e,status:t,note:n,children:r}){return(0,I.jsxs)(`section`,{className:`oc-int__section`,children:[(0,I.jsxs)(`div`,{className:`oc-int__section-head`,children:[(0,I.jsx)(`h3`,{className:`oc-uipa__h`,children:e}),t]}),n?(0,I.jsx)(`p`,{className:`oc-uipa__note`,children:n}):null,(0,I.jsx)(`div`,{className:`oc-int__fields`,children:r})]})}function g9({label:e,children:t}){return(0,I.jsxs)(`label`,{className:`oc-int__field`,children:[(0,I.jsx)(`span`,{className:`oc-int__field-label`,children:e}),t]})}function _9({label:e,checked:t,onChange:n}){return(0,I.jsxs)(`label`,{className:`oc-int__toggle`,children:[(0,I.jsx)(T1,{checked:t,onCheckedChange:e=>n(e===!0)}),(0,I.jsx)(`span`,{children:e})]})}function v9({value:e,options:t,onChange:n}){return(0,I.jsxs)(S3,{value:e,onValueChange:n,children:[(0,I.jsx)(w3,{size:`sm`,className:`w-full`,children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:t.map(([e,t])=>(0,I.jsx)(Q,{value:e,children:t},e))})]})}var Aot={altered_words:()=>DZ(),incorrect:()=>AZ(),incoherence:()=>NZ(),formatting:()=>IZ(),latency:()=>zZ(),api_error:()=>HZ(),other:()=>xfe()},y9=e=>Aot[e]?.()??e;function b9({matches:e,sourceWasOpen:t}){return t?e===!0?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-ok`,children:Dfe()}):e===!1?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-warn`,children:Afe()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:`—`}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:wfe()})}function jot({data:e,closeReason:t}){let n=e.snapshot,r=F(V.feedback.respondToFeedback),[i,a]=(0,N.useState)(e.thread),[o,s]=(0,N.useState)(``),[c,l]=(0,N.useState)(!1);async function u(){let t=o.trim();if(!(!t||c)){l(!0);try{await r({feedbackId:e._id,text:t}),a(e=>[...e,{authorRole:`admin`,text:t,at:Date.now()}]),s(``)}finally{l(!1)}}}let d=[];try{d=n.contextJson?JSON.parse(n.contextJson):[]}catch{d=[]}return(0,I.jsxs)(`div`,{className:`oc-fbadmin__detail`,children:[(0,I.jsxs)(`div`,{className:`oc-fbadmin__row`,children:[(0,I.jsx)(b9,{matches:n.displayedMatchesStored,sourceWasOpen:n.clientInfo?.sourceWasOpen??!1}),(0,I.jsxs)(`span`,{className:`oc-fbadmin__meta`,children:[y9(e.category),` · `,n.messageRole,n.isRegeneration?` · ${Nfe()}`:``,n.openclawModel?` · ${n.openclawModel}`:``,n.openclawRuntime?` (${n.openclawRuntime})`:``]})]}),e.comment?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Ife()}),(0,I.jsx)(`p`,{className:`oc-fbadmin__comment`,children:e.comment})]}):null,t?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Vme()}),(0,I.jsx)(`p`,{className:`oc-fbadmin__comment`,children:t})]}):null,(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:zfe()}),i.length>0?(0,I.jsx)(`div`,{className:`oc-fbadmin__thread`,children:i.map((e,t)=>(0,I.jsxs)(`div`,{className:`oc-notif__msg oc-notif__msg--${e.authorRole}`,children:[(0,I.jsx)(`span`,{className:`oc-notif__msg-who`,children:e.authorRole===`admin`?Hfe():Gfe()}),(0,I.jsx)(`span`,{className:`oc-notif__msg-text`,children:e.text})]},t))}):(0,I.jsx)(`p`,{className:`oc-fbadmin__meta`,children:Jfe()}),(0,I.jsx)(`textarea`,{className:`oc-feedback__textarea`,placeholder:Zfe(),value:o,maxLength:2e3,rows:3,onChange:e=>s(e.target.value.slice(0,2e3))}),(0,I.jsx)(`div`,{className:`oc-fbadmin__row`,style:{justifyContent:`flex-end`},children:(0,I.jsx)(X,{size:`sm`,onClick:()=>void u(),disabled:!o.trim()||c,children:c?epe():rpe()})})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:ope()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.messageText||UZ()})]}),n.clientInfo?.sourceWasOpen&&n.displayedText!==void 0?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:dpe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.displayedText||UZ()})]}):null,n.promptText?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:mpe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.promptText})]}):null,d.length>0?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:_pe({count:n.contextCount??d.length,truncated:n.contextTruncated?bpe():``})}),(0,I.jsx)(`div`,{className:`oc-fbadmin__ctx`,children:d.map((e,t)=>(0,I.jsxs)(`div`,{className:`oc-fbadmin__ctx-turn`,children:[(0,I.jsx)(`span`,{className:`oc-fbadmin__ctx-role`,children:e.role}),(0,I.jsx)(`span`,{className:`oc-fbadmin__ctx-text`,children:e.text})]},t))})]}):null,n.outboxAvailable?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Cpe()}),(0,I.jsxs)(`pre`,{className:`oc-msg__source-pre`,children:[n.outboxText??``,n.outboxStatus?`\n[status: ${n.outboxStatus}]`:``]})]}):null,n.clientInfo?.extensionsDetected&&n.clientInfo.extensionsDetected.length>0?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Epe()}),(0,I.jsx)(`div`,{className:`oc-fbadmin__row`,children:n.clientInfo.extensionsDetected.map(e=>(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-warn`,children:e},e))})]}):null,(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:kpe()}),(0,I.jsxs)(`p`,{className:`oc-fbadmin__env`,children:[[n.clientInfo?.language,n.clientInfo?.timezone,n.clientInfo?.theme?Mpe({theme:n.clientInfo.theme}):null,n.runId?`run ${n.runId.slice(0,12)}…`:null].filter(Boolean).join(` · `)||`—`,n.clientInfo?.plugins&&n.clientInfo.plugins.length>0?(0,I.jsxs)(`span`,{className:`oc-fbadmin__plugins`,children:[Fpe(),` `,n.clientInfo.plugins.join(`, `),(0,I.jsxs)(`span`,{className:`oc-fbadmin__note`,children:[` `,Rpe()]})]}):null,n.clientInfo?.userAgent?(0,I.jsx)(`span`,{className:`oc-fbadmin__ua`,children:n.clientInfo.userAgent}):null]})]})]})}function Mot(){let e=P(V.feedback.listForAdmin,{}),t=F(V.feedback.readSnapshot),n=F(V.feedback.deleteFeedback),r=v1(),[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)({});async function c(e){if(i===e._id){a(null);return}if(!o[e._id]){let n=await t({feedbackId:e._id});s(t=>({...t,[e._id]:n}))}a(e._id)}async function l(e){await r({title:$me(),description:nhe(),confirmLabel:ahe(),destructive:!0})&&(await n({feedbackId:e._id}),i===e._id&&a(null))}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[Vpe(),` `,(0,I.jsx)(`strong`,{children:Wpe()}),` `,qpe()]}),(0,I.jsx)(k5,{title:Xpe(),rows:e,emptyHint:$pe(),isExpanded:e=>i===e._id&&!!o[e._id],renderExpanded:e=>o[e._id]?(0,I.jsx)(jot,{data:o[e._id],closeReason:e.userCloseReason}):null,columns:[{header:nme(),cell:e=>new Date(e.at).toLocaleString(`fr-FR`),sort:e=>e.at},{header:ame(),cell:e=>y9(e.category),sort:e=>y9(e.category)},{header:cme(),cell:e=>e.messageRole===`user`?dme():mme(),sort:e=>e.messageRole},{header:_me(),cell:e=>(e.reporterEmail||e.reporterName||`—`)+(e.impersonated&&e.realOperatorEmail?` ${bme({operator:e.realOperatorEmail})}`:``),sort:e=>e.reporterEmail||e.reporterName||null},{header:Cme(),cell:e=>(0,I.jsx)(b9,{matches:e.displayedMatchesStored,sourceWasOpen:e.sourceWasOpen}),sort:e=>e.displayedMatchesStored===!1?0:e.displayedMatchesStored===!0?1:2},{header:Eme(),cell:e=>e.hasComment?`✎`:`—`,sort:e=>+!!e.hasComment},{header:kme(),cell:e=>e.userClosedAt==null?e.answered?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-ok`,children:Mme()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:Fme()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-closed`,children:Rme()}),sort:e=>e.userClosedAt==null?+!!e.answered:2}],rowActions:e=>[{label:i===e._id?Wme():qme(),onSelect:()=>void c(e)},{label:Xme(),onSelect:()=>void l(e),variant:`destructive`}]})]})}var x9=`all`;function S9(e){switch(e){case`image`:return IA();case`audio`:return zA();case`video`:return HA();case`pdf`:return GA();case`document`:return JA();case`archive`:return ZA();default:return ej()}}function Not(){let[e,t]=(0,N.useState)(x9),[n,r]=(0,N.useState)(x9),[i,a]=(0,N.useState)(x9),[o,s]=(0,N.useState)(x9),[c,l]=(0,N.useState)(null),u=F(V.files.softDelete),d=S1();function f(){t(x9),r(x9),a(x9),s(x9)}async function p(){let e=c;if(l(null),e)try{await u({fileId:e.id}),d.success(Nj())}catch(e){d.error(Ij(),e)}}let m=P(V.files.listMine,{direction:e===x9?void 0:e,chatId:n===x9?void 0:n,instanceName:i===x9?void 0:i,category:o===x9?void 0:o}),h=(0,N.useMemo)(()=>new Intl.DateTimeFormat(q(),{dateStyle:`medium`,timeStyle:`short`}),[]);if(m===void 0)return(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()});let{files:g,facets:_,truncated:v,cap:y}=m,b=e!==x9||n!==x9||i!==x9||o!==x9;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:rA()}),(0,I.jsxs)(`div`,{className:`oc-files__filters`,style:{display:`flex`,flexWrap:`wrap`,gap:8,margin:`12px 0`},children:[(0,I.jsxs)(S3,{value:e,onValueChange:t,children:[(0,I.jsx)(w3,{size:`sm`,"aria-label":oA(),children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:x9,children:lA()}),(0,I.jsx)(Q,{value:`inbound`,children:fA()}),(0,I.jsx)(Q,{value:`outbound`,children:hA()})]})]}),(0,I.jsxs)(S3,{value:n,onValueChange:r,children:[(0,I.jsx)(w3,{size:`sm`,"aria-label":vA(),children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:x9,children:xA()}),_.chats.map(e=>(0,I.jsx)(Q,{value:e.id,children:e.title},e.id))]})]}),_.multiProvider?(0,I.jsxs)(S3,{value:i,onValueChange:a,children:[(0,I.jsx)(w3,{size:`sm`,"aria-label":wA(),children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:x9,children:DA()}),_.instances.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]}):null,(0,I.jsxs)(S3,{value:o,onValueChange:s,children:[(0,I.jsx)(w3,{size:`sm`,"aria-label":AA(),children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:x9,children:NA()}),_.categories.map(e=>(0,I.jsx)(Q,{value:e,children:S9(e)},e))]})]}),b?(0,I.jsxs)(X,{variant:`ghost`,size:`sm`,onClick:f,style:{display:`inline-flex`,alignItems:`center`,gap:4,marginLeft:`auto`},children:[(0,I.jsx)(Pm,{size:14,"aria-hidden":!0}),wj()]}):null]}),g.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:b?Zj():Jj()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(C5,{children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[(0,I.jsx)(D5,{children:rj()}),(0,I.jsx)(D5,{children:oj()}),(0,I.jsx)(D5,{children:lj()}),(0,I.jsx)(D5,{children:fj()}),(0,I.jsx)(D5,{children:hj()}),(0,I.jsx)(D5,{className:`text-right`,children:vj()})]})}),(0,I.jsx)(T5,{children:g.map(e=>(0,I.jsxs)(E5,{children:[(0,I.jsx)(O5,{className:`font-medium`,style:{maxWidth:280,overflow:`hidden`,textOverflow:`ellipsis`},title:e.filename,children:e.filename}),(0,I.jsx)(O5,{title:e.mimeType,children:S9(e.category)}),(0,I.jsx)(O5,{children:(0,I.jsx)($,{variant:`secondary`,children:e.direction===`inbound`?fA():hA()})}),(0,I.jsx)(O5,{style:{maxWidth:220,overflow:`hidden`,textOverflow:`ellipsis`},title:e.chatTitle,children:e.chatTitle}),(0,I.jsx)(O5,{className:`whitespace-nowrap text-muted-foreground`,children:h.format(e.createdAt)}),(0,I.jsx)(O5,{className:`text-right`,children:(0,I.jsxs)(V$,{children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":Dj(),children:(0,I.jsx)(ym,{size:16})})}),(0,I.jsxs)(U$,{align:`end`,children:[e.url?(0,I.jsx)(W$,{asChild:!0,children:(0,I.jsxs)(`a`,{href:e.url,download:e.filename,target:`_blank`,rel:`noopener noreferrer`,children:[(0,I.jsx)(vm,{size:14}),xj()]})}):(0,I.jsxs)(W$,{disabled:!0,children:[(0,I.jsx)(vm,{size:14}),Gj()]}),(0,I.jsxs)(W$,{variant:`destructive`,onSelect:()=>l({id:e._id,filename:e.filename}),children:[(0,I.jsx)(Bm,{size:14}),Aj()]})]})]})})]},e._id))})]}),v?(0,I.jsx)(`p`,{className:`oc-admin__hint`,style:{marginTop:8},children:eM({cap:y})}):null]}),(0,I.jsx)(n1,{open:c!==null,onOpenChange:e=>!e&&l(null),children:(0,I.jsxs)(r1,{children:[(0,I.jsxs)(i1,{children:[(0,I.jsx)(o1,{children:zj()}),(0,I.jsx)(s1,{children:Hj()})]}),(0,I.jsxs)(a1,{children:[(0,I.jsx)(l1,{children:fW()}),(0,I.jsx)(c1,{onClick:()=>void p(),children:Aj()})]})]})})]})}var C9=2e4,w9=6e4;function Pot(e){return typeof e!=`number`||e<=0?0:Math.round(e/C9*100)}function Fot(e){return e<=0?0:Math.round(e/w9*100)}function T9(e,t){let n=(typeof e==`number`&&e>0?e:0)/1e3;return new Intl.NumberFormat(t,{minimumFractionDigits:1,maximumFractionDigits:1}).format(n)}function E9(e){return e.reduce((e,t)=>e+(typeof t.size==`number`&&t.size>0?t.size:0),0)}var D9=3;function Iot(e,t){let n=new Map;for(let t of e.split(`
|
|
163
163
|
`))n.set(t,(n.get(t)??0)+1);for(let e of t.split(`
|
|
164
|
-
`))n.set(e,(n.get(e)??0)-1);let r=0,i=0,a=[],o=[];for(let[e,t]of n)t<0?(r+=-t,a.length<D9&&a.push(e)):t>0&&(i+=t,o.length<D9&&o.push(e));return{added:r,removed:i,sampleAdded:a,sampleRemoved:o}}function Iot(e){return e instanceof Error?e.message.includes(`conflict:`):String(e).includes(`conflict:`)}var O9=e=>`${e.instanceName}::${e.agentId}`;function Lot(){let e=P(V.me.getMe,{host:xO}),t=e?.role===`admin`,n=(e?.permissions??[]).includes(`bridge.read`),r=P(V.admin.listInstances,e!==void 0&&t?{}:`skip`),[i,a]=(0,N.useState)(null);(0,N.useEffect)(()=>{!t||!r||r.length===0||(!i||!r.some(e=>e.name===i))&&a(r[0].name)},[t,r,i]);let o=P(V.agents.listAgentsForInstance,t&&i?{instanceName:i}:`skip`),s=P(V.agents.listMyAgents,e!==void 0&&!t?{}:`skip`),c=(0,N.useMemo)(()=>{if(e!==void 0){if(t)return i===null||o===void 0?r!==void 0&&r.length===0?[]:void 0:o.agents.map(e=>({instanceName:i,agentId:e.agentId,label:`${e.emoji?`${e.emoji} `:``}${e.displayName??e.agentId}`}));if(s!==void 0)return s.map(e=>({instanceName:e.instanceName,agentId:e.agentId,label:`${e.emoji?`${e.emoji} `:``}${e.displayName??e.agentId}`}))}},[e,t,i,o,r,s]),[l,u]=(0,N.useState)(null);(0,N.useEffect)(()=>{!c||c.length===0||(!l||!c.some(e=>O9(e)===l))&&u(O9(c[0]))},[c,l]);let d=c?.find(e=>O9(e)===l)??null,f=$n(V.agentFiles.listAgentFiles),[p,m]=(0,N.useState)({status:`idle`}),h=d?.instanceName??null,g=d?.agentId??null,_=P(V.compat.forInstance,n&&h!==null?{instanceName:h}:`skip`),v=n&&h!==null?F3(_,`agentFiles`):null,y=v===null?!1:v===`loading`?null:v.blocked,b=(0,N.useCallback)(async()=>{if(!(h===null||g===null)){m({status:`loading`});try{m({status:`done`,files:(await f({instanceName:h,agentId:g})).files})}catch{m({status:`error`})}}},[f,h,g]);(0,N.useEffect)(()=>{y===!1&&b()},[b,y]);let[x,S]=(0,N.useState)(null),C=q(),w=(0,N.useMemo)(()=>new Intl.NumberFormat(C,{maximumFractionDigits:0}),[C]);return e===void 0||c===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):(0,I.jsxs)(`div`,{className:`oc-afiles`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:t$e()}),(0,I.jsxs)(`div`,{className:`oc-afiles__picker`,children:[t&&(r?.length??0)>1?(0,I.jsxs)(C3,{value:i??``,onValueChange:e=>a(e),children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":XQ(),children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:(r??[]).map(e=>(0,I.jsx)(Q,{value:e.name,children:e.name},e.name))})]}):null,c.length>0?(0,I.jsxs)(C3,{value:l??``,onValueChange:e=>u(e),children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":o$e(),children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:c.map(e=>(0,I.jsx)(Q,{value:O9(e),children:e.label},O9(e)))})]}):(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:l$e()})]}),d===null?null:v===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):v!==null&&v.blocked?(0,I.jsxs)(`p`,{className:`oc-compat__blocked`,role:`status`,children:[(0,I.jsx)(Vm,{size:14,"aria-hidden":!0}),` `,W5(v.gatewayVersion)]}):p.status===`loading`||p.status===`idle`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):p.status===`error`?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[h$e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void b(),children:qQ()})]}):p.files.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:f$e()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-afiles__list`,children:p.files.map(e=>{let n=Not(e.size),r=n>=80;return(0,I.jsxs)(`div`,{className:`oc-afiles__row`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__name`,title:e.name,children:e.name}),e.missing?(0,I.jsx)($,{variant:`outline`,children:v$e()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-afiles__size`,children:x$e({size:T9(e.size,C)})}),(0,I.jsx)(`span`,{className:`oc-afiles__gauge${r?` is-warn`:``}`,"aria-hidden":!0,children:(0,I.jsx)(`span`,{className:`oc-afiles__gauge-fill`,style:{width:`${Math.min(n,100)}%`}})}),(0,I.jsx)(`span`,{className:`oc-afiles__pct`,children:w$e({pct:w.format(n)})}),r?(0,I.jsx)(Vm,{size:14,className:`oc-afiles__warn`,"aria-label":D$e()}):(0,I.jsx)(`span`,{className:`oc-afiles__warn-slot`,"aria-hidden":!0})]}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,className:`oc-afiles__open`,onClick:()=>S(e),children:t?N$e():I$e()})]},e.name)})}),(0,I.jsx)(`p`,{className:`oc-afiles__budget`,children:A$e({used:T9(E9(p.files),C),total:T9(w9,C),pct:w.format(Pot(E9(p.files)))})})]}),x&&d?(0,I.jsx)(Rot,{instanceName:d.instanceName,agentId:d.agentId,name:x.name,isAdmin:t,onClose:()=>S(null),onSaved:()=>void b()}):null]})}function Rot({instanceName:e,agentId:t,name:n,isAdmin:r,onClose:i,onSaved:a}){let o=$n(V.agentFiles.getAgentFile),s=$n(V.agentFiles.setAgentFile),c=C1(),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(!1),[_,v]=(0,N.useState)(!1),[y,b]=(0,N.useState)(!1),[x,S]=(0,N.useState)(!1),C=(0,N.useCallback)(async r=>{f(!1);try{let i=await o({instanceName:e,agentId:t,name:n});u({content:i.content,updatedAtMs:i.updatedAtMs}),r||m(i.content),b(!1)}catch{f(!0)}},[o,e,t,n]);(0,N.useEffect)(()=>{C(!1)},[C]);async function w(){if(l!==null){v(!0),S(!1);try{await s({instanceName:e,agentId:t,name:n,content:p,baseUpdatedAtMs:l.updatedAtMs??void 0}),c.success(n1e({name:n})),a(),await C(!1)}catch(e){Iot(e)?b(!0):S(!0)}finally{v(!1)}}}let T=l!==null&&p!==l.content,E=(0,N.useMemo)(()=>l===null?null:Fot(l.content,p),[l,p]),D=p.length>C9,O=q(),ee=(0,N.useMemo)(()=>new Intl.NumberFormat(O),[O]);return(0,I.jsx)(d1,{open:!0,onOpenChange:e=>!e&&i(),children:(0,I.jsxs)(f1,{className:`oc-afiles__editor`,children:[(0,I.jsxs)(p1,{children:[(0,I.jsx)(h1,{children:ZQ({name:n})}),(0,I.jsxs)(g1,{children:[V$e({agent:t,instance:e}),r?null:(0,I.jsxs)(I.Fragment,{children:[` · `,W$e()]})]})]}),d?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[c1e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void C(!1),children:qQ()})]}):l===null?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`textarea`,{className:`oc-afiles__source`,value:p,readOnly:!r,spellCheck:!1,onChange:e=>m(e.target.value),"aria-label":ZQ({name:n})}),(0,I.jsx)(`p`,{className:`oc-afiles__hint`,children:q$e()}),y?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[d1e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void C(!0),children:m1e()})]}):null,x?(0,I.jsx)(`p`,{className:`oc-afiles__error`,role:`alert`,children:a1e()}):null,(0,I.jsxs)(`div`,{className:`oc-afiles__editor-foot`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__count${D?` is-over`:``}`,children:X$e({count:ee.format(p.length),max:ee.format(C9)})}),r?(0,I.jsx)(X,{size:`sm`,disabled:!T||_||y,onClick:()=>g(!0),children:_?KQ():$$e()}):null]})]}),(0,I.jsx)(r1,{open:h,onOpenChange:g,children:(0,I.jsxs)(i1,{children:[(0,I.jsxs)(a1,{children:[(0,I.jsx)(s1,{children:_1e({name:n})}),(0,I.jsx)(c1,{children:b1e({agent:t})})]}),E?(0,I.jsxs)(`div`,{className:`oc-afiles__diff`,children:[(0,I.jsx)(`p`,{className:`oc-afiles__diff-counts`,children:C1e({added:E.added,removed:E.removed})}),E.sampleAdded.length>0?(0,I.jsxs)(`div`,{className:`oc-afiles__diff-block`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__diff-label`,children:E1e()}),E.sampleAdded.map((e,t)=>(0,I.jsx)(`code`,{className:`oc-afiles__diff-line is-add`,children:e||` `},t))]}):null,E.sampleRemoved.length>0?(0,I.jsxs)(`div`,{className:`oc-afiles__diff-block`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__diff-label`,children:k1e()}),E.sampleRemoved.map((e,t)=>(0,I.jsx)(`code`,{className:`oc-afiles__diff-line is-del`,children:e||` `},t))]}):null]}):null,(0,I.jsxs)(o1,{children:[(0,I.jsx)(u1,{children:fW()}),(0,I.jsx)(l1,{onClick:()=>void w(),children:M1e()})]})]})})]})})}var k9=[{id:`messages`,label:()=>xI()},{id:`composer`,label:()=>wI()},{id:`sidebar`,label:()=>DI()},{id:`other`,label:()=>AI()}],A9={showSource:{category:`messages`,label:()=>NI(),help:()=>II()},showReport:{category:`messages`,label:()=>zI(),help:()=>HI()},copyAssistant:{category:`messages`,label:()=>GI()},copyUser:{category:`messages`,label:()=>JI()},showDelete:{category:`messages`,label:()=>ZI()},showTools:{category:`messages`,label:()=>eL(),help:()=>rL()},voiceInput:{category:`composer`,label:()=>oL(),help:()=>lL()},showChatAge:{category:`sidebar`,label:()=>fL(),help:()=>hL()},showChatProvider:{category:`sidebar`,label:()=>vL(),help:()=>xL()}};function j9(e){return e.toLowerCase().normalize(`NFD`).replace(/\p{Diacritic}/gu,``)}function zot(e,t){let n=j9(t.trim()),r=new Map(k9.map(e=>[e.id,e.label()])),i=new Map(k9.map(e=>[e.id,[]]));for(let t of e){let e=A9[t],a=e?.category??`other`;n&&!j9(`${e?e.label():t} ${e?.help?e.help():``} ${t} ${r.get(a)??``}`).includes(n)||i.get(a).push(t)}return k9.map(e=>({id:e.id,label:r.get(e.id),keys:i.get(e.id)})).filter(e=>e.keys.length>0)}var Bot=[`showSource`,`showReport`,`copyAssistant`,`copyUser`,`showDelete`,`showTools`,`voiceInput`,`showChatAge`,`showChatProvider`],Vot={voiceInput:`voiceInput`};function Hot(e){return Bot.includes(e)}function M9(e){return e===`admin`}function Uot(e){return e===!0?`on`:e===!1?`off`:`inherit`}function Wot(e){return e===`on`?!0:e===`off`?!1:null}function Got(e){return Hot(e)?Vot[e]:void 0}var Kot={voiceInput:()=>eR()};function qot({prefKey:e,ui:t}){let n=F(V.admin.setUiPrefDefault),r=F(V.admin.setFeatureEnabled),i=Got(e),a=i?Kot[e]?.():void 0;return(0,I.jsxs)(`div`,{className:`oc-prefs__gov`,children:[(0,I.jsxs)(`div`,{className:`oc-prefs__gov-row`,children:[(0,I.jsx)(`span`,{className:`oc-prefs__gov-label`,children:HL()}),(0,I.jsxs)(C3,{value:Uot(t.defaults[e]),onValueChange:t=>void n({key:e,value:Wot(t)}),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:`on`,children:oR()}),(0,I.jsx)(Q,{value:`off`,children:lR()}),(0,I.jsx)(Q,{value:`inherit`,children:fR()})]})]}),i?(0,I.jsxs)(`span`,{className:`oc-prefs__gov-gate`,children:[(0,I.jsx)(E1,{checked:t.featuresEnabled[i]===!0,onCheckedChange:e=>void r({key:i,enabled:e===!0}),"aria-label":GL()}),GL()]}):null]}),a?(0,I.jsx)(`span`,{className:`oc-prefs__gov-help`,children:a}):null]})}function Jot(){let[e,t]=(0,N.useState)(``),[n,r]=(0,N.useState)(!1),i=P(V.me.getMe,{host:xO}),a=i?.ui,o=M9(i?.role)&&n,s=F(V.me.setUiPref).withOptimisticUpdate(w1),c=(0,N.useMemo)(()=>a?zot(Object.keys(a.effective),e):[],[a,e]);return a?(0,I.jsxs)(`div`,{className:`oc-prefs-panel`,children:[M9(i?.role)?(0,I.jsxs)(`label`,{className:`oc-prefs__gov-toggle`,children:[(0,I.jsx)(E1,{checked:n,onCheckedChange:e=>r(e===!0),"aria-label":zL()}),zL()]}):null,o?(0,I.jsxs)(`div`,{className:`oc-prefs__gov-head`,children:[(0,I.jsx)(`p`,{children:JL()}),(0,I.jsx)(`p`,{children:ZL()}),(0,I.jsx)(`p`,{children:rR()})]}):null,(0,I.jsx)(n1,{value:e,onChange:e=>t(e.target.value),placeholder:wL(),"aria-label":wL(),className:`mb-2`}),c.length===0?(0,I.jsx)(`div`,{className:`oc-prefs__empty`,children:DL()}):(0,I.jsx)(`div`,{className:`oc-prefs`,children:c.map(e=>(0,I.jsxs)(`div`,{className:`oc-prefs__group`,children:[(0,I.jsx)(`h4`,{className:`oc-prefs__cat`,children:e.label}),e.keys.map(e=>{let t=A9[e],n=t?t.label():e,r=t?.help?.(),i=a.locked[e],c=a.effective[e],l=a.userOverrides[e]!==void 0;return(0,I.jsxs)(`div`,{className:`oc-prefs__row${i?` is-locked`:``}${l&&!i?` is-overridden`:``}`,children:[(0,I.jsxs)(`div`,{className:`oc-prefs__info`,children:[(0,I.jsxs)(`span`,{className:`oc-prefs__label`,children:[n,i?(0,I.jsx)(`span`,{className:`oc-prefs__lock`,children:AL()}):l?null:(0,I.jsx)(`span`,{className:`oc-prefs__def`,children:NL()})]}),r?(0,I.jsx)(`span`,{className:`oc-prefs__help`,children:r}):null]}),(0,I.jsxs)(`div`,{className:`oc-prefs__ctl`,children:[!i&&l?(0,I.jsx)(`button`,{type:`button`,className:`oc-prefs__reset`,onClick:()=>void s({key:e,value:null}),children:IL()}):null,(0,I.jsx)(E1,{checked:c,disabled:i,onCheckedChange:t=>void s({key:e,value:t===!0}),"aria-label":n})]}),o?(0,I.jsx)(qot,{prefKey:e,ui:a}):null]},e)})]},e.id))})]}):(0,I.jsx)(`div`,{className:`oc-prefs__empty`,children:KO()})}function Yot(){let e=P(V.me.getMe,{host:xO}),t=F(V.me.setLocale),n=F(V.me.setMyName),r=C1(),i=e?.locale??`default`,a=e?.name??``,[o,s]=(0,N.useState)(null),c=o??a,l=c.trim()!==a.trim();async function u(){try{await n({name:c}),s(null),r.success(Dk())}catch(e){r.error(Ak(),e)}}return(0,I.jsxs)(`div`,{className:`oc-appearance`,children:[(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:hk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:vk()})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(n1,{className:`max-w-xs`,value:c,maxLength:120,placeholder:xk(),onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&l&&(e.preventDefault(),u())}}),(0,I.jsx)(X,{size:`sm`,disabled:!l,onClick:()=>void u(),children:JZ()})]}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:wk()})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:Nk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:Ik()})]}),(0,I.jsx)(`div`,{className:`oc-show__row`,children:[`fr`,`en`,`default`].map(e=>(0,I.jsx)(X,{variant:i===e?`default`:`outline`,size:`sm`,onClick:()=>void t({locale:e==="default"?null:e}),children:e===`fr`?Jk():e===`en`?Zk():ok()},e))}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:zk()})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:Hk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:Gk()})]}),(0,I.jsx)(Jot,{})]})]})}var Xot=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`];function Zot(e){let t=typeof e==`object`&&e?e:{},n=t.defaults!==null&&typeof t.defaults==`object`?t.defaults:{},r=n.thinkingDefault??t.thinkingDefault,i=n.fastModeDefault??t.fastModeDefault;return{thinkingDefault:typeof r==`string`?r:null,fastModeDefault:typeof i==`boolean`?i:null}}function Qot(){let e=$n(V.agentFiles.getChatDefaults),t=$n(V.agentFiles.setChatDefaults),n=C1(),[r,i]=(0,N.useState)({status:`loading`}),[a,o]=(0,N.useState)({thinkingDefault:null,fastModeDefault:null}),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1),d=P(V.admin.listInstances,{}),[f,p]=(0,N.useState)(null);(0,N.useEffect)(()=>{!d||d.length===0||(!f||!d.some(e=>e.name===f))&&p(d[0].name)},[d,f]);let m=(d?.length??0)>1,h=d!==void 0&&d.length===0,g=P(V.compat.forInstance,f?{instanceName:f}:`skip`),_=f?F3(g,`configDefaults`):`loading`,v=_===`loading`?null:_.blocked,y=(0,N.useMemo)(()=>m&&f?{instanceName:f}:{},[m,f]),b=(0,N.useRef)(0),x=(0,N.useCallback)(async()=>{let t=++b.current;i({status:`loading`});try{let n=Zot(await e(y));if(b.current!==t)return;i({status:`done`,current:n}),o(n)}catch{if(b.current!==t)return;i({status:`error`})}},[e,y]);(0,N.useEffect)(()=>{v===!1&&(m&&!f||x())},[x,v,m,f]);let S=r.status===`done`?r.current:null,C=S!==null&&a.thinkingDefault!==null&&a.thinkingDefault!==S.thinkingDefault,w=S!==null&&a.fastModeDefault!==null&&a.fastModeDefault!==S.fastModeDefault,T=C||w;async function E(){u(!0);try{await t({...y,...C?{thinkingDefault:a.thinkingDefault}:{},...w?{fastModeDefault:a.fastModeDefault}:{}}),n.success(a0e()),await x()}catch(e){n.error(c0e(),e)}finally{u(!1)}}let D=(0,N.useMemo)(()=>Xot.map(e=>({id:e,label:M3(e)})),[]),O=(0,N.useMemo)(()=>[{id:`fast`,label:JQ()},{id:`standard`,label:YQ()}],[]);return(0,I.jsxs)(`div`,{className:`oc-cdefaults`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:R1e()}),m&&f?(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:XQ()}),(0,I.jsxs)(C3,{value:f,onValueChange:e=>p(e),disabled:l,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":XQ(),children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:(d??[]).map(e=>(0,I.jsx)(Q,{value:e.name,children:e.name},e.name))})]})]}):null,h?(0,I.jsx)(`p`,{className:`oc-admin__hint`,role:`status`,children:aNe()}):_===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):_.blocked?(0,I.jsxs)(`p`,{className:`oc-compat__blocked`,role:`status`,children:[(0,I.jsx)(Vm,{size:14,"aria-hidden":!0}),` `,W5(_.gatewayVersion)]}):r.status===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):r.status===`error`?(0,I.jsxs)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:[$1e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void x(),children:qQ()})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:V1e()}),(0,I.jsx)(R3,{options:D,value:a.thinkingDefault,onChange:e=>o({...a,thinkingDefault:e}),disabled:l}),(0,I.jsx)(`p`,{className:`oc-cdefaults__help`,children:W1e()})]}),(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:q1e()}),(0,I.jsx)(R3,{options:O,value:a.fastModeDefault===null?null:a.fastModeDefault?`fast`:`standard`,onChange:e=>o({...a,fastModeDefault:e===`fast`}),disabled:l}),(0,I.jsx)(`p`,{className:`oc-cdefaults__help`,children:X1e()})]}),(0,I.jsx)(`div`,{className:`oc-cdefaults__actions`,children:(0,I.jsx)(X,{size:`sm`,disabled:!T||l,onClick:()=>c(!0),children:l?KQ():n0e()})}),(0,I.jsx)(`p`,{className:`oc-cdefaults__note`,children:d0e()})]}),(0,I.jsx)(r1,{open:s,onOpenChange:c,children:(0,I.jsxs)(i1,{children:[(0,I.jsxs)(a1,{children:[(0,I.jsx)(s1,{children:m0e()}),(0,I.jsx)(c1,{children:_0e()})]}),(0,I.jsxs)(o1,{children:[(0,I.jsx)(u1,{children:fW()}),(0,I.jsx)(l1,{onClick:()=>void E(),children:b0e()})]})]})})]})}function $ot(e){return e===`user`?QKe():e===`all`?tqe():MQ({group:e.group})}function est(e){return e===`common`?oqe():e===`owner`?lqe():MQ({group:e.group})}function tst(e){return e.name||e.email||e.userId.slice(0,8)}function nst(){let e=P(V.admin.listUsers,{}),[t,n]=(0,N.useState)(``),r=P(V.introspect.introspectUser,t?{userId:t}:`skip`);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:wKe()}),(0,I.jsxs)(C3,{value:t,onValueChange:n,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":AQ(),children:(0,I.jsx)(w3,{placeholder:AQ()})}),(0,I.jsx)(E3,{children:(e??[]).map(e=>(0,I.jsx)(Q,{value:e.userId,children:tst(e)},e._id))})]}),t===``?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:kKe()}):r===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):(0,I.jsxs)(`div`,{className:`oc-introspect`,children:[(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:MKe()}),(0,I.jsxs)(`div`,{className:`oc-introspect__id`,children:[(0,I.jsx)(`strong`,{children:r.user.label}),(0,I.jsx)($,{variant:`secondary`,children:r.role})]})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:FKe()}),r.groups.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:jQ()}):(0,I.jsx)(`div`,{className:`oc-introspect__chips`,children:r.groups.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e.name},e.groupId))})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:RKe()}),r.agents.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:jQ()}):(0,I.jsx)(`ul`,{className:`oc-introspect__list`,children:r.agents.map(e=>(0,I.jsxs)(`li`,{className:`oc-introspect__row`,children:[(0,I.jsx)(`span`,{className:`oc-introspect__name`,children:e.displayName||e.agentId}),e.isDefault?(0,I.jsx)($,{variant:`default`,children:YKe()}):null,(0,I.jsx)($,{variant:`outline`,children:$ot(e.via)}),(0,I.jsx)($,{variant:`secondary`,children:e.state})]},`${e.instanceName} ${e.agentId}`))})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:VKe()}),r.charts.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:jQ()}):(0,I.jsx)(`ul`,{className:`oc-introspect__list`,children:r.charts.map(e=>(0,I.jsxs)(`li`,{className:`oc-introspect__row`,children:[(0,I.jsx)(`span`,{className:`oc-introspect__name`,children:e.name}),(0,I.jsx)($,{variant:`outline`,children:est(e.via)})]},e.key))})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:WKe()}),r.permissions.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:jQ()}):(0,I.jsx)(`div`,{className:`oc-introspect__chips`,children:r.permissions.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e},e))})]})]})]})}var N9=[{id:`personal`,label:()=>UXe(),tabs:[`preferences`,`theme`,`files`]},{id:`agents`,label:()=>KXe(),tabs:[`instances`,`agentFiles`,`chatDefaults`,`bridge`]},{id:`access`,label:()=>YXe(),tabs:[`users`,`groups`,`access`,`roles`,`serviceAccounts`]},{id:`observability`,label:()=>QXe(),tabs:[`traces`,`kpi`,`anomalies`,`audit`,`feedbacks`,`integrations`]}],rst=new Map(N9.flatMap(e=>e.tabs.map(t=>[t,e.id])));function P9(e){let t=rst.get(e);if(!t)throw Error(`Settings tab "${e}" belongs to no group`);return t}function ist(e,t){return e.find(e=>P9(e)===t)}N9.flatMap(e=>[...e.tabs]);function ast(){let e=P(V.bridgeHealth.getBridgeAvailability,{});if(e===void 0)return null;let t=e.known?e.available?`ok`:`error`:`idle`,n=e.known?e.available?`${yBe()}${e.checkedAt?SBe({time:new Date(e.checkedAt).toLocaleTimeString(`fr-FR`)}):``}`:TBe({reason:e.reason??`?`}):gBe();return(0,I.jsx)(j5,{delayDuration:150,children:(0,I.jsxs)(M5,{children:[(0,I.jsx)(N5,{asChild:!0,children:(0,I.jsx)(`span`,{className:`oc-bridge-dot oc-bridge-dot--${t}`,role:`img`,"aria-label":n})}),(0,I.jsx)(P5,{children:n})]})})}var ost={users:()=>zGe(),groups:()=>vKe(),instances:()=>HGe(),bridge:()=>GGe(),serviceAccounts:()=>JGe(),roles:()=>ZGe(),traces:()=>eKe(),kpi:()=>rKe(),anomalies:()=>oKe(),files:()=>eA(),agentFiles:()=>QQe(),preferences:()=>fk(),chatDefaults:()=>F1e(),access:()=>xKe(),integrations:()=>lKe(),theme:()=>rM(),audit:()=>fKe(),feedbacks:()=>hKe()};function F9(e){let t=new Set(E7),n=new Set,r=[];for(let i of e??[])t.has(i)&&!n.has(i)&&(r.push(i),n.add(i));for(let e of E7)n.has(e)||r.push(e);return r}function sst(e,t){let n=new Set(t),r=[...t];return e.map(e=>n.has(e)?r.shift():e)}function cst({tab:e,active:t}){let n=ost[e]?.()??O7[e]??e,r=`oc-settings-tabs__tab`+(t?` is-active`:``),i=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-settings-tabs__label`,children:n}),e===`bridge`?(0,I.jsx)(ast,{}):null]});return D7.includes(e)?(0,I.jsx)(xs,{to:`/settings/$tab`,params:{tab:e},className:r,role:`tab`,"aria-selected":t,children:i}):(0,I.jsx)(xs,{to:`/settings/${e}`,className:r,role:`tab`,"aria-selected":t,children:i})}function lst({tab:e,active:t}){let{attributes:n,listeners:r,setNodeRef:i,transform:a,transition:o,isDragging:s}=J8({id:e});return(0,I.jsxs)(`div`,{ref:i,style:{transform:w6.Transform.toString(a),transition:o,opacity:s?.5:1},className:`oc-settings-tabs__item`,role:`presentation`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-settings-tabs__grip`,"aria-label":jXe(),...n,...r,children:(0,I.jsx)(Sm,{size:14,"aria-hidden":!0})}),(0,I.jsx)(cst,{tab:e,active:t})]})}function ust(){let e=P(V.me.getMe,{host:xO}),t=F(V.me.setSettingsTabOrder),n=N7(Gs({select:e=>e.pathname})),r=n===void 0?void 0:P9(n),i=(0,N.useMemo)(()=>F9(e?.settingsTabOrder??null),[e?.settingsTabOrder]),[a,o]=(0,N.useState)(i);(0,N.useEffect)(()=>o(i),[i]);let s=(0,N.useMemo)(()=>new Set(j7(e?.permissions??[])),[e?.permissions]),c=(0,N.useMemo)(()=>r===void 0?[]:a.filter(e=>s.has(e)&&P9(e)===r),[a,s,r]),l=A6(k6(u8,{activationConstraint:{distance:5}}),k6(o8,{coordinateGetter:X8}));if(r===void 0||c.length===0)return null;let u=N9.find(e=>e.id===r);function d(e){let{active:n,over:r}=e;if(!r||n.id===r.id)return;let i=c.indexOf(n.id),s=c.indexOf(r.id);if(i<0||s<0)return;let l=sst(a,z8(c,i,s));o(l),t({order:l})}return(0,I.jsx)(`div`,{className:`oc-settings-tabs`,role:`tablist`,"aria-label":u?.label(),children:(0,I.jsx)(P8,{sensors:l,collisionDetection:vnt,modifiers:[Ort],onDragEnd:d,children:(0,I.jsx)(K8,{items:c,strategy:Frt,children:c.map(e=>(0,I.jsx)(lst,{tab:e,active:e===n},e))})})})}function dst(){let e=P(V.me.getMe,{host:xO}),t=ss(),n=N7(Gs({select:e=>e.pathname})),r=n===void 0?void 0:P9(n),i=(0,N.useMemo)(()=>new Set(j7(e?.permissions??[])),[e?.permissions]),a=(0,N.useMemo)(()=>F9(e?.settingsTabOrder??null).filter(e=>i.has(e)),[e?.settingsTabOrder,i]),o=N9.filter(e=>e.tabs.some(e=>i.has(e)));function s(e){let n=ist(a,e.id);n&&t({to:M7(n)})}return(0,I.jsxs)(`nav`,{className:`oc-settings-nav`,"aria-label":PXe(),children:[(0,I.jsx)(xs,{to:`/`,className:`oc-settings-nav__back`,children:LXe()}),(0,I.jsx)(`div`,{className:`oc-settings-nav__title`,children:BXe()}),(0,I.jsx)(`div`,{className:`oc-settings-nav__list`,children:o.map(e=>(0,I.jsx)(`button`,{type:`button`,className:`oc-settings-nav__group`+(e.id===r?` is-active`:``),"aria-current":e.id===r?`true`:void 0,onClick:()=>s(e),children:e.label()},e.id))})]})}var fst=.1,pst=[248,248,248],mst=[24,24,24];function hst(e,t,n){let r=t,i=n,a=-1,o=-1;for(let s=0;s<n;s++)for(let n=0;n<t;n++)e[(s*t+n)*4+3]>8&&(n<r&&(r=n),n>a&&(a=n),s<i&&(i=s),s>o&&(o=s));return a<0?null:{x:r,y:i,width:a-r+1,height:o-i+1}}function gst(e,t,n){let r=t*n;if(r===0)return 0;let i=0;for(let t=3;t<e.length;t+=4)e[t]<=8&&i++;return i/r}function _st(e,t,n){return gst(e,t,n)>=fst}function vst(e,t){for(let n=0;n<e.length;n+=4)e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2]}function yst(e){for(let t=0;t<e.length;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]}var bst=12*1024*1024,xst=480,Sst=160,Cst=.92;async function wst(e,t={}){if(!e.type.startsWith(`image/`))throw Error(rF());if(e.size>bst)throw Error(oF());let{source:n,width:r,height:i,cleanup:a}=await Tst(e);try{let a=e.type===`image/svg+xml`,o=Math.min(xst/r,Sst/i,a?1/0:1),s=Math.max(1,Math.round(r*o)),c=Math.max(1,Math.round(i*o)),l=document.createElement(`canvas`);l.width=s,l.height=c;let u=l.getContext(`2d`);if(!u)throw Error(fF());u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,u.drawImage(n,0,0,s,c);let d=hst(u.getImageData(0,0,s,c).data,s,c)??{x:0,y:0,width:s,height:c},f=document.createElement(`canvas`);f.width=d.width,f.height=d.height;let p=f.getContext(`2d`);if(!p)throw Error(fF());if(p.drawImage(l,d.x,d.y,d.width,d.height,0,0,d.width,d.height),t.variantFor){let e=p.getImageData(0,0,d.width,d.height);_st(e.data,d.width,d.height)?vst(e.data,t.variantFor===`dark`?pst:mst):yst(e.data),p.putImageData(e,0,0)}let m=await L9(f,`image/webp`,Cst)??await L9(f,`image/png`);if(!m)throw Error(hF());return m}finally{a()}}async function Tst(e){if(e.type===`image/svg+xml`)return I9(e);if(typeof createImageBitmap==`function`)try{let t=await createImageBitmap(e);return{source:t,width:t.width,height:t.height,cleanup:()=>t.close()}}catch{}return I9(e)}async function I9(e){let t=URL.createObjectURL(e);try{let e=new Image;return e.decoding=`async`,await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=()=>r(Error(lF())),e.src=t}),{source:e,width:e.naturalWidth||300,height:e.naturalHeight||150,cleanup:()=>URL.revokeObjectURL(t)}}catch(e){throw URL.revokeObjectURL(t),e}}function L9(e,t,n){return new Promise(r=>e.toBlob(e=>r(e),t,n))}var R9=`__all__`,z9={kind:`relative`,from:`now-24h`,to:`now`},Est=[{value:`status`,label:`Statut`},{value:`latencyMs`,label:`Latence (ms)`},{value:`route`,label:`Route`},{value:`roleKey`,label:`Rôle`},{value:`correlationId`,label:`Corrélation`}];function B9({title:e,description:t,children:n}){return(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:e}),t?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:t}):null]}),(0,I.jsx)(`div`,{className:`oc-show__demo`,children:n})]})}function Dst(e){return e===`light`?ZO():e===`dark`?ek():rk()}var Ost=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function kst({tokens:e,mode:t}){let n=e.colors[t];return(0,I.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:Ost.map(e=>{let t=n[e];return(0,I.jsx)(`span`,{className:`oc-chart-swatch`,style:t?{background:t}:void 0},e)})})}function V9({selected:e,title:t,subtitle:n,tokens:r,mode:i,onSelect:a}){return(0,I.jsxs)(`button`,{type:`button`,className:V$(`oc-chart-card`,e&&`oc-chart-card--selected`),"aria-pressed":e,onClick:a,children:[(0,I.jsxs)(`div`,{className:`oc-chart-card__head`,children:[(0,I.jsx)(`span`,{className:`oc-chart-card__title`,children:t}),e?(0,I.jsx)(um,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,I.jsx)(kst,{tokens:r,mode:i}):(0,I.jsx)(`div`,{className:`oc-chart-swatches oc-chart-swatches--native`,"aria-hidden":!0}),(0,I.jsx)(`div`,{className:`oc-chart-card__meta`,children:(0,I.jsx)(`span`,{className:`oc-chart-card__subtitle`,children:n})})]})}function Ast({selectedKey:e,resolvedMode:t}){let n=P(V.charts.listMyCharts),r=F(V.charts.setMyChart);async function i(e){try{await r({name:e})}catch{}}return(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:AM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:NM()})]}),(0,I.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,I.jsx)(V9,{selected:e===null,title:IM(),subtitle:zM(),tokens:null,mode:t,onSelect:()=>void i(null)}),(n??[]).map(n=>{let r=n.via===`common`?HM():n.via===`owner`?GM():JM({group:n.via.group});return(0,I.jsx)(V9,{selected:e===n.key,title:n.name,subtitle:r,tokens:n.tokens,mode:t,onSelect:()=>void i(n.key)},n.key)})]}),n!==void 0&&n.length===0?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:ZM()}):null]})}function jst(){let e=F(V.charts.importChart),[t,n]=(0,N.useState)(``),[r,i]=(0,N.useState)(``),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1);async function d(e){let t=e.target.files?.[0];if(e.target.value=``,t){o(null),c(!1);try{i(await t.text())}catch{o(lP())}}}async function f(){if(o(null),c(!1),t.trim()===``){o(hP());return}let a;try{a=JSON.parse(r)}catch{o(lP());return}u(!0);try{await e({name:t.trim(),tokens:a}),c(!0),n(``),i(``)}catch(e){o(e instanceof Error?e.message:String(e))}finally{u(!1)}}return(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:zN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:HN()})]}),(0,I.jsxs)(`div`,{className:`oc-chart-import`,children:[(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:GN()}),(0,I.jsx)(n1,{value:t,onChange:e=>n(e.target.value),placeholder:JN(),maxLength:60})]}),(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:ZN()}),(0,I.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:r,onChange:e=>i(e.target.value),placeholder:eP(),rows:8,spellCheck:!1})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{variant:`outline`,size:`sm`,asChild:!0,children:(0,I.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,I.jsx)(Hm,{className:`size-4`}),rP(),(0,I.jsx)(`input`,{type:`file`,accept:`application/json,.json`,className:`oc-chart-import__file-input`,onChange:e=>void d(e)})]})}),(0,I.jsx)(X,{size:`sm`,disabled:l,onClick:()=>void f(),children:oP()})]}),a?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null,s?(0,I.jsx)(`p`,{className:`oc-chart-import__ok`,children:fP()}):null]})]})}function Mst({chart:e}){let t=$n(V.charts.setChartLogo),n=F(V.charts.removeChartLogo),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(null),s=t=>t===`light`?e.logoLightUrl:e.logoDarkUrl;async function c(n,r,a){if(e.chartId!==void 0){o(null),i(!0);try{let i=await(await wst(r,a?{variantFor:a}:{})).arrayBuffer();await t({chartId:e.chartId,bytes:i,mode:n})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function l(e,t){let n=t.target.files?.[0];t.target.value=``,n&&await c(e,n)}async function u(t){if(e.chartId!==void 0){o(null),i(!0);try{await n({chartId:e.chartId,mode:t})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function d(e){let t=s(e===`light`?`dark`:`light`);if(t){o(null),i(!0);try{await c(e,await(await fetch(t)).blob(),e)}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}function f({mode:e}){let t=s(e),n=s(e===`light`?`dark`:`light`);return(0,I.jsxs)(`div`,{className:`oc-chart-mine__logo-slot`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__logo-mode`,children:e===`light`?IP():zP()}),(0,I.jsx)(`span`,{className:`oc-chart-mine__logo-preview`,"data-mode":e,"data-empty":t?void 0:`1`,children:t?(0,I.jsx)(`img`,{src:t,alt:``}):null}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,asChild:!0,children:(0,I.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,I.jsx)(Hm,{className:`size-4`}),t?GP():HP(),(0,I.jsx)(`input`,{type:`file`,accept:`image/*`,className:`oc-chart-import__file-input`,onChange:t=>void l(e,t)})]})}),!t&&n?(0,I.jsx)(X,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void d(e),children:ZP()}):null,t?(0,I.jsx)(X,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void u(e),children:JP()}):null]})}return(0,I.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:NP()}),(0,I.jsxs)(`div`,{className:`oc-chart-mine__logo-slots`,children:[(0,I.jsx)(f,{mode:`light`}),(0,I.jsx)(f,{mode:`dark`})]}),r?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:eF()}):null,a?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null]})}function H9({chart:e}){let t=P(V.me.getMe,{host:xO}),n=F(V.charts.addChartDomain),r=F(V.charts.removeChartDomain),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(null),[c,l]=(0,N.useState)(!1);if(t?.role!==`admin`)return null;let u=e.domains??[];async function d(){let t=i.trim();if(t!==``){s(null),l(!0);try{await n({chartKey:e.key,domain:t}),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}}}async function f(t){s(null);try{await r({chartKey:e.key,domain:t})}catch{}}return(0,I.jsxs)(`div`,{className:`oc-chart-mine__domains`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:vF()}),(0,I.jsxs)(`div`,{className:`oc-chart-mine__domains-body`,children:[(0,I.jsx)(`div`,{className:`oc-chart-avail__groups`,children:u.length===0?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:AF()}):u.map(e=>(0,I.jsxs)($,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e,(0,I.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":NF({domain:e}),onClick:()=>void f(e),children:(0,I.jsx)(Gm,{className:`size-3`})})]},e))}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(n1,{value:i,onChange:e=>a(e.target.value),placeholder:wF(),className:`oc-chart-mine__domains-input`,onKeyDown:e=>{e.key===`Enter`&&d()}}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,disabled:c,onClick:()=>void d(),children:DF()})]}),(0,I.jsx)(`span`,{className:`oc-show__desc`,children:xF()}),o?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null]})]})}function Nst({chart:e}){let t=F(V.charts.updateChart),n=F(V.charts.deleteChart),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(e.name),[s,c]=(0,N.useState)(()=>JSON.stringify(e.tokens,null,2)),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(!1);function p(){o(e.name),c(JSON.stringify(e.tokens,null,2)),u(null),i(!0)}async function m(){if(e.chartId===void 0)return;u(null);let n;try{n=JSON.parse(s)}catch{u(lP());return}f(!0);try{await t({chartId:e.chartId,name:a.trim(),tokens:n}),i(!1)}catch(e){u(e instanceof Error?e.message:String(e))}finally{f(!1)}}async function h(){if(e.chartId!==void 0&&window.confirm(JF()))try{await n({chartId:e.chartId})}catch{}}return(0,I.jsxs)(`div`,{className:`oc-chart-mine__row`,children:[(0,I.jsxs)(`div`,{className:`oc-chart-mine__head`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__name`,children:e.name}),(0,I.jsx)(`div`,{className:`oc-show__row`,children:r?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:p,children:DP()}),(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>void h(),children:AP()})]})})]}),r?(0,I.jsxs)(`div`,{className:`oc-chart-mine__editor`,children:[(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:HF()}),(0,I.jsx)(n1,{value:a,onChange:e=>o(e.target.value),maxLength:60})]}),(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:GF()}),(0,I.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:s,onChange:e=>c(e.target.value),rows:10,spellCheck:!1})]}),l?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:l}):null,(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{size:`sm`,disabled:d,onClick:()=>void m(),children:IF()}),(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>i(!1),children:zF()})]})]}):null,(0,I.jsx)(Mst,{chart:e}),(0,I.jsx)(H9,{chart:e})]})}function Pst(){let e=P(V.charts.listMyCharts),t=(e??[]).filter(e=>e.via===`owner`);return(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:vP()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:xP()})]}),e!==void 0&&t.length===0?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:wP()}):(0,I.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,I.jsx)(Nst,{chart:e},e.key))})]})}function Fst({chart:e,groups:t}){let n=F(V.charts.addChartToGroupPool),r=F(V.charts.removeChartFromGroupPool),i=e.restrictedToGroups,a=e.poolGroups,o=new Set((a??[]).map(e=>e.groupId)),s=t.filter(e=>!o.has(e._id));async function c(t){try{await n({groupId:t,chartKey:e.key})}catch{}}async function l(t){try{await r({groupId:t,chartKey:e.key})}catch{}}return(0,I.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,I.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,I.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,I.jsx)($,{variant:i?`secondary`:`outline`,className:`oc-chart-avail__state`,children:i?xN():e.kind===`custom`&&e.scope===`personal`?oI():vN()}),e.isGlobalDefault?(0,I.jsx)($,{variant:`default`,children:wN()}):null]}),(0,I.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:AN()}),(a??[]).map(e=>(0,I.jsxs)($,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e.name,(0,I.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":IN({group:e.name}),onClick:()=>void l(e.groupId),children:(0,I.jsx)(Gm,{className:`size-3`})})]},e.groupId)),s.length>0?(0,I.jsxs)(C3,{value:``,onValueChange:e=>void c(e),children:[(0,I.jsx)(T3,{size:`sm`,className:`w-56`,children:(0,I.jsx)(w3,{placeholder:NN()})}),(0,I.jsx)(E3,{children:s.map(e=>(0,I.jsx)(Q,{value:e._id,children:e.name},e._id))})]}):t.length===0?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:DN()}):null]})]})}function Ist({chart:e}){let t=F(V.charts.promoteChartToCommon),n=F(V.charts.deleteChart);async function r(){if(e.chartId!==void 0)try{await t({chartId:e.chartId})}catch{}}async function i(){if(e.chartId!==void 0&&window.confirm(JF()))try{await n({chartId:e.chartId})}catch{}}return(0,I.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,I.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,I.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,I.jsx)($,{variant:e.scope===`common`?`outline`:`secondary`,children:e.scope===`common`?lI():oI()}),e.ownerLabel?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:rI({owner:e.ownerLabel})}):null]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[e.scope===`personal`?(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void r(),children:fI()}):null,(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:hI()})]})]})}function Lst({defaultThemeMode:e,defaultLocale:t,defaultChartKey:n}){let r=F(V.admin.setDefaultThemeMode),i=F(V.admin.setDefaultLocale),a=F(V.charts.setDefaultChart),o=P(V.charts.listChartsAdmin),s=P(V.groups.listGroups,{}),c=e??`system`,l=t??`fr`;return(0,I.jsxs)(`div`,{className:`oc-appearance-admin`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:wM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:DM()})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:eN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:rN()})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{variant:n===null?`default`:`outline`,size:`sm`,onClick:()=>void a({name:null}),children:IM()}),CO.map(e=>(0,I.jsx)(X,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void a({name:e.key}),children:e.name},e.key)),(o??[]).filter(e=>e.kind===`custom`&&e.scope===`common`).map(e=>(0,I.jsx)(X,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void a({name:e.key}),children:e.name},e.key))]})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:oN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:lN()})]}),(0,I.jsx)(`div`,{className:`oc-chart-avail-list`,children:(o??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,I.jsx)(Fst,{chart:e,groups:s??[]},e.key))})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:fN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:hN()})]}),(0,I.jsx)(`div`,{className:`oc-chart-avail-list`,children:(o??[]).filter(e=>e.kind===`builtin`||e.scope===`common`).map(e=>(0,I.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,I.jsx)(`div`,{className:`oc-chart-avail__head`,children:(0,I.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name})}),(0,I.jsx)(H9,{chart:e})]},e.key))})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:ZF()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:eI()})]}),(()=>{let e=(o??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:vI()}):(0,I.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,I.jsx)(Ist,{chart:e},e.key))})})()]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:oM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:lM()})]}),(0,I.jsx)(`div`,{className:`oc-show__row`,children:[`light`,`dark`,`system`].map(e=>(0,I.jsx)(X,{variant:c===e?`default`:`outline`,size:`sm`,onClick:()=>void r({mode:e}),children:Dst(e)},e))})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:fM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:hM()})]}),(0,I.jsx)(`div`,{className:`oc-show__row`,children:[`fr`,`en`].map(e=>(0,I.jsx)(X,{variant:l===e?`default`:`outline`,size:`sm`,onClick:()=>void i({locale:e}),children:e===`fr`?Jk():Zk()},e))}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:vM()})]})]})}function Rst(){let e=P(V.me.getMe,{host:xO}),t=wO(e?.resolvedThemeMode);return(0,I.jsxs)(`div`,{className:`oc-appearance`,children:[(0,I.jsx)(Ast,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,I.jsx)(jst,{}),(0,I.jsx)(Pst,{}),e?.role===`admin`?(0,I.jsx)(Lst,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function zst(){let[e,t]=(0,N.useState)(!0),[n,r]=(0,N.useState)(`per-user`),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(R9),[c,l]=(0,N.useState)(R9),[u,d]=(0,N.useState)(z9),f=i!==``||o!==R9||c!==R9;function p(){a(``),s(R9),l(R9),d(z9)}return(0,I.jsxs)(`div`,{className:`oc-show`,children:[(0,I.jsx)(Rst,{}),(0,I.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,I.jsx)(`summary`,{className:`oc-show__title`,children:xM()}),(0,I.jsxs)(B9,{title:`Buttons`,description:`Variants`,children:[(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{children:`Default`}),(0,I.jsx)(X,{variant:`secondary`,children:`Secondary`}),(0,I.jsx)(X,{variant:`outline`,children:`Outline`}),(0,I.jsx)(X,{variant:`ghost`,children:`Ghost`}),(0,I.jsx)(X,{variant:`destructive`,children:`Destructive`}),(0,I.jsx)(X,{variant:`link`,children:`Link`})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{size:`sm`,children:`Small`}),(0,I.jsx)(X,{children:`Default`}),(0,I.jsx)(X,{size:`lg`,children:`Large`}),(0,I.jsx)(X,{size:`icon`,"aria-label":`more`,children:(0,I.jsx)(ym,{})}),(0,I.jsx)(X,{disabled:!0,children:`Disabled`})]})]}),(0,I.jsx)(B9,{title:`Badges`,children:(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)($,{children:`Default`}),(0,I.jsx)($,{variant:`secondary`,children:`Secondary`}),(0,I.jsx)($,{variant:`outline`,children:`Outline`}),(0,I.jsx)($,{variant:`destructive`,children:`Destructive`})]})}),(0,I.jsx)(B9,{title:`Inputs & selection`,children:(0,I.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,I.jsx)(n1,{placeholder:`Text input…`}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsxs)(C3,{value:n,onValueChange:r,children:[(0,I.jsx)(T3,{className:`w-56`,children:(0,I.jsx)(w3,{placeholder:`Select…`})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:`per-user`,children:`per-user (chacun son agent)`}),(0,I.jsx)(Q,{value:`shared`,children:`shared (agent commun)`})]})]}),(0,I.jsxs)(`label`,{className:`oc-show__check`,children:[(0,I.jsx)(E1,{checked:e,onCheckedChange:e=>t(!!e)}),`Checkbox`]})]})]})}),(0,I.jsx)(B9,{title:`Filtres & plage temporelle`,description:`Barre réutilisable (recherche debouncée + selects rapides à largeur auto + plage façon Grafana) et constructeur de filtre avancé. Câblée dans Users, Groups, Comptes de service, Traces, Anomalies, Audit et KPI.`,children:(0,I.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,I.jsxs)(r7,{q:i,onQChange:a,searchPlaceholder:`Rechercher (kind, principal, rôle, route…)`,timeRange:u,onTimeRangeChange:d,onReset:p,canReset:f,children:[(0,I.jsxs)(C3,{value:o,onValueChange:s,children:[(0,I.jsx)(T3,{size:`sm`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:R9,children:`Toutes directions`}),(0,I.jsx)(Q,{value:`inbound`,children:`inbound`}),(0,I.jsx)(Q,{value:`outbound`,children:`outbound`}),(0,I.jsx)(Q,{value:`internal`,children:`internal`})]})]}),(0,I.jsxs)(C3,{value:c,onValueChange:l,children:[(0,I.jsx)(T3,{size:`sm`,children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:R9,children:`Toutes sévérités`}),(0,I.jsx)(Q,{value:`info`,children:`info`}),(0,I.jsx)(Q,{value:`warn`,children:`warn`}),(0,I.jsx)(Q,{value:`critical`,children:`critical`})]})]})]}),(0,I.jsx)(m7,{fields:Est,onChange:()=>{}}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(`span`,{className:`oc-show__desc`,children:`Sélecteur de plage seul :`}),(0,I.jsx)(n7,{value:u,onChange:d})]})]})}),(0,I.jsx)(B9,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,I.jsxs)(H$,{children:[(0,I.jsx)(U$,{asChild:!0,children:(0,I.jsx)(X,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,I.jsx)(ym,{})})}),(0,I.jsxs)(W$,{align:`start`,children:[(0,I.jsx)(K$,{children:`Actions`}),(0,I.jsx)(q$,{}),(0,I.jsx)(G$,{children:`Edit`}),(0,I.jsx)(G$,{children:`Duplicate`}),(0,I.jsx)(q$,{}),(0,I.jsx)(G$,{variant:`destructive`,children:`Delete`})]})]})}),(0,I.jsx)(B9,{title:`Card`,children:(0,I.jsxs)(n9,{className:`w-80`,children:[(0,I.jsxs)(r9,{children:[(0,I.jsx)(i9,{children:`Instance`}),(0,I.jsx)(a9,{children:`Non-secret metadata only.`})]}),(0,I.jsx)(o9,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,I.jsxs)(oot,{className:`gap-2`,children:[(0,I.jsx)(X,{size:`sm`,children:`Save`}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,children:`Cancel`})]})]})}),(0,I.jsx)(B9,{title:`Table`,children:(0,I.jsxs)(C5,{children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[(0,I.jsx)(D5,{className:`w-8`,children:(0,I.jsx)(E1,{"aria-label":`select all`})}),(0,I.jsx)(D5,{children:`Name`}),(0,I.jsx)(D5,{children:`Mode`}),(0,I.jsx)(D5,{className:`text-right`,children:`Status`}),(0,I.jsx)(D5,{className:`w-8`})]})}),(0,I.jsx)(T5,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,I.jsxs)(E5,{children:[(0,I.jsx)(O5,{children:(0,I.jsx)(E1,{"aria-label":`select ${e.n}`})}),(0,I.jsx)(O5,{className:`font-medium`,children:e.n}),(0,I.jsx)(O5,{children:(0,I.jsx)($,{variant:`secondary`,children:e.m})}),(0,I.jsx)(O5,{className:`text-right`,children:(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-muted-foreground`,children:[(0,I.jsx)(um,{className:`size-3.5`}),` `,e.s]})}),(0,I.jsx)(O5,{children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,I.jsx)(ym,{})})})]},e.n))})]})}),(0,I.jsx)(B9,{title:`App fragments`,description:`Chat-specific components`,children:(0,I.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,I.jsx)(`div`,{className:`oc-msg oc-msg--assistant`,children:(0,I.jsx)(`div`,{className:`oc-msg__body`,children:`Assistant message bubble.`})}),(0,I.jsx)(`div`,{className:`oc-tool oc-tool--completed`,children:(0,I.jsxs)(`div`,{className:`oc-tool__header`,children:[(0,I.jsx)(`span`,{className:`oc-tool__icon`,children:`✓`}),(0,I.jsx)(`span`,{className:`oc-tool__name`,children:`write-file`}),(0,I.jsx)(`span`,{className:`oc-tool__phase`,children:`completed`})]})}),(0,I.jsxs)(`div`,{className:`oc-run-status oc-run-status--streaming`,children:[(0,I.jsx)(`span`,{className:`oc-run-status__dot`}),(0,I.jsx)(`span`,{className:`oc-run-status__label`,children:`Running`})]})]})})]})]})}var U9=`oc.theme`;function W9(e){let t=e===`dark`||e===`system`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;document.documentElement.classList.toggle(`dark`,t)}function G9(e){(0,N.useEffect)(()=>{let t=e??localStorage.getItem(U9)??`system`;if(localStorage.setItem(U9,t),W9(t),t===`system`){let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=()=>W9(`system`);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)}},[e])}function Bst(e){(0,N.useEffect)(()=>{if(!e)return;document.documentElement.lang=e;let t;try{t=q()}catch{t=void 0}t!==e&&HO(e)},[e])}function Vst(){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(mr,{children:(0,I.jsx)(`div`,{className:`oc-boot`,children:dQ()})}),(0,I.jsx)(pr,{children:(0,I.jsx)(Ust,{})}),(0,I.jsx)(fr,{children:(0,I.jsx)(w4e,{children:(0,I.jsx)(Wst,{})})})]})}function Hst(){return(0,I.jsxs)(`svg`,{className:`oc-provider__logo`,viewBox:`0 0 48 48`,"aria-hidden":`true`,children:[(0,I.jsx)(`path`,{fill:`#EA4335`,d:`M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z`}),(0,I.jsx)(`path`,{fill:`#4285F4`,d:`M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z`}),(0,I.jsx)(`path`,{fill:`#FBBC05`,d:`M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z`}),(0,I.jsx)(`path`,{fill:`#34A853`,d:`M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z`})]})}function Ust(){let{signIn:e}=Ir();G9(void 0);let t=P(V.charts.brandForHost,{host:xO}),n=efe(xO),r=t??n??null,i=wO(void 0);TO(r?.tokens??null,i),(0,N.useEffect)(()=>{t&&tfe(xO,t)},[t]);let a=r?.brand,o=a&&!a.isDefault?jO(a,i):null,s=a?.label??`Atrium`,c=P(V.me.authProviders),[l,u]=(0,N.useState)(null);async function d(t){u(null);try{await e(t)}catch{u(JAe())}}let f=c!==void 0&&!c.google&&!c.microsoft&&!c.anonymous;return(0,I.jsxs)(`div`,{className:`oc-signin`,children:[(0,I.jsxs)(`svg`,{className:`oc-signin__motif`,viewBox:`0 0 1200 1000`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:[(0,I.jsx)(`polyline`,{className:`oc-signin__line`,points:`0,860 470,860 522,790 574,940 626,810 678,860 1200,860`,vectorEffect:`non-scaling-stroke`}),(0,I.jsx)(`polyline`,{className:`oc-signin__pulse`,points:`0,860 470,860 522,790 574,940 626,810 678,860 1200,860`,pathLength:`100`,vectorEffect:`non-scaling-stroke`})]}),(0,I.jsxs)(`div`,{className:`oc-signin__brand`,children:[o?(0,I.jsx)(`img`,{className:`oc-signin__brandlogo`,src:o,alt:``}):null,(0,I.jsx)(`span`,{className:`oc-signin__wordmark`,children:s})]}),(0,I.jsxs)(`div`,{className:`oc-signin__card`,children:[(0,I.jsx)(`h1`,{className:`oc-signin__title`,children:ZAe()}),(0,I.jsx)(`p`,{className:`oc-signin__subtitle`,children:eje()}),(0,I.jsx)(`div`,{className:`oc-signin__providers`,children:c?.google?(0,I.jsxs)(`button`,{type:`button`,className:`oc-provider oc-provider--google`,onClick:()=>void d(`google`),children:[(0,I.jsx)(Hst,{}),(0,I.jsx)(`span`,{children:rje()})]}):null}),l?(0,I.jsx)(`p`,{className:`oc-signin__error`,children:l}):null,f?(0,I.jsx)(`p`,{className:`oc-signin__error`,children:oje()}):null,c?.anonymous?(0,I.jsx)(`button`,{type:`button`,className:`oc-signin__dev`,onClick:()=>void e(`anonymous`),children:lje()}):null]})]})}function Wst(){let e=P(V.me.getMe,{host:xO}),t=F(V.me.bootstrap),n=ss();(0,N.useEffect)(()=>{e&&!e.hasProfile&&t()},[e,t]),G9(e?.resolvedThemeMode);let r=wO(e?.resolvedThemeMode);TO(e?.resolvedChartTokens,r),Bst(e?.resolvedLocale);let i=(0,N.useRef)(null);if((0,N.useEffect)(()=>{e&&(i.current!==null&&i.current!==e.userId&&n({to:`/`}),i.current=e.userId)},[e,n]),e===void 0)return(0,I.jsx)(`div`,{className:`oc-boot`,children:dQ()});let a=e.name||e.email||fje();return e.role===`pending`?(0,I.jsxs)(`div`,{className:`oc-shell`,children:[(0,I.jsx)(K9,{}),(0,I.jsx)(p5,{}),(0,I.jsxs)(`header`,{className:`oc-topbar`,children:[(0,I.jsx)(`span`,{className:`oc-topbar__brand`,children:(0,I.jsx)(q9,{brand:e.resolvedChartBrand,resolvedThemeMode:e.resolvedThemeMode})}),(0,I.jsx)(`div`,{className:`oc-topbar__actions`,children:(0,I.jsx)(m5,{label:a,mode:e.themeMode,minimal:!0})})]}),(0,I.jsxs)(`div`,{className:`oc-pending`,children:[(0,I.jsx)(`h1`,{className:`oc-pending__title`,children:hje()}),(0,I.jsx)(`p`,{className:`oc-pending__body`,children:vje()})]})]}):(0,I.jsx)(Kst,{canOpenSettings:j7(e.permissions??[]).length>0,userLabel:a,themeMode:e.themeMode,resolvedThemeMode:e.resolvedThemeMode,brand:e.resolvedChartBrand},e.userId)}function K9(){let e=P(V.me.getImpersonation),t=F(V.admin.stopImpersonation);return!e||!e.impersonating?null:(0,I.jsxs)(`div`,{className:`oc-imp`,role:`alert`,children:[(0,I.jsx)(Dee,{className:`size-4 shrink-0`}),(0,I.jsxs)(`span`,{className:`oc-imp__text`,children:[xje(),` `,(0,I.jsx)(`strong`,{children:e.targetLabel}),wje(),(0,I.jsx)(`strong`,{children:e.realLabel}),Dje()]}),(0,I.jsx)(X,{size:`sm`,variant:`outline`,className:`oc-imp__exit`,onClick:()=>void t(),children:Aje()})]})}function q9({brand:e,resolvedThemeMode:t}){let n=wO(t),r=e?.label??`Atrium`,i=e?.isDefault??!0,a=jO(e,n),[o,s]=(0,N.useState)(!1);return(0,N.useEffect)(()=>s(!1),[a]),(0,I.jsxs)(I.Fragment,{children:[a!==null&&!o?(0,I.jsx)(`img`,{className:`oc-brand__logo`,src:a,alt:``,"aria-hidden":`true`,onError:()=>s(!0)}):i?(0,I.jsx)(NO,{className:`oc-brand__logo`}):null,(0,I.jsx)(`span`,{className:`oc-brand__label`,children:r})]})}function Gst({userLabel:e,themeMode:t,resolvedThemeMode:n,brand:r,collapsed:i,onToggleSidebar:a}){return(0,I.jsxs)(`header`,{className:`oc-topbar`,children:[(0,I.jsxs)(`div`,{className:`oc-topbar__left`,children:[(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":i?Nje():Ije(),onClick:a,children:i?(0,I.jsx)(Mee,{}):(0,I.jsx)(jee,{})}),(0,I.jsx)(xs,{to:`/`,className:`oc-topbar__brand`,children:(0,I.jsx)(q9,{brand:r,resolvedThemeMode:n})})]}),(0,I.jsx)(`div`,{className:`oc-topbar__search`,children:(0,I.jsx)(dit,{})}),(0,I.jsxs)(`div`,{className:`oc-topbar__actions`,children:[(0,I.jsx)(oit,{}),(0,I.jsx)(m5,{label:e,mode:t})]})]})}function Kst({canOpenSettings:e,userLabel:t,themeMode:n,resolvedThemeMode:r,brand:i}){let{width:a,collapsed:o,toggleCollapsed:s,collapse:c,startResize:l,isMobile:u}=b3e(),d=zs(),f=as({strict:!1}),p=ss(),m=!!d({to:`/settings`,fuzzy:!0});(0,N.useEffect)(()=>{u&&c()},[Gs({select:e=>e.pathname}),u,c]);let h=(0,N.useCallback)(e=>{p({to:`/chat/$chatId`,params:{chatId:e}})},[p]),{startNewChat:g,picker:_}=tit(h),v=(0,N.useMemo)(()=>y5(g5,v5()),[]);return(0,N.useEffect)(()=>{let e=e=>{b5(e,g5)&&(e.preventDefault(),g())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g]),(0,I.jsxs)(`div`,{className:`oc-shell`,children:[_,(0,I.jsx)(K9,{}),(0,I.jsx)(p5,{}),(0,I.jsx)(Gst,{userLabel:t,themeMode:n,resolvedThemeMode:r,brand:i,collapsed:o,onToggleSidebar:s}),(0,I.jsxs)(`div`,{className:u?`oc-workspace oc-workspace--mobile`:`oc-workspace`,children:[u&&!o?(0,I.jsx)(`div`,{className:`oc-sidebar-backdrop`,onClick:c,"aria-hidden":!0}):null,o?null:(0,I.jsxs)(`div`,{className:`oc-sidebar-col`,style:u?void 0:{width:a,flex:`0 0 ${a}px`},children:[m?(0,I.jsx)(dst,{}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Xrt,{activeChatId:f.chatId??null,onSelect:h,onNewChat:()=>void g(),newChatShortcut:v}),e?(0,I.jsx)(X,{variant:`ghost`,className:`m-2 justify-start`,asChild:!0,children:(0,I.jsx)(xs,{to:`/settings`,children:zje()})}):null]}),(0,I.jsx)(`div`,{className:`oc-sidebar-resizer`,onPointerDown:l,role:`separator`,"aria-orientation":`vertical`,"aria-label":Hje()})]}),(0,I.jsx)(`main`,{className:`oc-main`,children:(0,I.jsx)(Fs,{})})]})]})}function qst(){let e=P(V.me.getMe,{host:xO}),t=ss(),n=Gs({select:e=>e.pathname}),r=(0,N.useMemo)(()=>e?j7(e.permissions??[]):[],[e]),i=e!==void 0&&r.length===0;if((0,N.useEffect)(()=>{i&&t({to:`/`})},[i,t]),e===void 0)return(0,I.jsx)(`div`,{className:`oc-admin__hint`,style:{padding:16},children:dQ()});if(i)return null;let a=N7(n),o=a!==void 0&&!r.includes(a);return(0,I.jsxs)(`div`,{className:`oc-admin`,children:[(0,I.jsx)(ust,{}),(0,I.jsx)(`div`,{className:`oc-admin__body`,children:o?(0,I.jsx)(Jst,{}):(0,I.jsx)(Fs,{})})]})}function Jst(){return(0,I.jsxs)(`div`,{className:`oc-route-error`,role:`alert`,children:[(0,I.jsx)(`div`,{className:`oc-route-error__icon`,"aria-hidden":!0,children:(0,I.jsx)(Vm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:Gje()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:Jje()})]})}function J9(){let e=P(V.me.getMe,{host:xO}),t=ss();return(0,N.useEffect)(()=>{if(e===void 0)return;let n=j7(e.permissions??[]);t({to:n.length>0?M7(n[0]):`/`,replace:!0})},[e,t]),(0,I.jsx)(`div`,{className:`oc-admin__hint`,style:{padding:16},children:dQ()})}function Yst(){let{tab:e}=as({from:`/settings/$tab`});switch(e){case`groups`:return(0,I.jsx)(qat,{});case`integrations`:return(0,I.jsx)(Oot,{});case`instances`:return(0,I.jsx)(_at,{});case`bridge`:return(0,I.jsx)(qit,{});case`theme`:return(0,I.jsx)(zst,{});case`feedbacks`:return(0,I.jsx)(jot,{});case`files`:return(0,I.jsx)(Mot,{});case`agentFiles`:return(0,I.jsx)(Lot,{});case`preferences`:return(0,I.jsx)(Yot,{});case`chatDefaults`:return(0,I.jsx)(Qot,{});case`access`:return(0,I.jsx)(nst,{});default:return(0,I.jsx)(zat,{})}}function Xst(){let{chatId:e}=as({from:`/chat/$chatId`}),{m:t}=os({from:`/chat/$chatId`});return(0,I.jsx)(q3,{chatId:e,focusMessageId:t??null})}function Zst(){return(0,I.jsx)(q3,{chatId:null})}var Y9=Es({component:Vst}),Qst=ws({getParentRoute:()=>Y9,path:`/`,component:Zst}),$st=ws({getParentRoute:()=>Y9,path:`chat/$chatId`,component:Xst,validateSearch:e=>({m:typeof e.m==`string`?e.m:void 0})}),X9=ws({getParentRoute:()=>Y9,path:`settings`,component:qst}),ect=ws({getParentRoute:()=>X9,path:`/`,component:J9}),tct=ws({getParentRoute:()=>X9,path:`traces`,validateSearch:aat,component:rot}),nct=ws({getParentRoute:()=>X9,path:`audit`,validateSearch:oat,component:Dat}),rct=ws({getParentRoute:()=>X9,path:`anomalies`,validateSearch:sat,component:Sot}),ict=ws({getParentRoute:()=>X9,path:`kpi`,validateSearch:cat,component:dot}),act=ws({getParentRoute:()=>X9,path:`serviceAccounts`,validateSearch:lat,component:Aat}),oct=ws({getParentRoute:()=>X9,path:`users`,validateSearch:uat,component:mat}),sct=ws({getParentRoute:()=>X9,path:`uiprefs`,beforeLoad:()=>{throw ia({to:`/settings/$tab`,params:{tab:fat.uiprefs},replace:!0})}}),cct=ws({getParentRoute:()=>X9,path:`$tab`,parseParams:e=>({tab:Wp([...D7]).catch(`roles`).parse(e.tab)}),component:Yst});function lct({reset:e}){let t=ss();return(0,I.jsxs)(`div`,{className:`oc-route-error`,role:`alert`,children:[(0,I.jsx)(`div`,{className:`oc-route-error__icon`,"aria-hidden":!0,children:(0,I.jsx)(Vm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:Zje()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:eMe()}),(0,I.jsxs)(`div`,{className:`oc-route-error__actions`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta`,onClick:()=>e(),children:rMe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta oc-route-error__cta--ghost`,onClick:()=>void t({to:`/`}),children:fQ()})]})]})}function uct(){let e=ss();return(0,I.jsxs)(`div`,{className:`oc-route-error`,role:`status`,children:[(0,I.jsx)(`div`,{className:`oc-route-error__icon`,"aria-hidden":!0,children:(0,I.jsx)(Eee,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:cMe()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:dMe()}),(0,I.jsx)(`div`,{className:`oc-route-error__actions`,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta`,onClick:()=>void e({to:`/`}),children:fQ()})})]})}var Z9=Vs({routeTree:Y9.addChildren([Qst,$st,X9.addChildren([ect,tct,nct,rct,ict,act,oct,sct,cct])]),defaultPreload:`intent`,defaultErrorComponent:lct,defaultNotFoundComponent:uct});async function dct(){try{let e=await fetch(`/config.json`,{cache:`no-store`});if(e.ok){let t=(await e.json())?.convexUrl;if(typeof t==`string`&&t.trim())return t.trim()}}catch{}throw Error(`No Convex URL configured: serve /config.json {"convexUrl":"…"} (production) or set VITE_CONVEX_URL (local dev).`)}var fct=()=>null;function Q9({children:e}){return(0,I.jsx)(`div`,{style:{display:`flex`,minHeight:`100vh`,alignItems:`center`,justifyContent:`center`,padding:`2rem`,textAlign:`center`,font:`14px system-ui, sans-serif`,opacity:.6},children:e})}var $9=_r.createRoot(document.getElementById(`root`));$9.render((0,I.jsx)(N.StrictMode,{children:(0,I.jsx)(Q9,{children:`Chargement…`})})),dct().then(e=>{let t=new Yn(e);$9.render((0,I.jsx)(N.StrictMode,{children:(0,I.jsx)(Lr,{client:t,children:(0,I.jsxs)(S4e,{children:[(0,I.jsx)(_tt,{children:(0,I.jsx)(Ws,{router:Z9})}),(0,I.jsx)(N.Suspense,{fallback:null,children:(0,I.jsx)(fct,{router:Z9,position:`bottom-right`})})]})})}))}).catch(e=>{console.error(`Boot failed:`,e),$9.render((0,I.jsx)(N.StrictMode,{children:(0,I.jsxs)(Q9,{children:[`Configuration manquante\xA0:`,` `,e instanceof Error?e.message:String(e)]})}))});
|
|
164
|
+
`))n.set(e,(n.get(e)??0)-1);let r=0,i=0,a=[],o=[];for(let[e,t]of n)t<0?(r+=-t,a.length<D9&&a.push(e)):t>0&&(i+=t,o.length<D9&&o.push(e));return{added:r,removed:i,sampleAdded:a,sampleRemoved:o}}function Lot(e){return e instanceof Error?e.message.includes(`conflict:`):String(e).includes(`conflict:`)}var O9=e=>`${e.instanceName}::${e.agentId}`;function Rot(){let e=P(V.me.getMe,{host:xO}),t=e?.role===`admin`,n=(e?.permissions??[]).includes(`bridge.read`),r=P(V.admin.listInstances,e!==void 0&&t?{}:`skip`),[i,a]=(0,N.useState)(null);(0,N.useEffect)(()=>{!t||!r||r.length===0||(!i||!r.some(e=>e.name===i))&&a(r[0].name)},[t,r,i]);let o=P(V.agents.listAgentsForInstance,t&&i?{instanceName:i}:`skip`),s=P(V.agents.listMyAgents,e!==void 0&&!t?{}:`skip`),c=(0,N.useMemo)(()=>{if(e!==void 0){if(t)return i===null||o===void 0?r!==void 0&&r.length===0?[]:void 0:o.agents.map(e=>({instanceName:i,agentId:e.agentId,label:`${e.emoji?`${e.emoji} `:``}${e.displayName??e.agentId}`}));if(s!==void 0)return s.map(e=>({instanceName:e.instanceName,agentId:e.agentId,label:`${e.emoji?`${e.emoji} `:``}${e.displayName??e.agentId}`}))}},[e,t,i,o,r,s]),[l,u]=(0,N.useState)(null);(0,N.useEffect)(()=>{!c||c.length===0||(!l||!c.some(e=>O9(e)===l))&&u(O9(c[0]))},[c,l]);let d=c?.find(e=>O9(e)===l)??null,f=$n(V.agentFiles.listAgentFiles),[p,m]=(0,N.useState)({status:`idle`}),h=d?.instanceName??null,g=d?.agentId??null,_=P(V.compat.forInstance,n&&h!==null?{instanceName:h}:`skip`),v=n&&h!==null?P3(_,`agentFiles`):null,y=v===null?!1:v===`loading`?null:v.blocked,b=(0,N.useCallback)(async()=>{if(!(h===null||g===null)){m({status:`loading`});try{m({status:`done`,files:(await f({instanceName:h,agentId:g})).files})}catch{m({status:`error`})}}},[f,h,g]);(0,N.useEffect)(()=>{y===!1&&b()},[b,y]);let[x,S]=(0,N.useState)(null),C=q(),w=(0,N.useMemo)(()=>new Intl.NumberFormat(C,{maximumFractionDigits:0}),[C]);return e===void 0||c===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):(0,I.jsxs)(`div`,{className:`oc-afiles`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:r$e()}),(0,I.jsxs)(`div`,{className:`oc-afiles__picker`,children:[t&&(r?.length??0)>1?(0,I.jsxs)(S3,{value:i??``,onValueChange:e=>a(e),children:[(0,I.jsx)(w3,{size:`sm`,"aria-label":YQ(),children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:(r??[]).map(e=>(0,I.jsx)(Q,{value:e.name,children:e.name},e.name))})]}):null,c.length>0?(0,I.jsxs)(S3,{value:l??``,onValueChange:e=>u(e),children:[(0,I.jsx)(w3,{size:`sm`,"aria-label":c$e(),children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:c.map(e=>(0,I.jsx)(Q,{value:O9(e),children:e.label},O9(e)))})]}):(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:d$e()})]}),d===null?null:v===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):v!==null&&v.blocked?(0,I.jsxs)(`p`,{className:`oc-compat__blocked`,role:`status`,children:[(0,I.jsx)(Vm,{size:14,"aria-hidden":!0}),` `,W5(v.gatewayVersion)]}):p.status===`loading`||p.status===`idle`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):p.status===`error`?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[_$e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void b(),children:KQ()})]}):p.files.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:m$e()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-afiles__list`,children:p.files.map(e=>{let n=Pot(e.size),r=n>=80;return(0,I.jsxs)(`div`,{className:`oc-afiles__row`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__name`,title:e.name,children:e.name}),e.missing?(0,I.jsx)($,{variant:`outline`,children:b$e()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-afiles__size`,children:C$e({size:T9(e.size,C)})}),(0,I.jsx)(`span`,{className:`oc-afiles__gauge${r?` is-warn`:``}`,"aria-hidden":!0,children:(0,I.jsx)(`span`,{className:`oc-afiles__gauge-fill`,style:{width:`${Math.min(n,100)}%`}})}),(0,I.jsx)(`span`,{className:`oc-afiles__pct`,children:E$e({pct:w.format(n)})}),r?(0,I.jsx)(Vm,{size:14,className:`oc-afiles__warn`,"aria-label":k$e()}):(0,I.jsx)(`span`,{className:`oc-afiles__warn-slot`,"aria-hidden":!0})]}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,className:`oc-afiles__open`,onClick:()=>S(e),children:t?F$e():R$e()})]},e.name)})}),(0,I.jsx)(`p`,{className:`oc-afiles__budget`,children:M$e({used:T9(E9(p.files),C),total:T9(w9,C),pct:w.format(Fot(E9(p.files)))})})]}),x&&d?(0,I.jsx)(zot,{instanceName:d.instanceName,agentId:d.agentId,name:x.name,isAdmin:t,onClose:()=>S(null),onSaved:()=>void b()}):null]})}function zot({instanceName:e,agentId:t,name:n,isAdmin:r,onClose:i,onSaved:a}){let o=$n(V.agentFiles.getAgentFile),s=$n(V.agentFiles.setAgentFile),c=S1(),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(!1),[_,v]=(0,N.useState)(!1),[y,b]=(0,N.useState)(!1),[x,S]=(0,N.useState)(!1),C=(0,N.useCallback)(async r=>{f(!1);try{let i=await o({instanceName:e,agentId:t,name:n});u({content:i.content,updatedAtMs:i.updatedAtMs}),r||m(i.content),b(!1)}catch{f(!0)}},[o,e,t,n]);(0,N.useEffect)(()=>{C(!1)},[C]);async function w(){if(l!==null){v(!0),S(!1);try{await s({instanceName:e,agentId:t,name:n,content:p,baseUpdatedAtMs:l.updatedAtMs??void 0}),c.success(i1e({name:n})),a(),await C(!1)}catch(e){Lot(e)?b(!0):S(!0)}finally{v(!1)}}}let T=l!==null&&p!==l.content,E=(0,N.useMemo)(()=>l===null?null:Iot(l.content,p),[l,p]),D=p.length>C9,O=q(),ee=(0,N.useMemo)(()=>new Intl.NumberFormat(O),[O]);return(0,I.jsx)(u1,{open:!0,onOpenChange:e=>!e&&i(),children:(0,I.jsxs)(d1,{className:`oc-afiles__editor`,children:[(0,I.jsxs)(f1,{children:[(0,I.jsx)(m1,{children:XQ({name:n})}),(0,I.jsxs)(h1,{children:[U$e({agent:t,instance:e}),r?null:(0,I.jsxs)(I.Fragment,{children:[` · `,K$e()]})]})]}),d?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[u1e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void C(!1),children:KQ()})]}):l===null?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`textarea`,{className:`oc-afiles__source`,value:p,readOnly:!r,spellCheck:!1,onChange:e=>m(e.target.value),"aria-label":XQ({name:n})}),(0,I.jsx)(`p`,{className:`oc-afiles__hint`,children:Y$e()}),y?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[p1e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void C(!0),children:g1e()})]}):null,x?(0,I.jsx)(`p`,{className:`oc-afiles__error`,role:`alert`,children:s1e()}):null,(0,I.jsxs)(`div`,{className:`oc-afiles__editor-foot`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__count${D?` is-over`:``}`,children:Q$e({count:ee.format(p.length),max:ee.format(C9)})}),r?(0,I.jsx)(X,{size:`sm`,disabled:!T||_||y,onClick:()=>g(!0),children:_?GQ():t1e()}):null]})]}),(0,I.jsx)(n1,{open:h,onOpenChange:g,children:(0,I.jsxs)(r1,{children:[(0,I.jsxs)(i1,{children:[(0,I.jsx)(o1,{children:y1e({name:n})}),(0,I.jsx)(s1,{children:S1e({agent:t})})]}),E?(0,I.jsxs)(`div`,{className:`oc-afiles__diff`,children:[(0,I.jsx)(`p`,{className:`oc-afiles__diff-counts`,children:T1e({added:E.added,removed:E.removed})}),E.sampleAdded.length>0?(0,I.jsxs)(`div`,{className:`oc-afiles__diff-block`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__diff-label`,children:O1e()}),E.sampleAdded.map((e,t)=>(0,I.jsx)(`code`,{className:`oc-afiles__diff-line is-add`,children:e||` `},t))]}):null,E.sampleRemoved.length>0?(0,I.jsxs)(`div`,{className:`oc-afiles__diff-block`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__diff-label`,children:j1e()}),E.sampleRemoved.map((e,t)=>(0,I.jsx)(`code`,{className:`oc-afiles__diff-line is-del`,children:e||` `},t))]}):null]}):null,(0,I.jsxs)(a1,{children:[(0,I.jsx)(l1,{children:fW()}),(0,I.jsx)(c1,{onClick:()=>void w(),children:P1e()})]})]})})]})})}var k9=[{id:`messages`,label:()=>xI()},{id:`composer`,label:()=>wI()},{id:`sidebar`,label:()=>DI()},{id:`other`,label:()=>AI()}],A9={showSource:{category:`messages`,label:()=>NI(),help:()=>II()},showReport:{category:`messages`,label:()=>zI(),help:()=>HI()},copyAssistant:{category:`messages`,label:()=>GI()},copyUser:{category:`messages`,label:()=>JI()},showDelete:{category:`messages`,label:()=>ZI()},showTools:{category:`messages`,label:()=>eL(),help:()=>rL()},voiceInput:{category:`composer`,label:()=>oL(),help:()=>lL()},showChatAge:{category:`sidebar`,label:()=>fL(),help:()=>hL()},showChatProvider:{category:`sidebar`,label:()=>vL(),help:()=>xL()}};function j9(e){return e.toLowerCase().normalize(`NFD`).replace(/\p{Diacritic}/gu,``)}function Bot(e,t){let n=j9(t.trim()),r=new Map(k9.map(e=>[e.id,e.label()])),i=new Map(k9.map(e=>[e.id,[]]));for(let t of e){let e=A9[t],a=e?.category??`other`;n&&!j9(`${e?e.label():t} ${e?.help?e.help():``} ${t} ${r.get(a)??``}`).includes(n)||i.get(a).push(t)}return k9.map(e=>({id:e.id,label:r.get(e.id),keys:i.get(e.id)})).filter(e=>e.keys.length>0)}var Vot=[`showSource`,`showReport`,`copyAssistant`,`copyUser`,`showDelete`,`showTools`,`voiceInput`,`showChatAge`,`showChatProvider`],Hot={voiceInput:`voiceInput`};function Uot(e){return Vot.includes(e)}function M9(e){return e===`admin`}function Wot(e){return e===!0?`on`:e===!1?`off`:`inherit`}function Got(e){return e===`on`?!0:e===`off`?!1:null}function Kot(e){return Uot(e)?Hot[e]:void 0}var qot={voiceInput:()=>eR()};function Jot({prefKey:e,ui:t}){let n=F(V.admin.setUiPrefDefault),r=F(V.admin.setFeatureEnabled),i=Kot(e),a=i?qot[e]?.():void 0;return(0,I.jsxs)(`div`,{className:`oc-prefs__gov`,children:[(0,I.jsxs)(`div`,{className:`oc-prefs__gov-row`,children:[(0,I.jsx)(`span`,{className:`oc-prefs__gov-label`,children:HL()}),(0,I.jsxs)(S3,{value:Wot(t.defaults[e]),onValueChange:t=>void n({key:e,value:Got(t)}),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-36`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:`on`,children:oR()}),(0,I.jsx)(Q,{value:`off`,children:lR()}),(0,I.jsx)(Q,{value:`inherit`,children:fR()})]})]}),i?(0,I.jsxs)(`span`,{className:`oc-prefs__gov-gate`,children:[(0,I.jsx)(T1,{checked:t.featuresEnabled[i]===!0,onCheckedChange:e=>void r({key:i,enabled:e===!0}),"aria-label":GL()}),GL()]}):null]}),a?(0,I.jsx)(`span`,{className:`oc-prefs__gov-help`,children:a}):null]})}function Yot(){let[e,t]=(0,N.useState)(``),[n,r]=(0,N.useState)(!1),i=P(V.me.getMe,{host:xO}),a=i?.ui,o=M9(i?.role)&&n,s=F(V.me.setUiPref).withOptimisticUpdate(C1),c=(0,N.useMemo)(()=>a?Bot(Object.keys(a.effective),e):[],[a,e]);return a?(0,I.jsxs)(`div`,{className:`oc-prefs-panel`,children:[M9(i?.role)?(0,I.jsxs)(`label`,{className:`oc-prefs__gov-toggle`,children:[(0,I.jsx)(T1,{checked:n,onCheckedChange:e=>r(e===!0),"aria-label":zL()}),zL()]}):null,o?(0,I.jsxs)(`div`,{className:`oc-prefs__gov-head`,children:[(0,I.jsx)(`p`,{children:JL()}),(0,I.jsx)(`p`,{children:ZL()}),(0,I.jsx)(`p`,{children:rR()})]}):null,(0,I.jsx)(t1,{value:e,onChange:e=>t(e.target.value),placeholder:wL(),"aria-label":wL(),className:`mb-2`}),c.length===0?(0,I.jsx)(`div`,{className:`oc-prefs__empty`,children:DL()}):(0,I.jsx)(`div`,{className:`oc-prefs`,children:c.map(e=>(0,I.jsxs)(`div`,{className:`oc-prefs__group`,children:[(0,I.jsx)(`h4`,{className:`oc-prefs__cat`,children:e.label}),e.keys.map(e=>{let t=A9[e],n=t?t.label():e,r=t?.help?.(),i=a.locked[e],c=a.effective[e],l=a.userOverrides[e]!==void 0;return(0,I.jsxs)(`div`,{className:`oc-prefs__row${i?` is-locked`:``}${l&&!i?` is-overridden`:``}`,children:[(0,I.jsxs)(`div`,{className:`oc-prefs__info`,children:[(0,I.jsxs)(`span`,{className:`oc-prefs__label`,children:[n,i?(0,I.jsx)(`span`,{className:`oc-prefs__lock`,children:AL()}):l?null:(0,I.jsx)(`span`,{className:`oc-prefs__def`,children:NL()})]}),r?(0,I.jsx)(`span`,{className:`oc-prefs__help`,children:r}):null]}),(0,I.jsxs)(`div`,{className:`oc-prefs__ctl`,children:[!i&&l?(0,I.jsx)(`button`,{type:`button`,className:`oc-prefs__reset`,onClick:()=>void s({key:e,value:null}),children:IL()}):null,(0,I.jsx)(T1,{checked:c,disabled:i,onCheckedChange:t=>void s({key:e,value:t===!0}),"aria-label":n})]}),o?(0,I.jsx)(Jot,{prefKey:e,ui:a}):null]},e)})]},e.id))})]}):(0,I.jsx)(`div`,{className:`oc-prefs__empty`,children:KO()})}function Xot(){let e=P(V.me.getMe,{host:xO}),t=F(V.me.setLocale),n=F(V.me.setMyName),r=S1(),i=e?.locale??`default`,a=e?.name??``,[o,s]=(0,N.useState)(null),c=o??a,l=c.trim()!==a.trim();async function u(){try{await n({name:c}),s(null),r.success(Dk())}catch(e){r.error(Ak(),e)}}return(0,I.jsxs)(`div`,{className:`oc-appearance`,children:[(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:hk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:vk()})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(t1,{className:`max-w-xs`,value:c,maxLength:120,placeholder:xk(),onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&l&&(e.preventDefault(),u())}}),(0,I.jsx)(X,{size:`sm`,disabled:!l,onClick:()=>void u(),children:qZ()})]}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:wk()})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:Nk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:Ik()})]}),(0,I.jsx)(`div`,{className:`oc-show__row`,children:[`fr`,`en`,`default`].map(e=>(0,I.jsx)(X,{variant:i===e?`default`:`outline`,size:`sm`,onClick:()=>void t({locale:e==="default"?null:e}),children:e===`fr`?Jk():e===`en`?Zk():ok()},e))}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:zk()})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:Hk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:Gk()})]}),(0,I.jsx)(Yot,{})]})]})}var Zot=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`];function Qot(e){let t=typeof e==`object`&&e?e:{},n=t.defaults!==null&&typeof t.defaults==`object`?t.defaults:{},r=n.thinkingDefault??t.thinkingDefault,i=n.fastModeDefault??t.fastModeDefault;return{thinkingDefault:typeof r==`string`?r:null,fastModeDefault:typeof i==`boolean`?i:null}}function $ot(){let e=$n(V.agentFiles.getChatDefaults),t=$n(V.agentFiles.setChatDefaults),n=S1(),[r,i]=(0,N.useState)({status:`loading`}),[a,o]=(0,N.useState)({thinkingDefault:null,fastModeDefault:null}),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1),d=P(V.admin.listInstances,{}),[f,p]=(0,N.useState)(null);(0,N.useEffect)(()=>{!d||d.length===0||(!f||!d.some(e=>e.name===f))&&p(d[0].name)},[d,f]);let m=(d?.length??0)>1,h=d!==void 0&&d.length===0,g=P(V.compat.forInstance,f?{instanceName:f}:`skip`),_=f?P3(g,`configDefaults`):`loading`,v=_===`loading`?null:_.blocked,y=(0,N.useMemo)(()=>m&&f?{instanceName:f}:{},[m,f]),b=(0,N.useRef)(0),x=(0,N.useCallback)(async()=>{let t=++b.current;i({status:`loading`});try{let n=Qot(await e(y));if(b.current!==t)return;i({status:`done`,current:n}),o(n)}catch{if(b.current!==t)return;i({status:`error`})}},[e,y]);(0,N.useEffect)(()=>{v===!1&&(m&&!f||x())},[x,v,m,f]);let S=r.status===`done`?r.current:null,C=S!==null&&a.thinkingDefault!==null&&a.thinkingDefault!==S.thinkingDefault,w=S!==null&&a.fastModeDefault!==null&&a.fastModeDefault!==S.fastModeDefault,T=C||w;async function E(){u(!0);try{await t({...y,...C?{thinkingDefault:a.thinkingDefault}:{},...w?{fastModeDefault:a.fastModeDefault}:{}}),n.success(s0e()),await x()}catch(e){n.error(u0e(),e)}finally{u(!1)}}let D=(0,N.useMemo)(()=>Zot.map(e=>({id:e,label:j3(e)})),[]),O=(0,N.useMemo)(()=>[{id:`fast`,label:qQ()},{id:`standard`,label:JQ()}],[]);return(0,I.jsxs)(`div`,{className:`oc-cdefaults`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:B1e()}),m&&f?(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:YQ()}),(0,I.jsxs)(S3,{value:f,onValueChange:e=>p(e),disabled:l,children:[(0,I.jsx)(w3,{size:`sm`,"aria-label":YQ(),children:(0,I.jsx)(C3,{})}),(0,I.jsx)(T3,{children:(d??[]).map(e=>(0,I.jsx)(Q,{value:e.name,children:e.name},e.name))})]})]}):null,h?(0,I.jsx)(`p`,{className:`oc-admin__hint`,role:`status`,children:sNe()}):_===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):_.blocked?(0,I.jsxs)(`p`,{className:`oc-compat__blocked`,role:`status`,children:[(0,I.jsx)(Vm,{size:14,"aria-hidden":!0}),` `,W5(_.gatewayVersion)]}):r.status===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):r.status===`error`?(0,I.jsxs)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:[t0e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void x(),children:KQ()})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:U1e()}),(0,I.jsx)(L3,{options:D,value:a.thinkingDefault,onChange:e=>o({...a,thinkingDefault:e}),disabled:l}),(0,I.jsx)(`p`,{className:`oc-cdefaults__help`,children:K1e()})]}),(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:Y1e()}),(0,I.jsx)(L3,{options:O,value:a.fastModeDefault===null?null:a.fastModeDefault?`fast`:`standard`,onChange:e=>o({...a,fastModeDefault:e===`fast`}),disabled:l}),(0,I.jsx)(`p`,{className:`oc-cdefaults__help`,children:Q1e()})]}),(0,I.jsx)(`div`,{className:`oc-cdefaults__actions`,children:(0,I.jsx)(X,{size:`sm`,disabled:!T||l,onClick:()=>c(!0),children:l?GQ():i0e()})}),(0,I.jsx)(`p`,{className:`oc-cdefaults__note`,children:p0e()})]}),(0,I.jsx)(n1,{open:s,onOpenChange:c,children:(0,I.jsxs)(r1,{children:[(0,I.jsxs)(i1,{children:[(0,I.jsx)(o1,{children:g0e()}),(0,I.jsx)(s1,{children:y0e()})]}),(0,I.jsxs)(a1,{children:[(0,I.jsx)(l1,{children:fW()}),(0,I.jsx)(c1,{onClick:()=>void E(),children:S0e()})]})]})})]})}function est(e){return e===`user`?eqe():e===`all`?rqe():jQ({group:e.group})}function tst(e){return e===`common`?cqe():e===`owner`?dqe():jQ({group:e.group})}function nst(e){return e.name||e.email||e.userId.slice(0,8)}function rst(){let e=P(V.admin.listUsers,{}),[t,n]=(0,N.useState)(``),r=P(V.introspect.introspectUser,t?{userId:t}:`skip`);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:EKe()}),(0,I.jsxs)(S3,{value:t,onValueChange:n,children:[(0,I.jsx)(w3,{size:`sm`,"aria-label":kQ(),children:(0,I.jsx)(C3,{placeholder:kQ()})}),(0,I.jsx)(T3,{children:(e??[]).map(e=>(0,I.jsx)(Q,{value:e.userId,children:nst(e)},e._id))})]}),t===``?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:jKe()}):r===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KO()}):(0,I.jsxs)(`div`,{className:`oc-introspect`,children:[(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:PKe()}),(0,I.jsxs)(`div`,{className:`oc-introspect__id`,children:[(0,I.jsx)(`strong`,{children:r.user.label}),(0,I.jsx)($,{variant:`secondary`,children:r.role})]})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:LKe()}),r.groups.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:AQ()}):(0,I.jsx)(`div`,{className:`oc-introspect__chips`,children:r.groups.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e.name},e.groupId))})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:BKe()}),r.agents.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:AQ()}):(0,I.jsx)(`ul`,{className:`oc-introspect__list`,children:r.agents.map(e=>(0,I.jsxs)(`li`,{className:`oc-introspect__row`,children:[(0,I.jsx)(`span`,{className:`oc-introspect__name`,children:e.displayName||e.agentId}),e.isDefault?(0,I.jsx)($,{variant:`default`,children:ZKe()}):null,(0,I.jsx)($,{variant:`outline`,children:est(e.via)}),(0,I.jsx)($,{variant:`secondary`,children:e.state})]},`${e.instanceName} ${e.agentId}`))})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:UKe()}),r.charts.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:AQ()}):(0,I.jsx)(`ul`,{className:`oc-introspect__list`,children:r.charts.map(e=>(0,I.jsxs)(`li`,{className:`oc-introspect__row`,children:[(0,I.jsx)(`span`,{className:`oc-introspect__name`,children:e.name}),(0,I.jsx)($,{variant:`outline`,children:tst(e.via)})]},e.key))})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:KKe()}),r.permissions.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:AQ()}):(0,I.jsx)(`div`,{className:`oc-introspect__chips`,children:r.permissions.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e},e))})]})]})]})}var N9=[{id:`personal`,label:()=>GXe(),tabs:[`preferences`,`theme`,`files`]},{id:`agents`,label:()=>JXe(),tabs:[`instances`,`agentFiles`,`chatDefaults`,`bridge`]},{id:`access`,label:()=>ZXe(),tabs:[`users`,`groups`,`access`,`roles`,`serviceAccounts`]},{id:`observability`,label:()=>eZe(),tabs:[`traces`,`kpi`,`anomalies`,`audit`,`feedbacks`,`integrations`]}],ist=new Map(N9.flatMap(e=>e.tabs.map(t=>[t,e.id])));function P9(e){let t=ist.get(e);if(!t)throw Error(`Settings tab "${e}" belongs to no group`);return t}function ast(e,t){return e.find(e=>P9(e)===t)}N9.flatMap(e=>[...e.tabs]);function ost(){let e=P(V.bridgeHealth.getBridgeAvailability,{});if(e===void 0)return null;let t=e.known?e.available?`ok`:`error`:`idle`,n=e.known?e.available?`${xBe()}${e.checkedAt?wBe({time:new Date(e.checkedAt).toLocaleTimeString(`fr-FR`)}):``}`:DBe({reason:e.reason??`?`}):vBe();return(0,I.jsx)(j5,{delayDuration:150,children:(0,I.jsxs)(M5,{children:[(0,I.jsx)(N5,{asChild:!0,children:(0,I.jsx)(`span`,{className:`oc-bridge-dot oc-bridge-dot--${t}`,role:`img`,"aria-label":n})}),(0,I.jsx)(P5,{children:n})]})})}var sst={users:()=>VGe(),groups:()=>bKe(),instances:()=>WGe(),bridge:()=>qGe(),serviceAccounts:()=>XGe(),roles:()=>$Ge(),traces:()=>nKe(),kpi:()=>aKe(),anomalies:()=>cKe(),files:()=>eA(),agentFiles:()=>e$e(),preferences:()=>fk(),chatDefaults:()=>L1e(),access:()=>CKe(),integrations:()=>dKe(),theme:()=>rM(),audit:()=>mKe(),feedbacks:()=>_Ke()};function F9(e){let t=new Set(E7),n=new Set,r=[];for(let i of e??[])t.has(i)&&!n.has(i)&&(r.push(i),n.add(i));for(let e of E7)n.has(e)||r.push(e);return r}function cst(e,t){let n=new Set(t),r=[...t];return e.map(e=>n.has(e)?r.shift():e)}function lst({tab:e,active:t}){let n=sst[e]?.()??O7[e]??e,r=`oc-settings-tabs__tab`+(t?` is-active`:``),i=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-settings-tabs__label`,children:n}),e===`bridge`?(0,I.jsx)(ost,{}):null]});return D7.includes(e)?(0,I.jsx)(xs,{to:`/settings/$tab`,params:{tab:e},className:r,role:`tab`,"aria-selected":t,children:i}):(0,I.jsx)(xs,{to:`/settings/${e}`,className:r,role:`tab`,"aria-selected":t,children:i})}function ust({tab:e,active:t}){let{attributes:n,listeners:r,setNodeRef:i,transform:a,transition:o,isDragging:s}=q8({id:e});return(0,I.jsxs)(`div`,{ref:i,style:{transform:C6.Transform.toString(a),transition:o,opacity:s?.5:1},className:`oc-settings-tabs__item`,role:`presentation`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-settings-tabs__grip`,"aria-label":NXe(),...n,...r,children:(0,I.jsx)(Sm,{size:14,"aria-hidden":!0})}),(0,I.jsx)(lst,{tab:e,active:t})]})}function dst(){let e=P(V.me.getMe,{host:xO}),t=F(V.me.setSettingsTabOrder),n=N7(Gs({select:e=>e.pathname})),r=n===void 0?void 0:P9(n),i=(0,N.useMemo)(()=>F9(e?.settingsTabOrder??null),[e?.settingsTabOrder]),[a,o]=(0,N.useState)(i);(0,N.useEffect)(()=>o(i),[i]);let s=(0,N.useMemo)(()=>new Set(j7(e?.permissions??[])),[e?.permissions]),c=(0,N.useMemo)(()=>r===void 0?[]:a.filter(e=>s.has(e)&&P9(e)===r),[a,s,r]),l=k6(O6(l8,{activationConstraint:{distance:5}}),O6(a8,{coordinateGetter:Y8}));if(r===void 0||c.length===0)return null;let u=N9.find(e=>e.id===r);function d(e){let{active:n,over:r}=e;if(!r||n.id===r.id)return;let i=c.indexOf(n.id),s=c.indexOf(r.id);if(i<0||s<0)return;let l=cst(a,R8(c,i,s));o(l),t({order:l})}return(0,I.jsx)(`div`,{className:`oc-settings-tabs`,role:`tablist`,"aria-label":u?.label(),children:(0,I.jsx)(N8,{sensors:l,collisionDetection:bnt,modifiers:[Art],onDragEnd:d,children:(0,I.jsx)(G8,{items:c,strategy:Lrt,children:c.map(e=>(0,I.jsx)(ust,{tab:e,active:e===n},e))})})})}function fst(){let e=P(V.me.getMe,{host:xO}),t=ss(),n=N7(Gs({select:e=>e.pathname})),r=n===void 0?void 0:P9(n),i=(0,N.useMemo)(()=>new Set(j7(e?.permissions??[])),[e?.permissions]),a=(0,N.useMemo)(()=>F9(e?.settingsTabOrder??null).filter(e=>i.has(e)),[e?.settingsTabOrder,i]),o=N9.filter(e=>e.tabs.some(e=>i.has(e)));function s(e){let n=ast(a,e.id);n&&t({to:M7(n)})}return(0,I.jsxs)(`nav`,{className:`oc-settings-nav`,"aria-label":IXe(),children:[(0,I.jsx)(xs,{to:`/`,className:`oc-settings-nav__back`,children:zXe()}),(0,I.jsx)(`div`,{className:`oc-settings-nav__title`,children:HXe()}),(0,I.jsx)(`div`,{className:`oc-settings-nav__list`,children:o.map(e=>(0,I.jsx)(`button`,{type:`button`,className:`oc-settings-nav__group`+(e.id===r?` is-active`:``),"aria-current":e.id===r?`true`:void 0,onClick:()=>s(e),children:e.label()},e.id))})]})}var pst=.1,mst=[248,248,248],hst=[24,24,24];function gst(e,t,n){let r=t,i=n,a=-1,o=-1;for(let s=0;s<n;s++)for(let n=0;n<t;n++)e[(s*t+n)*4+3]>8&&(n<r&&(r=n),n>a&&(a=n),s<i&&(i=s),s>o&&(o=s));return a<0?null:{x:r,y:i,width:a-r+1,height:o-i+1}}function _st(e,t,n){let r=t*n;if(r===0)return 0;let i=0;for(let t=3;t<e.length;t+=4)e[t]<=8&&i++;return i/r}function I9(e,t,n){return _st(e,t,n)>=pst}function vst(e,t){for(let n=0;n<e.length;n+=4)e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2]}function yst(e){for(let t=0;t<e.length;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]}var bst=12*1024*1024,xst=480,Sst=160,Cst=.92;async function wst(e,t={}){if(!e.type.startsWith(`image/`))throw Error(rF());if(e.size>bst)throw Error(oF());let{source:n,width:r,height:i,cleanup:a}=await Tst(e);try{let a=e.type===`image/svg+xml`,o=Math.min(xst/r,Sst/i,a?1/0:1),s=Math.max(1,Math.round(r*o)),c=Math.max(1,Math.round(i*o)),l=document.createElement(`canvas`);l.width=s,l.height=c;let u=l.getContext(`2d`);if(!u)throw Error(fF());u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,u.drawImage(n,0,0,s,c);let d=gst(u.getImageData(0,0,s,c).data,s,c)??{x:0,y:0,width:s,height:c},f=document.createElement(`canvas`);f.width=d.width,f.height=d.height;let p=f.getContext(`2d`);if(!p)throw Error(fF());if(p.drawImage(l,d.x,d.y,d.width,d.height,0,0,d.width,d.height),t.variantFor){let e=p.getImageData(0,0,d.width,d.height);I9(e.data,d.width,d.height)?vst(e.data,t.variantFor===`dark`?mst:hst):yst(e.data),p.putImageData(e,0,0)}let m=I9(p.getImageData(0,0,d.width,d.height).data,d.width,d.height),h=await R9(f,`image/webp`,Cst)??await R9(f,`image/png`);if(!h)throw Error(hF());return{blob:h,hasAlpha:m}}finally{a()}}async function Tst(e){if(e.type===`image/svg+xml`)return L9(e);if(typeof createImageBitmap==`function`)try{let t=await createImageBitmap(e);return{source:t,width:t.width,height:t.height,cleanup:()=>t.close()}}catch{}return L9(e)}async function L9(e){let t=URL.createObjectURL(e);try{let e=new Image;return e.decoding=`async`,await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=()=>r(Error(lF())),e.src=t}),{source:e,width:e.naturalWidth||300,height:e.naturalHeight||150,cleanup:()=>URL.revokeObjectURL(t)}}catch(e){throw URL.revokeObjectURL(t),e}}function R9(e,t,n){return new Promise(r=>e.toBlob(e=>r(e),t,n))}var z9=`__all__`,B9={kind:`relative`,from:`now-24h`,to:`now`},Est=[{value:`status`,label:`Statut`},{value:`latencyMs`,label:`Latence (ms)`},{value:`route`,label:`Route`},{value:`roleKey`,label:`Rôle`},{value:`correlationId`,label:`Corrélation`}];function V9({title:e,description:t,children:n}){return(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:e}),t?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:t}):null]}),(0,I.jsx)(`div`,{className:`oc-show__demo`,children:n})]})}function Dst(e){return e===`light`?ZO():e===`dark`?ek():rk()}var Ost=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function kst({tokens:e,mode:t}){let n=e.colors[t];return(0,I.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:Ost.map(e=>{let t=n[e];return(0,I.jsx)(`span`,{className:`oc-chart-swatch`,style:t?{background:t}:void 0},e)})})}function H9({selected:e,title:t,subtitle:n,tokens:r,mode:i,onSelect:a}){return(0,I.jsxs)(`button`,{type:`button`,className:B$(`oc-chart-card`,e&&`oc-chart-card--selected`),"aria-pressed":e,onClick:a,children:[(0,I.jsxs)(`div`,{className:`oc-chart-card__head`,children:[(0,I.jsx)(`span`,{className:`oc-chart-card__title`,children:t}),e?(0,I.jsx)(um,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,I.jsx)(kst,{tokens:r,mode:i}):(0,I.jsx)(`div`,{className:`oc-chart-swatches oc-chart-swatches--native`,"aria-hidden":!0}),(0,I.jsx)(`div`,{className:`oc-chart-card__meta`,children:(0,I.jsx)(`span`,{className:`oc-chart-card__subtitle`,children:n})})]})}function Ast({selectedKey:e,resolvedMode:t}){let n=P(V.charts.listMyCharts),r=F(V.charts.setMyChart);async function i(e){try{await r({name:e})}catch{}}return(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:AM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:NM()})]}),(0,I.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,I.jsx)(H9,{selected:e===null,title:IM(),subtitle:zM(),tokens:null,mode:t,onSelect:()=>void i(null)}),(n??[]).map(n=>{let r=n.via===`common`?HM():n.via===`owner`?GM():JM({group:n.via.group});return(0,I.jsx)(H9,{selected:e===n.key,title:n.name,subtitle:r,tokens:n.tokens,mode:t,onSelect:()=>void i(n.key)},n.key)})]}),n!==void 0&&n.length===0?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:ZM()}):null]})}function jst(){let e=F(V.charts.importChart),[t,n]=(0,N.useState)(``),[r,i]=(0,N.useState)(``),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1);async function d(e){let t=e.target.files?.[0];if(e.target.value=``,t){o(null),c(!1);try{i(await t.text())}catch{o(lP())}}}async function f(){if(o(null),c(!1),t.trim()===``){o(hP());return}let a;try{a=JSON.parse(r)}catch{o(lP());return}u(!0);try{await e({name:t.trim(),tokens:a}),c(!0),n(``),i(``)}catch(e){o(e instanceof Error?e.message:String(e))}finally{u(!1)}}return(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:zN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:HN()})]}),(0,I.jsxs)(`div`,{className:`oc-chart-import`,children:[(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:GN()}),(0,I.jsx)(t1,{value:t,onChange:e=>n(e.target.value),placeholder:JN(),maxLength:60})]}),(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:ZN()}),(0,I.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:r,onChange:e=>i(e.target.value),placeholder:eP(),rows:8,spellCheck:!1})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{variant:`outline`,size:`sm`,asChild:!0,children:(0,I.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,I.jsx)(Hm,{className:`size-4`}),rP(),(0,I.jsx)(`input`,{type:`file`,accept:`application/json,.json`,className:`oc-chart-import__file-input`,onChange:e=>void d(e)})]})}),(0,I.jsx)(X,{size:`sm`,disabled:l,onClick:()=>void f(),children:oP()})]}),a?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null,s?(0,I.jsx)(`p`,{className:`oc-chart-import__ok`,children:fP()}):null]})]})}function Mst({chart:e}){let t=$n(V.charts.setChartLogo),n=F(V.charts.removeChartLogo),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(null),s=t=>t===`light`?e.logoLightUrl:e.logoDarkUrl;async function c(n,r,a){if(e.chartId!==void 0){o(null),i(!0);try{let{blob:i,hasAlpha:o}=await wst(r,a?{variantFor:a}:{}),s=await i.arrayBuffer();await t({chartId:e.chartId,bytes:s,mode:n,hasAlpha:o})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function l(e,t){let n=t.target.files?.[0];t.target.value=``,n&&await c(e,n)}async function u(t){if(e.chartId!==void 0){o(null),i(!0);try{await n({chartId:e.chartId,mode:t})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function d(e){let t=s(e===`light`?`dark`:`light`);if(t){o(null),i(!0);try{await c(e,await(await fetch(t)).blob(),e)}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}function f({mode:e}){let t=s(e),n=s(e===`light`?`dark`:`light`);return(0,I.jsxs)(`div`,{className:`oc-chart-mine__logo-slot`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__logo-mode`,children:e===`light`?IP():zP()}),(0,I.jsx)(`span`,{className:`oc-chart-mine__logo-preview`,"data-mode":e,"data-empty":t?void 0:`1`,children:t?(0,I.jsx)(`img`,{src:t,alt:``}):null}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,asChild:!0,children:(0,I.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,I.jsx)(Hm,{className:`size-4`}),t?GP():HP(),(0,I.jsx)(`input`,{type:`file`,accept:`image/*`,className:`oc-chart-import__file-input`,onChange:t=>void l(e,t)})]})}),!t&&n?(0,I.jsx)(X,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void d(e),children:ZP()}):null,t?(0,I.jsx)(X,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void u(e),children:JP()}):null]})}return(0,I.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:NP()}),(0,I.jsxs)(`div`,{className:`oc-chart-mine__logo-slots`,children:[(0,I.jsx)(f,{mode:`light`}),(0,I.jsx)(f,{mode:`dark`})]}),r?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:eF()}):null,a?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null]})}function U9({chart:e}){let t=P(V.me.getMe,{host:xO}),n=F(V.charts.addChartDomain),r=F(V.charts.removeChartDomain),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(null),[c,l]=(0,N.useState)(!1);if(t?.role!==`admin`)return null;let u=e.domains??[];async function d(){let t=i.trim();if(t!==``){s(null),l(!0);try{await n({chartKey:e.key,domain:t}),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}}}async function f(t){s(null);try{await r({chartKey:e.key,domain:t})}catch{}}return(0,I.jsxs)(`div`,{className:`oc-chart-mine__domains`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:vF()}),(0,I.jsxs)(`div`,{className:`oc-chart-mine__domains-body`,children:[(0,I.jsx)(`div`,{className:`oc-chart-avail__groups`,children:u.length===0?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:AF()}):u.map(e=>(0,I.jsxs)($,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e,(0,I.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":NF({domain:e}),onClick:()=>void f(e),children:(0,I.jsx)(Gm,{className:`size-3`})})]},e))}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(t1,{value:i,onChange:e=>a(e.target.value),placeholder:wF(),className:`oc-chart-mine__domains-input`,onKeyDown:e=>{e.key===`Enter`&&d()}}),(0,I.jsx)(X,{variant:`outline`,size:`sm`,disabled:c,onClick:()=>void d(),children:DF()})]}),(0,I.jsx)(`span`,{className:`oc-show__desc`,children:xF()}),o?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null]})]})}function Nst({chart:e}){let t=F(V.charts.updateChart),n=F(V.charts.deleteChart),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(e.name),[s,c]=(0,N.useState)(()=>JSON.stringify(e.tokens,null,2)),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(!1);function p(){o(e.name),c(JSON.stringify(e.tokens,null,2)),u(null),i(!0)}async function m(){if(e.chartId===void 0)return;u(null);let n;try{n=JSON.parse(s)}catch{u(lP());return}f(!0);try{await t({chartId:e.chartId,name:a.trim(),tokens:n}),i(!1)}catch(e){u(e instanceof Error?e.message:String(e))}finally{f(!1)}}async function h(){if(e.chartId!==void 0&&window.confirm(JF()))try{await n({chartId:e.chartId})}catch{}}return(0,I.jsxs)(`div`,{className:`oc-chart-mine__row`,children:[(0,I.jsxs)(`div`,{className:`oc-chart-mine__head`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__name`,children:e.name}),(0,I.jsx)(`div`,{className:`oc-show__row`,children:r?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:p,children:DP()}),(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>void h(),children:AP()})]})})]}),r?(0,I.jsxs)(`div`,{className:`oc-chart-mine__editor`,children:[(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:HF()}),(0,I.jsx)(t1,{value:a,onChange:e=>o(e.target.value),maxLength:60})]}),(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:GF()}),(0,I.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:s,onChange:e=>c(e.target.value),rows:10,spellCheck:!1})]}),l?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:l}):null,(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{size:`sm`,disabled:d,onClick:()=>void m(),children:IF()}),(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>i(!1),children:zF()})]})]}):null,(0,I.jsx)(Mst,{chart:e}),(0,I.jsx)(U9,{chart:e})]})}function Pst(){let e=P(V.charts.listMyCharts),t=(e??[]).filter(e=>e.via===`owner`);return(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:vP()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:xP()})]}),e!==void 0&&t.length===0?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:wP()}):(0,I.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,I.jsx)(Nst,{chart:e},e.key))})]})}function Fst({chart:e,groups:t}){let n=F(V.charts.addChartToGroupPool),r=F(V.charts.removeChartFromGroupPool),i=e.restrictedToGroups,a=e.poolGroups,o=new Set((a??[]).map(e=>e.groupId)),s=t.filter(e=>!o.has(e._id));async function c(t){try{await n({groupId:t,chartKey:e.key})}catch{}}async function l(t){try{await r({groupId:t,chartKey:e.key})}catch{}}return(0,I.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,I.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,I.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,I.jsx)($,{variant:i?`secondary`:`outline`,className:`oc-chart-avail__state`,children:i?xN():e.kind===`custom`&&e.scope===`personal`?oI():vN()}),e.isGlobalDefault?(0,I.jsx)($,{variant:`default`,children:wN()}):null]}),(0,I.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:AN()}),(a??[]).map(e=>(0,I.jsxs)($,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e.name,(0,I.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":IN({group:e.name}),onClick:()=>void l(e.groupId),children:(0,I.jsx)(Gm,{className:`size-3`})})]},e.groupId)),s.length>0?(0,I.jsxs)(S3,{value:``,onValueChange:e=>void c(e),children:[(0,I.jsx)(w3,{size:`sm`,className:`w-56`,children:(0,I.jsx)(C3,{placeholder:NN()})}),(0,I.jsx)(T3,{children:s.map(e=>(0,I.jsx)(Q,{value:e._id,children:e.name},e._id))})]}):t.length===0?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:DN()}):null]})]})}function Ist({chart:e}){let t=F(V.charts.promoteChartToCommon),n=F(V.charts.deleteChart);async function r(){if(e.chartId!==void 0)try{await t({chartId:e.chartId})}catch{}}async function i(){if(e.chartId!==void 0&&window.confirm(JF()))try{await n({chartId:e.chartId})}catch{}}return(0,I.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,I.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,I.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,I.jsx)($,{variant:e.scope===`common`?`outline`:`secondary`,children:e.scope===`common`?lI():oI()}),e.ownerLabel?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:rI({owner:e.ownerLabel})}):null]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[e.scope===`personal`?(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void r(),children:fI()}):null,(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:hI()})]})]})}function Lst({defaultThemeMode:e,defaultLocale:t,defaultChartKey:n}){let r=F(V.admin.setDefaultThemeMode),i=F(V.admin.setDefaultLocale),a=F(V.charts.setDefaultChart),o=P(V.charts.listChartsAdmin),s=P(V.groups.listGroups,{}),c=e??`system`,l=t??`fr`;return(0,I.jsxs)(`div`,{className:`oc-appearance-admin`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h2`,{className:`oc-show__title`,children:wM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:DM()})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:eN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:rN()})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{variant:n===null?`default`:`outline`,size:`sm`,onClick:()=>void a({name:null}),children:IM()}),CO.map(e=>(0,I.jsx)(X,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void a({name:e.key}),children:e.name},e.key)),(o??[]).filter(e=>e.kind===`custom`&&e.scope===`common`).map(e=>(0,I.jsx)(X,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void a({name:e.key}),children:e.name},e.key))]})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:oN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:lN()})]}),(0,I.jsx)(`div`,{className:`oc-chart-avail-list`,children:(o??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,I.jsx)(Fst,{chart:e,groups:s??[]},e.key))})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:fN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:hN()})]}),(0,I.jsx)(`div`,{className:`oc-chart-avail-list`,children:(o??[]).filter(e=>e.kind===`builtin`||e.scope===`common`).map(e=>(0,I.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,I.jsx)(`div`,{className:`oc-chart-avail__head`,children:(0,I.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name})}),(0,I.jsx)(U9,{chart:e})]},e.key))})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:ZF()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:eI()})]}),(()=>{let e=(o??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:vI()}):(0,I.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,I.jsx)(Ist,{chart:e},e.key))})})()]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:oM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:lM()})]}),(0,I.jsx)(`div`,{className:`oc-show__row`,children:[`light`,`dark`,`system`].map(e=>(0,I.jsx)(X,{variant:c===e?`default`:`outline`,size:`sm`,onClick:()=>void r({mode:e}),children:Dst(e)},e))})]}),(0,I.jsxs)(`section`,{className:`oc-show__section`,children:[(0,I.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,I.jsx)(`h3`,{className:`oc-show__title`,children:fM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:hM()})]}),(0,I.jsx)(`div`,{className:`oc-show__row`,children:[`fr`,`en`].map(e=>(0,I.jsx)(X,{variant:l===e?`default`:`outline`,size:`sm`,onClick:()=>void i({locale:e}),children:e===`fr`?Jk():Zk()},e))}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:vM()})]})]})}function Rst(){let e=P(V.me.getMe,{host:xO}),t=wO(e?.resolvedThemeMode);return(0,I.jsxs)(`div`,{className:`oc-appearance`,children:[(0,I.jsx)(Ast,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,I.jsx)(jst,{}),(0,I.jsx)(Pst,{}),e?.role===`admin`?(0,I.jsx)(Lst,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function zst(){let[e,t]=(0,N.useState)(!0),[n,r]=(0,N.useState)(`per-user`),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(z9),[c,l]=(0,N.useState)(z9),[u,d]=(0,N.useState)(B9),f=i!==``||o!==z9||c!==z9;function p(){a(``),s(z9),l(z9),d(B9)}return(0,I.jsxs)(`div`,{className:`oc-show`,children:[(0,I.jsx)(Rst,{}),(0,I.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,I.jsx)(`summary`,{className:`oc-show__title`,children:xM()}),(0,I.jsxs)(V9,{title:`Buttons`,description:`Variants`,children:[(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{children:`Default`}),(0,I.jsx)(X,{variant:`secondary`,children:`Secondary`}),(0,I.jsx)(X,{variant:`outline`,children:`Outline`}),(0,I.jsx)(X,{variant:`ghost`,children:`Ghost`}),(0,I.jsx)(X,{variant:`destructive`,children:`Destructive`}),(0,I.jsx)(X,{variant:`link`,children:`Link`})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(X,{size:`sm`,children:`Small`}),(0,I.jsx)(X,{children:`Default`}),(0,I.jsx)(X,{size:`lg`,children:`Large`}),(0,I.jsx)(X,{size:`icon`,"aria-label":`more`,children:(0,I.jsx)(ym,{})}),(0,I.jsx)(X,{disabled:!0,children:`Disabled`})]})]}),(0,I.jsx)(V9,{title:`Badges`,children:(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)($,{children:`Default`}),(0,I.jsx)($,{variant:`secondary`,children:`Secondary`}),(0,I.jsx)($,{variant:`outline`,children:`Outline`}),(0,I.jsx)($,{variant:`destructive`,children:`Destructive`})]})}),(0,I.jsx)(V9,{title:`Inputs & selection`,children:(0,I.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,I.jsx)(t1,{placeholder:`Text input…`}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsxs)(S3,{value:n,onValueChange:r,children:[(0,I.jsx)(w3,{className:`w-56`,children:(0,I.jsx)(C3,{placeholder:`Select…`})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:`per-user`,children:`per-user (chacun son agent)`}),(0,I.jsx)(Q,{value:`shared`,children:`shared (agent commun)`})]})]}),(0,I.jsxs)(`label`,{className:`oc-show__check`,children:[(0,I.jsx)(T1,{checked:e,onCheckedChange:e=>t(!!e)}),`Checkbox`]})]})]})}),(0,I.jsx)(V9,{title:`Filtres & plage temporelle`,description:`Barre réutilisable (recherche debouncée + selects rapides à largeur auto + plage façon Grafana) et constructeur de filtre avancé. Câblée dans Users, Groups, Comptes de service, Traces, Anomalies, Audit et KPI.`,children:(0,I.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,I.jsxs)(r7,{q:i,onQChange:a,searchPlaceholder:`Rechercher (kind, principal, rôle, route…)`,timeRange:u,onTimeRangeChange:d,onReset:p,canReset:f,children:[(0,I.jsxs)(S3,{value:o,onValueChange:s,children:[(0,I.jsx)(w3,{size:`sm`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:z9,children:`Toutes directions`}),(0,I.jsx)(Q,{value:`inbound`,children:`inbound`}),(0,I.jsx)(Q,{value:`outbound`,children:`outbound`}),(0,I.jsx)(Q,{value:`internal`,children:`internal`})]})]}),(0,I.jsxs)(S3,{value:c,onValueChange:l,children:[(0,I.jsx)(w3,{size:`sm`,children:(0,I.jsx)(C3,{})}),(0,I.jsxs)(T3,{children:[(0,I.jsx)(Q,{value:z9,children:`Toutes sévérités`}),(0,I.jsx)(Q,{value:`info`,children:`info`}),(0,I.jsx)(Q,{value:`warn`,children:`warn`}),(0,I.jsx)(Q,{value:`critical`,children:`critical`})]})]})]}),(0,I.jsx)(m7,{fields:Est,onChange:()=>{}}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(`span`,{className:`oc-show__desc`,children:`Sélecteur de plage seul :`}),(0,I.jsx)(n7,{value:u,onChange:d})]})]})}),(0,I.jsx)(V9,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,I.jsxs)(V$,{children:[(0,I.jsx)(H$,{asChild:!0,children:(0,I.jsx)(X,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,I.jsx)(ym,{})})}),(0,I.jsxs)(U$,{align:`start`,children:[(0,I.jsx)(G$,{children:`Actions`}),(0,I.jsx)(K$,{}),(0,I.jsx)(W$,{children:`Edit`}),(0,I.jsx)(W$,{children:`Duplicate`}),(0,I.jsx)(K$,{}),(0,I.jsx)(W$,{variant:`destructive`,children:`Delete`})]})]})}),(0,I.jsx)(V9,{title:`Card`,children:(0,I.jsxs)(n9,{className:`w-80`,children:[(0,I.jsxs)(r9,{children:[(0,I.jsx)(i9,{children:`Instance`}),(0,I.jsx)(a9,{children:`Non-secret metadata only.`})]}),(0,I.jsx)(o9,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,I.jsxs)(sot,{className:`gap-2`,children:[(0,I.jsx)(X,{size:`sm`,children:`Save`}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,children:`Cancel`})]})]})}),(0,I.jsx)(V9,{title:`Table`,children:(0,I.jsxs)(C5,{children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[(0,I.jsx)(D5,{className:`w-8`,children:(0,I.jsx)(T1,{"aria-label":`select all`})}),(0,I.jsx)(D5,{children:`Name`}),(0,I.jsx)(D5,{children:`Mode`}),(0,I.jsx)(D5,{className:`text-right`,children:`Status`}),(0,I.jsx)(D5,{className:`w-8`})]})}),(0,I.jsx)(T5,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,I.jsxs)(E5,{children:[(0,I.jsx)(O5,{children:(0,I.jsx)(T1,{"aria-label":`select ${e.n}`})}),(0,I.jsx)(O5,{className:`font-medium`,children:e.n}),(0,I.jsx)(O5,{children:(0,I.jsx)($,{variant:`secondary`,children:e.m})}),(0,I.jsx)(O5,{className:`text-right`,children:(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-muted-foreground`,children:[(0,I.jsx)(um,{className:`size-3.5`}),` `,e.s]})}),(0,I.jsx)(O5,{children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,I.jsx)(ym,{})})})]},e.n))})]})}),(0,I.jsx)(V9,{title:`App fragments`,description:`Chat-specific components`,children:(0,I.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,I.jsx)(`div`,{className:`oc-msg oc-msg--assistant`,children:(0,I.jsx)(`div`,{className:`oc-msg__body`,children:`Assistant message bubble.`})}),(0,I.jsx)(`div`,{className:`oc-tool oc-tool--completed`,children:(0,I.jsxs)(`div`,{className:`oc-tool__header`,children:[(0,I.jsx)(`span`,{className:`oc-tool__icon`,children:`✓`}),(0,I.jsx)(`span`,{className:`oc-tool__name`,children:`write-file`}),(0,I.jsx)(`span`,{className:`oc-tool__phase`,children:`completed`})]})}),(0,I.jsxs)(`div`,{className:`oc-run-status oc-run-status--streaming`,children:[(0,I.jsx)(`span`,{className:`oc-run-status__dot`}),(0,I.jsx)(`span`,{className:`oc-run-status__label`,children:`Running`})]})]})})]})]})}var W9=`oc.theme`;function G9(e){let t=e===`dark`||e===`system`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;document.documentElement.classList.toggle(`dark`,t)}function K9(e){(0,N.useEffect)(()=>{let t=e??localStorage.getItem(W9)??`system`;if(localStorage.setItem(W9,t),G9(t),t===`system`){let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=()=>G9(`system`);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)}},[e])}function Bst(e){(0,N.useEffect)(()=>{if(!e)return;document.documentElement.lang=e;let t;try{t=q()}catch{t=void 0}t!==e&&HO(e)},[e])}function Vst(){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(mr,{children:(0,I.jsx)(`div`,{className:`oc-boot`,children:uQ()})}),(0,I.jsx)(pr,{children:(0,I.jsx)(Ust,{})}),(0,I.jsx)(fr,{children:(0,I.jsx)(E4e,{children:(0,I.jsx)(Wst,{})})})]})}function Hst(){return(0,I.jsxs)(`svg`,{className:`oc-provider__logo`,viewBox:`0 0 48 48`,"aria-hidden":`true`,children:[(0,I.jsx)(`path`,{fill:`#EA4335`,d:`M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z`}),(0,I.jsx)(`path`,{fill:`#4285F4`,d:`M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z`}),(0,I.jsx)(`path`,{fill:`#FBBC05`,d:`M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z`}),(0,I.jsx)(`path`,{fill:`#34A853`,d:`M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z`})]})}function Ust(){let{signIn:e}=Ir();K9(void 0);let t=P(V.charts.brandForHost,{host:xO}),n=efe(xO),r=t??n??null,i=wO(void 0);TO(r?.tokens??null,i),(0,N.useEffect)(()=>{t&&tfe(xO,t)},[t]);let a=r?.brand,o=a&&!a.isDefault?jO(a,i):null,s=a?.label??`Atrium`,c=P(V.me.authProviders),[l,u]=(0,N.useState)(null);async function d(t){u(null);try{await e(t)}catch{u(XAe())}}let f=c!==void 0&&!c.google&&!c.microsoft&&!c.anonymous;return(0,I.jsxs)(`div`,{className:`oc-signin`,children:[(0,I.jsxs)(`svg`,{className:`oc-signin__motif`,viewBox:`0 0 1200 1000`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:[(0,I.jsx)(`polyline`,{className:`oc-signin__line`,points:`0,860 470,860 522,790 574,940 626,810 678,860 1200,860`,vectorEffect:`non-scaling-stroke`}),(0,I.jsx)(`polyline`,{className:`oc-signin__pulse`,points:`0,860 470,860 522,790 574,940 626,810 678,860 1200,860`,pathLength:`100`,vectorEffect:`non-scaling-stroke`})]}),(0,I.jsxs)(`div`,{className:`oc-signin__brand`,children:[o?(0,I.jsx)(`img`,{className:`oc-signin__brandlogo`,src:o,alt:``}):null,(0,I.jsx)(`span`,{className:`oc-signin__wordmark`,children:s})]}),(0,I.jsxs)(`div`,{className:`oc-signin__card`,children:[(0,I.jsx)(`h1`,{className:`oc-signin__title`,children:$Ae()}),(0,I.jsx)(`p`,{className:`oc-signin__subtitle`,children:nje()}),(0,I.jsx)(`div`,{className:`oc-signin__providers`,children:c?.google?(0,I.jsxs)(`button`,{type:`button`,className:`oc-provider oc-provider--google`,onClick:()=>void d(`google`),children:[(0,I.jsx)(Hst,{}),(0,I.jsx)(`span`,{children:aje()})]}):null}),l?(0,I.jsx)(`p`,{className:`oc-signin__error`,children:l}):null,f?(0,I.jsx)(`p`,{className:`oc-signin__error`,children:cje()}):null,c?.anonymous?(0,I.jsx)(`button`,{type:`button`,className:`oc-signin__dev`,onClick:()=>void e(`anonymous`),children:dje()}):null]})]})}function Wst(){let e=P(V.me.getMe,{host:xO}),t=F(V.me.bootstrap),n=ss();(0,N.useEffect)(()=>{e&&!e.hasProfile&&t()},[e,t]),K9(e?.resolvedThemeMode);let r=wO(e?.resolvedThemeMode);TO(e?.resolvedChartTokens,r),Bst(e?.resolvedLocale);let i=(0,N.useRef)(null);if((0,N.useEffect)(()=>{e&&(i.current!==null&&i.current!==e.userId&&n({to:`/`}),i.current=e.userId)},[e,n]),e===void 0)return(0,I.jsx)(`div`,{className:`oc-boot`,children:uQ()});let a=e.name||e.email||mje();return e.role===`pending`?(0,I.jsxs)(`div`,{className:`oc-shell`,children:[(0,I.jsx)(q9,{}),(0,I.jsx)(f5,{}),(0,I.jsxs)(`header`,{className:`oc-topbar`,children:[(0,I.jsx)(`span`,{className:`oc-topbar__brand`,children:(0,I.jsx)(J9,{brand:e.resolvedChartBrand,resolvedThemeMode:e.resolvedThemeMode})}),(0,I.jsx)(`div`,{className:`oc-topbar__actions`,children:(0,I.jsx)(p5,{label:a,mode:e.themeMode,minimal:!0})})]}),(0,I.jsxs)(`div`,{className:`oc-pending`,children:[(0,I.jsx)(`h1`,{className:`oc-pending__title`,children:_je()}),(0,I.jsx)(`p`,{className:`oc-pending__body`,children:bje()})]})]}):(0,I.jsx)(Kst,{canOpenSettings:j7(e.permissions??[]).length>0,userLabel:a,themeMode:e.themeMode,resolvedThemeMode:e.resolvedThemeMode,brand:e.resolvedChartBrand},e.userId)}function q9(){let e=P(V.me.getImpersonation),t=F(V.admin.stopImpersonation);return!e||!e.impersonating?null:(0,I.jsxs)(`div`,{className:`oc-imp`,role:`alert`,children:[(0,I.jsx)(Dee,{className:`size-4 shrink-0`}),(0,I.jsxs)(`span`,{className:`oc-imp__text`,children:[Cje(),` `,(0,I.jsx)(`strong`,{children:e.targetLabel}),Eje(),(0,I.jsx)(`strong`,{children:e.realLabel}),kje()]}),(0,I.jsx)(X,{size:`sm`,variant:`outline`,className:`oc-imp__exit`,onClick:()=>void t(),children:Mje()})]})}function J9({brand:e,resolvedThemeMode:t}){let n=wO(t),r=e?.label??`Atrium`,i=e?.isDefault??!0,a=jO(e,n),[o,s]=(0,N.useState)(!1);return(0,N.useEffect)(()=>s(!1),[a]),(0,I.jsxs)(I.Fragment,{children:[a!==null&&!o?(0,I.jsx)(`img`,{className:`oc-brand__logo`,src:a,alt:``,"aria-hidden":`true`,onError:()=>s(!0)}):i?(0,I.jsx)(NO,{className:`oc-brand__logo`}):null,(0,I.jsx)(`span`,{className:`oc-brand__label`,children:r})]})}function Gst({userLabel:e,themeMode:t,resolvedThemeMode:n,brand:r,collapsed:i,onToggleSidebar:a}){return(0,I.jsxs)(`header`,{className:`oc-topbar`,children:[(0,I.jsxs)(`div`,{className:`oc-topbar__left`,children:[(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":i?Fje():Rje(),onClick:a,children:i?(0,I.jsx)(Mee,{}):(0,I.jsx)(jee,{})}),(0,I.jsx)(xs,{to:`/`,className:`oc-topbar__brand`,children:(0,I.jsx)(J9,{brand:r,resolvedThemeMode:n})})]}),(0,I.jsx)(`div`,{className:`oc-topbar__search`,children:(0,I.jsx)(fit,{})}),(0,I.jsxs)(`div`,{className:`oc-topbar__actions`,children:[(0,I.jsx)(m5,{}),(0,I.jsx)(p5,{label:e,mode:t})]})]})}function Kst({canOpenSettings:e,userLabel:t,themeMode:n,resolvedThemeMode:r,brand:i}){let{width:a,collapsed:o,toggleCollapsed:s,collapse:c,startResize:l,isMobile:u}=S3e(),d=zs(),f=as({strict:!1}),p=ss(),m=!!d({to:`/settings`,fuzzy:!0});(0,N.useEffect)(()=>{u&&c()},[Gs({select:e=>e.pathname}),u,c]);let h=(0,N.useCallback)(e=>{p({to:`/chat/$chatId`,params:{chatId:e}})},[p]),{startNewChat:g,picker:_}=rit(h),v=(0,N.useMemo)(()=>y5(g5,v5()),[]);return(0,N.useEffect)(()=>{let e=e=>{b5(e,g5)&&(e.preventDefault(),g())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g]),(0,I.jsxs)(`div`,{className:`oc-shell`,children:[_,(0,I.jsx)(q9,{}),(0,I.jsx)(f5,{}),(0,I.jsx)(Gst,{userLabel:t,themeMode:n,resolvedThemeMode:r,brand:i,collapsed:o,onToggleSidebar:s}),(0,I.jsxs)(`div`,{className:u?`oc-workspace oc-workspace--mobile`:`oc-workspace`,children:[u&&!o?(0,I.jsx)(`div`,{className:`oc-sidebar-backdrop`,onClick:c,"aria-hidden":!0}):null,o?null:(0,I.jsxs)(`div`,{className:`oc-sidebar-col`,style:u?void 0:{width:a,flex:`0 0 ${a}px`},children:[m?(0,I.jsx)(fst,{}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Qrt,{activeChatId:f.chatId??null,onSelect:h,onNewChat:()=>void g(),newChatShortcut:v}),e?(0,I.jsx)(X,{variant:`ghost`,className:`m-2 justify-start`,asChild:!0,children:(0,I.jsx)(xs,{to:`/settings`,children:Vje()})}):null]}),(0,I.jsx)(`div`,{className:`oc-sidebar-resizer`,onPointerDown:l,role:`separator`,"aria-orientation":`vertical`,"aria-label":Wje()})]}),(0,I.jsx)(`main`,{className:`oc-main`,children:(0,I.jsx)(Fs,{})})]})]})}function qst(){let e=P(V.me.getMe,{host:xO}),t=ss(),n=Gs({select:e=>e.pathname}),r=(0,N.useMemo)(()=>e?j7(e.permissions??[]):[],[e]),i=e!==void 0&&r.length===0;if((0,N.useEffect)(()=>{i&&t({to:`/`})},[i,t]),e===void 0)return(0,I.jsx)(`div`,{className:`oc-admin__hint`,style:{padding:16},children:uQ()});if(i)return null;let a=N7(n),o=a!==void 0&&!r.includes(a);return(0,I.jsxs)(`div`,{className:`oc-admin`,children:[(0,I.jsx)(dst,{}),(0,I.jsx)(`div`,{className:`oc-admin__body`,children:o?(0,I.jsx)(Jst,{}):(0,I.jsx)(Fs,{})})]})}function Jst(){return(0,I.jsxs)(`div`,{className:`oc-route-error`,role:`alert`,children:[(0,I.jsx)(`div`,{className:`oc-route-error__icon`,"aria-hidden":!0,children:(0,I.jsx)(Vm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:qje()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:Xje()})]})}function Yst(){let e=P(V.me.getMe,{host:xO}),t=ss();return(0,N.useEffect)(()=>{if(e===void 0)return;let n=j7(e.permissions??[]);t({to:n.length>0?M7(n[0]):`/`,replace:!0})},[e,t]),(0,I.jsx)(`div`,{className:`oc-admin__hint`,style:{padding:16},children:uQ()})}function Xst(){let{tab:e}=as({from:`/settings/$tab`});switch(e){case`groups`:return(0,I.jsx)(Jat,{});case`integrations`:return(0,I.jsx)(kot,{});case`instances`:return(0,I.jsx)(vat,{});case`bridge`:return(0,I.jsx)(Jit,{});case`theme`:return(0,I.jsx)(zst,{});case`feedbacks`:return(0,I.jsx)(Mot,{});case`files`:return(0,I.jsx)(Not,{});case`agentFiles`:return(0,I.jsx)(Rot,{});case`preferences`:return(0,I.jsx)(Xot,{});case`chatDefaults`:return(0,I.jsx)($ot,{});case`access`:return(0,I.jsx)(rst,{});default:return(0,I.jsx)(Bat,{})}}function Zst(){let{chatId:e}=as({from:`/chat/$chatId`}),{m:t}=os({from:`/chat/$chatId`});return(0,I.jsx)(K3,{chatId:e,focusMessageId:t??null})}function Qst(){return(0,I.jsx)(K3,{chatId:null})}var Y9=Es({component:Vst}),$st=ws({getParentRoute:()=>Y9,path:`/`,component:Qst}),ect=ws({getParentRoute:()=>Y9,path:`chat/$chatId`,component:Zst,validateSearch:e=>({m:typeof e.m==`string`?e.m:void 0})}),X9=ws({getParentRoute:()=>Y9,path:`settings`,component:qst}),tct=ws({getParentRoute:()=>X9,path:`/`,component:Yst}),nct=ws({getParentRoute:()=>X9,path:`traces`,validateSearch:oat,component:iot}),rct=ws({getParentRoute:()=>X9,path:`audit`,validateSearch:sat,component:Oat}),ict=ws({getParentRoute:()=>X9,path:`anomalies`,validateSearch:cat,component:Cot}),act=ws({getParentRoute:()=>X9,path:`kpi`,validateSearch:lat,component:fot}),oct=ws({getParentRoute:()=>X9,path:`serviceAccounts`,validateSearch:uat,component:jat}),sct=ws({getParentRoute:()=>X9,path:`users`,validateSearch:dat,component:hat}),cct=ws({getParentRoute:()=>X9,path:`uiprefs`,beforeLoad:()=>{throw ia({to:`/settings/$tab`,params:{tab:pat.uiprefs},replace:!0})}}),lct=ws({getParentRoute:()=>X9,path:`$tab`,parseParams:e=>({tab:Wp([...D7]).catch(`roles`).parse(e.tab)}),component:Xst});function uct({reset:e}){let t=ss();return(0,I.jsxs)(`div`,{className:`oc-route-error`,role:`alert`,children:[(0,I.jsx)(`div`,{className:`oc-route-error__icon`,"aria-hidden":!0,children:(0,I.jsx)(Vm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:$je()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:nMe()}),(0,I.jsxs)(`div`,{className:`oc-route-error__actions`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta`,onClick:()=>e(),children:aMe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta oc-route-error__cta--ghost`,onClick:()=>void t({to:`/`}),children:dQ()})]})]})}function dct(){let e=ss();return(0,I.jsxs)(`div`,{className:`oc-route-error`,role:`status`,children:[(0,I.jsx)(`div`,{className:`oc-route-error__icon`,"aria-hidden":!0,children:(0,I.jsx)(Eee,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:uMe()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:pMe()}),(0,I.jsx)(`div`,{className:`oc-route-error__actions`,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta`,onClick:()=>void e({to:`/`}),children:dQ()})})]})}var Z9=Vs({routeTree:Y9.addChildren([$st,ect,X9.addChildren([tct,nct,rct,ict,act,oct,sct,cct,lct])]),defaultPreload:`intent`,defaultErrorComponent:uct,defaultNotFoundComponent:dct});async function fct(){try{let e=await fetch(`/config.json`,{cache:`no-store`});if(e.ok){let t=(await e.json())?.convexUrl;if(typeof t==`string`&&t.trim())return t.trim()}}catch{}throw Error(`No Convex URL configured: serve /config.json {"convexUrl":"…"} (production) or set VITE_CONVEX_URL (local dev).`)}var pct=()=>null;function Q9({children:e}){return(0,I.jsx)(`div`,{style:{display:`flex`,minHeight:`100vh`,alignItems:`center`,justifyContent:`center`,padding:`2rem`,textAlign:`center`,font:`14px system-ui, sans-serif`,opacity:.6},children:e})}var $9=_r.createRoot(document.getElementById(`root`));$9.render((0,I.jsx)(N.StrictMode,{children:(0,I.jsx)(Q9,{children:`Chargement…`})})),fct().then(e=>{let t=new Yn(e);$9.render((0,I.jsx)(N.StrictMode,{children:(0,I.jsx)(Lr,{client:t,children:(0,I.jsxs)(w4e,{children:[(0,I.jsx)(ytt,{children:(0,I.jsx)(Ws,{router:Z9})}),(0,I.jsx)(N.Suspense,{fallback:null,children:(0,I.jsx)(pct,{router:Z9,position:`bottom-right`})})]})})}))}).catch(e=>{console.error(`Boot failed:`,e),$9.render((0,I.jsx)(N.StrictMode,{children:(0,I.jsxs)(Q9,{children:[`Configuration manquante\xA0:`,` `,e instanceof Error?e.message:String(e)]})}))});
|