@lacneu/atrium 0.6.2 → 0.6.3

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 \`${jx}\` by passing a \`${Ix}\` 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 \`${jx}\`. 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},Ux=Ox,Wx=kx,Gx=Ax,Kx=Nx,qx=zx,Jx=Vx,Yx=Fx,Xx=Lx;function Zx(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 Qx(e){let[t,n]=N.useState(void 0);return Uy(()=>{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 $x=`Checkbox`,[eS,Doe]=Vy($x),[tS,nS]=eS($x);function rS(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]=Wy({prop:n,defaultProp:i??!1,onChange:c,caller:$x}),[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:fS(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,I.jsx)(tS,{scope:t,...b,children:dS(d)?d(b):r})}var iS=`CheckboxTrigger`,aS=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}=nS(iS,e),h=_y(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)(Ey.button,{type:`button`,role:`checkbox`,"aria-checked":fS(c)?`mixed`:c,"aria-required":l,"data-state":pS(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=>fS(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});aS.displayName=iS;var oS=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)(rS,{__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)(aS,{...d,ref:t,__scopeCheckbox:n}),e&&(0,I.jsx)(uS,{__scopeCheckbox:n})]})})});oS.displayName=$x;var sS=`CheckboxIndicator`,cS=N.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=nS(sS,n);return(0,I.jsx)(Gy,{present:r||fS(a.checked)||a.checked===!0,children:(0,I.jsx)(Ey.span,{"data-state":pS(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});cS.displayName=sS;var lS=`CheckboxBubbleInput`,uS=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}=nS(lS,e),m=_y(n,p),h=Zx(a),g=Qx(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=fS(a),n.call(e,fS(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=N.useRef(fS(a)?!1:a);return(0,I.jsx)(Ey.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%)`}})});uS.displayName=lS;function dS(e){return typeof e==`function`}function fS(e){return e===`indeterminate`}function pS(e){return fS(e)?`indeterminate`:e?`checked`:`unchecked`}var mS=[`top`,`right`,`bottom`,`left`],hS=Math.min,gS=Math.max,_S=Math.round,vS=Math.floor,yS=e=>({x:e,y:e}),Ooe={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bS(e,t,n){return gS(e,hS(t,n))}function xS(e,t){return typeof e==`function`?e(t):e}function SS(e){return e.split(`-`)[0]}function CS(e){return e.split(`-`)[1]}function wS(e){return e===`x`?`y`:`x`}function TS(e){return e===`y`?`height`:`width`}function ES(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function DS(e){return wS(ES(e))}function koe(e,t,n){n===void 0&&(n=!1);let r=CS(e),i=DS(e),a=TS(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=jS(o)),[o,jS(o)]}function Aoe(e){let t=jS(e);return[OS(e),t,OS(t)]}function OS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var kS=[`left`,`right`],AS=[`right`,`left`],joe=[`top`,`bottom`],Moe=[`bottom`,`top`];function Noe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?AS:kS:t?kS:AS;case`left`:case`right`:return t?joe:Moe;default:return[]}}function Poe(e,t,n,r){let i=CS(e),a=Noe(SS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(OS)))),a}function jS(e){let t=SS(e);return Ooe[t]+e.slice(t.length)}function Foe(e){return{top:0,right:0,bottom:0,left:0,...e}}function MS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Foe(e)}function NS(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 PS(e,t,n){let{reference:r,floating:i}=e,a=ES(t),o=DS(t),s=TS(o),c=SS(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(CS(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}=xS(t,e),p=MS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=NS(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=NS(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}=PS(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}=PS(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}=xS(e,t)||{};if(l==null)return{};let d=MS(u),f={x:n,y:r},p=DS(i),m=TS(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=hS(d[_],T),D=hS(d[v],T),O=E,ee=C-h[m]-D,te=C/2-h[m]/2+w,k=bS(O,te,ee),A=!c.arrow&&CS(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}=xS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=SS(r),_=ES(o),v=SS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[jS(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`&&_!==ES(t))||T.every(e=>ES(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=ES(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 FS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IS(e){return mS.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}=xS(e,t);switch(i){case`referenceHidden`:{let e=FS(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:IS(e)}}}case`escaped`:{let e=FS(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:IS(e)}}}default:return{}}}}},LS=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=SS(n),s=CS(n),c=ES(n)===`y`,l=LS.has(o)?-1:1,u=a&&c?-1:1,d=xS(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}=xS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ES(SS(i)),p=wS(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=bS(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=bS(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}=xS(e,t),u={x:n,y:r},d=ES(i),f=wS(d),p=u[f],m=u[d],h=xS(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=LS.has(SS(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}=xS(e,t),u=await o.detectOverflow(t,l),d=SS(i),f=CS(i),p=ES(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=hS(h-u[g],v),x=hS(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=gS(u.left,0),t=gS(u.right,0),n=gS(u.top,0),r=gS(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:gS(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:gS(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 RS(){return typeof window<`u`}function zS(e){return HS(e)?(e.nodeName||``).toLowerCase():`#document`}function BS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function VS(e){return((HS(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function HS(e){return RS()?e instanceof Node||e instanceof BS(e).Node:!1}function US(e){return RS()?e instanceof Element||e instanceof BS(e).Element:!1}function WS(e){return RS()?e instanceof HTMLElement||e instanceof BS(e).HTMLElement:!1}function GS(e){return!RS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof BS(e).ShadowRoot}function KS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$S(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function qoe(e){return/^(table|td|th)$/.test(zS(e))}function qS(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/,JS=e=>!!e&&e!==`none`,YS;function XS(e){let t=US(e)?$S(e):e;return JS(t.transform)||JS(t.translate)||JS(t.scale)||JS(t.rotate)||JS(t.perspective)||!ZS()&&(JS(t.backdropFilter)||JS(t.filter))||Joe.test(t.willChange||``)||Yoe.test(t.contain||``)}function Xoe(e){let t=tC(e);for(;WS(t)&&!QS(t);){if(XS(t))return t;if(qS(t))return null;t=tC(t)}return null}function ZS(){return YS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),YS}function QS(e){return/^(html|body|#document)$/.test(zS(e))}function $S(e){return BS(e).getComputedStyle(e)}function eC(e){return US(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tC(e){if(zS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||GS(e)&&e.host||VS(e);return GS(t)?t.host:t}function nC(e){let t=tC(e);return QS(t)?e.ownerDocument?e.ownerDocument.body:e.body:WS(t)&&KS(t)?t:nC(t)}function rC(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=nC(e),i=r===e.ownerDocument?.body,a=BS(r);if(i){let e=iC(a);return t.concat(a,a.visualViewport||[],KS(r)?r:[],e&&n?rC(e):[])}else return t.concat(r,rC(r,[],n))}function iC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function aC(e){let t=$S(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=WS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=_S(n)!==a||_S(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function oC(e){return US(e)?e:e.contextElement}function sC(e){let t=oC(e);if(!WS(t))return yS(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=aC(t),o=(a?_S(n.width):n.width)/r,s=(a?_S(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Zoe=yS(0);function cC(e){let t=BS(e);return!ZS()||!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!==BS(e)?!1:t}function lC(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=oC(e),o=yS(1);t&&(r?US(r)&&(o=sC(r)):o=sC(e));let s=Qoe(a,n,r)?cC(a):yS(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=BS(a),t=r&&US(r)?BS(r):r,n=e,i=iC(n);for(;i&&r&&t!==n;){let e=sC(i),t=i.getBoundingClientRect(),r=$S(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=BS(i),i=iC(n)}}return NS({width:u,height:d,x:c,y:l})}function uC(e,t){let n=eC(e).scrollLeft;return t?t.left+n:lC(VS(e)).left+n}function dC(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-uC(e,n),y:n.top+t.scrollTop}}function $oe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=VS(r),s=t?qS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=yS(1),u=yS(0),d=WS(r);if((d||!d&&!a)&&((zS(r)!==`body`||KS(o))&&(c=eC(r)),d)){let e=lC(r);l=sC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?dC(o,c):yS(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=VS(e),n=eC(e),r=e.ownerDocument.body,i=gS(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=gS(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+uC(e),s=-n.scrollTop;return $S(r).direction===`rtl`&&(o+=gS(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var fC=25;function nse(e,t){let n=BS(e),r=VS(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ZS();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=uC(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<=fC&&(a-=o)}else l<=fC&&(a+=l);return{width:a,height:o,x:s,y:c}}function rse(e,t){let n=lC(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=WS(e)?sC(e):yS(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function pC(e,t,n){let r;if(t===`viewport`)r=nse(e,n);else if(t===`document`)r=tse(VS(e));else if(US(t))r=rse(t,n);else{let n=cC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return NS(r)}function mC(e,t){let n=tC(e);return n===t||!US(n)||QS(n)?!1:$S(n).position===`fixed`||mC(n,t)}function ise(e,t){let n=t.get(e);if(n)return n;let r=rC(e,[],!1).filter(e=>US(e)&&zS(e)!==`body`),i=null,a=$S(e).position===`fixed`,o=a?tC(e):e;for(;US(o)&&!QS(o);){let t=$S(o),n=XS(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||KS(o)&&!n&&mC(e,o))?r=r.filter(e=>e!==o):i=t,o=tC(o)}return t.set(e,r),r}function ase(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?qS(t)?[]:ise(t,this._c):[].concat(n),r],o=pC(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=pC(t,a[e],i);s=gS(n.top,s),c=hS(n.right,c),l=hS(n.bottom,l),u=gS(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ose(e){let{width:t,height:n}=aC(e);return{width:t,height:n}}function sse(e,t,n){let r=WS(t),i=VS(t),a=n===`fixed`,o=lC(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=yS(0);function l(){c.x=uC(i)}if(r||!r&&!a)if((zS(t)!==`body`||KS(i))&&(s=eC(t)),r){let e=lC(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?dC(i,s):yS(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 hC(e){return $S(e).position===`static`}function gC(e,t){if(!WS(e)||$S(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return VS(e)===n&&(n=n.ownerDocument.body),n}function _C(e,t){let n=BS(e);if(qS(e))return n;if(!WS(e)){let t=tC(e);for(;t&&!QS(t);){if(US(t)&&!hC(t))return t;t=tC(t)}return n}let r=gC(e,t);for(;r&&qoe(r)&&hC(r);)r=gC(r,t);return r&&QS(r)&&hC(r)&&!XS(r)?n:r||Xoe(e)||n}var cse=async function(e){let t=this.getOffsetParent||_C,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 $S(e).direction===`rtl`}var use={convertOffsetParentRelativeRectToViewportRelativeRect:$oe,getDocumentElement:VS,getClippingRect:ase,getOffsetParent:_C,getElementRects:cse,getClientRects:ese,getDimensions:ose,getScale:sC,isElement:US,isRTL:lse};function vC(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=VS(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=vS(d),h=vS(i.clientWidth-(u+f)),g=vS(i.clientHeight-(d+p)),_=vS(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:gS(0,hS(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&&!vC(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=oC(e),u=i||a?[...l?rC(l):[],...t?rC(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?lC(e):null;c&&g();function g(){let t=lC(e);h&&!vC(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,yC=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})},bC=typeof document<`u`?N.useLayoutEffect:function(){};function xC(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(!xC(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)&&!xC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function SC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function CC(e,t){let n=SC(e);return Math.round(t*n)/n}function wC(e){let t=N.useRef(e);return bC(()=>{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);xC(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=wC(c),D=wC(i),O=wC(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&&!xC(w.current,t)&&(w.current=t,ls.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);bC(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=N.useRef(!1);bC(()=>(te.current=!0,()=>{te.current=!1}),[]),bC(()=>{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=CC(A.floating,u.x),r=CC(A.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...SC(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?{}:yC({element:r.current,padding:i}).fn(n):r?yC({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`,TC=N.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,I.jsx)(Ey.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`})})});TC.displayName=kse;var Ase=TC,EC=`Popper`,[DC,OC]=Vy(EC),[jse,kC]=DC(EC),AC=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})};AC.displayName=EC;var jC=`PopperAnchor`,MC=N.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=kC(jC,n),o=N.useRef(null),s=a.onAnchorChange,c=_y(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&&LC(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,I.jsx)(Ey.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});MC.displayName=jC;var NC=`PopperContent`,[Mse,Nse]=DC(NC),PC=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=kC(NC,n),[_,v]=N.useState(null),y=_y(t,e=>v(e)),[b,x]=N.useState(null),S=Qx(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;Uy(()=>(re(A),()=>{re(void 0)}),[A,re]);let[M,ie]=LC(A),ae=My(m);Uy(()=>{j&&ae?.()},[j,ae]);let oe=ne.arrow?.x,se=ne.arrow?.y,ce=ne.arrow?.centerOffset!==0,[le,ue]=N.useState();return Uy(()=>{_&&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)(Ey.div,{"data-side":M,"data-align":ie,...h,ref:y,style:{...h.style,animation:j?void 0:`none`}})})})});PC.displayName=NC;var FC=`PopperArrow`,Pse={top:`bottom`,right:`left`,bottom:`top`,left:`right`},IC=N.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Nse(FC,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`}})})});IC.displayName=FC;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]=LC(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 LC(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var RC=AC,zC=MC,BC=PC,VC=IC,HC=`rovingFocusGroup.onEntryFocus`,Lse={bubbles:!1,cancelable:!0},UC=`RovingFocusGroup`,[WC,GC,Rse]=Hy(UC),[zse,KC]=Vy(UC,[Rse]),[Bse,Vse]=zse(UC),qC=N.forwardRef((e,t)=>(0,I.jsx)(WC.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(WC.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Hse,{...e,ref:t})})}));qC.displayName=UC;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=_y(t,f),m=Yy(a),[h,g]=Wy({prop:o,defaultProp:s??null,onChange:c,caller:UC}),[_,v]=N.useState(!1),y=My(l),b=GC(n),x=N.useRef(!1),[S,C]=N.useState(0);return N.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(HC,y),()=>e.removeEventListener(HC,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)(Ey.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(HC,Lse);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);XC([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))})})}),JC=`RovingFocusGroupItem`,YC=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Jy(),l=a||c,u=Vse(JC,n),d=u.currentTabStopId===l,f=GC(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return N.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,I.jsx)(WC.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(Ey.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(()=>XC(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});YC.displayName=JC;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 XC(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 ZC=qC,QC=YC,$C=[`Enter`,` `],qse=[`ArrowDown`,`PageUp`,`Home`],ew=[`ArrowUp`,`PageDown`,`End`],Jse=[...qse,...ew],Yse={ltr:[...$C,`ArrowRight`],rtl:[...$C,`ArrowLeft`]},Xse={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},tw=`Menu`,[nw,Zse,Qse]=Hy(tw),[rw,iw]=Vy(tw,[Qse,OC,KC]),aw=OC(),ow=KC(),[sw,cw]=rw(tw),[$se,lw]=rw(tw),uw=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=aw(t),[c,l]=N.useState(null),u=N.useRef(!1),d=My(a),f=Yy(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)(RC,{...s,children:(0,I.jsx)(sw,{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})})})};uw.displayName=tw;var ece=`MenuAnchor`,dw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=aw(n);return(0,I.jsx)(zC,{...i,...r,ref:t})});dw.displayName=ece;var fw=`MenuPortal`,[tce,pw]=rw(fw,{forceMount:void 0}),mw=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=cw(fw,t);return(0,I.jsx)(tce,{scope:t,forceMount:n,children:(0,I.jsx)(Gy,{present:n||a.open,children:(0,I.jsx)(db,{asChild:!0,container:i,children:r})})})};mw.displayName=fw;var hw=`MenuContent`,[nce,gw]=rw(hw),_w=N.forwardRef((e,t)=>{let n=pw(hw,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=cw(hw,e.__scopeMenu),o=lw(hw,e.__scopeMenu);return(0,I.jsx)(nw.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Gy,{present:r||a.open,children:(0,I.jsx)(nw.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=cw(hw,e.__scopeMenu),r=N.useRef(null),i=_y(t,r);return N.useEffect(()=>{let e=r.current;if(e)return Jb(e)},[]),(0,I.jsx)(vw,{...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=cw(hw,e.__scopeMenu);return(0,I.jsx)(vw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ace=by(`MenuContent.ScrollLock`),vw=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=cw(hw,n),_=lw(hw,n),v=aw(n),y=ow(n),b=Zse(n),[x,S]=N.useState(null),C=N.useRef(null),w=_y(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?Hb: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),[]),mb();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)(ab,{asChild:!0,trapped:i,onMountAutoFocus:K(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,I.jsx)($y,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,I.jsx)(ZC,{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)(BC,{role:`menu`,"aria-orientation":`vertical`,"data-state":Vw(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);ew.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,Ww(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)}))})})})})})})});_w.displayName=hw;var oce=`MenuGroup`,yw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Ey.div,{role:`group`,...r,ref:t})});yw.displayName=oce;var sce=`MenuLabel`,bw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Ey.div,{...r,ref:t})});bw.displayName=sce;var xw=`MenuItem`,Sw=`menu.itemSelect`,Cw=N.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=N.useRef(null),o=lw(xw,e.__scopeMenu),s=gw(xw,e.__scopeMenu),c=_y(t,a),l=N.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Sw,{bubbles:!0,cancelable:!0});e.addEventListener(Sw,e=>r?.(e),{once:!0}),Dy(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,I.jsx)(ww,{...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===` `||$C.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Cw.displayName=xw;var ww=N.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=gw(xw,n),s=ow(n),c=N.useRef(null),l=_y(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)(nw.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,I.jsx)(QC,{asChild:!0,...s,focusable:!r,children:(0,I.jsx)(Ey.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,Ww(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Ww(e=>o.onItemLeave(e))),onFocus:K(e.onFocus,()=>d(!0)),onBlur:K(e.onBlur,()=>d(!1))})})})}),cce=`MenuCheckboxItem`,Tw=N.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,I.jsx)(jw,{scope:e.__scopeMenu,checked:n,children:(0,I.jsx)(Cw,{role:`menuitemcheckbox`,"aria-checked":Hw(n)?`mixed`:n,...i,ref:t,"data-state":Uw(n),onSelect:K(i.onSelect,()=>r?.(Hw(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Tw.displayName=cce;var Ew=`MenuRadioGroup`,[lce,uce]=rw(Ew,{value:void 0,onValueChange:()=>{}}),Dw=N.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=My(r);return(0,I.jsx)(lce,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,I.jsx)(yw,{...i,ref:t})})});Dw.displayName=Ew;var Ow=`MenuRadioItem`,kw=N.forwardRef((e,t)=>{let{value:n,...r}=e,i=uce(Ow,e.__scopeMenu),a=n===i.value;return(0,I.jsx)(jw,{scope:e.__scopeMenu,checked:a,children:(0,I.jsx)(Cw,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Uw(a),onSelect:K(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});kw.displayName=Ow;var Aw=`MenuItemIndicator`,[jw,dce]=rw(Aw,{checked:!1}),Mw=N.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=dce(Aw,n);return(0,I.jsx)(Gy,{present:r||Hw(a.checked)||a.checked===!0,children:(0,I.jsx)(Ey.span,{...i,ref:t,"data-state":Uw(a.checked)})})});Mw.displayName=Aw;var fce=`MenuSeparator`,Nw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Ey.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Nw.displayName=fce;var pce=`MenuArrow`,Pw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=aw(n);return(0,I.jsx)(VC,{...i,...r,ref:t})});Pw.displayName=pce;var Fw=`MenuSub`,[mce,Iw]=rw(Fw),hce=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=cw(Fw,t),o=aw(t),[s,c]=N.useState(null),[l,u]=N.useState(null),d=My(i);return N.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,I.jsx)(RC,{...o,children:(0,I.jsx)(sw,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,I.jsx)(mce,{scope:t,contentId:Jy(),triggerId:Jy(),trigger:s,onTriggerChange:c,children:n})})})};hce.displayName=Fw;var Lw=`MenuSubTrigger`,Rw=N.forwardRef((e,t)=>{let n=cw(Lw,e.__scopeMenu),r=lw(Lw,e.__scopeMenu),i=Iw(Lw,e.__scopeMenu),a=gw(Lw,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)(dw,{asChild:!0,...l,children:(0,I.jsx)(ww,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Vw(n.open),...e,ref:gy(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Ww(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,Ww(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())})})})});Rw.displayName=Lw;var zw=`MenuSubContent`,Bw=N.forwardRef((e,t)=>{let n=pw(hw,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=cw(hw,e.__scopeMenu),s=lw(hw,e.__scopeMenu),c=Iw(zw,e.__scopeMenu),l=N.useRef(null),u=_y(t,l);return(0,I.jsx)(nw.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Gy,{present:r||o.open,children:(0,I.jsx)(nw.Slot,{scope:e.__scopeMenu,children:(0,I.jsx)(vw,{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())})})})})})});Bw.displayName=zw;function Vw(e){return e?`open`:`closed`}function Hw(e){return e===`indeterminate`}function Uw(e){return Hw(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 Ww(e){return t=>t.pointerType===`mouse`?e(t):void 0}var xce=uw,Sce=dw,Cce=mw,wce=_w,Tce=yw,Ece=bw,Dce=Cw,Oce=Tw,kce=Dw,Ace=kw,jce=Mw,Mce=Nw,Nce=Pw,Pce=Rw,Fce=Bw,Gw=`DropdownMenu`,[Ice,Lce]=Vy(Gw,[iw]),Kw=iw(),[Rce,qw]=Ice(Gw),Jw=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Kw(t),l=N.useRef(null),[u,d]=Wy({prop:i,defaultProp:a??!1,onChange:o,caller:Gw});return(0,I.jsx)(Rce,{scope:t,triggerId:Jy(),triggerRef:l,contentId:Jy(),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})})};Jw.displayName=Gw;var Yw=`DropdownMenuTrigger`,Xw=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=qw(Yw,n),o=Kw(n);return(0,I.jsx)(Sce,{asChild:!0,...o,children:(0,I.jsx)(Ey.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:gy(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())})})})});Xw.displayName=Yw;var zce=`DropdownMenuPortal`,Zw=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Kw(t);return(0,I.jsx)(Cce,{...r,...n})};Zw.displayName=zce;var Qw=`DropdownMenuContent`,$w=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(Qw,n),a=Kw(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)`}})});$w.displayName=Qw;var Bce=`DropdownMenuGroup`,Vce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Tce,{...i,...r,ref:t})});Vce.displayName=Bce;var Hce=`DropdownMenuLabel`,eT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Ece,{...i,...r,ref:t})});eT.displayName=Hce;var Uce=`DropdownMenuItem`,tT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Dce,{...i,...r,ref:t})});tT.displayName=Uce;var Wce=`DropdownMenuCheckboxItem`,Gce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Oce,{...i,...r,ref:t})});Gce.displayName=Wce;var Kce=`DropdownMenuRadioGroup`,nT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(kce,{...i,...r,ref:t})});nT.displayName=Kce;var qce=`DropdownMenuRadioItem`,rT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Ace,{...i,...r,ref:t})});rT.displayName=qce;var Jce=`DropdownMenuItemIndicator`,iT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(jce,{...i,...r,ref:t})});iT.displayName=Jce;var Yce=`DropdownMenuSeparator`,aT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Mce,{...i,...r,ref:t})});aT.displayName=Yce;var Xce=`DropdownMenuArrow`,Zce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(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=Kw(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=Kw(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=Jw,rle=Xw,ile=Zw,ale=$w,ole=eT,sle=tT,cle=nT,lle=rT,ule=iT,dle=aT;function oT(e,[t,n]){return Math.min(n,Math.max(t,e))}var sT=`Popover`,[cT,fle]=Vy(sT,[OC]),lT=OC(),[ple,uT]=cT(sT),dT=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=lT(t),c=N.useRef(null),[l,u]=N.useState(!1),[d,f]=Wy({prop:r,defaultProp:i??!1,onChange:a,caller:sT});return(0,I.jsx)(RC,{...s,children:(0,I.jsx)(ple,{scope:t,contentId:Jy(),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})})};dT.displayName=sT;var fT=`PopoverAnchor`,mle=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=uT(fT,n),a=lT(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return N.useEffect(()=>(o(),()=>s()),[o,s]),(0,I.jsx)(zC,{...a,...r,ref:t})});mle.displayName=fT;var pT=`PopoverTrigger`,mT=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=uT(pT,n),a=lT(n),o=_y(t,i.triggerRef),s=(0,I.jsx)(Ey.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":xT(i.open),...r,ref:o,onClick:K(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,I.jsx)(zC,{asChild:!0,...a,children:s})});mT.displayName=pT;var hT=`PopoverPortal`,[hle,gle]=cT(hT,{forceMount:void 0}),gT=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=uT(hT,t);return(0,I.jsx)(hle,{scope:t,forceMount:n,children:(0,I.jsx)(Gy,{present:n||a.open,children:(0,I.jsx)(db,{asChild:!0,container:i,children:r})})})};gT.displayName=hT;var _T=`PopoverContent`,vT=N.forwardRef((e,t)=>{let n=gle(_T,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=uT(_T,e.__scopePopover);return(0,I.jsx)(Gy,{present:r||a.open,children:a.modal?(0,I.jsx)(vle,{...i,ref:t}):(0,I.jsx)(yle,{...i,ref:t})})});vT.displayName=_T;var _le=by(`PopoverContent.RemoveScroll`),vle=N.forwardRef((e,t)=>{let n=uT(_T,e.__scopePopover),r=N.useRef(null),i=_y(t,r),a=N.useRef(!1);return N.useEffect(()=>{let e=r.current;if(e)return Jb(e)},[]),(0,I.jsx)(Hb,{as:_le,allowPinchZoom:!0,children:(0,I.jsx)(yT,{...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=uT(_T,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return(0,I.jsx)(yT,{...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()}})}),yT=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=uT(_T,n),p=lT(n);return mb(),(0,I.jsx)(ab,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)($y,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,I.jsx)(BC,{"data-state":xT(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)`}})})})}),bT=`PopoverClose`,ble=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=uT(bT,n);return(0,I.jsx)(Ey.button,{type:`button`,...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})});ble.displayName=bT;var xle=`PopoverArrow`,Sle=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=lT(n);return(0,I.jsx)(VC,{...i,...r,ref:t})});Sle.displayName=xle;function xT(e){return e?`open`:`closed`}var ST=dT,CT=mT,wT=gT,TT=vT,Cle=[` `,`Enter`,`ArrowUp`,`ArrowDown`],wle=[` `,`Enter`],ET=`Select`,[DT,OT,Tle]=Hy(ET),[kT,Ele]=Vy(ET,[Tle,OC]),AT=OC(),[Dle,jT]=kT(ET),[Ole,kle]=kT(ET),Ale=`SelectProvider`;function MT(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=AT(t),[_,v]=N.useState(null),[y,b]=N.useState(null),[x,S]=N.useState(!1),C=Yy(l),[w,T]=Wy({prop:r,defaultProp:i??!1,onChange:a,caller:ET}),[E,D]=Wy({prop:o,defaultProp:s,onChange:c,caller:ET}),O=N.useRef(null),ee=_?!!m||!!_.closest(`form`):!0,[te,k]=N.useState(new Set),A=Jy(),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)(RC,{...g,children:(0,I.jsx)(Dle,{scope:t,...M,children:(0,I.jsx)(DT.Provider,{scope:t,children:(0,I.jsx)(Ole,{scope:t,onNativeOptionAdd:ne,onNativeOptionRemove:re,children:qle(h)?h(M):n})})})})}MT.displayName=Ale;var NT=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,I.jsx)(MT,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,I.jsxs)(I.Fragment,{children:[n,e?(0,I.jsx)(hE,{__scopeSelect:t}):null]})})};NT.displayName=ET;var PT=`SelectTrigger`,FT=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=AT(n),o=jT(PT,n),s=o.disabled||r,c=_y(t,o.onTriggerChange),l=OT(n),u=N.useRef(`touch`),[d,f,p]=_E(e=>{let t=l().filter(e=>!e.disabled),n=vE(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)(zC,{asChild:!0,...a,children:(0,I.jsx)(Ey.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":gE(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())})})})});FT.displayName=PT;var IT=`SelectValue`,LT=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=jT(IT,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=_y(t,c.onValueNodeChange);Uy(()=>{l(u)},[l,u]);let f=gE(c.value);return(0,I.jsx)(Ey.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`)})});LT.displayName=IT;var jle=`SelectIcon`,RT=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,I.jsx)(Ey.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});RT.displayName=jle;var zT=`SelectPortal`,[Mle,Nle]=kT(zT,{forceMount:void 0}),BT=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,I.jsx)(Mle,{scope:e.__scopeSelect,forceMount:n,children:(0,I.jsx)(db,{asChild:!0,...r})})};BT.displayName=zT;var VT=`SelectContent`,HT=N.forwardRef((e,t)=>{let n=Nle(VT,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=jT(VT,e.__scopeSelect),[o,s]=N.useState();return Uy(()=>{s(new DocumentFragment)},[]),(0,I.jsx)(Gy,{present:r||a.open,children:({present:e})=>e?(0,I.jsx)(qT,{...i,ref:t}):(0,I.jsx)(UT,{...i,fragment:o})})});HT.displayName=VT;var UT=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?ls.createPortal((0,I.jsx)(GT,{scope:n,children:(0,I.jsx)(DT.Slot,{scope:n,children:(0,I.jsx)(`div`,{ref:t,children:r})})}),i):null});UT.displayName=`SelectContentFragment`;var WT=10,[GT,KT]=kT(VT),Ple=`SelectContentImpl`,Fle=by(`SelectContent.RemoveScroll`),qT=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=jT(VT,n),[y,b]=N.useState(null),[x,S]=N.useState(null),C=_y(t,e=>b(e)),[w,T]=N.useState(null),[E,D]=N.useState(null),O=OT(n),[ee,te]=N.useState(!1),k=N.useRef(!1);N.useEffect(()=>{if(y)return Jb(y)},[y]),mb();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]=_E(e=>{let t=O().filter(e=>!e.disabled),n=vE(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`?YT:JT,le=ce===YT?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,I.jsx)(GT,{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)(Hb,{as:Fle,allowPinchZoom:!0,children:(0,I.jsx)(ab,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:K(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,I.jsx)($y,{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()}})})})})})})});qT.displayName=Ple;var Ile=`SelectItemAlignedPosition`,JT=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=jT(VT,n),o=KT(VT,n),[s,c]=N.useState(null),[l,u]=N.useState(null),d=_y(t,e=>u(e)),f=OT(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-WT,d=oT(a,[WT,Math.max(WT,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-WT,d=oT(a,[WT,Math.max(WT,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-WT*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-WT,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=`${WT}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]);Uy(()=>y(),[y]);let[b,x]=N.useState();return Uy(()=>{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)(Ey.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});JT.displayName=Ile;var Lle=`SelectPopperPosition`,YT=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=WT,...a}=e,o=AT(n);return(0,I.jsx)(BC,{...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)`}})});YT.displayName=Lle;var[Rle,XT]=kT(VT,{}),ZT=`SelectViewport`,QT=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=KT(ZT,n),o=XT(ZT,n),s=_y(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)(DT.Slot,{scope:n,children:(0,I.jsx)(Ey.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-WT*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})})})]})});QT.displayName=ZT;var $T=`SelectGroup`,[zle,Ble]=kT($T),Vle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Jy();return(0,I.jsx)(zle,{scope:n,id:i,children:(0,I.jsx)(Ey.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Vle.displayName=$T;var eE=`SelectLabel`,Hle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ble(eE,n);return(0,I.jsx)(Ey.div,{id:i.id,...r,ref:t})});Hle.displayName=eE;var tE=`SelectItem`,[Ule,nE]=kT(tE),rE=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=jT(tE,n),c=KT(tE,n),l=s.value===r,[u,d]=N.useState(a??``),[f,p]=N.useState(!1),m=_y(t,e=>c.itemRefCallback?.(e,r,i)),h=Jy(),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)(DT.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,I.jsx)(Ey.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())})})})})});rE.displayName=tE;var iE=`SelectItemText`,aE=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=jT(iE,n),s=KT(iE,n),c=nE(iE,n),l=kle(iE,n),[u,d]=N.useState(null),f=_y(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 Uy(()=>(h(m),()=>g(m)),[h,g,m]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ey.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ls.createPortal(a.children,o.valueNode):null]})});aE.displayName=iE;var oE=`SelectItemIndicator`,sE=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return nE(oE,n).isSelected?(0,I.jsx)(Ey.span,{"aria-hidden":!0,...r,ref:t}):null});sE.displayName=oE;var cE=`SelectScrollUpButton`,lE=N.forwardRef((e,t)=>{let n=KT(cE,e.__scopeSelect),r=XT(cE,e.__scopeSelect),[i,a]=N.useState(!1),o=_y(t,r.onScrollButtonChange);return Uy(()=>{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)(fE,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});lE.displayName=cE;var uE=`SelectScrollDownButton`,dE=N.forwardRef((e,t)=>{let n=KT(uE,e.__scopeSelect),r=XT(uE,e.__scopeSelect),[i,a]=N.useState(!1),o=_y(t,r.onScrollButtonChange);return Uy(()=>{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)(fE,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});dE.displayName=uE;var fE=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=KT(`SelectScrollButton`,n),o=N.useRef(null),s=OT(n),c=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>c(),[c]),Uy(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,I.jsx)(Ey.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)(Ey.div,{"aria-hidden":!0,...r,ref:t})});Gle.displayName=Wle;var pE=`SelectArrow`,Kle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=AT(n);return KT(pE,n).position===`popper`?(0,I.jsx)(VC,{...i,...r,ref:t}):null});Kle.displayName=pE;var mE=`SelectBubbleInput`,hE=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=jT(mE,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=_y(n,p),h=i??``,g=Zx(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)(Ey.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...zy,...t.style},ref:m,defaultValue:h,children:[gE(i)?(0,I.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});hE.displayName=mE;function qle(e){return typeof e==`function`}function gE(e){return e===``||e===void 0}function _E(e){let t=My(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 vE(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 yE=`Tabs`,[Yle,Xle]=Vy(yE,[KC]),bE=KC(),[Zle,xE]=Yle(yE),SE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Yy(s),[d,f]=Wy({prop:r,onChange:i,defaultProp:a??``,caller:yE});return(0,I.jsx)(Zle,{scope:n,baseId:Jy(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,I.jsx)(Ey.div,{dir:u,"data-orientation":o,...l,ref:t})})});SE.displayName=yE;var CE=`TabsList`,wE=N.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=xE(CE,n),o=bE(n);return(0,I.jsx)(ZC,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,I.jsx)(Ey.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});wE.displayName=CE;var TE=`TabsTrigger`,EE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=xE(TE,n),s=bE(n),c=kE(o.baseId,r),l=AE(o.baseId,r),u=r===o.value;return(0,I.jsx)(QC,{asChild:!0,...s,focusable:!i,active:u,children:(0,I.jsx)(Ey.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)})})})});EE.displayName=TE;var DE=`TabsContent`,OE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=xE(DE,n),c=kE(s.baseId,r),l=AE(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)(Gy,{present:i||u,children:({present:n})=>(0,I.jsx)(Ey.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})})});OE.displayName=DE;function kE(e,t){return`${e}-trigger-${t}`}function AE(e,t){return`${e}-content-${t}`}var Qle=SE,$le=wE,eue=EE,tue=OE,[jE,nue]=Vy(`Tooltip`,[OC]),ME=OC(),NE=`TooltipProvider`,rue=700,PE=`tooltip.open`,[iue,FE]=jE(NE),IE=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})};IE.displayName=NE;var LE=`Tooltip`,[aue,RE]=jE(LE),zE=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=FE(LE,e.__scopeTooltip),l=ME(t),[u,d]=N.useState(null),f=Jy(),p=N.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=N.useRef(!1),[_,v]=Wy({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(PE))):c.onClose(),a?.(e)},caller:LE}),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)(RC,{...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})})};zE.displayName=LE;var BE=`TooltipTrigger`,VE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=RE(BE,n),a=FE(BE,n),o=ME(n),s=_y(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)(zC,{asChild:!0,...o,children:(0,I.jsx)(Ey.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)})})});VE.displayName=BE;var HE=`TooltipPortal`,[oue,sue]=jE(HE,{forceMount:void 0}),UE=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=RE(HE,t);return(0,I.jsx)(oue,{scope:t,forceMount:n,children:(0,I.jsx)(Gy,{present:n||a.open,children:(0,I.jsx)(db,{asChild:!0,container:i,children:r})})})};UE.displayName=HE;var WE=`TooltipContent`,GE=N.forwardRef((e,t)=>{let n=sue(WE,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=RE(WE,e.__scopeTooltip);return(0,I.jsx)(Gy,{present:r||o.open,children:o.disableHoverableContent?(0,I.jsx)(KE,{side:i,...a,ref:t}):(0,I.jsx)(cue,{side:i,...a,ref:t})})}),cue=N.forwardRef((e,t)=>{let n=RE(WE,e.__scopeTooltip),r=FE(WE,e.__scopeTooltip),i=N.useRef(null),a=_y(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)(KE,{...e,ref:a})}),[lue,uue]=jE(LE,{isInside:!1}),due=Cy(`TooltipContent`),KE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=RE(WE,n),l=ME(n),{onClose:u}=c;return N.useEffect(()=>(document.addEventListener(PE,u),()=>document.removeEventListener(PE,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)($y,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,I.jsxs)(BC,{"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)(Yie,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});GE.displayName=WE;var qE=`TooltipArrow`,JE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=ME(n);return uue(qE,n).isInside?null:(0,I.jsx)(VC,{...i,...r,ref:t})});JE.displayName=qE;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=IE,yue=zE,bue=VE,xue=UE,Sue=GE,Cue=JE,YE=(0,H.forwardRef)((e,t)=>(0,I.jsx)(Oy.div,{...e,ref:t}));YE.displayName=`AttachmentPrimitive.Root`;var XE=(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)(Oy.div,{...e,ref:t,children:[`.`,n]})});XE.displayName=`AttachmentPrimitive.unstable_Thumb`;var ZE=()=>(0,I.jsx)(I.Fragment,{children:G(e=>e.attachment.name)});ZE.displayName=`AttachmentPrimitive.Name`;var wue=jy(`AttachmentPrimitive.Remove`,()=>{let e=Dg();return W(()=>{e.attachment().remove()},[e])}),QE=yy({Name:()=>ZE,Remove:()=>wue,Root:()=>YE,unstable_Thumb:()=>XE}),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)}),$E=({children:e,...t})=>Tue(t)?e:null;$E.displayName=`MessagePrimitive.If`;var eD=(0,H.createContext)(null),tD=()=>Th(eD),Eue=({children:e})=>{let t=bh(new Map),n=bh([]),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)(eD.Provider,{value:o,children:e})},nD=(0,H.createContext)(null),rD=(0,H.createContext)(null),iD=()=>{let e=Th(nD);if(!e)throw Error(`useTriggerPopoverRootContext must be used within ComposerPrimitive.TriggerPopoverRoot`);return e},aD=()=>Th(nD),Due=()=>{let e=Th(rD);if(!e)throw Error(`useTriggerPopoverAriaPublish must be used within ComposerPrimitive.TriggerPopoverRoot`);return e},Oue=()=>{let e=iD();return(0,H.useSyncExternalStore)(e.subscribe,e.getTriggers,e.getTriggers)},kue=new Map,oD=()=>()=>{},sD=()=>kue,Aue=()=>{let e=aD();return(0,H.useSyncExternalStore)(e?e.subscribe:oD,e?e.getTriggers:sD,e?e.getTriggers:sD)},cD=()=>null,jue=()=>{let e=aD();return(0,H.useSyncExternalStore)(e?e.subscribeAria:oD,e?e.getActiveAria:cD,e?e.getActiveAria:cD)};function lD(){let e=bh(new Set);return{notify:W(()=>{for(let t of e.current)t()},[]),subscribe:W(t=>(e.current.add(t),()=>{e.current.delete(t)}),[])}}var uD=({children:e})=>{let t=bh(new Map),n=bh(new Set),{notify:r,subscribe:i}=lD(),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=bh(null),l=bh(null),{notify:u,subscribe:d}=lD(),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)(nD.Provider,{value:m,children:(0,I.jsx)(rD.Provider,{value:h,children:e})})},dD=({children:e})=>tD()?(0,I.jsx)(uD,{children:e}):(0,I.jsx)(Eue,{children:(0,I.jsx)(uD,{children:e})});dD.displayName=`ComposerPrimitive.TriggerPopoverRoot`;var fD=/\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(fD.test(n))return null;if(r.startsWith(t,e)){if(e>0&&!fD.test(r[e-1]))continue;return{query:r.slice(e+t.length),offset:e}}}return null}var Nue=Dh(function({text:e,triggerChar:t}){let[n,r]=yh(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=Dh(function({navigableList:e,isSearchMode:t,activeCategoryId:n,query:r,popoverId:i,open:a,selectItem:o,selectCategory:s,goBack:c,close:l}){let[u,d]=yh(0);xh(()=>{d(0)},[e]),xh(()=>{d(0)},[t,n]);let f=Ch(t=>{t<0||t>=e.length||t!==u&&d(t)}),p=Ch(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 pD(e,t){return e.id.toLowerCase().includes(t)||e.label.toLowerCase().includes(t)||(e.description?.toLowerCase().includes(t)??!1)}var Iue=Dh(function({adapter:e,query:t,open:n}){let[r,i]=yh(null);xh(()=>{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))pD(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=>pD(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:Ch(e=>{i(e)}),goBack:Ch(()=>{i(null)})}}),Lue=Dh(function({behavior:e,trigger:t,aui:n,triggerChar:r,setCursorPosition:i,onSelected:a}){let o=bh(null),s=Ch(e=>(o.current=e,()=>{o.current===e&&(o.current=null)}));return{selectItem:Ch(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:Ch(()=>{a(),t&&i(t.offset)}),registerSelectItemOverride:s}}),Rue=Dh(function({adapter:e,text:t,triggerChar:n,behavior:r,aui:i,popoverId:a}){let o=Hh(Nue({text:t,triggerChar:n})),s=o.trigger!==null&&e!==void 0&&r!==void 0,c=Hh(Iue({adapter:e,query:o.query,open:s})),l=Ch(()=>{c.goBack()}),u=Hh(Lue({behavior:r,trigger:o.trigger,aui:i,triggerChar:n,setCursorPosition:o.setCursorPosition,onSelected:l})),d=Hh(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}}),mD=(0,H.createContext)(null),hD=()=>{let e=Th(mD);if(!e)throw Error(`useTriggerPopoverScopeContext must be used within ComposerPrimitive.TriggerPopover`);return e},zue=()=>Th(mD),gD=(0,H.createContext)(null),_D=()=>{let e=Th(gD);if(!e)throw Error(`TriggerPopover.Directive / TriggerPopover.Action must be rendered inside ComposerPrimitive.TriggerPopover`);return e},vD=(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=bh(null),[u,d]=yh(null),f=bh(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=Hh(Rue({adapter:t,text:s,triggerChar:e,behavior:u??void 0,aui:o,popoverId:c})),g=bh(h);g.current=h;let _=iD();xh(()=>_.register({char:e,...u?{behavior:u}:{},resource:g.current}),[_,e,u]);let v=tD();xh(()=>{if(v)return v.register(g.current)},[v]);let y=u!==null&&h.open,b=Due();return xh(()=>{if(y)return()=>{b.setActiveAria(e,null)}},[b,e,y]),xh(()=>{y&&b.setActiveAria(e,{popoverId:c,highlightedItemId:h.highlightedItemId})},[b,e,c,y,h.highlightedItemId]),(0,I.jsx)(gD.Provider,{value:m,children:(0,I.jsx)(mD.Provider,{value:h,children:y?(0,I.jsx)(Oy.div,{role:`listbox`,id:c,"aria-label":n??`Suggestions`,"aria-activedescendant":h.highlightedItemId,"data-state":`open`,...i,ref:a,children:r}):r})})});vD.displayName=`ComposerPrimitive.TriggerPopover`;var yD=()=>{let{disabled:e,send:t}=$re(),n=W(()=>t(),[t]);return e?null:n},Bue=jy(`ComposerPrimitive.Send`,yD),bD=(0,H.forwardRef)(({onSubmit:e,...t},n)=>{let r=yD(),i=e=>{e.preventDefault(),r&&r()};return(0,I.jsx)(Oy.form,{...t,ref:n,onSubmit:K(e,i)})});bD.displayName=`ComposerPrimitive.Root`;var xD=e=>{let t=My(e),n=oy(e=>e.onScrollToBottom);xh(()=>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 SD(){return SD=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},SD.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},CD=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&&CD(n.current,null),n.current=t,t&&CD(t,r)},[t])},wD={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},TD=function(e){Object.keys(wD).forEach(function(t){e.style.setProperty(t,wD[t],`important`)})},ED=null,DD=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),ED||(ED=document.createElement(`textarea`),ED.setAttribute(`tabindex`,`-1`),ED.setAttribute(`aria-hidden`,`true`),TD(ED)),ED.parentNode===null&&document.body.appendChild(ED);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;ED.style[t]=o[t]}),TD(ED),ED.value=t;var c=DD(ED,e);ED.value=t,c=DD(ED,e),ED.value=`x`;var l=ED.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 OD=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 kD(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){kD(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},ede=function(e){kD(window,`resize`,e)},tde=function(e){kD(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?OD:a,s=e.onHeightChange,c=s===void 0?OD: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`,SD({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),ide=`(pointer: coarse) and (not (any-pointer: fine))`,AD=(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=tD(),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=bh(null),D=_y(_,E),O=bh(!1);Ny(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]);xh(()=>A(),[A]),xD(()=>{v.composer().getState().type===`thread`&&f&&A()}),xh(()=>{if(!(v.composer().getState().type!==`thread`||!d))return v.on(`thread.runStart`,A)},[d,A,v]),xh(()=>{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(jh(()=>{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;jh(()=>{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)(xy,{...ne,children:(0,H.cloneElement)(n,void 0,e)})}return(0,I.jsx)(t?xy:rde,{...ne})});AD.displayName=`ComposerPrimitive.Input`;var ade=jy(`ComposerPrimitive.Cancel`,()=>{let{disabled:e,cancel:t}=eie();return e?null:t}),ode=jy(`ComposerPrimitive.AddAttachment`,({multiple:e=!0}={})=>{let{disabled:t,addAttachment:n}=nie(),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`]),jD=(0,H.forwardRef)(({disabled:e,asChild:t=!1,render:n,children:r,...i},a)=>{let[o,s]=yh(!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)(xy,{...p,children:(0,H.cloneElement)(n,void 0,e)})}return(0,I.jsx)(t?xy:`div`,{...p,children:r})});jD.displayName=`ComposerPrimitive.AttachmentDropzone`;var sde=jy(`ComposerPrimitive.Dictate`,()=>{let{disabled:e,startDictation:t}=tie();return e?null:t}),cde=jy(`ComposerPrimitive.StopDictation`,()=>{let e=Dg(),t=G(e=>e.composer.dictation!=null),n=W(()=>{e.composer().stopDictation()},[e]);return t?n:null}),MD=(0,H.forwardRef)(({children:e,...t},n)=>{let r=G(e=>e.composer.dictation?.transcript);return r?(0,I.jsx)(Oy.span,{...t,ref:n,children:e??r}):null});MD.displayName=`ComposerPrimitive.DictationTranscript`;var ND=(0,H.forwardRef)((e,t)=>G(e=>e.composer.quote)?(0,I.jsx)(Oy.div,{...e,ref:t}):null);ND.displayName=`ComposerPrimitive.Quote`;var PD=(0,H.forwardRef)(({children:e,...t},n)=>{let r=G(e=>e.composer.quote?.text);return r?(0,I.jsx)(Oy.span,{...t,ref:n,children:e??r}):null});PD.displayName=`ComposerPrimitive.QuoteText`;var FD=(0,H.forwardRef)(({onClick:e,...t},n)=>{let r=Dg(),i=W(()=>{r.composer().setQuote(void 0)},[r]);return(0,I.jsx)(Oy.button,{type:`button`,...t,ref:n,onClick:K(e,i)})});FD.displayName=`ComposerPrimitive.QuoteDismiss`;var ID=(0,H.forwardRef)(({children:e,"aria-label":t,...n},r)=>{let{categories:i,activeCategoryId:a,isSearchMode:o,open:s}=hD();return!s||a||o?null:(0,I.jsx)(Oy.div,{role:`group`,"aria-label":t??`Categories`,...n,ref:r,children:e(i)})});ID.displayName=`ComposerPrimitive.TriggerPopoverCategories`;var LD=(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}=hD(),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)(Oy.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)})});LD.displayName=`ComposerPrimitive.TriggerPopoverCategoryItem`;var RD=(0,H.forwardRef)(({children:e,"aria-label":t,...n},r)=>{let{items:i,activeCategoryId:a,isSearchMode:o,open:s}=hD();return!s||!a&&!o?null:(0,I.jsx)(Oy.div,{role:`group`,"aria-label":t??`Items`,...n,ref:r,children:e(i)})});RD.displayName=`ComposerPrimitive.TriggerPopoverItems`;var zD=(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}=hD(),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)(Oy.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)})});zD.displayName=`ComposerPrimitive.TriggerPopoverItem`;var BD=(0,H.forwardRef)(({onClick:e,...t},n)=>{let{activeCategoryId:r,isSearchMode:i,goBack:a,open:o}=hD();return!o||!r||i?null:(0,I.jsx)(Oy.button,{type:`button`,...t,ref:n,onClick:K(e,a)})});BD.displayName=`ComposerPrimitive.TriggerPopoverBack`;var VD=({formatter:e,onExecute:t,removeOnExecute:n})=>{let{register:r}=_D(),i=bh(t);return i.current=t,xh(()=>r({kind:`action`,formatter:e??ry,onExecute:e=>i.current(e),...n===void 0?{}:{removeOnExecute:n}}),[r,e,n]),null};VD.displayName=`ComposerPrimitive.TriggerPopoverAction`;var HD=({formatter:e,onInserted:t})=>{let{register:n}=_D(),r=bh(t);return r.current=t,xh(()=>n({kind:`directive`,formatter:e??ry,onInserted:e=>r.current?.(e)}),[n,e]),null};HD.displayName=`ComposerPrimitive.TriggerPopoverDirective`;var lde=Object.assign(vD,{Directive:HD,Action:VD}),UD=yy({AddAttachment:()=>ode,AttachmentByIndex:()=>qv,AttachmentDropzone:()=>jD,Attachments:()=>Yv,Cancel:()=>ade,Dictate:()=>sde,DictationTranscript:()=>MD,If:()=>ny,Input:()=>AD,Queue:()=>Xv,Quote:()=>ND,QuoteDismiss:()=>FD,QuoteText:()=>PD,Root:()=>bD,Send:()=>Bue,StopDictation:()=>cde,Unstable_TriggerPopover:()=>lde,Unstable_TriggerPopoverBack:()=>BD,Unstable_TriggerPopoverCategories:()=>ID,Unstable_TriggerPopoverCategoryItem:()=>LD,Unstable_TriggerPopoverItem:()=>zD,Unstable_TriggerPopoverItems:()=>RD,Unstable_TriggerPopoverRoot:()=>dD,unstable_useTriggerPopoverRootContext:()=>iD,unstable_useTriggerPopoverRootContextOptional:()=>aD,unstable_useTriggerPopoverScopeContext:()=>hD,unstable_useTriggerPopoverScopeContextOptional:()=>zue,unstable_useTriggerPopoverTriggers:()=>Oue,unstable_useTriggerPopoverTriggersOptional:()=>Aue}),WD=()=>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}),GD=(0,H.createContext)(null),dde=e=>({useSmoothStatus:zg(()=>e)}),fde=({children:e})=>{let t=KD({optional:!0}),n=Dg(),[r]=yh(()=>dde(n.part().getState().status));return t?e:(0,I.jsx)(GD.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 KD(e){let t=Th(GD);if(!e?.optional&&!t)throw Error(`This component must be used within a SmoothContextProvider.`);return t}var{useSmoothStatus:mde,useSmoothStatusStore:hde}=iy(KD,`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))}},qD=Object.freeze({type:`running`}),JD=(e,t=!1)=>{let{text:n}=e,[r,i]=yh(e.status.type===`running`?``:n),a=Dg(),o=G(()=>a.part()),[s,c]=yh(o);(o!==s||!n.startsWith(r))&&(c(o),i(e.status.type===`running`?``:n));let l=hde({optional:!0}),u=My(t=>{if(i(t),l){let n=r!==t||e.status.type===`running`?qD:e.status;ly(l).setState(n,!0)}});xh(()=>{if(l){let i=t&&(r!==n||e.status.type===`running`)?qD:e.status;ly(l).setState(i,!0)}},[l,t,n,r,e.status]);let[d]=yh(new gde(r,u)),f=bh(o);return xh(()=>{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]),xh(()=>()=>{d.stop()},[d]),U(()=>t?{type:`text`,text:r,status:n===r?e.status:qD}:e,[t,r,e,n])},YD=(0,H.forwardRef)(({smooth:e=!0,component:t=`span`,...n},r)=>{let{text:i,status:a}=JD(WD(),e);return(0,I.jsx)(t,{"data-status":a.type,...n,ref:r,children:i})});YD.displayName=`MessagePartPrimitive.Text`;var XD=(0,H.forwardRef)((e,t)=>{let{image:n}=ude();return(0,I.jsx)(Oy.img,{src:n,...e,ref:t})});XD.displayName=`MessagePartPrimitive.Image`;var ZD=e=>{let t=bh(void 0);return W(n=>{t.current&&=(t.current(),void 0),n&&(t.current=e(n))},[e])},QD=(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},$D=(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},eO=()=>{let e=Dg(),t=G(()=>e.message());return ZD(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=oy(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=oy(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)=>ZD(W(n=>{if(e)return t.getState().registerAnchorElement(n)},[e,t])),Cde=({active:e,threadViewportStore:t})=>ZD(W(n=>{if(!e)return;let r=t.getState(),i=r.topAnchorMessageClamp;return r.registerAnchorTargetElement(n,{tallerThan:QD(i.tallerThan,n),visibleHeight:QD(i.visibleHeight,n)})},[e,t])),wde=({forwardedRef:e,...t})=>{let n=_y(e,eO()),r=G(e=>e.message.id);return(0,I.jsx)(Oy.div,{...t,ref:n,"data-message-id":r})},Tde=({forwardedRef:e,threadViewportStore:t,...n})=>{let r=eO(),i=bde(),a=xde(),o=_y(e,r,Sde(i,t),Cde({active:a,threadViewportStore:t})),s=G(e=>e.message.id);return(0,I.jsx)(Oy.div,{...n,ref:o,"data-message-id":s,"data-aui-top-anchor-user":i?``:void 0,"data-aui-top-anchor-target":a?``:void 0})},tO=(0,H.forwardRef)((e,t)=>{let n=sy();return n.getState().turnAnchor===`top`?(0,I.jsx)(Tde,{...e,forwardedRef:t,threadViewportStore:n}):(0,I.jsx)(wde,{...e,forwardedRef:t})});tO.displayName=`MessagePrimitive.Root`;var nO={...kv,Text:()=>(0,I.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,I.jsx)(YD,{}),(0,I.jsx)(Zv,{children:(0,I.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Image:()=>(0,I.jsx)(XD,{})},rO=e=>{if(`children`in e)return(0,I.jsx)(Iv,{children:e.children});let{components:t,...n}=e;return(0,I.jsx)(Iv,{components:t?{Text:t.Text??nO.Text,Image:t.Image??nO.Image,Reasoning:t.Reasoning??kv.Reasoning,Source:t.Source??kv.Source,File:t.File??kv.File,Unstable_Audio:t.Unstable_Audio??kv.Unstable_Audio,...`ChainOfThought`in t?{ChainOfThought:t.ChainOfThought}:{tools:t.tools,data:t.data,ToolGroup:t.ToolGroup??kv.ToolGroup,ReasoningGroup:t.ReasoningGroup??kv.ReasoningGroup},Empty:t.Empty,Quote:t.Quote,generativeUI:t.generativeUI}:nO,...n})};rO.displayName=`MessagePrimitive.Parts`;var iO=({children:e})=>die()===void 0?null:e;iO.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},aO={Text:()=>(0,I.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,I.jsx)(YD,{}),(0,I.jsx)(Zv,{children:(0,I.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Reasoning:()=>null,Source:()=>null,Image:()=>(0,I.jsx)(XD,{}),File:()=>null,Unstable_Audio:()=>null,Group:({children:e})=>e},Ade=({components:{Text:e=aO.Text,Reasoning:t=aO.Reasoning,Image:n=aO.Image,Source:r=aO.Source,File:i=aO.File,Unstable_Audio:a=aO.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??aO.Text})},(e,t)=>e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),oO=({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??aO.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])})};oO.displayName=`MessagePrimitive.Unstable_PartsGrouped`;var sO=({components:e,...t})=>(0,I.jsx)(oO,{...t,components:e,groupingFunction:Ede});sO.displayName=`MessagePrimitive.Unstable_PartsGroupedByParentId`;var cO=yy({AttachmentByIndex:()=>Uv,Attachments:()=>Gv,Content:()=>rO,Error:()=>iO,GenerativeUI:()=>Sv,GroupedParts:()=>Bv,If:()=>$E,PartByIndex:()=>Av,Parts:()=>rO,Quote:()=>Vv,Root:()=>tO,Unstable_PartsGrouped:()=>oO,Unstable_PartsGroupedByParentId:()=>sO}),Fde=e=>{let t=My(e);return ZD(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=bh(null),a=G(e=>e.thread.messages.length>0),o=bh(!1),s=bh(null),c=sy();e===void 0&&(e=c.getState().turnAnchor!==`top`);let l=bh(0),u=bh(0),d=bh(0),f=bh(0),p=bh(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]);Sh(()=>()=>{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&&ly(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=ZD(e=>(e.addEventListener(`scroll`,_),()=>{e.removeEventListener(`scroll`,_)}));return Sh(()=>{if(n){if(!a){o.current=!1;return}o.current||(o.current=!0,p.current===null&&h(`instant`))}},[a,h,n]),xD(({behavior:e})=>{m(e)}),Ag(`thread.runStart`,()=>{t&&c.getState().turnAnchor!==`top`&&h(`auto`)}),Ag(`threadListItem.switchedTo`,()=>{r&&h(`instant`)}),_y(v,y,i)},lO=(0,H.forwardRef)((e,t)=>(0,I.jsx)(Oy.div,{...e,ref:t}));lO.displayName=`ThreadPrimitive.Root`;var uO=({children:e})=>G(e=>e.thread.isEmpty)?e:null;uO.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)),dO=({children:e,...t})=>Lde(t)?e:null;dO.displayName=`ThreadPrimitive.If`;var fO=(e,t)=>ZD(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])),pO=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:pO(e)-pO(t)},mO=({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=mO(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&&($D(t,0),t.remove());return}if(t??=vde(),(t.parentElement!==c.parentElement||t.previousElementSibling!==c)&&c.after(t),a.target(o,s,c),$D(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(mO({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=sy();Sh(()=>{if(e)return Ude(t)},[e,t])},hO=({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=>hO(e)?.anchorId,Kde=e=>hO(e)?.targetId,qde=()=>fO(oy(e=>e.registerViewport),W(e=>e.clientHeight,[])),Jde=()=>ZD(oy(e=>e.registerViewportElement)),Yde=e=>{let t=sy(),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]);Sh(()=>{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)},gO=(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=sy().getState().turnAnchor===`top`;Yde(u),Wde(u);let d=_y(o,s,c,l);return(0,I.jsx)(Oy.div,{...a,ref:d,children:i})});gO.displayName=`ThreadPrimitive.ViewportScrollable`;var _O=(0,H.forwardRef)(({turnAnchor:e,topAnchorMessageClamp:t,...n},r)=>(0,I.jsx)(uy,{options:{turnAnchor:e,topAnchorMessageClamp:t},children:(0,I.jsx)(gO,{...n,ref:r})}));_O.displayName=`ThreadPrimitive.Viewport`;var vO=(0,H.forwardRef)((e,t)=>{let n=_y(t,fO(oy(e=>e.registerContentInset),W(e=>{let t=parseFloat(getComputedStyle(e).marginTop)||0;return e.offsetHeight+t},[])));return(0,I.jsx)(Oy.div,{...e,ref:n})});vO.displayName=`ThreadPrimitive.ViewportFooter`;var Xde=jy(`ThreadPrimitive.ScrollToBottom`,({behavior:e}={})=>{let t=oy(e=>e.isAtBottom),n=sy(),r=W(()=>{n.getState().scrollToBottom({behavior:e})},[n,e]);return t?null:r},[`behavior`]),Zde=jy(`ThreadPrimitive.Suggestion`,({prompt:e,send:t,clearComposer:n,autoSend:r,method:i})=>{let{disabled:a,trigger:o}=uie({prompt:e,send:t??r??!1,clearComposer:n});return a?null:o},[`prompt`,`send`,`clearComposer`,`autoSend`,`method`]),yO=yy({Empty:()=>uO,If:()=>dO,MessageByIndex:()=>gv,Messages:()=>Cre,Root:()=>lO,ScrollToBottom:()=>Xde,Suggestion:()=>Zde,SuggestionByIndex:()=>$v,Suggestions:()=>Zre,Viewport:()=>_O,ViewportFooter:()=>vO,ViewportProvider:()=>uy}),Qde=yy({AssistantRuntimeImpl:()=>A_,BaseAssistantRuntimeCore:()=>j_,CompositeContextProvider:()=>Wh,DefaultThreadComposerRuntimeCore:()=>X_,MessageRepository:()=>H_,ThreadRuntimeImpl:()=>E_,fromThreadMessageLike:()=>z_,generateId:()=>F_,getAutoStatus:()=>L_,splitLocalRuntimeOptions:()=>fie,useComposerInputPluginRegistryOptional:()=>tD,useSmooth:()=>JD,useSmoothStatus:()=>mde,withSmoothContextProvider:()=>pde}),bO=typeof window<`u`&&window.location?window.location.hostname:``,xO=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(xO(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(xO(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(`.`),SO=[{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(SO.map(e=>e.key));function CO(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 wO(e,t){(0,N.useEffect)(()=>{rfe(e??null,t)},[e,t])}var TO=new Map,EO={active:!1,percent:0,count:0},DO=new Set;function OO(){let e=0,t=0;for(let n of TO.values())e+=n.loaded,t+=n.total;let n=TO.size;EO={active:n>0,percent:t>0?Math.min(100,Math.round(e/t*100)):0,count:n};for(let e of DO)e()}var kO={subscribe(e){return DO.add(e),()=>DO.delete(e)},getSnapshot(){return EO},report(e,t,n){TO.set(e,{loaded:t,total:n}),OO()},clear(e){TO.delete(e)&&OO()}};function AO(e,t){return(t===`dark`?e?.logoDarkUrl:e?.logoLightUrl)??(t===`dark`?e?.logoLightUrl:e?.logoDarkUrl)??null}function ife(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 jO({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 afe={},MO=[`fr`,`en`],ofe=`PARAGLIDE_LOCALE`,NO=[`localStorage`,`baseLocale`],PO=[],FO,IO;function sfe(e){if(PO.length===0)return;let t=typeof e==`string`?e:e.href;if(FO===t)return IO;let n=new URL(t,`http://dummy.com`),r;for(let e of PO)if(new afe(e.match,n.href).exec(n.href)){r=e;break}return FO=t,IO=r,r}function LO(e){let t=sfe(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:NO}var RO=void 0;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var zO=!1,q=()=>{if(RO){let e=RO?.getStore()?.locale;if(e)return e}let e=NO;typeof window<`u`&&window.location?.href&&(e=LO(window.location.href));let t=cfe(e,typeof window<`u`?window.location?.href:void 0);if(t)return zO||(zO=!0,BO(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 cfe(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(UO(t)&&HO.has(t)){let e=HO.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return ufe(t)}}let e=VO(n);if(e)return e}}var lfe=e=>{e?window.location.href=e:window.location.reload()},BO=(e,t)=>{let n={reload:!0,...t},r;try{r=q()}catch{}let i=[],a=NO;typeof window<`u`&&window.location?.href&&(a=LO(window.location.href));for(let t of a)if(t===`baseLocale`)continue;else if(t===`localStorage`&&typeof window<`u`)localStorage.setItem(ofe,e);else if(UO(t)&&HO.has(t)){let n=HO.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&&lfe(void 0)};if(i.length)return Promise.all(i).then(()=>{o()});o()};function VO(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of MO)if(e.toLowerCase()===t)return e}function ufe(e){let t=VO(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${MO.join(`, `)}`)}var HO=new Map;function UO(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}var dfe=e=>`Fichier trop volumineux (${e?.size} Mo, max ${e?.max} Mo). Réduisez-le (p. ex. compressez les images) et réessayez.`,ffe=e=>`File too large (${e?.size} MB, max ${e?.max} MB). Reduce it (e.g. compress images) and try again.`,pfe=((e,t={})=>(t.locale??q())===`fr`?dfe(e):ffe(e)),mfe=()=>`Chargement…`,WO=()=>`Loading…`,GO=((e={},t={})=>(t.locale??q())===`fr`?mfe(e):WO(e)),KO=()=>`Thème`,qO=()=>`Theme`,JO=((e={},t={})=>(t.locale??q())===`fr`?KO(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=()=>`Réponse reçue.`,VH=()=>`Reply received.`,HH=((e={},t={})=>(t.locale??q())===`fr`?BH(e):VH(e)),UH=()=>`Comment puis-je aider ?`,WH=()=>`How can I help?`,GH=((e={},t={})=>(t.locale??q())===`fr`?UH(e):WH(e)),KH=()=>`Conversation`,qH=()=>`Conversation`,JH=((e={},t={})=>(t.locale??q())===`fr`?KH(e):qH(e)),YH=e=>`Agent de cette conversation : ${e?.name}`,XH=e=>`Agent for this conversation: ${e?.name}`,ZH=((e,t={})=>(t.locale??q())===`fr`?YH(e):XH(e)),QH=()=>` (agent par défaut)`,$H=()=>` (default agent)`,eU=((e={},t={})=>(t.locale??q())===`fr`?QH(e):$H(e)),tU=()=>` — cet agent n’existe plus sur la gateway`,nU=()=>` — this agent no longer exists on the gateway`,rU=((e={},t={})=>(t.locale??q())===`fr`?tU(e):nU(e)),iU=()=>` — état non confirmé (gateway injoignable)`,aU=()=>` — state not confirmed (gateway unreachable)`,oU=((e={},t={})=>(t.locale??q())===`fr`?iU(e):aU(e)),sU=e=>`Instance : ${e?.instance}`,cU=e=>`Instance: ${e?.instance}`,lU=((e,t={})=>(t.locale??q())===`fr`?sU(e):cU(e)),uU=()=>`Modèle`,dU=()=>`Model`,fU=((e={},t={})=>(t.locale??q())===`fr`?uU(e):dU(e)),pU=e=>`Modèle · ${e?.provider}`,mU=e=>`Model · ${e?.provider}`,hU=((e,t={})=>(t.locale??q())===`fr`?pU(e):mU(e)),gU=()=>`Niveau de réflexion hérité de l’agent`,_U=()=>`Thinking level inherited from the agent`,vU=((e={},t={})=>(t.locale??q())===`fr`?gU(e):_U(e)),yU=()=>`Niveau de réflexion (spécifique à ce chat)`,bU=()=>`Thinking level (specific to this chat)`,xU=((e={},t={})=>(t.locale??q())===`fr`?yU(e):bU(e)),SU=()=>`Réflexion`,CU=()=>`Thinking`,wU=((e={},t={})=>(t.locale??q())===`fr`?SU(e):CU(e)),TU=()=>`héritée`,EU=()=>`inherited`,DU=((e={},t={})=>(t.locale??q())===`fr`?TU(e):EU(e)),OU=e=>`Contexte utilisé : ${e?.pct}% (${e?.used} / ${e?.total} tokens)`,kU=e=>`Context used: ${e?.pct}% (${e?.used} / ${e?.total} tokens)`,AU=((e,t={})=>(t.locale??q())===`fr`?OU(e):kU(e)),jU=()=>`Contexte`,MU=()=>`Context`,NU=((e={},t={})=>(t.locale??q())===`fr`?jU(e):MU(e)),PU=()=>`Exporter la conversation`,FU=()=>`Export the conversation`,IU=((e={},t={})=>(t.locale??q())===`fr`?PU(e):FU(e)),LU=()=>`Exporter`,RU=()=>`Export`,zU=((e={},t={})=>(t.locale??q())===`fr`?LU(e):RU(e)),BU=()=>`Markdown (.md)`,VU=()=>`Markdown (.md)`,HU=((e={},t={})=>(t.locale??q())===`fr`?BU(e):VU(e)),UU=()=>`JSON (.json)`,WU=()=>`JSON (.json)`,GU=((e={},t={})=>(t.locale??q())===`fr`?UU(e):WU(e)),KU=()=>`Réglages avancés (réflexion, modèle)`,qU=()=>`Advanced settings (thinking, model)`,JU=((e={},t={})=>(t.locale??q())===`fr`?KU(e):qU(e)),YU=()=>`Avancé`,XU=()=>`Advanced`,ZU=((e={},t={})=>(t.locale??q())===`fr`?YU(e):XU(e)),QU=()=>`Supprimer et régénérer cette réponse ?`,$U=()=>`Delete and regenerate this reply?`,eW=((e={},t={})=>(t.locale??q())===`fr`?QU(e):$U(e)),tW=()=>`Cette réponse sera supprimée, puis régénérée à partir de votre dernier message.`,nW=()=>`This reply will be deleted, then regenerated from your last message.`,rW=((e={},t={})=>(t.locale??q())===`fr`?tW(e):nW(e)),iW=()=>`Régénérer`,aW=()=>`Regenerate`,oW=((e={},t={})=>(t.locale??q())===`fr`?iW(e):aW(e)),sW=()=>`Annuler`,cW=()=>`Cancel`,lW=((e={},t={})=>(t.locale??q())===`fr`?sW(e):cW(e)),uW=()=>`Supprimer ce message et les suivants ?`,dW=()=>`Delete this message and the following ones?`,fW=((e={},t={})=>(t.locale??q())===`fr`?uW(e):dW(e)),pW=()=>`Ce message et tous les messages qui le suivent seront supprimés de la conversation. Cette action est irréversible.`,mW=()=>`This message and all messages following it will be deleted from the conversation. This action is irreversible.`,hW=((e={},t={})=>(t.locale??q())===`fr`?pW(e):mW(e)),gW=()=>`Supprimer`,_W=()=>`Delete`,vW=((e={},t={})=>(t.locale??q())===`fr`?gW(e):_W(e)),yW=()=>`Supprimer et régénérer la réponse`,bW=()=>`Delete and regenerate the reply`,xW=((e={},t={})=>(t.locale??q())===`fr`?yW(e):bW(e)),SW=()=>`Supprimer ce message et les suivants`,CW=()=>`Delete this message and the following ones`,wW=((e={},t={})=>(t.locale??q())===`fr`?SW(e):CW(e)),TW=()=>`Supprimer le message`,EW=()=>`Delete the message`,DW=((e={},t={})=>(t.locale??q())===`fr`?TW(e):EW(e)),OW=()=>`La suppression a échoué`,kW=()=>`Delete failed`,AW=((e={},t={})=>(t.locale??q())===`fr`?OW(e):kW(e)),jW=()=>`Sources`,MW=()=>`Sources`,NW=((e={},t={})=>(t.locale??q())===`fr`?jW(e):MW(e)),PW=()=>`1 souvenir`,FW=()=>`1 memory`,IW=((e={},t={})=>(t.locale??q())===`fr`?PW(e):FW(e)),LW=e=>`${e?.count} souvenirs`,RW=e=>`${e?.count} memories`,zW=((e,t={})=>(t.locale??q())===`fr`?LW(e):RW(e)),BW=()=>`1 document`,VW=()=>`1 document`,HW=((e={},t={})=>(t.locale??q())===`fr`?BW(e):VW(e)),UW=e=>`${e?.count} documents`,WW=e=>`${e?.count} documents`,GW=((e,t={})=>(t.locale??q())===`fr`?UW(e):WW(e)),KW=()=>`Mémoire conversationnelle`,qW=()=>`Conversational memory`,JW=((e={},t={})=>(t.locale??q())===`fr`?KW(e):qW(e)),YW=()=>`Documents`,XW=()=>`Documents`,ZW=((e={},t={})=>(t.locale??q())===`fr`?YW(e):XW(e)),QW=e=>`score ${e?.score}`,$W=e=>`score ${e?.score}`,eG=((e,t={})=>(t.locale??q())===`fr`?QW(e):$W(e)),tG=()=>`(sans titre)`,nG=()=>`(untitled)`,rG=((e={},t={})=>(t.locale??q())===`fr`?tG(e):nG(e)),iG=()=>`Sources de la réponse`,aG=()=>`Sources of the reply`,oG=((e={},t={})=>(t.locale??q())===`fr`?iG(e):aG(e)),sG=()=>`Voir les sources de la réponse`,cG=()=>`View the sources of the reply`,lG=((e={},t={})=>(t.locale??q())===`fr`?sG(e):cG(e)),uG=()=>`Rechercher dans les sources…`,dG=()=>`Search the sources…`,fG=((e={},t={})=>(t.locale??q())===`fr`?uG(e):dG(e)),pG=()=>`Aucune source ne correspond à votre recherche.`,mG=()=>`No source matches your search.`,hG=((e={},t={})=>(t.locale??q())===`fr`?pG(e):mG(e)),gG=()=>`Tout sélectionner`,_G=()=>`Select all`,vG=((e={},t={})=>(t.locale??q())===`fr`?gG(e):_G(e)),yG=e=>`${e?.count} document(s) sélectionné(s)`,bG=e=>`${e?.count} document(s) selected`,xG=((e,t={})=>(t.locale??q())===`fr`?yG(e):bG(e)),SG=()=>`Joindre les documents`,CG=()=>`Attach the documents`,wG=((e={},t={})=>(t.locale??q())===`fr`?SG(e):CG(e)),TG=()=>`Récupère les fichiers sources des documents cochés en liens téléchargeables (slot « Source d'origine »).`,EG=()=>`Fetches the checked documents' source files as downloadable links (the "Original source" slot).`,DG=((e={},t={})=>(t.locale??q())===`fr`?TG(e):EG(e)),OG=e=>`${e?.count} document(s) joint(s) téléchargeable(s) — ouvrir le panneau Sources`,kG=e=>`${e?.count} attached document(s) available for download — open the Sources panel`,AG=((e,t={})=>(t.locale??q())===`fr`?OG(e):kG(e)),jG=()=>`Source d'origine`,MG=()=>`Original source`,NG=((e={},t={})=>(t.locale??q())===`fr`?jG(e):MG(e)),PG=()=>`Aucun agent documentaire configuré`,FG=()=>`No documentary agent configured`,IG=((e={},t={})=>(t.locale??q())===`fr`?PG(e):FG(e)),LG=()=>`Récupération des documents en cours…`,RG=()=>`Fetching the documents…`,zG=((e={},t={})=>(t.locale??q())===`fr`?LG(e):RG(e)),BG=()=>`Récupération des documents lancée — voir le panneau Sources`,VG=()=>`Document fetch started — see the Sources panel`,HG=((e={},t={})=>(t.locale??q())===`fr`?BG(e):VG(e)),UG=()=>`Impossible de lancer la récupération des documents`,WG=()=>`Could not start the document fetch`,GG=((e={},t={})=>(t.locale??q())===`fr`?UG(e):WG(e)),KG=()=>`Récupération…`,qG=()=>`Fetching…`,JG=((e={},t={})=>(t.locale??q())===`fr`?KG(e):qG(e)),YG=()=>`Télécharger la source`,XG=()=>`Download the source`,ZG=((e={},t={})=>(t.locale??q())===`fr`?YG(e):XG(e)),QG=()=>`Source introuvable`,$G=()=>`Source not found`,eK=((e={},t={})=>(t.locale??q())===`fr`?QG(e):$G(e)),tK=()=>`Voir plus`,nK=()=>`Show more`,rK=((e={},t={})=>(t.locale??q())===`fr`?tK(e):nK(e)),iK=()=>`Voir moins`,aK=()=>`Show less`,oK=((e={},t={})=>(t.locale??q())===`fr`?iK(e):aK(e)),sK=()=>`Fermer le panneau des sources`,cK=()=>`Close the sources panel`,lK=((e={},t={})=>(t.locale??q())===`fr`?sK(e):cK(e)),uK=()=>`Redimensionner le panneau des sources`,dK=()=>`Resize the sources panel`,fK=((e={},t={})=>(t.locale??q())===`fr`?uK(e):dK(e)),pK=e=>`Source · texte brut exact · ${e?.count} caractère`,mK=e=>`Source · exact raw text · ${e?.count} character`,hK=((e,t={})=>(t.locale??q())===`fr`?pK(e):mK(e)),gK=e=>`Source · texte brut exact · ${e?.count} caractères`,_K=e=>`Source · exact raw text · ${e?.count} characters`,vK=((e,t={})=>(t.locale??q())===`fr`?gK(e):_K(e)),yK=()=>`Copier la source exacte`,bK=()=>`Copy the exact source`,xK=((e={},t={})=>(t.locale??q())===`fr`?yK(e):bK(e)),SK=()=>`(aucun texte)`,CK=()=>`(no text)`,wK=((e={},t={})=>(t.locale??q())===`fr`?SK(e):CK(e)),TK=()=>`Afficher le message rendu`,EK=()=>`Show the rendered message`,DK=((e={},t={})=>(t.locale??q())===`fr`?TK(e):EK(e)),OK=()=>`Afficher la source (texte brut exact)`,kK=()=>`Show the source (exact raw text)`,AK=((e={},t={})=>(t.locale??q())===`fr`?OK(e):kK(e)),jK=()=>`Afficher la source du message`,MK=()=>`Show the message source`,NK=((e={},t={})=>(t.locale??q())===`fr`?jK(e):MK(e)),PK=()=>`Copier le message`,FK=()=>`Copy the message`,IK=((e={},t={})=>(t.locale??q())===`fr`?PK(e):FK(e)),LK=()=>`Envoi…`,RK=()=>`Sending…`,zK=((e={},t={})=>(t.locale??q())===`fr`?LK(e):RK(e)),BK=e=>`${e?.name} traite votre message…`,VK=e=>`${e?.name} is processing your message…`,HK=((e,t={})=>(t.locale??q())===`fr`?BK(e):VK(e)),UK=e=>`L'agent ${e?.name} traite votre message…`,WK=e=>`The agent ${e?.name} is processing your message…`,GK=((e,t={})=>(t.locale??q())===`fr`?UK(e):WK(e)),KK=()=>`Copier la réponse`,qK=()=>`Copy the reply`,JK=((e={},t={})=>(t.locale??q())===`fr`?KK(e):qK(e)),YK=()=>`Chat indisponible…`,XK=()=>`Chat unavailable…`,ZK=((e={},t={})=>(t.locale??q())===`fr`?YK(e):XK(e)),QK=()=>`Message OpenClaw…`,$K=()=>`Message OpenClaw…`,eq=((e={},t={})=>(t.locale??q())===`fr`?QK(e):$K(e)),tq=()=>`Joindre un fichier`,nq=()=>`Attach a file`,rq=((e={},t={})=>(t.locale??q())===`fr`?tq(e):nq(e)),iq=()=>`échec`,aq=()=>`failed`,oq=((e={},t={})=>(t.locale??q())===`fr`?iq(e):aq(e)),sq=e=>`Téléversement du fichier… ${e?.percent}%`,cq=e=>`Uploading file… ${e?.percent}%`,lq=((e,t={})=>(t.locale??q())===`fr`?sq(e):cq(e)),uq=e=>`Téléversement de ${e?.count} fichiers… ${e?.percent}%`,dq=e=>`Uploading ${e?.count} files… ${e?.percent}%`,fq=((e,t={})=>(t.locale??q())===`fr`?uq(e):dq(e)),pq=()=>`Retirer la pièce jointe`,mq=()=>`Remove attachment`,hq=((e={},t={})=>(t.locale??q())===`fr`?pq(e):mq(e)),gq=()=>`Masquer l'activité des outils et revenir à la vue épurée`,_q=()=>`Hide tool activity and return to the clean view`,vq=((e={},t={})=>(t.locale??q())===`fr`?gq(e):_q(e)),yq=()=>`Afficher l'activité des outils (traitements réalisés et en cours)`,bq=()=>`Show tool activity (completed and in-progress processing)`,xq=((e={},t={})=>(t.locale??q())===`fr`?yq(e):bq(e)),Sq=()=>`Outils`,Cq=()=>`Tools`,wq=((e={},t={})=>(t.locale??q())===`fr`?Sq(e):Cq(e)),Tq=e=>`${e?.count} appel d'outil`,Eq=e=>`${e?.count} tool call`,Dq=((e,t={})=>(t.locale??q())===`fr`?Tq(e):Eq(e)),Oq=e=>`${e?.count} appels d'outils`,kq=e=>`${e?.count} tool calls`,Aq=((e,t={})=>(t.locale??q())===`fr`?Oq(e):kq(e)),jq=()=>`en cours`,Mq=()=>`running`,Nq=((e={},t={})=>(t.locale??q())===`fr`?jq(e):Mq(e)),Pq=()=>`terminé`,Fq=()=>`done`,Iq=((e={},t={})=>(t.locale??q())===`fr`?Pq(e):Fq(e)),Lq=()=>`Afficher le détail des appels d'outils`,Rq=()=>`Show tool call details`,zq=((e={},t={})=>(t.locale??q())===`fr`?Lq(e):Rq(e)),Bq=()=>`Masquer le détail des appels d'outils`,Vq=()=>`Hide tool call details`,Hq=((e={},t={})=>(t.locale??q())===`fr`?Bq(e):Vq(e)),Uq=()=>`Dictée vocale — bientôt disponible`,Wq=()=>`Voice dictation — coming soon`,Gq=((e={},t={})=>(t.locale??q())===`fr`?Uq(e):Wq(e)),Kq=()=>`Dictée vocale (bientôt disponible)`,qq=()=>`Voice dictation (coming soon)`,Jq=((e={},t={})=>(t.locale??q())===`fr`?Kq(e):qq(e)),Yq=()=>`Envoi indisponible (service de chat hors ligne)`,Xq=()=>`Sending unavailable (chat service offline)`,Zq=((e={},t={})=>(t.locale??q())===`fr`?Yq(e):Xq(e)),Qq=()=>`Envoyer`,$q=()=>`Send`,eJ=((e={},t={})=>(t.locale??q())===`fr`?Qq(e):$q(e)),tJ=()=>`Réponse en cours…`,nJ=()=>`Response in progress…`,rJ=((e={},t={})=>(t.locale??q())===`fr`?tJ(e):nJ(e)),iJ=()=>`Mettre en file (envoyé après la réponse en cours)`,aJ=()=>`Queue (sent after the current reply)`,oJ=((e={},t={})=>(t.locale??q())===`fr`?iJ(e):aJ(e)),sJ=()=>`Envoyer après la réponse en cours`,cJ=()=>`Send after the current reply`,lJ=((e={},t={})=>(t.locale??q())===`fr`?sJ(e):cJ(e)),uJ=()=>`Trop de messages en attente. Patientez la fin de la réponse en cours.`,dJ=()=>`Too many messages waiting. Wait for the current reply to finish.`,fJ=((e={},t={})=>(t.locale??q())===`fr`?uJ(e):dJ(e)),pJ=()=>`Impossible de mettre le message en file. Réessayez.`,mJ=()=>`Could not queue the message. Try again.`,hJ=((e={},t={})=>(t.locale??q())===`fr`?pJ(e):mJ(e)),gJ=()=>`Chargement…`,_J=()=>`Loading…`,vJ=((e={},t={})=>(t.locale??q())===`fr`?gJ(e):_J(e)),yJ=()=>`Configuration des intégrations.`,bJ=()=>`Integrations configuration.`,xJ=((e={},t={})=>(t.locale??q())===`fr`?yJ(e):bJ(e)),SJ=()=>`Aucune clé API ici`,CJ=()=>`No API key here`,wJ=((e={},t={})=>(t.locale??q())===`fr`?SJ(e):CJ(e)),TJ=()=>`— 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.`,EJ=()=>`— 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.`,DJ=((e={},t={})=>(t.locale??q())===`fr`?TJ(e):EJ(e)),OJ=()=>`actif`,kJ=()=>`active`,AJ=((e={},t={})=>(t.locale??q())===`fr`?OJ(e):kJ(e)),jJ=()=>`en pause`,MJ=()=>`paused`,NJ=((e={},t={})=>(t.locale??q())===`fr`?jJ(e):MJ(e)),PJ=()=>`clé manquante (env)`,FJ=()=>`key missing (env)`,IJ=((e={},t={})=>(t.locale??q())===`fr`?PJ(e):FJ(e)),LJ=()=>`appliqué par le bridge (à venir)`,RJ=()=>`applied by the bridge (coming soon)`,zJ=((e={},t={})=>(t.locale??q())===`fr`?LJ(e):RJ(e)),BJ=()=>`Export des traces. Clés : LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY (env).`,VJ=()=>`Trace export. Keys: LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY (env).`,HJ=((e={},t={})=>(t.locale??q())===`fr`?BJ(e):VJ(e)),UJ=()=>`Export des traces. Clé : OPIK_API_KEY (env).`,WJ=()=>`Trace export. Key: OPIK_API_KEY (env).`,GJ=((e={},t={})=>(t.locale??q())===`fr`?UJ(e):WJ(e)),KJ=()=>`Host`,qJ=()=>`Host`,JJ=((e={},t={})=>(t.locale??q())===`fr`?KJ(e):qJ(e)),YJ=()=>`Base URL`,XJ=()=>`Base URL`,ZJ=((e={},t={})=>(t.locale??q())===`fr`?YJ(e):XJ(e)),QJ=()=>`Workspace`,$J=()=>`Workspace`,eY=((e={},t={})=>(t.locale??q())===`fr`?QJ(e):$J(e)),tY=()=>`(défaut serveur)`,nY=()=>`(server default)`,rY=((e={},t={})=>(t.locale??q())===`fr`?tY(e):nY(e)),iY=()=>`Activé (expédition des traces)`,aY=()=>`Enabled (trace shipping)`,oY=((e={},t={})=>(t.locale??q())===`fr`?iY(e):aY(e)),sY=()=>`Synthèse vocale (TTS)`,cY=()=>`Text-to-speech (TTS)`,lY=((e={},t={})=>(t.locale??q())===`fr`?sY(e):cY(e)),uY=()=>`Lecture audio des réponses. Clé du provider via env (ex. OPENAI_API_KEY, ELEVENLABS_API_KEY).`,dY=()=>`Audio playback of replies. Provider key via env (e.g. OPENAI_API_KEY, ELEVENLABS_API_KEY).`,fY=((e={},t={})=>(t.locale??q())===`fr`?uY(e):dY(e)),pY=()=>`Mode auto`,mY=()=>`Auto mode`,hY=((e={},t={})=>(t.locale??q())===`fr`?pY(e):mY(e)),gY=()=>`Désactivé`,_Y=()=>`Disabled`,vY=((e={},t={})=>(t.locale??q())===`fr`?gY(e):_Y(e)),yY=()=>`Toujours`,bY=()=>`Always`,xY=((e={},t={})=>(t.locale??q())===`fr`?yY(e):bY(e)),SY=()=>`Après un message vocal`,CY=()=>`After a voice message`,wY=((e={},t={})=>(t.locale??q())===`fr`?SY(e):CY(e)),TY=()=>`Sur directive [[tts:…]]`,EY=()=>`On [[tts:…]] directive`,DY=((e={},t={})=>(t.locale??q())===`fr`?TY(e):EY(e)),OY=()=>`Provider`,kY=()=>`Provider`,AY=((e={},t={})=>(t.locale??q())===`fr`?OY(e):kY(e)),jY=()=>`Microsoft (sans clé)`,MY=()=>`Microsoft (no key)`,NY=((e={},t={})=>(t.locale??q())===`fr`?jY(e):MY(e)),PY=()=>`Modèle`,FY=()=>`Model`,IY=((e={},t={})=>(t.locale??q())===`fr`?PY(e):FY(e)),LY=()=>`Voix`,RY=()=>`Voice`,zY=((e={},t={})=>(t.locale??q())===`fr`?LY(e):RY(e)),BY=()=>`speakerVoiceId / nom de voix`,VY=()=>`speakerVoiceId / voice name`,HY=((e={},t={})=>(t.locale??q())===`fr`?BY(e):VY(e)),UY=()=>`Mode conversation (Talk / STS)`,WY=()=>`Conversation mode (Talk / STS)`,GY=((e={},t={})=>(t.locale??q())===`fr`?UY(e):WY(e)),KY=()=>`OpenAI realtime : OPENAI_API_KEY présent (env). Le navigateur recevra un jeton éphémère minté côté serveur — jamais la clé brute.`,qY=()=>`OpenAI realtime: OPENAI_API_KEY present (env). The browser will receive an ephemeral token minted server-side — never the raw key.`,JY=((e={},t={})=>(t.locale??q())===`fr`?KY(e):qY(e)),YY=()=>`OpenAI realtime : OPENAI_API_KEY ABSENT (env). À définir côté déploiement pour activer gpt-realtime.`,XY=()=>`OpenAI realtime: OPENAI_API_KEY ABSENT (env). To be set on the deployment side to enable gpt-realtime.`,ZY=((e={},t={})=>(t.locale??q())===`fr`?YY(e):XY(e)),QY=()=>`Activer le mode conversation`,$Y=()=>`Enable conversation mode`,eX=((e={},t={})=>(t.locale??q())===`fr`?QY(e):$Y(e)),tX=()=>`Provider realtime`,nX=()=>`Realtime provider`,rX=((e={},t={})=>(t.locale??q())===`fr`?tX(e):nX(e)),iX=()=>`Modèle realtime`,aX=()=>`Realtime model`,oX=((e={},t={})=>(t.locale??q())===`fr`?iX(e):aX(e)),sX=()=>`Transport`,cX=()=>`Transport`,lX=((e={},t={})=>(t.locale??q())===`fr`?sX(e):cX(e)),uX=()=>`WebRTC (navigateur)`,dX=()=>`WebRTC (browser)`,fX=((e={},t={})=>(t.locale??q())===`fr`?uX(e):dX(e)),pX=()=>`Locale`,mX=()=>`Locale`,hX=((e={},t={})=>(t.locale??q())===`fr`?pX(e):mX(e)),gX=()=>`Interrompre la lecture quand l'utilisateur parle`,_X=()=>`Interrupt playback when the user speaks`,vX=((e={},t={})=>(t.locale??q())===`fr`?gX(e):_X(e)),yX=()=>`Voice wake (mot d'activation)`,bX=()=>`Voice wake (wake word)`,xX=((e={},t={})=>(t.locale??q())===`fr`?yX(e):bX(e)),SX=()=>`non câblable dans le navigateur`,CX=()=>`not wireable in the browser`,wX=((e={},t={})=>(t.locale??q())===`fr`?SX(e):CX(e)),TX=()=>`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`,EX=()=>`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`,DX=((e={},t={})=>(t.locale??q())===`fr`?TX(e):EX(e)),OX=()=>`Curseurs d'expédition`,kX=()=>`Shipping cursors`,AX=((e={},t={})=>(t.locale??q())===`fr`?OX(e):kX(e)),jX=()=>`Aucun curseur — aucune trace n'a encore été expédiée.`,MX=()=>`No cursor — no trace has been shipped yet.`,NX=((e={},t={})=>(t.locale??q())===`fr`?jX(e):MX(e)),PX=()=>`Vendeur`,FX=()=>`Vendor`,IX=((e={},t={})=>(t.locale??q())===`fr`?PX(e):FX(e)),LX=()=>`Dernier envoi`,RX=()=>`Last send`,zX=((e={},t={})=>(t.locale??q())===`fr`?LX(e):RX(e)),BX=()=>`Échecs consécutifs`,VX=()=>`Consecutive failures`,HX=((e={},t={})=>(t.locale??q())===`fr`?BX(e):VX(e)),UX=()=>`Dernier statut HTTP`,WX=()=>`Last HTTP status`,GX=((e={},t={})=>(t.locale??q())===`fr`?UX(e):WX(e)),KX=()=>`Dernière erreur`,qX=()=>`Last error`,JX=((e={},t={})=>(t.locale??q())===`fr`?KX(e):qX(e)),YX=()=>`Mots modifiés / altérés`,XX=()=>`Modified / altered words`,ZX=((e={},t={})=>(t.locale??q())===`fr`?YX(e):XX(e)),QX=()=>`Réponse incorrecte`,$X=()=>`Incorrect answer`,eZ=((e={},t={})=>(t.locale??q())===`fr`?QX(e):$X(e)),tZ=()=>`Incohérence`,nZ=()=>`Inconsistency`,rZ=((e={},t={})=>(t.locale??q())===`fr`?tZ(e):nZ(e)),iZ=()=>`Formatage`,aZ=()=>`Formatting`,oZ=((e={},t={})=>(t.locale??q())===`fr`?iZ(e):aZ(e)),sZ=()=>`Latence`,cZ=()=>`Latency`,lZ=((e={},t={})=>(t.locale??q())===`fr`?sZ(e):cZ(e)),uZ=()=>`Erreur API`,dZ=()=>`API error`,fZ=((e={},t={})=>(t.locale??q())===`fr`?uZ(e):dZ(e)),pZ=()=>`Autre`,mZ=()=>`Other`,hZ=((e={},t={})=>(t.locale??q())===`fr`?pZ(e):mZ(e)),gZ=()=>`reçu = stocké`,_Z=()=>`received = stored`,vZ=((e={},t={})=>(t.locale??q())===`fr`?gZ(e):_Z(e)),yZ=()=>`affichage fidèle ✓`,bZ=()=>`faithful display ✓`,xZ=((e={},t={})=>(t.locale??q())===`fr`?yZ(e):bZ(e)),SZ=()=>`écart ⚠`,CZ=()=>`mismatch ⚠`,wZ=((e={},t={})=>(t.locale??q())===`fr`?SZ(e):CZ(e)),TZ=()=>`régénération`,EZ=()=>`regeneration`,DZ=((e={},t={})=>(t.locale??q())===`fr`?TZ(e):EZ(e)),OZ=()=>`Commentaire du rapporteur`,kZ=()=>`Reporter's comment`,AZ=((e={},t={})=>(t.locale??q())===`fr`?OZ(e):kZ(e)),jZ=()=>`Échange avec l'utilisateur`,MZ=()=>`Exchange with the user`,NZ=((e={},t={})=>(t.locale??q())===`fr`?jZ(e):MZ(e)),PZ=()=>`Administrateur`,FZ=()=>`Administrator`,IZ=((e={},t={})=>(t.locale??q())===`fr`?PZ(e):FZ(e)),LZ=()=>`Utilisateur`,RZ=()=>`User`,zZ=((e={},t={})=>(t.locale??q())===`fr`?LZ(e):RZ(e)),BZ=()=>`Aucune réponse envoyée.`,VZ=()=>`No reply sent.`,HZ=((e={},t={})=>(t.locale??q())===`fr`?BZ(e):VZ(e)),UZ=()=>`Répondre à l'utilisateur (visible dans sa zone de notification)…`,WZ=()=>`Reply to the user (visible in their notification area)…`,GZ=((e={},t={})=>(t.locale??q())===`fr`?UZ(e):WZ(e)),KZ=()=>`Envoi…`,hfe=()=>`Sending…`,gfe=((e={},t={})=>(t.locale??q())===`fr`?KZ(e):hfe(e)),_fe=()=>`Répondre`,vfe=()=>`Reply`,yfe=((e={},t={})=>(t.locale??q())===`fr`?_fe(e):vfe(e)),bfe=()=>`Texte stocké (serveur, autoritatif)`,xfe=()=>`Stored text (server, authoritative)`,Sfe=((e={},t={})=>(t.locale??q())===`fr`?bfe(e):xfe(e)),Cfe=()=>`(vide)`,wfe=()=>`(empty)`,qZ=((e={},t={})=>(t.locale??q())===`fr`?Cfe(e):wfe(e)),Tfe=()=>`Texte affiché (navigateur, au signalement)`,Efe=()=>`Displayed text (browser, at report time)`,Dfe=((e={},t={})=>(t.locale??q())===`fr`?Tfe(e):Efe(e)),Ofe=()=>`Prompt générateur`,kfe=()=>`Generator prompt`,Afe=((e={},t={})=>(t.locale??q())===`fr`?Ofe(e):kfe(e)),jfe=e=>`Contexte figé (${e?.count} tours${e?.truncated})`,Mfe=e=>`Frozen context (${e?.count} turns${e?.truncated})`,Nfe=((e,t={})=>(t.locale??q())===`fr`?jfe(e):Mfe(e)),Pfe=()=>`, tronqué`,Ffe=()=>`, truncated`,Ife=((e={},t={})=>(t.locale??q())===`fr`?Pfe(e):Ffe(e)),Lfe=()=>`Payload dispatché (outbox)`,Rfe=()=>`Dispatched payload (outbox)`,zfe=((e={},t={})=>(t.locale??q())===`fr`?Lfe(e):Rfe(e)),Bfe=()=>`Extensions de correction détectées (peuvent altérer le texte)`,Vfe=()=>`Correction extensions detected (may alter the text)`,Hfe=((e={},t={})=>(t.locale??q())===`fr`?Bfe(e):Vfe(e)),Ufe=()=>`Environnement client`,Wfe=()=>`Client environment`,Gfe=((e={},t={})=>(t.locale??q())===`fr`?Ufe(e):Wfe(e)),Kfe=e=>`thème ${e?.theme}`,qfe=e=>`theme ${e?.theme}`,Jfe=((e,t={})=>(t.locale??q())===`fr`?Kfe(e):qfe(e)),Yfe=()=>`Plugins :`,Xfe=()=>`Plugins:`,Zfe=((e={},t={})=>(t.locale??q())===`fr`?Yfe(e):Xfe(e)),Qfe=()=>`(navigator.plugins — neutralisé/partiel dans les navigateurs modernes)`,$fe=()=>`(navigator.plugins — neutralized/partial in modern browsers)`,epe=((e={},t={})=>(t.locale??q())===`fr`?Qfe(e):$fe(e)),tpe=()=>`Signalements « Report Feedback » enregistrés. La liste est en métadonnées ; ouvrir le détail lit le contenu figé et`,npe=()=>`Recorded "Report Feedback" reports. The list shows metadata; opening the detail reads the frozen content and`,rpe=((e={},t={})=>(t.locale??q())===`fr`?tpe(e):npe(e)),ipe=()=>`trace cet accès dans l'Audit`,ape=()=>`traces this access in the Audit`,ope=((e={},t={})=>(t.locale??q())===`fr`?ipe(e):ape(e)),spe=()=>`(lecture de contenu d'un autre utilisateur). Fenêtre récente bornée.`,cpe=()=>`(reading another user's content). Bounded recent window.`,lpe=((e={},t={})=>(t.locale??q())===`fr`?spe(e):cpe(e)),upe=()=>`Signalements`,dpe=()=>`Reports`,fpe=((e={},t={})=>(t.locale??q())===`fr`?upe(e):dpe(e)),ppe=()=>`Aucun signalement pour l'instant.`,mpe=()=>`No reports yet.`,hpe=((e={},t={})=>(t.locale??q())===`fr`?ppe(e):mpe(e)),gpe=()=>`Quand`,_pe=()=>`When`,vpe=((e={},t={})=>(t.locale??q())===`fr`?gpe(e):_pe(e)),ype=()=>`Catégorie`,bpe=()=>`Category`,xpe=((e={},t={})=>(t.locale??q())===`fr`?ype(e):bpe(e)),Spe=()=>`Type`,Cpe=()=>`Type`,wpe=((e={},t={})=>(t.locale??q())===`fr`?Spe(e):Cpe(e)),Tpe=()=>`user`,Epe=()=>`user`,Dpe=((e={},t={})=>(t.locale??q())===`fr`?Tpe(e):Epe(e)),Ope=()=>`AI`,kpe=()=>`AI`,Ape=((e={},t={})=>(t.locale??q())===`fr`?Ope(e):kpe(e)),jpe=()=>`Rapporteur`,Mpe=()=>`Reporter`,Npe=((e={},t={})=>(t.locale??q())===`fr`?jpe(e):Mpe(e)),Ppe=e=>`(via ${e?.operator})`,Fpe=e=>`(via ${e?.operator})`,Ipe=((e,t={})=>(t.locale??q())===`fr`?Ppe(e):Fpe(e)),Lpe=()=>`Fidélité`,Rpe=()=>`Fidelity`,zpe=((e={},t={})=>(t.locale??q())===`fr`?Lpe(e):Rpe(e)),Bpe=()=>`Note`,Vpe=()=>`Note`,Hpe=((e={},t={})=>(t.locale??q())===`fr`?Bpe(e):Vpe(e)),Upe=()=>`Statut`,Wpe=()=>`Status`,Gpe=((e={},t={})=>(t.locale??q())===`fr`?Upe(e):Wpe(e)),Kpe=()=>`Répondu`,qpe=()=>`Answered`,Jpe=((e={},t={})=>(t.locale??q())===`fr`?Kpe(e):qpe(e)),Ype=()=>`En attente`,Xpe=()=>`Pending`,Zpe=((e={},t={})=>(t.locale??q())===`fr`?Ype(e):Xpe(e)),Qpe=()=>`Clos par l'utilisateur`,$pe=()=>`Closed by user`,eme=((e={},t={})=>(t.locale??q())===`fr`?Qpe(e):$pe(e)),tme=()=>`Raison de clôture`,nme=()=>`Close reason`,rme=((e={},t={})=>(t.locale??q())===`fr`?tme(e):nme(e)),ime=()=>`Masquer`,ame=()=>`Hide`,ome=((e={},t={})=>(t.locale??q())===`fr`?ime(e):ame(e)),sme=()=>`Voir le détail`,cme=()=>`View detail`,lme=((e={},t={})=>(t.locale??q())===`fr`?sme(e):cme(e)),ume=()=>`Supprimer`,dme=()=>`Delete`,fme=((e={},t={})=>(t.locale??q())===`fr`?ume(e):dme(e)),pme=()=>`Supprimer ce signalement ?`,mme=()=>`Delete this report?`,hme=((e={},t={})=>(t.locale??q())===`fr`?pme(e):mme(e)),gme=()=>`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.`,vme=((e={},t={})=>(t.locale??q())===`fr`?gme(e):_me(e)),yme=()=>`Supprimer`,bme=()=>`Delete`,xme=((e={},t={})=>(t.locale??q())===`fr`?yme(e):bme(e)),Sme=()=>`Aucun onglet`,Cme=()=>`No tabs`,wme=((e={},t={})=>(t.locale??q())===`fr`?Sme(e):Cme(e)),Tme=e=>`${e?.count} onglets`,Eme=e=>`${e?.count} tabs`,Dme=((e,t={})=>(t.locale??q())===`fr`?Tme(e):Eme(e)),Ome=()=>`Onglets Settings autorisés`,kme=()=>`Allowed Settings tabs`,Ame=((e={},t={})=>(t.locale??q())===`fr`?Ome(e):kme(e)),jme=()=>`Changement de rôle refusé`,Mme=()=>`Role change refused`,Nme=((e={},t={})=>(t.locale??q())===`fr`?jme(e):Mme(e)),Pme=()=>`Mise à jour des permissions refusée`,Fme=()=>`Permission update refused`,Ime=((e={},t={})=>(t.locale??q())===`fr`?Pme(e):Fme(e)),Lme=()=>`Rechercher (email, nom)`,Rme=()=>`Search (email, name)`,zme=((e={},t={})=>(t.locale??q())===`fr`?Lme(e):Rme(e)),Bme=()=>`Tous les rôles`,Vme=()=>`All roles`,Hme=((e={},t={})=>(t.locale??q())===`fr`?Bme(e):Vme(e)),Ume=()=>`Utilisateurs`,Wme=()=>`Users`,Gme=((e={},t={})=>(t.locale??q())===`fr`?Ume(e):Wme(e)),Kme=()=>`Aucun utilisateur.`,qme=()=>`No users.`,Jme=((e={},t={})=>(t.locale??q())===`fr`?Kme(e):qme(e)),Yme=()=>`Voir comme cet utilisateur`,Xme=()=>`View as this user`,Zme=((e={},t={})=>(t.locale??q())===`fr`?Yme(e):Xme(e)),Qme=()=>`Supprimer l’utilisateur`,$me=()=>`Delete user`,ehe=((e={},t={})=>(t.locale??q())===`fr`?Qme(e):$me(e)),the=()=>`Supprimer cet utilisateur ?`,nhe=()=>`Delete this user?`,rhe=((e={},t={})=>(t.locale??q())===`fr`?the(e):nhe(e)),ihe=e=>`« ${e?.user} » et toutes ses données (conversations, fichiers, accès) seront définitivement supprimés. Cette action est irréversible.`,ahe=e=>`“${e?.user}” and all their data (conversations, files, access) will be permanently deleted. This action cannot be undone.`,ohe=((e,t={})=>(t.locale??q())===`fr`?ihe(e):ahe(e)),she=()=>`SUPPRIMER`,che=()=>`DELETE`,lhe=((e={},t={})=>(t.locale??q())===`fr`?she(e):che(e)),uhe=()=>`Supprimer définitivement`,dhe=()=>`Delete permanently`,fhe=((e={},t={})=>(t.locale??q())===`fr`?uhe(e):dhe(e)),phe=()=>`Suppression de l’utilisateur refusée`,mhe=()=>`User deletion refused`,hhe=((e={},t={})=>(t.locale??q())===`fr`?phe(e):mhe(e)),ghe=e=>`Utilisateur « ${e?.user} » supprimé.`,_he=e=>`User “${e?.user}” deleted.`,vhe=((e,t={})=>(t.locale??q())===`fr`?ghe(e):_he(e)),yhe=()=>`Renommer`,bhe=()=>`Rename`,xhe=((e={},t={})=>(t.locale??q())===`fr`?yhe(e):bhe(e)),She=()=>`Renommer l’utilisateur`,Che=()=>`Rename user`,whe=((e={},t={})=>(t.locale??q())===`fr`?She(e):Che(e)),The=e=>`Nom affiché pour « ${e?.user} »`,Ehe=e=>`Display name for “${e?.user}”`,Dhe=((e,t={})=>(t.locale??q())===`fr`?The(e):Ehe(e)),Ohe=()=>`Nom et prénom`,khe=()=>`Name`,Ahe=((e={},t={})=>(t.locale??q())===`fr`?Ohe(e):khe(e)),jhe=()=>`Nom mis à jour.`,Mhe=()=>`Name updated.`,Nhe=((e={},t={})=>(t.locale??q())===`fr`?jhe(e):Mhe(e)),Phe=()=>`Renommage refusé`,Fhe=()=>`Rename refused`,Ihe=((e={},t={})=>(t.locale??q())===`fr`?Phe(e):Fhe(e)),Lhe=()=>`Utilisateur`,Rhe=()=>`User`,zhe=((e={},t={})=>(t.locale??q())===`fr`?Lhe(e):Rhe(e)),Bhe=()=>`Rôle`,Vhe=()=>`Role`,Hhe=((e={},t={})=>(t.locale??q())===`fr`?Bhe(e):Vhe(e)),Uhe=()=>`Accès Settings`,Whe=()=>`Settings access`,Ghe=((e={},t={})=>(t.locale??q())===`fr`?Uhe(e):Whe(e)),Khe=()=>`Tous (admin)`,qhe=()=>`All (admin)`,Jhe=((e={},t={})=>(t.locale??q())===`fr`?Khe(e):qhe(e)),Yhe=()=>`Agents`,Xhe=()=>`Agents`,JZ=((e={},t={})=>(t.locale??q())===`fr`?Yhe(e):Xhe(e)),Zhe=()=>`Gérer les agents`,Qhe=()=>`Manage agents`,YZ=((e={},t={})=>(t.locale??q())===`fr`?Zhe(e):Qhe(e)),$he=()=>`Échec de l’enregistrement de l’instance`,ege=()=>`Failed to save instance`,tge=((e={},t={})=>(t.locale??q())===`fr`?$he(e):ege(e)),nge=()=>`Les agents sont `,rge=()=>`Agents are `,ige=((e={},t={})=>(t.locale??q())===`fr`?nge(e):rge(e)),age=()=>`découverts par le bridge`,oge=()=>`discovered by the bridge`,sge=((e={},t={})=>(t.locale??q())===`fr`?age(e):oge(e)),cge=()=>` (jamais saisis à la main). Les identifiants gateway (token, device, clé API) se configurent par instance via « Identifiants » — chiffrés au repos.`,lge=()=>` (never entered by hand). Gateway credentials (token, device identity, API key) are set per instance via “Credentials” — encrypted at rest.`,uge=((e={},t={})=>(t.locale??q())===`fr`?cge(e):lge(e)),dge=()=>`Instances`,fge=()=>`Instances`,pge=((e={},t={})=>(t.locale??q())===`fr`?dge(e):fge(e)),mge=()=>`Ajouter une instance`,hge=()=>`Add instance`,gge=((e={},t={})=>(t.locale??q())===`fr`?mge(e):hge(e)),_ge=()=>`Aucune instance.`,vge=()=>`No instances.`,yge=((e={},t={})=>(t.locale??q())===`fr`?_ge(e):vge(e)),bge=()=>`Nom`,xge=()=>`Name`,Sge=((e={},t={})=>(t.locale??q())===`fr`?bge(e):xge(e)),Cge=()=>`Bridge`,wge=()=>`Bridge`,Tge=((e={},t={})=>(t.locale??q())===`fr`?Cge(e):wge(e)),Ege=()=>`Gateway URL`,Dge=()=>`Gateway URL`,Oge=((e={},t={})=>(t.locale??q())===`fr`?Ege(e):Dge(e)),kge=()=>`Affichage`,Age=()=>`Display`,jge=((e={},t={})=>(t.locale??q())===`fr`?kge(e):Age(e)),Mge=()=>`Configurer le bridge`,Nge=()=>`Configure bridge`,Pge=((e={},t={})=>(t.locale??q())===`fr`?Mge(e):Nge(e)),Fge=()=>`Supprimer`,Ige=()=>`Delete`,XZ=((e={},t={})=>(t.locale??q())===`fr`?Fge(e):Ige(e)),Lge=()=>`Nouvelle instance`,Rge=()=>`New instance`,zge=((e={},t={})=>(t.locale??q())===`fr`?Lge(e):Rge(e)),Bge=()=>`Modifier`,Vge=()=>`Edit`,Hge=((e={},t={})=>(t.locale??q())===`fr`?Bge(e):Vge(e)),Uge=()=>`Modifier l'instance`,Wge=()=>`Edit instance`,Gge=((e={},t={})=>(t.locale??q())===`fr`?Uge(e):Wge(e)),Kge=()=>`Le nom est la clé de routage et ne peut pas être modifié après création.`,qge=()=>`The name is the routing key and can't be changed after creation.`,Jge=((e={},t={})=>(t.locale??q())===`fr`?Kge(e):qge(e)),Yge=()=>`Métadonnées non-secrètes.`,Xge=()=>`Non-secret metadata.`,Zge=((e={},t={})=>(t.locale??q())===`fr`?Yge(e):Xge(e)),Qge=()=>`Enregistrer`,$ge=()=>`Save`,ZZ=((e={},t={})=>(t.locale??q())===`fr`?Qge(e):$ge(e)),e_e=()=>`Nom de l’instance (ex. main)`,t_e=()=>`Instance name (e.g. main)`,n_e=((e={},t={})=>(t.locale??q())===`fr`?e_e(e):t_e(e)),r_e=()=>`Technologie (bridge)`,i_e=()=>`Technology (bridge)`,a_e=((e={},t={})=>(t.locale??q())===`fr`?r_e(e):i_e(e)),o_e=()=>`Gateway URL (ws(s)://)`,s_e=()=>`Gateway URL (ws(s)://)`,c_e=((e={},t={})=>(t.locale??q())===`fr`?o_e(e):s_e(e)),l_e=()=>`URL du bridge (optionnel)`,u_e=()=>`Bridge URL (optional)`,d_e=((e={},t={})=>(t.locale??q())===`fr`?l_e(e):u_e(e)),f_e=()=>`http://bridge-host:8787 — sinon BRIDGE_URL`,p_e=()=>`http://bridge-host:8787 — falls back to BRIDGE_URL`,m_e=((e={},t={})=>(t.locale??q())===`fr`?f_e(e):p_e(e)),h_e=()=>`Nom affiché (optionnel)`,g_e=()=>`Display name (optional)`,__e=((e={},t={})=>(t.locale??q())===`fr`?h_e(e):g_e(e)),v_e=()=>`Version de la gateway (optionnel)`,y_e=()=>`Gateway version (optional)`,b_e=((e={},t={})=>(t.locale??q())===`fr`?v_e(e):y_e(e)),x_e=()=>`ex. 2026.6.5 — repli de compatibilité`,S_e=()=>`e.g. 2026.6.5 — compat fallback`,C_e=((e={},t={})=>(t.locale??q())===`fr`?x_e(e):S_e(e)),w_e=()=>`URL HTTP média (optionnel)`,T_e=()=>`Media HTTP URL (optional)`,E_e=((e={},t={})=>(t.locale??q())===`fr`?w_e(e):T_e(e)),D_e=()=>`Seulement si le média est servi sur un autre hôte/port`,O_e=()=>`Only if media is served on another host/port`,k_e=((e={},t={})=>(t.locale??q())===`fr`?D_e(e):O_e(e)),A_e=()=>`Identifiants`,j_e=()=>`Credentials`,M_e=((e={},t={})=>(t.locale??q())===`fr`?A_e(e):j_e(e)),N_e=e=>`Identifiants de la gateway — instance « ${e?.instance} »`,P_e=e=>`Gateway credentials — instance « ${e?.instance} »`,F_e=((e,t={})=>(t.locale??q())===`fr`?N_e(e):P_e(e)),I_e=()=>`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.`,L_e=()=>`Stored encrypted at rest. Write-only: a value is never shown again — set or replace it, or clear it.`,R_e=((e={},t={})=>(t.locale??q())===`fr`?I_e(e):L_e(e)),z_e=()=>`Jeton opérateur`,B_e=()=>`Operator token`,V_e=((e={},t={})=>(t.locale??q())===`fr`?z_e(e):B_e(e)),H_e=()=>`Identité d'appareil (JSON Ed25519)`,U_e=()=>`Device identity (Ed25519 JSON)`,W_e=((e={},t={})=>(t.locale??q())===`fr`?H_e(e):U_e(e)),G_e=()=>`Clé API`,K_e=()=>`API key`,q_e=((e={},t={})=>(t.locale??q())===`fr`?G_e(e):K_e(e)),J_e=()=>`Configuré`,Y_e=()=>`Configured`,QZ=((e={},t={})=>(t.locale??q())===`fr`?J_e(e):Y_e(e)),X_e=()=>`Non défini`,Z_e=()=>`Not set`,$Z=((e={},t={})=>(t.locale??q())===`fr`?X_e(e):Z_e(e)),Q_e=()=>`Saisir la valeur…`,$_e=()=>`Enter value…`,eve=((e={},t={})=>(t.locale??q())===`fr`?Q_e(e):$_e(e)),tve=()=>`Remplacer la valeur…`,nve=()=>`Replace value…`,rve=((e={},t={})=>(t.locale??q())===`fr`?tve(e):nve(e)),ive=()=>`Définir`,ave=()=>`Set`,ove=((e={},t={})=>(t.locale??q())===`fr`?ive(e):ave(e)),sve=()=>`Effacer`,cve=()=>`Clear`,lve=((e={},t={})=>(t.locale??q())===`fr`?sve(e):cve(e)),uve=()=>`Identifiant enregistré`,dve=()=>`Credential saved`,fve=((e={},t={})=>(t.locale??q())===`fr`?uve(e):dve(e)),pve=()=>`Impossible d'enregistrer l'identifiant`,mve=()=>`Could not save the credential`,eQ=((e={},t={})=>(t.locale??q())===`fr`?pve(e):mve(e)),hve=()=>`Identifiant effacé`,gve=()=>`Credential cleared`,_ve=((e={},t={})=>(t.locale??q())===`fr`?hve(e):gve(e)),vve=()=>`Générer`,yve=()=>`Generate`,bve=((e={},t={})=>(t.locale??q())===`fr`?vve(e):yve(e)),xve=()=>`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.`,Sve=()=>`Mints an Ed25519 identity server-side (the private key never reaches the browser) and saves it. You'll then pair it on the gateway.`,Cve=((e={},t={})=>(t.locale??q())===`fr`?xve(e):Sve(e)),wve=()=>`Identité générée et enregistrée`,Tve=()=>`Device identity generated and saved`,tQ=((e={},t={})=>(t.locale??q())===`fr`?wve(e):Tve(e)),Eve=()=>`Appairez cet appareil sur votre gateway avec :`,Dve=()=>`Pair this device on your gateway with:`,Ove=((e={},t={})=>(t.locale??q())===`fr`?Eve(e):Dve(e)),kve=()=>`Impossible de générer l'identité d'appareil`,Ave=()=>`Could not generate the device identity`,jve=((e={},t={})=>(t.locale??q())===`fr`?kve(e):Ave(e)),Mve=()=>`Synchroniser maintenant`,Nve=()=>`Sync now`,Pve=((e={},t={})=>(t.locale??q())===`fr`?Mve(e):Nve(e)),Fve=()=>`Synchronisation…`,Ive=()=>`Syncing…`,Lve=((e={},t={})=>(t.locale??q())===`fr`?Fve(e):Ive(e)),Rve=()=>`Synchronisation effectuée`,zve=()=>`Synced`,Bve=((e={},t={})=>(t.locale??q())===`fr`?Rve(e):zve(e)),Vve=()=>`Échec de la synchronisation`,Hve=()=>`Sync failed`,nQ=((e={},t={})=>(t.locale??q())===`fr`?Vve(e):Hve(e)),Uve=()=>`Aucun agent récupéré — appairez l'appareil sur la gateway (ou vérifiez la configuration de l'instance), puis re-synchronisez`,Wve=()=>`No agents retrieved — pair the device on the gateway (or check the instance configuration), then sync again`,Gve=((e={},t={})=>(t.locale??q())===`fr`?Uve(e):Wve(e)),Kve=()=>`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é.`,qve=()=>`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.`,Jve=((e={},t={})=>(t.locale??q())===`fr`?Kve(e):qve(e)),Yve=()=>`Secret du bridge (bridge → Convex)`,Xve=()=>`Bridge secret (bridge → Convex)`,Zve=((e={},t={})=>(t.locale??q())===`fr`?Yve(e):Xve(e)),Qve=()=>`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.`,$ve=()=>`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.`,eye=((e={},t={})=>(t.locale??q())===`fr`?Qve(e):$ve(e)),tye=()=>`Générer`,nye=()=>`Generate`,rye=((e={},t={})=>(t.locale??q())===`fr`?tye(e):nye(e)),iye=()=>`Régénérer`,aye=()=>`Regenerate`,oye=((e={},t={})=>(t.locale??q())===`fr`?iye(e):aye(e)),sye=()=>`Révoquer`,cye=()=>`Revoke`,lye=((e={},t={})=>(t.locale??q())===`fr`?sye(e):cye(e)),uye=()=>`Secret du bridge révoqué`,dye=()=>`Bridge secret revoked`,fye=((e={},t={})=>(t.locale??q())===`fr`?uye(e):dye(e)),pye=()=>`Impossible de générer le secret du bridge`,mye=()=>`Could not generate the bridge secret`,rQ=((e={},t={})=>(t.locale??q())===`fr`?pye(e):mye(e)),hye=()=>`Copiez ce secret maintenant — il ne sera plus jamais affiché. Placez-le dans la variable d'environnement du bridge.`,gye=()=>`Copy this secret now — it is never shown again. Put it in the bridge's environment variable.`,_ye=((e={},t={})=>(t.locale??q())===`fr`?hye(e):gye(e)),vye=()=>`J'ai copié le secret`,yye=()=>`I've copied the secret`,iQ=((e={},t={})=>(t.locale??q())===`fr`?vye(e):yye(e)),bye=e=>`Agents — instance « ${e?.name} »`,xye=e=>`Agents — instance « ${e?.name} »`,Sye=((e,t={})=>(t.locale??q())===`fr`?bye(e):xye(e)),Cye=()=>`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é.`,wye=()=>`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.`,Tye=((e={},t={})=>(t.locale??q())===`fr`?Cye(e):wye(e)),Eye=()=>`Impossible de mettre à jour l’agent`,Dye=()=>`Could not update the agent`,aQ=((e={},t={})=>(t.locale??q())===`fr`?Eye(e):Dye(e)),Oye=()=>`Types`,kye=()=>`Types`,Aye=((e={},t={})=>(t.locale??q())===`fr`?Oye(e):kye(e)),jye=()=>`Gérer`,Mye=()=>`Manage`,Nye=((e={},t={})=>(t.locale??q())===`fr`?jye(e):Mye(e)),Pye=()=>`Types de l'agent`,Fye=()=>`Agent types`,Iye=((e={},t={})=>(t.locale??q())===`fr`?Pye(e):Fye(e)),Lye=()=>`Un agent peut avoir plusieurs types. Chaque type indique à Atrium comment l'agent peut être utilisé.`,Rye=()=>`An agent may hold several types. Each type tells Atrium how the agent can be used.`,zye=((e={},t={})=>(t.locale??q())===`fr`?Lye(e):Rye(e)),Bye=()=>`Conversationnel`,Vye=()=>`Conversational`,Hye=((e={},t={})=>(t.locale??q())===`fr`?Bye(e):Vye(e)),Uye=()=>`Agent de chat standard — répond aux messages des utilisateurs dans une conversation.`,Wye=()=>`Standard chat agent — answers users' messages in a conversation.`,Gye=((e={},t={})=>(t.locale??q())===`fr`?Uye(e):Wye(e)),Kye=()=>`Source documentaire`,qye=()=>`Documentary source`,Jye=((e={},t={})=>(t.locale??q())===`fr`?Kye(e):qye(e)),Yye=()=>`Agent spécialisé appelé par une action Atrium dédiée pour exploiter une source documentaire — pas de chat direct.`,Xye=()=>`Specialised agent invoked by a dedicated Atrium action to exploit a documentary source — not used for direct chat.`,Zye=((e={},t={})=>(t.locale??q())===`fr`?Yye(e):Xye(e)),Qye=()=>`Définir par défaut`,$ye=()=>`Set as default`,ebe=((e={},t={})=>(t.locale??q())===`fr`?Qye(e):$ye(e)),tbe=()=>`Retirer`,nbe=()=>`Remove`,rbe=((e={},t={})=>(t.locale??q())===`fr`?tbe(e):nbe(e)),ibe=e=>`Retirer ${e?.name} ?`,abe=e=>`Remove ${e?.name}?`,obe=((e,t={})=>(t.locale??q())===`fr`?ibe(e):abe(e)),sbe=()=>`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.`,cbe=()=>`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.`,lbe=((e={},t={})=>(t.locale??q())===`fr`?sbe(e):cbe(e)),ube=()=>`Retirer`,dbe=()=>`Remove`,fbe=((e={},t={})=>(t.locale??q())===`fr`?ube(e):dbe(e)),pbe=()=>`Agent retiré`,mbe=()=>`Agent removed`,hbe=((e={},t={})=>(t.locale??q())===`fr`?pbe(e):mbe(e)),gbe=()=>`Chargement…`,_be=()=>`Loading…`,vbe=((e={},t={})=>(t.locale??q())===`fr`?gbe(e):_be(e)),ybe=()=>`Jamais sondé.`,bbe=()=>`Never polled.`,xbe=((e={},t={})=>(t.locale??q())===`fr`?ybe(e):bbe(e)),Sbe=()=>`Découverte OK.`,Cbe=()=>`Discovery OK.`,wbe=((e={},t={})=>(t.locale??q())===`fr`?Sbe(e):Cbe(e)),Tbe=e=>`Hors-ligne (${e?.error}) — dernier bon résultat servi.`,Ebe=e=>`Offline (${e?.error}) — last good result served.`,Dbe=((e,t={})=>(t.locale??q())===`fr`?Tbe(e):Ebe(e)),Obe=()=>`Aucun agent découvert.`,kbe=()=>`No agent discovered.`,Abe=((e={},t={})=>(t.locale??q())===`fr`?Obe(e):kbe(e)),jbe=()=>`défaut`,Mbe=()=>`default`,oQ=((e={},t={})=>(t.locale??q())===`fr`?jbe(e):Mbe(e)),Nbe=()=>`supprimé`,Pbe=()=>`removed`,Fbe=((e={},t={})=>(t.locale??q())===`fr`?Nbe(e):Pbe(e)),Ibe=()=>`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é.`,Lbe=()=>`Trace of actions performed under impersonation: who really acted (real actor) and on behalf of which user. Message content is never recorded.`,Rbe=((e={},t={})=>(t.locale??q())===`fr`?Ibe(e):Lbe(e)),zbe=()=>`Fenêtre récente bornée — une plage antérieure peut être partielle.`,Bbe=()=>`Bounded recent window — an earlier range may be partial.`,Vbe=((e={},t={})=>(t.locale??q())===`fr`?zbe(e):Bbe(e)),Hbe=()=>`Rechercher (action, acteur, ressource)`,Ube=()=>`Search (action, actor, resource)`,Wbe=((e={},t={})=>(t.locale??q())===`fr`?Hbe(e):Ube(e)),Gbe=()=>`Action`,Kbe=()=>`Action`,sQ=((e={},t={})=>(t.locale??q())===`fr`?Gbe(e):Kbe(e)),qbe=()=>`Toutes les actions`,Jbe=()=>`All actions`,Ybe=((e={},t={})=>(t.locale??q())===`fr`?qbe(e):Jbe(e)),Xbe=()=>`Usurpation : toutes`,Zbe=()=>`Impersonation: all`,Qbe=((e={},t={})=>(t.locale??q())===`fr`?Xbe(e):Zbe(e)),$be=()=>`Sous usurpation`,exe=()=>`Under impersonation`,txe=((e={},t={})=>(t.locale??q())===`fr`?$be(e):exe(e)),nxe=()=>`Sans usurpation`,rxe=()=>`Without impersonation`,ixe=((e={},t={})=>(t.locale??q())===`fr`?nxe(e):rxe(e)),axe=()=>`Ressource`,oxe=()=>`Resource`,cQ=((e={},t={})=>(t.locale??q())===`fr`?axe(e):oxe(e)),sxe=()=>`Toutes les ressources`,cxe=()=>`All resources`,lxe=((e={},t={})=>(t.locale??q())===`fr`?sxe(e):cxe(e)),uxe=()=>`Audit`,dxe=()=>`Audit`,fxe=((e={},t={})=>(t.locale??q())===`fr`?uxe(e):dxe(e)),pxe=()=>`Aucune action tracée pour l’instant.`,mxe=()=>`No action traced yet.`,hxe=((e={},t={})=>(t.locale??q())===`fr`?pxe(e):mxe(e)),gxe=()=>`Quand`,_xe=()=>`When`,vxe=((e={},t={})=>(t.locale??q())===`fr`?gxe(e):_xe(e)),yxe=()=>`Acteur réel`,bxe=()=>`Real actor`,xxe=((e={},t={})=>(t.locale??q())===`fr`?yxe(e):bxe(e)),Sxe=()=>`Au nom de`,Cxe=()=>`On behalf of`,wxe=((e={},t={})=>(t.locale??q())===`fr`?Sxe(e):Cxe(e)),Txe=()=>`Traces`,Exe=()=>`Traces`,Dxe=((e={},t={})=>(t.locale??q())===`fr`?Txe(e):Exe(e)),Oxe=()=>`KPI`,kxe=()=>`KPI`,Axe=((e={},t={})=>(t.locale??q())===`fr`?Oxe(e):kxe(e)),jxe=()=>`OpenClaw / Anomalies`,Mxe=()=>`OpenClaw / Anomalies`,Nxe=((e={},t={})=>(t.locale??q())===`fr`?jxe(e):Mxe(e)),Pxe=()=>`Chats`,Fxe=()=>`Chats`,Ixe=((e={},t={})=>(t.locale??q())===`fr`?Pxe(e):Fxe(e)),Lxe=()=>`Admin`,Rxe=()=>`Admin`,zxe=((e={},t={})=>(t.locale??q())===`fr`?Lxe(e):Rxe(e)),Bxe=()=>`Lire`,Vxe=()=>`Read`,lQ=((e={},t={})=>(t.locale??q())===`fr`?Bxe(e):Vxe(e)),Hxe=()=>`Contenu`,Uxe=()=>`Content`,Wxe=((e={},t={})=>(t.locale??q())===`fr`?Hxe(e):Uxe(e)),Gxe=()=>`Écrire`,Kxe=()=>`Write`,uQ=((e={},t={})=>(t.locale??q())===`fr`?Gxe(e):Kxe(e)),qxe=()=>`Requête`,Jxe=()=>`Query`,Yxe=((e={},t={})=>(t.locale??q())===`fr`?qxe(e):Jxe(e)),Xxe=()=>`Anomalies`,Zxe=()=>`Anomalies`,Qxe=((e={},t={})=>(t.locale??q())===`fr`?Xxe(e):Zxe(e)),$xe=()=>`Signaler`,eSe=()=>`Report`,tSe=((e={},t={})=>(t.locale??q())===`fr`?$xe(e):eSe(e)),nSe=()=>`Gérer`,rSe=()=>`Manage`,iSe=((e={},t={})=>(t.locale??q())===`fr`?nSe(e):rSe(e)),aSe=()=>`Auto-correction`,oSe=()=>`Self-heal`,sSe=((e={},t={})=>(t.locale??q())===`fr`?aSe(e):oSe(e)),cSe=e=>`${e?.key} — accès au contenu brut (PHI), à accorder avec prudence`,lSe=e=>`${e?.key} — access to raw content (PHI), grant with caution`,uSe=((e,t={})=>(t.locale??q())===`fr`?cSe(e):lSe(e)),dSe=()=>`Échec de l’initialisation des rôles`,fSe=()=>`Failed to initialize roles`,pSe=((e={},t={})=>(t.locale??q())===`fr`?dSe(e):fSe(e)),mSe=e=>`Modifier le rôle intégré « ${e?.name} » ?`,hSe=e=>`Edit the built-in role “${e?.name}”?`,gSe=((e,t={})=>(t.locale??q())===`fr`?mSe(e):hSe(e)),_Se=()=>`Les rôles intégrés sont la base du modèle de permissions. Les modifier peut affecter les comptes existants. Continuer ?`,vSe=()=>`Built-in roles are the foundation of the permission model. Editing them may affect existing accounts. Continue?`,ySe=((e={},t={})=>(t.locale??q())===`fr`?_Se(e):vSe(e)),bSe=()=>`Modifier`,xSe=()=>`Edit`,SSe=((e={},t={})=>(t.locale??q())===`fr`?bSe(e):xSe(e)),CSe=()=>`Échec de la mise à jour des permissions`,wSe=()=>`Failed to update permissions`,TSe=((e={},t={})=>(t.locale??q())===`fr`?CSe(e):wSe(e)),ESe=()=>`Échec de la création du rôle`,DSe=()=>`Failed to create role`,OSe=((e={},t={})=>(t.locale??q())===`fr`?ESe(e):DSe(e)),kSe=()=>`Matrice de permissions. Lignes = rôles (intégrés + personnalisés), colonnes = clés de permission. Le rôle`,ASe=()=>`Permission matrix. Rows = roles (built-in + custom), columns = permission keys. The`,jSe=((e={},t={})=>(t.locale??q())===`fr`?kSe(e):ASe(e)),MSe=()=>`détient le joker « * » (toutes les permissions) et est verrouillé. La colonne`,NSe=()=>`role holds the “*” wildcard (all permissions) and is locked. The`,PSe=((e={},t={})=>(t.locale??q())===`fr`?MSe(e):NSe(e)),FSe=()=>`donne accès au contenu brut (PHI) — à n’accorder qu’à bon escient.`,ISe=()=>`column grants access to raw content (PHI) — grant only when justified.`,LSe=((e={},t={})=>(t.locale??q())===`fr`?FSe(e):ISe(e)),RSe=()=>`Rôles`,zSe=()=>`Roles`,BSe=((e={},t={})=>(t.locale??q())===`fr`?RSe(e):zSe(e)),VSe=()=>`Ajouter un rôle`,HSe=()=>`Add a role`,USe=((e={},t={})=>(t.locale??q())===`fr`?VSe(e):HSe(e)),WSe=()=>`Chargement…`,GSe=()=>`Loading…`,KSe=((e={},t={})=>(t.locale??q())===`fr`?WSe(e):GSe(e)),qSe=()=>`Initialisation des rôles…`,JSe=()=>`Initializing roles…`,YSe=((e={},t={})=>(t.locale??q())===`fr`?qSe(e):JSe(e)),XSe=()=>`Rôle`,ZSe=()=>`Role`,QSe=((e={},t={})=>(t.locale??q())===`fr`?XSe(e):ZSe(e)),$Se=()=>`intégré`,eCe=()=>`built-in`,tCe=((e={},t={})=>(t.locale??q())===`fr`?$Se(e):eCe(e)),nCe=()=>`personnalisé`,rCe=()=>`custom`,iCe=((e={},t={})=>(t.locale??q())===`fr`?nCe(e):rCe(e)),aCe=()=>`Authentifié mais pas encore approuvé — l’accès est bloqué tant qu’un administrateur n’a pas validé le compte.`,oCe=()=>`Authenticated but not yet approved — access is blocked until an admin approves the account.`,sCe=((e={},t={})=>(t.locale??q())===`fr`?aCe(e):oCe(e)),cCe=()=>`Personne approuvée, avec accès au chat.`,lCe=()=>`Approved person with chat access.`,uCe=((e={},t={})=>(t.locale??q())===`fr`?cCe(e):lCe(e)),dCe=()=>`Accès total (superset) : gère les utilisateurs, rôles, agents, instances et l’observabilité.`,fCe=()=>`Full access (superset): manages users, roles, agents, instances and observability.`,pCe=((e={},t={})=>(t.locale??q())===`fr`?dCe(e):fCe(e)),mCe=()=>`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.`,hCe=()=>`READ-ONLY service account for monitoring: views traces, KPIs, anomalies and bridge/version status through the API. Cannot write or trigger anything.`,gCe=((e={},t={})=>(t.locale??q())===`fr`?mCe(e):hCe(e)),_Ce=()=>`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.`,vCe=()=>`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.`,yCe=((e={},t={})=>(t.locale??q())===`fr`?_Ce(e):vCe(e)),bCe=()=>`Accordé via « * » (toutes les permissions)`,xCe=()=>`Granted via “*” (all permissions)`,SCe=((e={},t={})=>(t.locale??q())===`fr`?bCe(e):xCe(e)),CCe=()=>`Écriture en cours…`,wCe=()=>`Writing…`,TCe=((e={},t={})=>(t.locale??q())===`fr`?CCe(e):wCe(e)),ECe=()=>`Nouveau rôle`,DCe=()=>`New role`,OCe=((e={},t={})=>(t.locale??q())===`fr`?ECe(e):DCe(e)),kCe=()=>`Rôle personnalisé. Ajustez les permissions dans la matrice après création.`,ACe=()=>`Custom role. Adjust the permissions in the matrix after creation.`,jCe=((e={},t={})=>(t.locale??q())===`fr`?kCe(e):ACe(e)),MCe=()=>`Créer`,NCe=()=>`Create`,PCe=((e={},t={})=>(t.locale??q())===`fr`?MCe(e):NCe(e)),FCe=()=>`Clé (identifiant stable)`,ICe=()=>`Key (stable identifier)`,LCe=((e={},t={})=>(t.locale??q())===`fr`?FCe(e):ICe(e)),RCe=()=>`ex. analyst`,zCe=()=>`e.g. analyst`,BCe=((e={},t={})=>(t.locale??q())===`fr`?RCe(e):zCe(e)),VCe=()=>`Nom affiché`,HCe=()=>`Display name`,UCe=((e={},t={})=>(t.locale??q())===`fr`?VCe(e):HCe(e)),WCe=()=>`Description (optionnel)`,GCe=()=>`Description (optional)`,KCe=((e={},t={})=>(t.locale??q())===`fr`?WCe(e):GCe(e)),qCe=()=>`Ouvertes`,JCe=()=>`Open`,YCe=((e={},t={})=>(t.locale??q())===`fr`?qCe(e):JCe(e)),XCe=()=>`En sourdine`,ZCe=()=>`Muted`,QCe=((e={},t={})=>(t.locale??q())===`fr`?XCe(e):ZCe(e)),$Ce=()=>`Résolues`,ewe=()=>`Resolved`,twe=((e={},t={})=>(t.locale??q())===`fr`?$Ce(e):ewe(e)),nwe=()=>`Résoudre cette anomalie ?`,rwe=()=>`Resolve this anomaly?`,iwe=((e={},t={})=>(t.locale??q())===`fr`?nwe(e):rwe(e)),awe=()=>`L’anomalie`,owe=()=>`The anomaly`,swe=((e={},t={})=>(t.locale??q())===`fr`?awe(e):owe(e)),cwe=()=>`sera marquée comme`,lwe=()=>`will be marked as`,uwe=((e={},t={})=>(t.locale??q())===`fr`?cwe(e):lwe(e)),dwe=()=>`résolue`,fwe=()=>`resolved`,pwe=((e={},t={})=>(t.locale??q())===`fr`?dwe(e):fwe(e)),mwe=()=>`Elle sortira du décompte des anomalies ouvertes (signal de self-repair OpenClaw).`,hwe=()=>`It will be removed from the open anomalies count (OpenClaw self-repair signal).`,gwe=((e={},t={})=>(t.locale??q())===`fr`?mwe(e):hwe(e)),_we=()=>`Résoudre`,vwe=()=>`Resolve`,ywe=((e={},t={})=>(t.locale??q())===`fr`?_we(e):vwe(e)),bwe=()=>`Anomalie résolue`,xwe=()=>`Anomaly resolved`,Swe=((e={},t={})=>(t.locale??q())===`fr`?bwe(e):xwe(e)),Cwe=()=>`Échec de la résolution`,wwe=()=>`Resolution failed`,Twe=((e={},t={})=>(t.locale??q())===`fr`?Cwe(e):wwe(e)),Ewe=()=>`Anomalie acquittée`,Dwe=()=>`Anomaly acknowledged`,Owe=((e={},t={})=>(t.locale??q())===`fr`?Ewe(e):Dwe(e)),kwe=()=>`Échec de l’acquittement`,Awe=()=>`Acknowledgement failed`,jwe=((e={},t={})=>(t.locale??q())===`fr`?kwe(e):Awe(e)),Mwe=()=>`Anomalies détectées (cron) ou signalées par les agents OpenClaw. Données non-PHI uniquement (type, sévérité, message, corrélation).`,Nwe=()=>`Anomalies detected (cron) or reported by OpenClaw agents. Non-PHI data only (type, severity, message, correlation).`,Pwe=((e={},t={})=>(t.locale??q())===`fr`?Mwe(e):Nwe(e)),Fwe=()=>`Ouverte`,Iwe=()=>`Open`,Lwe=((e={},t={})=>(t.locale??q())===`fr`?Fwe(e):Iwe(e)),Rwe=()=>`= active, elle alerte et compte dans le heartbeat.`,zwe=()=>`= active, it alerts and counts in the heartbeat.`,Bwe=((e={},t={})=>(t.locale??q())===`fr`?Rwe(e):zwe(e)),Vwe=()=>`En sourdine`,Hwe=()=>`Muted`,Uwe=((e={},t={})=>(t.locale??q())===`fr`?Vwe(e):Hwe(e)),Wwe=()=>`= vue, plus d'alerte, mais pas forcément corrigée (les admins sont notifiés des nouvelles anomalies).`,Gwe=()=>`= seen, no more alerts, but not necessarily fixed (admins are notified of new anomalies).`,Kwe=((e={},t={})=>(t.locale??q())===`fr`?Wwe(e):Gwe(e)),qwe=()=>`Résolue`,Jwe=()=>`Resolved`,Ywe=((e={},t={})=>(t.locale??q())===`fr`?qwe(e):Jwe(e)),Xwe=()=>`= le problème est réglé (le détecteur résout automatiquement quand la condition cesse). Les deux la sortent du décompte heartbeat.`,Zwe=()=>`= the problem is fixed (the detector resolves automatically when the condition clears). Both remove it from the heartbeat count.`,Qwe=((e={},t={})=>(t.locale??q())===`fr`?Xwe(e):Zwe(e)),$we=()=>`La plage temporelle filtre la fenêtre récente — une plage antérieure peut être partielle.`,eTe=()=>`The time range filters the recent window — an earlier range may be partial.`,tTe=((e={},t={})=>(t.locale??q())===`fr`?$we(e):eTe(e)),nTe=()=>`Rechercher (message, type, corrélation)`,rTe=()=>`Search (message, type, correlation)`,iTe=((e={},t={})=>(t.locale??q())===`fr`?nTe(e):rTe(e)),aTe=()=>`Tous les statuts`,oTe=()=>`All statuses`,sTe=((e={},t={})=>(t.locale??q())===`fr`?aTe(e):oTe(e)),cTe=()=>`Sévérité`,lTe=()=>`Severity`,dQ=((e={},t={})=>(t.locale??q())===`fr`?cTe(e):lTe(e)),uTe=()=>`Toutes sévérités`,dTe=()=>`All severities`,fTe=((e={},t={})=>(t.locale??q())===`fr`?uTe(e):dTe(e)),pTe=()=>`Source`,mTe=()=>`Source`,fQ=((e={},t={})=>(t.locale??q())===`fr`?pTe(e):mTe(e)),hTe=()=>`Toutes sources`,gTe=()=>`All sources`,_Te=((e={},t={})=>(t.locale??q())===`fr`?hTe(e):gTe(e)),vTe=()=>`Type`,yTe=()=>`Type`,pQ=((e={},t={})=>(t.locale??q())===`fr`?vTe(e):yTe(e)),bTe=()=>`Tous les types`,xTe=()=>`All types`,STe=((e={},t={})=>(t.locale??q())===`fr`?bTe(e):xTe(e)),CTe=()=>`Anomalies`,wTe=()=>`Anomalies`,TTe=((e={},t={})=>(t.locale??q())===`fr`?CTe(e):wTe(e)),ETe=()=>`Aucune anomalie ouverte. 🎉`,DTe=()=>`No open anomalies. 🎉`,OTe=((e={},t={})=>(t.locale??q())===`fr`?ETe(e):DTe(e)),kTe=()=>`Aucune anomalie enregistrée.`,ATe=()=>`No anomalies recorded.`,jTe=((e={},t={})=>(t.locale??q())===`fr`?kTe(e):ATe(e)),MTe=()=>`Résoudre (corrigé)`,NTe=()=>`Resolve (fixed)`,PTe=((e={},t={})=>(t.locale??q())===`fr`?MTe(e):NTe(e)),FTe=()=>`Marquer comme vue (sourdine)`,ITe=()=>`Mark as seen (mute)`,LTe=((e={},t={})=>(t.locale??q())===`fr`?FTe(e):ITe(e)),RTe=()=>`Quand`,zTe=()=>`When`,BTe=((e={},t={})=>(t.locale??q())===`fr`?RTe(e):zTe(e)),VTe=()=>`Statut`,HTe=()=>`Status`,UTe=((e={},t={})=>(t.locale??q())===`fr`?VTe(e):HTe(e)),WTe=()=>`Message`,GTe=()=>`Message`,KTe=((e={},t={})=>(t.locale??q())===`fr`?WTe(e):GTe(e)),qTe=()=>`Cause & correctif`,JTe=()=>`Cause & fix`,YTe=((e={},t={})=>(t.locale??q())===`fr`?qTe(e):JTe(e)),XTe=()=>`Corrélation`,ZTe=()=>`Correlation`,QTe=((e={},t={})=>(t.locale??q())===`fr`?XTe(e):ZTe(e)),$Te=()=>`Voir la trace`,eEe=()=>`View trace`,tEe=((e={},t={})=>(t.locale??q())===`fr`?$Te(e):eEe(e)),nEe=()=>`ouverte`,rEe=()=>`open`,iEe=((e={},t={})=>(t.locale??q())===`fr`?nEe(e):rEe(e)),aEe=()=>`en sourdine`,oEe=()=>`muted`,sEe=((e={},t={})=>(t.locale??q())===`fr`?aEe(e):oEe(e)),cEe=()=>`résolue`,lEe=()=>`resolved`,uEe=((e={},t={})=>(t.locale??q())===`fr`?cEe(e):lEe(e)),dEe=()=>`Réponse incorrecte`,fEe=()=>`Incorrect response`,pEe=((e={},t={})=>(t.locale??q())===`fr`?dEe(e):fEe(e)),mEe=()=>`Incohérence`,hEe=()=>`Inconsistency`,gEe=((e={},t={})=>(t.locale??q())===`fr`?mEe(e):hEe(e)),_Ee=()=>`Mots / orthographe erronés`,vEe=()=>`Wrong words / spelling`,yEe=((e={},t={})=>(t.locale??q())===`fr`?_Ee(e):vEe(e)),bEe=()=>`Formatage`,xEe=()=>`Formatting`,SEe=((e={},t={})=>(t.locale??q())===`fr`?bEe(e):xEe(e)),CEe=()=>`Latence`,wEe=()=>`Latency`,TEe=((e={},t={})=>(t.locale??q())===`fr`?CEe(e):wEe(e)),EEe=()=>`Erreur API`,DEe=()=>`API error`,OEe=((e={},t={})=>(t.locale??q())===`fr`?EEe(e):DEe(e)),kEe=()=>`Autre`,AEe=()=>`Other`,mQ=((e={},t={})=>(t.locale??q())===`fr`?kEe(e):AEe(e)),jEe=()=>`Mots modifiés à l'envoi`,MEe=()=>`Words altered on send`,NEe=((e={},t={})=>(t.locale??q())===`fr`?jEe(e):MEe(e)),PEe=()=>`Caractères / mise en forme altérés`,FEe=()=>`Characters / formatting altered`,IEe=((e={},t={})=>(t.locale??q())===`fr`?PEe(e):FEe(e)),LEe=()=>`Signaler un problème`,REe=()=>`Report an issue`,zEe=((e={},t={})=>(t.locale??q())===`fr`?LEe(e):REe(e)),BEe=()=>`Merci. Un instantané complet de ce message a été figé pour analyse.`,VEe=()=>`Thank you. A complete snapshot of this message has been frozen for analysis.`,HEe=((e={},t={})=>(t.locale??q())===`fr`?BEe(e):VEe(e)),UEe=()=>`Signalez un problème avec votre message tel qu'il a été envoyé. Un instantané forensique exact est enregistré.`,WEe=()=>`Report an issue with your message as it was sent. An exact forensic snapshot is recorded.`,GEe=((e={},t={})=>(t.locale??q())===`fr`?UEe(e):WEe(e)),KEe=()=>`Signalez un problème avec cette réponse. Un instantané forensique exact est enregistré au moment de l'envoi.`,qEe=()=>`Report an issue with this response. An exact forensic snapshot is recorded at send time.`,JEe=((e={},t={})=>(t.locale??q())===`fr`?KEe(e):qEe(e)),YEe=()=>`✓ 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.`,XEe=()=>`✓ The displayed text (source view) matches exactly, character for character, the text stored on the server. The comparison is frozen as evidence.`,ZEe=((e={},t={})=>(t.locale??q())===`fr`?YEe(e):XEe(e)),QEe=()=>`⚠ Écart détecté entre le texte affiché (vue source) et le texte stocké. L'instantané a figé les deux versions.`,$Ee=()=>`⚠ Discrepancy detected between the displayed text (source view) and the stored text. The snapshot has frozen both versions.`,eDe=((e={},t={})=>(t.locale??q())===`fr`?QEe(e):$Ee(e)),tDe=()=>`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.`,nDe=()=>`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.`,rDe=((e={},t={})=>(t.locale??q())===`fr`?tDe(e):nDe(e)),iDe=()=>`Catégorie`,aDe=()=>`Category`,oDe=((e={},t={})=>(t.locale??q())===`fr`?iDe(e):aDe(e)),sDe=()=>`Choisir une catégorie`,cDe=()=>`Choose a category`,lDe=((e={},t={})=>(t.locale??q())===`fr`?sDe(e):cDe(e)),uDe=()=>`Commentaire`,dDe=()=>`Comment`,fDe=((e={},t={})=>(t.locale??q())===`fr`?uDe(e):dDe(e)),pDe=()=>`Décrivez le problème…`,mDe=()=>`Describe the issue…`,hDe=((e={},t={})=>(t.locale??q())===`fr`?pDe(e):mDe(e)),gDe=()=>`Fermer`,_De=()=>`Close`,vDe=((e={},t={})=>(t.locale??q())===`fr`?gDe(e):_De(e)),yDe=()=>`Annuler`,bDe=()=>`Cancel`,xDe=((e={},t={})=>(t.locale??q())===`fr`?yDe(e):bDe(e)),SDe=()=>`Envoi…`,CDe=()=>`Sending…`,wDe=((e={},t={})=>(t.locale??q())===`fr`?SDe(e):CDe(e)),TDe=()=>`Envoyer`,EDe=()=>`Send`,DDe=((e={},t={})=>(t.locale??q())===`fr`?TDe(e):EDe(e)),ODe=()=>`Problème signalé`,kDe=()=>`Issue reported`,ADe=((e={},t={})=>(t.locale??q())===`fr`?ODe(e):kDe(e)),jDe=()=>`Signaler un problème`,MDe=()=>`Report an issue`,NDe=((e={},t={})=>(t.locale??q())===`fr`?jDe(e):MDe(e)),PDe=()=>`Signaler un problème avec ce message`,FDe=()=>`Report an issue with this message`,IDe=((e={},t={})=>(t.locale??q())===`fr`?PDe(e):FDe(e)),LDe=()=>`Événements récents (fenêtre bornée, plus récents d’abord). Toutes les traces sont des métadonnées `,RDe=()=>`Recent events (bounded window, newest first). All traces are redacted metadata `,zDe=((e={},t={})=>(t.locale??q())===`fr`?LDe(e):RDe(e)),BDe=()=>`expurgées`,VDe=()=>`redacted`,HDe=((e={},t={})=>(t.locale??q())===`fr`?BDe(e):VDe(e)),UDe=()=>` : aucun contenu de message, pièce jointe ou jeton n’est stocké — uniquement des longueurs, codes et indicateurs.`,WDe=()=>`: no message content, attachment or token is stored — only lengths, codes and flags.`,GDe=((e={},t={})=>(t.locale??q())===`fr`?UDe(e):WDe(e)),KDe=()=>`La plage temporelle filtre la fenêtre récente — une plage antérieure peut être partielle.`,qDe=()=>`The time range filters the recent window — an older range may be partial.`,JDe=((e={},t={})=>(t.locale??q())===`fr`?KDe(e):qDe(e)),YDe=()=>`Rechercher (kind, principal, rôle, route, correlationId)`,XDe=()=>`Search (kind, principal, role, route, correlationId)`,ZDe=((e={},t={})=>(t.locale??q())===`fr`?YDe(e):XDe(e)),QDe=()=>`Statut`,$De=()=>`Status`,eOe=((e={},t={})=>(t.locale??q())===`fr`?QDe(e):$De(e)),tOe=()=>`Tous statuts`,nOe=()=>`All statuses`,rOe=((e={},t={})=>(t.locale??q())===`fr`?tOe(e):nOe(e)),iOe=()=>`Principal`,aOe=()=>`Principal`,oOe=((e={},t={})=>(t.locale??q())===`fr`?iOe(e):aOe(e)),sOe=()=>`Tous principaux`,cOe=()=>`All principals`,lOe=((e={},t={})=>(t.locale??q())===`fr`?sOe(e):cOe(e)),uOe=()=>`Direction`,dOe=()=>`Direction`,fOe=((e={},t={})=>(t.locale??q())===`fr`?uOe(e):dOe(e)),pOe=()=>`Toutes directions`,mOe=()=>`All directions`,hOe=((e={},t={})=>(t.locale??q())===`fr`?pOe(e):mOe(e)),gOe=()=>`Rôle`,_Oe=()=>`Role`,vOe=((e={},t={})=>(t.locale??q())===`fr`?gOe(e):_Oe(e)),yOe=()=>`Tous les rôles`,bOe=()=>`All roles`,xOe=((e={},t={})=>(t.locale??q())===`fr`?yOe(e):bOe(e)),SOe=()=>`Tous les kinds`,COe=()=>`All kinds`,wOe=((e={},t={})=>(t.locale??q())===`fr`?SOe(e):COe(e)),TOe=()=>`tous les kinds`,EOe=()=>`all kinds`,DOe=((e={},t={})=>(t.locale??q())===`fr`?TOe(e):EOe(e)),OOe=e=>`${e?.count} lignes`,kOe=e=>`${e?.count} rows`,AOe=((e,t={})=>(t.locale??q())===`fr`?OOe(e):kOe(e)),jOe=()=>`Effacer le filtre de corrélation`,MOe=()=>`Clear correlation filter`,NOe=((e={},t={})=>(t.locale??q())===`fr`?jOe(e):MOe(e)),POe=()=>`filtre: correlationId=`,FOe=()=>`filter: correlationId=`,IOe=((e={},t={})=>(t.locale??q())===`fr`?POe(e):FOe(e)),LOe=()=>`Effacer`,ROe=()=>`Clear`,zOe=((e={},t={})=>(t.locale??q())===`fr`?LOe(e):ROe(e)),BOe=()=>`Traces`,VOe=()=>`Traces`,HOe=((e={},t={})=>(t.locale??q())===`fr`?BOe(e):VOe(e)),UOe=()=>`Aucun événement pour cette corrélation dans la fenêtre.`,WOe=()=>`No event for this correlation in the window.`,GOe=((e={},t={})=>(t.locale??q())===`fr`?UOe(e):WOe(e)),KOe=()=>`Aucun événement tracé pour l’instant.`,qOe=()=>`No traced event yet.`,JOe=((e={},t={})=>(t.locale??q())===`fr`?KOe(e):qOe(e)),YOe=()=>`Quand`,XOe=()=>`When`,ZOe=((e={},t={})=>(t.locale??q())===`fr`?YOe(e):XOe(e)),QOe=()=>`Kind`,$Oe=()=>`Kind`,eke=((e={},t={})=>(t.locale??q())===`fr`?QOe(e):$Oe(e)),tke=()=>`Résultat`,nke=()=>`Result`,rke=((e={},t={})=>(t.locale??q())===`fr`?tke(e):nke(e)),ike=()=>`ok`,ake=()=>`ok`,oke=((e={},t={})=>(t.locale??q())===`fr`?ike(e):ake(e)),ske=()=>`Direction`,cke=()=>`Direction`,lke=((e={},t={})=>(t.locale??q())===`fr`?ske(e):cke(e)),uke=()=>`Principal`,dke=()=>`Principal`,fke=((e={},t={})=>(t.locale??q())===`fr`?uke(e):dke(e)),pke=()=>`Rôle`,mke=()=>`Role`,hke=((e={},t={})=>(t.locale??q())===`fr`?pke(e):mke(e)),gke=()=>`Route`,_ke=()=>`Route`,vke=((e={},t={})=>(t.locale??q())===`fr`?gke(e):_ke(e)),yke=()=>`Statut`,bke=()=>`Status`,xke=((e={},t={})=>(t.locale??q())===`fr`?yke(e):bke(e)),Ske=()=>`Latence`,Cke=()=>`Latency`,wke=((e={},t={})=>(t.locale??q())===`fr`?Ske(e):Cke(e)),Tke=()=>`Corrélation`,Eke=()=>`Correlation`,Dke=((e={},t={})=>(t.locale??q())===`fr`?Tke(e):Eke(e)),Oke=()=>`Suivre ce tour (filtrer par correlationId)`,kke=()=>`Follow this turn (filter by correlationId)`,Ake=((e={},t={})=>(t.locale??q())===`fr`?Oke(e):kke(e)),jke=()=>`Meta`,Mke=()=>`Meta`,Nke=((e={},t={})=>(t.locale??q())===`fr`?jke(e):Mke(e)),Pke=()=>`Voir`,Fke=()=>`View`,Ike=((e={},t={})=>(t.locale??q())===`fr`?Pke(e):Fke(e)),Lke=()=>`Meta ·`,Rke=()=>`Meta ·`,zke=((e={},t={})=>(t.locale??q())===`fr`?Lke(e):Rke(e)),Bke=()=>`expurgé`,Vke=()=>`redacted`,Hke=((e={},t={})=>(t.locale??q())===`fr`?Bke(e):Vke(e)),Uke=()=>`Métadonnées non-PHI uniquement (longueurs, codes, indicateurs). Aucun contenu de message n’est stocké.`,Wke=()=>`Non-PHI metadata only (lengths, codes, flags). No message content is stored.`,Gke=((e={},t={})=>(t.locale??q())===`fr`?Uke(e):Wke(e)),Kke=()=>`Chargement…`,qke=()=>`Loading…`,hQ=((e={},t={})=>(t.locale??q())===`fr`?Kke(e):qke(e)),Jke=()=>`Connexion refusée. Le domaine de ce compte n’est pas autorisé.`,Yke=()=>`Sign-in refused. This account’s email domain is not allowed.`,Xke=((e={},t={})=>(t.locale??q())===`fr`?Jke(e):Yke(e)),Zke=()=>`Bon retour`,Qke=()=>`Welcome back`,$ke=((e={},t={})=>(t.locale??q())===`fr`?Zke(e):Qke(e)),eAe=()=>`Connectez-vous pour continuer`,tAe=()=>`Sign in to continue`,nAe=((e={},t={})=>(t.locale??q())===`fr`?eAe(e):tAe(e)),rAe=()=>`Se connecter avec Google`,iAe=()=>`Sign in with Google`,aAe=((e={},t={})=>(t.locale??q())===`fr`?rAe(e):iAe(e)),oAe=()=>`Aucun mode de connexion configuré.`,sAe=()=>`No sign-in method configured.`,cAe=((e={},t={})=>(t.locale??q())===`fr`?oAe(e):sAe(e)),lAe=()=>`Continuer (dev, sans compte)`,uAe=()=>`Continue (dev, no account)`,dAe=((e={},t={})=>(t.locale??q())===`fr`?lAe(e):uAe(e)),fAe=()=>`Compte`,pAe=()=>`Account`,mAe=((e={},t={})=>(t.locale??q())===`fr`?fAe(e):pAe(e)),hAe=()=>`En attente d’approbation`,gAe=()=>`Awaiting approval`,_Ae=((e={},t={})=>(t.locale??q())===`fr`?hAe(e):gAe(e)),vAe=()=>`Ton compte est créé mais doit être approuvé par un administrateur avant d’accéder au chat.`,yAe=()=>`Your account has been created but must be approved by an administrator before you can access the chat.`,bAe=((e={},t={})=>(t.locale??q())===`fr`?vAe(e):yAe(e)),xAe=()=>`Vous explorez l’application en tant que`,SAe=()=>`You are exploring the application as`,CAe=((e={},t={})=>(t.locale??q())===`fr`?xAe(e):SAe(e)),wAe=()=>`. Toute action est exécutée et tracée en votre nom (`,TAe=()=>`. Every action is executed and traced in your name (`,EAe=((e={},t={})=>(t.locale??q())===`fr`?wAe(e):TAe(e)),DAe=()=>`).`,OAe=()=>`).`,kAe=((e={},t={})=>(t.locale??q())===`fr`?DAe(e):OAe(e)),AAe=()=>`Quitter`,jAe=()=>`Exit`,MAe=((e={},t={})=>(t.locale??q())===`fr`?AAe(e):jAe(e)),NAe=()=>`Afficher la barre latérale`,PAe=()=>`Show sidebar`,FAe=((e={},t={})=>(t.locale??q())===`fr`?NAe(e):PAe(e)),IAe=()=>`Réduire la barre latérale`,LAe=()=>`Collapse sidebar`,RAe=((e={},t={})=>(t.locale??q())===`fr`?IAe(e):LAe(e)),zAe=()=>`Paramètres`,BAe=()=>`Settings`,VAe=((e={},t={})=>(t.locale??q())===`fr`?zAe(e):BAe(e)),HAe=()=>`Redimensionner la barre latérale`,UAe=()=>`Resize sidebar`,WAe=((e={},t={})=>(t.locale??q())===`fr`?HAe(e):UAe(e)),GAe=()=>`Accès non autorisé`,KAe=()=>`Access denied`,qAe=((e={},t={})=>(t.locale??q())===`fr`?GAe(e):KAe(e)),JAe=()=>`Vous n’avez pas la permission de consulter cet onglet. Choisissez un onglet disponible dans le menu, ou contactez votre administrateur.`,YAe=()=>`You do not have permission to view this tab. Choose an available tab from the menu, or contact your administrator.`,XAe=((e={},t={})=>(t.locale??q())===`fr`?JAe(e):YAe(e)),ZAe=()=>`Une erreur est survenue`,QAe=()=>`Something went wrong`,$Ae=((e={},t={})=>(t.locale??q())===`fr`?ZAe(e):QAe(e)),eje=()=>`Cette page n’a pas pu être affichée. Réessayez, ou revenez à l’accueil. Si le problème persiste, contactez votre administrateur.`,tje=()=>`This page could not be displayed. Try again, or return home. If the problem persists, contact your administrator.`,nje=((e={},t={})=>(t.locale??q())===`fr`?eje(e):tje(e)),rje=()=>`Réessayer`,ije=()=>`Retry`,aje=((e={},t={})=>(t.locale??q())===`fr`?rje(e):ije(e)),oje=()=>`Accueil`,sje=()=>`Home`,gQ=((e={},t={})=>(t.locale??q())===`fr`?oje(e):sje(e)),cje=()=>`Page introuvable`,lje=()=>`Page not found`,uje=((e={},t={})=>(t.locale??q())===`fr`?cje(e):lje(e)),dje=()=>`Cette adresse ne correspond à aucune page de l’application.`,fje=()=>`This address does not match any page in the application.`,pje=((e={},t={})=>(t.locale??q())===`fr`?dje(e):fje(e)),mje=e=>`Agents de ${e?.user}`,hje=e=>`${e?.user}'s agents`,gje=((e,t={})=>(t.locale??q())===`fr`?mje(e):hje(e)),_je=()=>`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.`,vje=()=>`Assign the discovered agents (per instance) and designate the default agent. At least one agent is required to create conversations.`,yje=((e={},t={})=>(t.locale??q())===`fr`?_je(e):vje(e)),bje=()=>`Chargement…`,xje=()=>`Loading…`,Sje=((e={},t={})=>(t.locale??q())===`fr`?bje(e):xje(e)),Cje=()=>`Aucune instance configurée. Ajoutez-en une dans l'onglet Instances.`,wje=()=>`No instance configured. Add one in the Instances tab.`,Tje=((e={},t={})=>(t.locale??q())===`fr`?Cje(e):wje(e)),Eje=()=>`Mise à jour de l'accès refusée`,Dje=()=>`Access update denied`,Oje=((e={},t={})=>(t.locale??q())===`fr`?Eje(e):Dje(e)),kje=()=>`Définition de l'agent par défaut refusée`,Aje=()=>`Setting the default agent was denied`,jje=((e={},t={})=>(t.locale??q())===`fr`?kje(e):Aje(e)),Mje=()=>`hors-ligne`,Nje=()=>`offline`,Pje=((e={},t={})=>(t.locale??q())===`fr`?Mje(e):Nje(e)),Fje=()=>`Chargement des agents…`,Ije=()=>`Loading agents…`,Lje=((e={},t={})=>(t.locale??q())===`fr`?Fje(e):Ije(e)),Rje=()=>`Aucun agent découvert.`,zje=()=>`No agent discovered.`,Bje=((e={},t={})=>(t.locale??q())===`fr`?Rje(e):zje(e)),Vje=()=>`Aucun agent découvert (instance hors-ligne).`,Hje=()=>`No agent discovered (instance offline).`,Uje=((e={},t={})=>(t.locale??q())===`fr`?Vje(e):Hje(e)),Wje=e=>`Assigner ${e?.name}`,Gje=e=>`Assign ${e?.name}`,Kje=((e,t={})=>(t.locale??q())===`fr`?Wje(e):Gje(e)),qje=()=>`supprimé`,Jje=()=>`removed`,Yje=((e={},t={})=>(t.locale??q())===`fr`?qje(e):Jje(e)),Xje=()=>`Agent par défaut`,Zje=()=>`Default agent`,_Q=((e={},t={})=>(t.locale??q())===`fr`?Xje(e):Zje(e)),Qje=()=>`Définir comme agent par défaut`,$je=()=>`Set as default agent`,vQ=((e={},t={})=>(t.locale??q())===`fr`?Qje(e):$je(e)),eMe=e=>`Configurer l'instance « ${e?.instance} »`,tMe=e=>`Configure instance « ${e?.instance} »`,nMe=((e,t={})=>(t.locale??q())===`fr`?eMe(e):tMe(e)),rMe=()=>`Configurer`,iMe=()=>`Configure`,yQ=((e={},t={})=>(t.locale??q())===`fr`?rMe(e):iMe(e)),aMe=()=>`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.`,oMe=()=>`Non-secret bridge config, applied hot on the next message (no restart). Secrets (tokens, device identity) live in the bridge environment, never here.`,sMe=((e={},t={})=>(t.locale??q())===`fr`?aMe(e):oMe(e)),cMe=()=>`Aucune instance — ajoutez-en une dans Agents › Instances d’abord.`,lMe=()=>`No instances yet — add one under Agents › Instances first.`,uMe=((e={},t={})=>(t.locale??q())===`fr`?cMe(e):lMe(e)),dMe=()=>`Mode média sortant`,fMe=()=>`Outbound media mode`,pMe=((e={},t={})=>(t.locale??q())===`fr`?dMe(e):fMe(e)),mMe=()=>`Mode média entrant`,hMe=()=>`Inbound media mode`,gMe=((e={},t={})=>(t.locale??q())===`fr`?mMe(e):hMe(e)),_Me=()=>`Taille média max (Mo)`,vMe=()=>`Max media size (MB)`,yMe=((e={},t={})=>(t.locale??q())===`fr`?_Me(e):vMe(e)),bMe=()=>`Ré-hydratation de session`,xMe=()=>`Session re-hydration`,SMe=((e={},t={})=>(t.locale??q())===`fr`?bMe(e):xMe(e)),CMe=()=>`Enregistrer`,wMe=()=>`Save`,TMe=((e={},t={})=>(t.locale??q())===`fr`?CMe(e):wMe(e)),EMe=()=>`Impossible d’enregistrer la configuration`,DMe=()=>`Could not save the configuration`,OMe=((e={},t={})=>(t.locale??q())===`fr`?EMe(e):DMe(e)),kMe=()=>`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).`,AMe=()=>`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).`,jMe=((e={},t={})=>(t.locale??q())===`fr`?kMe(e):AMe(e)),MMe=()=>`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).`,NMe=()=>`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).`,PMe=((e={},t={})=>(t.locale??q())===`fr`?MMe(e):NMe(e)),FMe=()=>`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.`,IMe=()=>`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.`,LMe=((e={},t={})=>(t.locale??q())===`fr`?FMe(e):IMe(e)),RMe=()=>`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.`,zMe=()=>`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.`,BMe=((e={},t={})=>(t.locale??q())===`fr`?RMe(e):zMe(e)),VMe=()=>`Chemin entrant (vu par l’agent)`,HMe=()=>`Inbound path (agent view)`,UMe=((e={},t={})=>(t.locale??q())===`fr`?VMe(e):HMe(e)),WMe=()=>`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.`,GMe=()=>`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.`,KMe=((e={},t={})=>(t.locale??q())===`fr`?WMe(e):GMe(e)),qMe=()=>`Chemin sortant (vu par l’agent)`,JMe=()=>`Outbound path (agent view)`,YMe=((e={},t={})=>(t.locale??q())===`fr`?qMe(e):JMe(e)),XMe=()=>`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.`,ZMe=()=>`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.`,QMe=((e={},t={})=>(t.locale??q())===`fr`?XMe(e):ZMe(e)),$Me=()=>`Vérifier les chemins`,eNe=()=>`Check paths`,tNe=((e={},t={})=>(t.locale??q())===`fr`?$Me(e):eNe(e)),nNe=()=>`Vérification…`,rNe=()=>`Checking…`,iNe=((e={},t={})=>(t.locale??q())===`fr`?nNe(e):rNe(e)),aNe=()=>`Échec de la vérification des chemins`,oNe=()=>`Path check failed`,sNe=((e={},t={})=>(t.locale??q())===`fr`?aNe(e):oNe(e)),cNe=()=>`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.`,lNe=()=>`Checks the BRIDGE's access to the shared dirs. The agent-side mount (inside the gateway container) must be verified separately.`,uNe=((e={},t={})=>(t.locale??q())===`fr`?cNe(e):lNe(e)),dNe=()=>`Entrant (écriture bridge)`,fNe=()=>`Inbound (bridge write)`,pNe=((e={},t={})=>(t.locale??q())===`fr`?dNe(e):fNe(e)),mNe=()=>`Sortant (lecture bridge)`,hNe=()=>`Outbound (bridge read)`,gNe=((e={},t={})=>(t.locale??q())===`fr`?mNe(e):hNe(e)),_Ne=()=>`Accessible`,vNe=()=>`Accessible`,yNe=((e={},t={})=>(t.locale??q())===`fr`?_Ne(e):vNe(e)),bNe=()=>`Non concerné (pas shared-fs)`,xNe=()=>`Not applicable (not shared-fs)`,SNe=((e={},t={})=>(t.locale??q())===`fr`?bNe(e):xNe(e)),CNe=()=>`Bridge injoignable — vérification impossible`,wNe=()=>`Bridge unreachable — could not check`,TNe=((e={},t={})=>(t.locale??q())===`fr`?CNe(e):wNe(e)),ENe=e=>`Bridge joignable mais la vérification a échoué (${e?.reason})`,DNe=e=>`Bridge reachable but the check failed (${e?.reason})`,ONe=((e,t={})=>(t.locale??q())===`fr`?ENe(e):DNe(e)),kNe=()=>`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.`,ANe=()=>`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.`,jNe=((e={},t={})=>(t.locale??q())===`fr`?kNe(e):ANe(e)),MNe=()=>`Chargement…`,NNe=()=>`Loading…`,bQ=((e={},t={})=>(t.locale??q())===`fr`?MNe(e):NNe(e)),PNe=()=>`Aucun relevé pour l’instant — le sondage tourne chaque minute. Reviens dans un moment.`,FNe=()=>`No reading yet — the poll runs every minute. Check back in a moment.`,INe=((e={},t={})=>(t.locale??q())===`fr`?PNe(e):FNe(e)),LNe=()=>`Bridge opérationnel`,RNe=()=>`Bridge operational`,zNe=((e={},t={})=>(t.locale??q())===`fr`?LNe(e):RNe(e)),BNe=()=>`Bridge injoignable`,VNe=()=>`Bridge unreachable`,HNe=((e={},t={})=>(t.locale??q())===`fr`?BNe(e):VNe(e)),UNe=e=>`Bridge : ${e?.count} connexion(s) en erreur`,WNe=e=>`Bridge: ${e?.count} connection(s) in error`,GNe=((e,t={})=>(t.locale??q())===`fr`?UNe(e):WNe(e)),KNe=e=>`Vérifié à ${e?.time}`,qNe=e=>`Checked at ${e?.time}`,JNe=((e,t={})=>(t.locale??q())===`fr`?KNe(e):qNe(e)),YNe=e=>`· Bridge démarré le ${e?.time}`,XNe=e=>`· Bridge started on ${e?.time}`,ZNe=((e,t={})=>(t.locale??q())===`fr`?YNe(e):XNe(e)),QNe=()=>`↗ Anomalies`,$Ne=()=>`↗ Anomalies`,ePe=((e={},t={})=>(t.locale??q())===`fr`?QNe(e):$Ne(e)),tPe=e=>`Connexions (${e?.count})`,nPe=e=>`Connections (${e?.count})`,rPe=((e,t={})=>(t.locale??q())===`fr`?tPe(e):nPe(e)),iPe=()=>`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).`,aPe=()=>`No connection tested yet. A connection's state appears as soon as a message exercises it (the bridge connects on demand).`,oPe=((e={},t={})=>(t.locale??q())===`fr`?iPe(e):aPe(e)),sPe=e=>`${e?.ok} OK · ${e?.errors} échec(s) · ${e?.attempts} tentative(s)`,cPe=e=>`${e?.ok} OK · ${e?.errors} failure(s) · ${e?.attempts} attempt(s)`,lPe=((e,t={})=>(t.locale??q())===`fr`?sPe(e):cPe(e)),uPe=e=>`Rejeté par la passerelle : ${e?.label} — pas une défaillance du bridge.`,dPe=e=>`Rejected by the gateway: ${e?.label} — not a bridge fault.`,fPe=((e,t={})=>(t.locale??q())===`fr`?uPe(e):dPe(e)),pPe=()=>`Filtrer par cible ou hôte…`,mPe=()=>`Filter by target or host…`,hPe=((e={},t={})=>(t.locale??q())===`fr`?pPe(e):mPe(e)),gPe=()=>`Tous`,_Pe=()=>`All`,xQ=((e={},t={})=>(t.locale??q())===`fr`?gPe(e):_Pe(e)),vPe=()=>`État`,yPe=()=>`State`,bPe=((e={},t={})=>(t.locale??q())===`fr`?vPe(e):yPe(e)),xPe=()=>`Instance`,SPe=()=>`Instance`,CPe=((e={},t={})=>(t.locale??q())===`fr`?xPe(e):SPe(e)),wPe=()=>`Version`,TPe=()=>`Version`,EPe=((e={},t={})=>(t.locale??q())===`fr`?wPe(e):TPe(e)),DPe=()=>`Aucune connexion ne correspond aux filtres.`,OPe=()=>`No connection matches the filters.`,kPe=((e={},t={})=>(t.locale??q())===`fr`?DPe(e):OPe(e)),APe=()=>`Cible`,jPe=()=>`Target`,MPe=((e={},t={})=>(t.locale??q())===`fr`?APe(e):jPe(e)),NPe=()=>`État`,PPe=()=>`State`,FPe=((e={},t={})=>(t.locale??q())===`fr`?NPe(e):PPe(e)),IPe=()=>`Instance`,LPe=()=>`Instance`,RPe=((e={},t={})=>(t.locale??q())===`fr`?IPe(e):LPe(e)),zPe=()=>`Hôte passerelle`,BPe=()=>`Gateway host`,VPe=((e={},t={})=>(t.locale??q())===`fr`?zPe(e):BPe(e)),HPe=()=>`Version`,UPe=()=>`Version`,WPe=((e={},t={})=>(t.locale??q())===`fr`?HPe(e):UPe(e)),GPe=()=>`Stats`,KPe=()=>`Stats`,qPe=((e={},t={})=>(t.locale??q())===`fr`?GPe(e):KPe(e)),JPe=()=>`Dernier OK`,YPe=()=>`Last OK`,XPe=((e={},t={})=>(t.locale??q())===`fr`?JPe(e):YPe(e)),ZPe=()=>`connectée`,QPe=()=>`connected`,SQ=((e={},t={})=>(t.locale??q())===`fr`?ZPe(e):QPe(e)),$Pe=()=>`erreur`,eFe=()=>`error`,CQ=((e={},t={})=>(t.locale??q())===`fr`?$Pe(e):eFe(e)),tFe=()=>`inactive`,nFe=()=>`inactive`,wQ=((e={},t={})=>(t.locale??q())===`fr`?tFe(e):nFe(e)),rFe=()=>`5 dernières minutes`,iFe=()=>`Last 5 minutes`,aFe=((e={},t={})=>(t.locale??q())===`fr`?rFe(e):iFe(e)),oFe=()=>`15 dernières minutes`,sFe=()=>`Last 15 minutes`,cFe=((e={},t={})=>(t.locale??q())===`fr`?oFe(e):sFe(e)),lFe=()=>`30 dernières minutes`,uFe=()=>`Last 30 minutes`,dFe=((e={},t={})=>(t.locale??q())===`fr`?lFe(e):uFe(e)),fFe=()=>`Dernière heure`,pFe=()=>`Last hour`,mFe=((e={},t={})=>(t.locale??q())===`fr`?fFe(e):pFe(e)),hFe=()=>`3 dernières heures`,gFe=()=>`Last 3 hours`,_Fe=((e={},t={})=>(t.locale??q())===`fr`?hFe(e):gFe(e)),vFe=()=>`6 dernières heures`,yFe=()=>`Last 6 hours`,bFe=((e={},t={})=>(t.locale??q())===`fr`?vFe(e):yFe(e)),xFe=()=>`12 dernières heures`,SFe=()=>`Last 12 hours`,CFe=((e={},t={})=>(t.locale??q())===`fr`?xFe(e):SFe(e)),wFe=()=>`Dernières 24 heures`,TFe=()=>`Last 24 hours`,EFe=((e={},t={})=>(t.locale??q())===`fr`?wFe(e):TFe(e)),DFe=()=>`2 derniers jours`,OFe=()=>`Last 2 days`,kFe=((e={},t={})=>(t.locale??q())===`fr`?DFe(e):OFe(e)),AFe=()=>`7 derniers jours`,jFe=()=>`Last 7 days`,MFe=((e={},t={})=>(t.locale??q())===`fr`?AFe(e):jFe(e)),NFe=()=>`30 derniers jours`,PFe=()=>`Last 30 days`,FFe=((e={},t={})=>(t.locale??q())===`fr`?NFe(e):PFe(e)),IFe=()=>`90 derniers jours`,LFe=()=>`Last 90 days`,RFe=((e={},t={})=>(t.locale??q())===`fr`?IFe(e):LFe(e)),zFe=()=>`Appels API`,BFe=()=>`API calls`,VFe=((e={},t={})=>(t.locale??q())===`fr`?zFe(e):BFe(e)),HFe=()=>`Erreurs API`,UFe=()=>`API errors`,WFe=((e={},t={})=>(t.locale??q())===`fr`?HFe(e):UFe(e)),GFe=()=>`Latence moyenne`,KFe=()=>`Average latency`,qFe=((e={},t={})=>(t.locale??q())===`fr`?GFe(e):KFe(e)),JFe=()=>`Ingestion OpenClaw`,YFe=()=>`OpenClaw ingest`,XFe=((e={},t={})=>(t.locale??q())===`fr`?JFe(e):YFe(e)),ZFe=()=>`Messages envoyés`,QFe=()=>`Messages sent`,$Fe=((e={},t={})=>(t.locale??q())===`fr`?ZFe(e):QFe(e)),eIe=()=>`Erreurs de stream`,tIe=()=>`Stream errors`,nIe=((e={},t={})=>(t.locale??q())===`fr`?eIe(e):tIe(e)),rIe=()=>`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.`,iIe=()=>`Hourly aggregated indicators from redacted traces (non-PHI metadata only). Live updates (useQuery) — the rollup runs every hour.`,aIe=((e={},t={})=>(t.locale??q())===`fr`?rIe(e):iIe(e)),oIe=()=>`La plage filtre l’historique des rollups — une plage antérieure peut être partielle.`,sIe=()=>`The range filters the rollup history — an earlier range may be partial.`,cIe=((e={},t={})=>(t.locale??q())===`fr`?oIe(e):sIe(e)),lIe=()=>`Chargement des KPI…`,uIe=()=>`Loading KPIs…`,dIe=((e={},t={})=>(t.locale??q())===`fr`?lIe(e):uIe(e)),fIe=()=>`Aucune donnée KPI — le rollup tourne chaque heure ; lance-le ou attends.`,pIe=()=>`No KPI data — the rollup runs every hour; run it or wait.`,mIe=((e={},t={})=>(t.locale??q())===`fr`?fIe(e):pIe(e)),hIe=e=>`dernier : ${e?.value}`,gIe=e=>`latest: ${e?.value}`,_Ie=((e,t={})=>(t.locale??q())===`fr`?hIe(e):gIe(e)),vIe=()=>`aucune donnée`,yIe=()=>`no data`,bIe=((e={},t={})=>(t.locale??q())===`fr`?vIe(e):yIe(e)),xIe=e=>`${e?.count} h`,SIe=e=>`${e?.count} h`,CIe=((e,t={})=>(t.locale??q())===`fr`?xIe(e):SIe(e)),wIe=e=>`Série horaire (max ${e?.max} ${e?.unit})`,TIe=e=>`Hourly series (max ${e?.max} ${e?.unit})`,EIe=((e,t={})=>(t.locale??q())===`fr`?wIe(e):TIe(e)),DIe=()=>`Mode dev — comptes & rôles`,OIe=()=>`Dev mode — accounts & roles`,kIe=((e={},t={})=>(t.locale??q())===`fr`?DIe(e):OIe(e)),AIe=()=>`Mode dev — comptes & rôles`,jIe=()=>`Dev mode — accounts & roles`,MIe=((e={},t={})=>(t.locale??q())===`fr`?AIe(e):jIe(e)),NIe=()=>`Change de rôle et « agis en tant que » pour tester plusieurs utilisateurs sans CLI. Visible uniquement en dev.`,PIe=()=>`Change roles and “act as” to test multiple users without the CLI. Visible in dev only.`,FIe=((e={},t={})=>(t.locale??q())===`fr`?NIe(e):PIe(e)),IIe=e=>`Moi — ${e?.canonical}`,LIe=e=>`Me — ${e?.canonical}`,RIe=((e,t={})=>(t.locale??q())===`fr`?IIe(e):LIe(e)),zIe=()=>`Devenir admin`,BIe=()=>`Become admin`,VIe=((e={},t={})=>(t.locale??q())===`fr`?zIe(e):BIe(e)),HIe=()=>`Devenir user`,UIe=()=>`Become user`,WIe=((e={},t={})=>(t.locale??q())===`fr`?HIe(e):UIe(e)),GIe=()=>`Devenir pending`,KIe=()=>`Become pending`,qIe=((e={},t={})=>(t.locale??q())===`fr`?GIe(e):KIe(e)),JIe=()=>`Tu agis en tant que`,YIe=()=>`You are acting as`,XIe=((e={},t={})=>(t.locale??q())===`fr`?JIe(e):YIe(e)),ZIe=()=>`Arrêter`,QIe=()=>`Stop`,$Ie=((e={},t={})=>(t.locale??q())===`fr`?ZIe(e):QIe(e)),eLe=()=>`Aucun autre compte. Déconnecte-toi puis reconnecte-toi (nouvelle identité anonyme) — elle sera active immédiatement.`,tLe=()=>`No other account. Sign out then sign back in (new anonymous identity) — it will be active immediately.`,nLe=((e={},t={})=>(t.locale??q())===`fr`?eLe(e):tLe(e)),rLe=()=>`Deviens admin d'abord`,iLe=()=>`Become admin first`,aLe=((e={},t={})=>(t.locale??q())===`fr`?rLe(e):iLe(e)),oLe=()=>`Un compte pending ne peut pas être impersonné`,sLe=()=>`A pending account cannot be impersonated`,cLe=((e={},t={})=>(t.locale??q())===`fr`?oLe(e):sLe(e)),lLe=()=>`Agir en tant que cet utilisateur`,uLe=()=>`Act as this user`,dLe=((e={},t={})=>(t.locale??q())===`fr`?lLe(e):uLe(e)),fLe=()=>`Agir en tant que`,pLe=()=>`Act as`,mLe=((e={},t={})=>(t.locale??q())===`fr`?fLe(e):pLe(e)),hLe=()=>`Nouveau chat`,gLe=()=>`New chat`,_Le=((e={},t={})=>(t.locale??q())===`fr`?hLe(e):gLe(e)),vLe=()=>`Nouveau projet`,yLe=()=>`New project`,TQ=((e={},t={})=>(t.locale??q())===`fr`?vLe(e):yLe(e)),bLe=()=>`Nom du projet`,xLe=()=>`Project name`,SLe=((e={},t={})=>(t.locale??q())===`fr`?bLe(e):xLe(e)),CLe=()=>`ex. Travail`,wLe=()=>`e.g. Work`,TLe=((e={},t={})=>(t.locale??q())===`fr`?CLe(e):wLe(e)),ELe=()=>`Créer`,DLe=()=>`Create`,OLe=((e={},t={})=>(t.locale??q())===`fr`?ELe(e):DLe(e)),kLe=()=>`Épinglés`,ALe=()=>`Pinned`,jLe=((e={},t={})=>(t.locale??q())===`fr`?kLe(e):ALe(e)),MLe=()=>`Glissez un chat ici`,NLe=()=>`Drop a chat here`,PLe=((e={},t={})=>(t.locale??q())===`fr`?MLe(e):NLe(e)),FLe=()=>`Chats`,ILe=()=>`Chats`,LLe=((e={},t={})=>(t.locale??q())===`fr`?FLe(e):ILe(e)),RLe=()=>`Sans titre`,zLe=()=>`Untitled`,EQ=((e={},t={})=>(t.locale??q())===`fr`?RLe(e):zLe(e)),BLe=()=>`Supprimer le projet`,VLe=()=>`Delete project`,DQ=((e={},t={})=>(t.locale??q())===`fr`?BLe(e):VLe(e)),HLe=e=>`Supprimer le projet « ${e?.name} » ?`,ULe=e=>`Delete project "${e?.name}"?`,WLe=((e,t={})=>(t.locale??q())===`fr`?HLe(e):ULe(e)),GLe=e=>`Cette action est irréversible : elle supprimera aussi définitivement ${e?.count} conversation(s) et tous leurs messages.`,KLe=e=>`This action is irreversible: it will also permanently delete ${e?.count} conversation(s) and all their messages.`,qLe=((e,t={})=>(t.locale??q())===`fr`?GLe(e):KLe(e)),JLe=()=>`Cette action est irréversible.`,YLe=()=>`This action is irreversible.`,XLe=((e={},t={})=>(t.locale??q())===`fr`?JLe(e):YLe(e)),ZLe=()=>`Supprimer`,QLe=()=>`Delete`,OQ=((e={},t={})=>(t.locale??q())===`fr`?ZLe(e):QLe(e)),$Le=()=>`Déplacer / réordonner`,eRe=()=>`Move / reorder`,tRe=((e={},t={})=>(t.locale??q())===`fr`?$Le(e):eRe(e)),nRe=()=>`Actions`,rRe=()=>`Actions`,iRe=((e={},t={})=>(t.locale??q())===`fr`?nRe(e):rRe(e)),aRe=()=>`Renommer`,oRe=()=>`Rename`,sRe=((e={},t={})=>(t.locale??q())===`fr`?aRe(e):oRe(e)),cRe=()=>`Désépingler`,lRe=()=>`Unpin`,uRe=((e={},t={})=>(t.locale??q())===`fr`?cRe(e):lRe(e)),dRe=()=>`Épingler`,fRe=()=>`Pin`,pRe=((e={},t={})=>(t.locale??q())===`fr`?dRe(e):fRe(e)),mRe=()=>`Couleur`,hRe=()=>`Color`,gRe=((e={},t={})=>(t.locale??q())===`fr`?mRe(e):hRe(e)),_Re=()=>`Aucune couleur`,vRe=()=>`No color`,yRe=((e={},t={})=>(t.locale??q())===`fr`?_Re(e):vRe(e)),bRe=()=>`Supprimer ce chat ?`,xRe=()=>`Delete this chat?`,SRe=((e={},t={})=>(t.locale??q())===`fr`?bRe(e):xRe(e)),CRe=()=>`Cette action est irréversible et supprimera ses messages.`,wRe=()=>`This action is irreversible and will delete its messages.`,TRe=((e={},t={})=>(t.locale??q())===`fr`?CRe(e):wRe(e)),ERe=e=>`Bridge : ${e?.provider}`,DRe=e=>`Bridge: ${e?.provider}`,ORe=((e,t={})=>(t.locale??q())===`fr`?ERe(e):DRe(e)),kRe=()=>`Renommer le chat`,ARe=()=>`Rename chat`,jRe=((e={},t={})=>(t.locale??q())===`fr`?kRe(e):ARe(e)),MRe=()=>`Titre`,NRe=()=>`Title`,PRe=((e={},t={})=>(t.locale??q())===`fr`?MRe(e):NRe(e)),FRe=()=>`Réflexion…`,IRe=()=>`Thinking…`,LRe=((e={},t={})=>(t.locale??q())===`fr`?FRe(e):IRe(e)),RRe=()=>`Génération…`,zRe=()=>`Generating…`,BRe=((e={},t={})=>(t.locale??q())===`fr`?RRe(e):zRe(e)),VRe=()=>`Erreur`,HRe=()=>`Error`,URe=((e={},t={})=>(t.locale??q())===`fr`?VRe(e):HRe(e)),WRe=()=>`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.`,GRe=()=>`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.`,KRe=((e={},t={})=>(t.locale??q())===`fr`?WRe(e):GRe(e)),qRe=()=>`Interrompu`,JRe=()=>`Stopped`,YRe=((e={},t={})=>(t.locale??q())===`fr`?qRe(e):JRe(e)),XRe=()=>`contient`,ZRe=()=>`contains`,QRe=((e={},t={})=>(t.locale??q())===`fr`?XRe(e):ZRe(e)),$Re=()=>`Filtre avancé`,eze=()=>`Advanced filter`,tze=((e={},t={})=>(t.locale??q())===`fr`?$Re(e):eze(e)),nze=()=>`Aucun critère. Ajoutez une condition (toutes les conditions sont cumulées avec ET).`,rze=()=>`No criteria. Add a condition (all conditions are combined with AND).`,ize=((e={},t={})=>(t.locale??q())===`fr`?nze(e):rze(e)),aze=()=>`Champ`,oze=()=>`Field`,sze=((e={},t={})=>(t.locale??q())===`fr`?aze(e):oze(e)),cze=()=>`Valeur`,lze=()=>`Value`,uze=((e={},t={})=>(t.locale??q())===`fr`?cze(e):lze(e)),dze=()=>`Supprimer la condition`,fze=()=>`Remove condition`,pze=((e={},t={})=>(t.locale??q())===`fr`?dze(e):fze(e)),mze=()=>`Ajouter une condition`,hze=()=>`Add condition`,gze=((e={},t={})=>(t.locale??q())===`fr`?mze(e):hze(e)),_ze=()=>`Bridge : pas encore de relevé (sondage chaque minute)`,vze=()=>`Bridge: no reading yet (polled every minute)`,yze=((e={},t={})=>(t.locale??q())===`fr`?_ze(e):vze(e)),bze=()=>`Bridge opérationnel`,xze=()=>`Bridge operational`,Sze=((e={},t={})=>(t.locale??q())===`fr`?bze(e):xze(e)),Cze=e=>` · vérifié à ${e?.time}`,wze=e=>` · verified at ${e?.time}`,Tze=((e,t={})=>(t.locale??q())===`fr`?Cze(e):wze(e)),Eze=e=>`Bridge indisponible (${e?.reason}) — ouvre l’onglet Bridge pour le détail`,Dze=e=>`Bridge unavailable (${e?.reason}) — open the Bridge tab for details`,Oze=((e,t={})=>(t.locale??q())===`fr`?Eze(e):Dze(e)),kze=()=>`Utilisateur`,Aze=()=>`User`,jze=((e={},t={})=>(t.locale??q())===`fr`?kze(e):Aze(e)),Mze=()=>`Système`,Nze=()=>`System`,Pze=((e={},t={})=>(t.locale??q())===`fr`?Mze(e):Nze(e)),Fze=()=>`[Export limité aux 200 messages les plus récents de cette conversation]`,Ize=()=>`[Export limited to the 200 most recent messages of this conversation]`,Lze=((e={},t={})=>(t.locale??q())===`fr`?Fze(e):Ize(e)),Rze=()=>`Conversation`,zze=()=>`Conversation`,kQ=((e={},t={})=>(t.locale??q())===`fr`?Rze(e):zze(e)),Bze=e=>`Exporté le ${e?.date}`,Vze=e=>`Exported on ${e?.date}`,Hze=((e,t={})=>(t.locale??q())===`fr`?Bze(e):Vze(e)),Uze=e=>`[fichier : ${e?.name}]`,Wze=e=>`[file: ${e?.name}]`,Gze=((e,t={})=>(t.locale??q())===`fr`?Uze(e):Wze(e)),Kze=()=>`Rechercher dans les conversations`,qze=()=>`Search conversations`,Jze=((e={},t={})=>(t.locale??q())===`fr`?Kze(e):qze(e)),Yze=()=>`Rechercher…`,Xze=()=>`Search…`,Zze=((e={},t={})=>(t.locale??q())===`fr`?Yze(e):Xze(e)),Qze=()=>`Rechercher dans les conversations`,$ze=()=>`Search conversations`,eBe=((e={},t={})=>(t.locale??q())===`fr`?Qze(e):$ze(e)),tBe=()=>`Rechercher dans toutes les conversations…`,nBe=()=>`Search across all conversations…`,rBe=((e={},t={})=>(t.locale??q())===`fr`?tBe(e):nBe(e)),iBe=()=>`Recherche`,aBe=()=>`Search`,oBe=((e={},t={})=>(t.locale??q())===`fr`?iBe(e):aBe(e)),sBe=e=>`Tapez au moins ${e?.count} caractères pour rechercher.`,cBe=e=>`Type at least ${e?.count} characters to search.`,lBe=((e,t={})=>(t.locale??q())===`fr`?sBe(e):cBe(e)),uBe=()=>`Recherche…`,dBe=()=>`Searching…`,fBe=((e={},t={})=>(t.locale??q())===`fr`?uBe(e):dBe(e)),pBe=e=>`Aucune conversation ne correspond à « ${e?.term} ».`,mBe=e=>`No conversation matches “${e?.term}”.`,hBe=((e,t={})=>(t.locale??q())===`fr`?pBe(e):mBe(e)),gBe=()=>`Nouveau chat`,_Be=()=>`New chat`,vBe=((e={},t={})=>(t.locale??q())===`fr`?gBe(e):_Be(e)),yBe=()=>`Titre`,bBe=()=>`Title`,xBe=((e={},t={})=>(t.locale??q())===`fr`?yBe(e):bBe(e)),SBe=()=>`Message`,CBe=()=>`Message`,wBe=((e={},t={})=>(t.locale??q())===`fr`?SBe(e):CBe(e)),TBe=()=>`naviguer`,EBe=()=>`navigate`,DBe=((e={},t={})=>(t.locale??q())===`fr`?TBe(e):EBe(e)),OBe=()=>`ouvrir`,kBe=()=>`open`,ABe=((e={},t={})=>(t.locale??q())===`fr`?OBe(e):kBe(e)),jBe=()=>`Échap`,MBe=()=>`Esc`,NBe=((e={},t={})=>(t.locale??q())===`fr`?jBe(e):MBe(e)),PBe=()=>`fermer`,FBe=()=>`close`,IBe=((e={},t={})=>(t.locale??q())===`fr`?PBe(e):FBe(e)),LBe=()=>`Choisir un agent`,RBe=()=>`Choose an agent`,zBe=((e={},t={})=>(t.locale??q())===`fr`?LBe(e):RBe(e)),BBe=()=>`Sélectionnez l’agent (et l’instance) pour cette conversation.`,VBe=()=>`Select the agent (and instance) for this conversation.`,HBe=((e={},t={})=>(t.locale??q())===`fr`?BBe(e):VBe(e)),UBe=()=>`Chargement…`,WBe=()=>`Loading…`,GBe=((e={},t={})=>(t.locale??q())===`fr`?UBe(e):WBe(e)),KBe=()=>`Aucun agent ne vous est assigné. Contactez votre administrateur pour qu’il vous en attribue un.`,qBe=()=>`No agent is assigned to you. Contact your administrator to have one assigned.`,JBe=((e={},t={})=>(t.locale??q())===`fr`?KBe(e):qBe(e)),YBe=()=>`Rechercher un agent…`,XBe=()=>`Search for an agent…`,ZBe=((e={},t={})=>(t.locale??q())===`fr`?YBe(e):XBe(e)),QBe=()=>`Rechercher un agent`,$Be=()=>`Search for an agent`,eVe=((e={},t={})=>(t.locale??q())===`fr`?QBe(e):$Be(e)),tVe=()=>`Cet agent n’existe plus sur la gateway`,nVe=()=>`This agent no longer exists on the gateway`,rVe=((e={},t={})=>(t.locale??q())===`fr`?tVe(e):nVe(e)),iVe=()=>`Agent par défaut`,aVe=()=>`Default agent`,oVe=((e={},t={})=>(t.locale??q())===`fr`?iVe(e):aVe(e)),sVe=()=>`Rechercher`,cVe=()=>`Search`,lVe=((e={},t={})=>(t.locale??q())===`fr`?sVe(e):cVe(e)),uVe=()=>`Réinitialiser`,dVe=()=>`Reset`,fVe=((e={},t={})=>(t.locale??q())===`fr`?uVe(e):dVe(e)),pVe=()=>`Ajouter`,mVe=()=>`Add`,hVe=((e={},t={})=>(t.locale??q())===`fr`?pVe(e):mVe(e)),gVe=()=>`Aucun élément.`,_Ve=()=>`No items.`,vVe=((e={},t={})=>(t.locale??q())===`fr`?gVe(e):_Ve(e)),yVe=()=>`Chargement…`,bVe=()=>`Loading…`,xVe=((e={},t={})=>(t.locale??q())===`fr`?yVe(e):bVe(e)),SVe=()=>`Tout sélectionner`,CVe=()=>`Select all`,wVe=((e={},t={})=>(t.locale??q())===`fr`?SVe(e):CVe(e)),TVe=()=>`Sélectionner la ligne`,EVe=()=>`Select row`,DVe=((e={},t={})=>(t.locale??q())===`fr`?TVe(e):EVe(e)),OVe=()=>`Actions`,kVe=()=>`Actions`,AVe=((e={},t={})=>(t.locale??q())===`fr`?OVe(e):kVe(e)),jVe=e=>`Trier par ${e?.column}`,MVe=e=>`Sort by ${e?.column}`,NVe=((e,t={})=>(t.locale??q())===`fr`?jVe(e):MVe(e)),PVe=()=>`Agent introuvable`,FVe=()=>`Agent not found`,IVe=((e={},t={})=>(t.locale??q())===`fr`?PVe(e):FVe(e)),LVe=()=>`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).`,RVe=()=>`The configured agent no longer exists on the gateway. Check OPENCLAW_AGENT_ID in the bridge .env (it must match a real gateway agent).`,zVe=((e={},t={})=>(t.locale??q())===`fr`?LVe(e):RVe(e)),BVe=()=>`Authentification refusée`,VVe=()=>`Authentication refused`,HVe=((e={},t={})=>(t.locale??q())===`fr`?BVe(e):VVe(e)),UVe=()=>`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.`,WVe=()=>`The operator token does not match the paired device. Re-pair a dedicated bridge device on the gateway and report its token + device identity.`,GVe=((e={},t={})=>(t.locale??q())===`fr`?UVe(e):WVe(e)),KVe=()=>`Signature device impossible`,qVe=()=>`Device signing failed`,JVe=((e={},t={})=>(t.locale??q())===`fr`?KVe(e):qVe(e)),YVe=()=>`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.`,XVe=()=>`The device identity private key won’t decode. Check OPENCLAW_DEVICE_IDENTITY (JSON format, single \\n) — see fix-devid.mjs.`,ZVe=((e={},t={})=>(t.locale??q())===`fr`?YVe(e):XVe(e)),QVe=()=>`Portée insuffisante`,$Ve=()=>`Insufficient scope`,eHe=((e={},t={})=>(t.locale??q())===`fr`?QVe(e):$Ve(e)),tHe=()=>`Le pairing du device n’a pas la portée requise (operator.admin). Approuvez/élevez la portée du device sur la passerelle.`,nHe=()=>`The device pairing lacks the required scope (operator.admin). Approve/elevate the device scope on the gateway.`,rHe=((e={},t={})=>(t.locale??q())===`fr`?tHe(e):nHe(e)),iHe=()=>`Délai dépassé`,aHe=()=>`Timed out`,oHe=((e={},t={})=>(t.locale??q())===`fr`?iHe(e):aHe(e)),sHe=()=>`La passerelle n’a pas répondu à temps. Vérifiez qu’elle est démarrée et joignable (OPENCLAW_GATEWAY_URL).`,cHe=()=>`The gateway did not respond in time. Check it’s started and reachable (OPENCLAW_GATEWAY_URL).`,lHe=((e={},t={})=>(t.locale??q())===`fr`?sHe(e):cHe(e)),uHe=()=>`Passerelle déconnectée`,dHe=()=>`Gateway disconnected`,fHe=((e={},t={})=>(t.locale??q())===`fr`?uHe(e):dHe(e)),pHe=()=>`La connexion à la passerelle a été coupée. Vérifiez l’état du conteneur OpenClaw et l’URL/port de la passerelle.`,mHe=()=>`The connection to the gateway dropped. Check the OpenClaw container state and the gateway URL/port.`,hHe=((e={},t={})=>(t.locale??q())===`fr`?pHe(e):mHe(e)),gHe=()=>`Bridge injoignable`,_He=()=>`Bridge unreachable`,vHe=((e={},t={})=>(t.locale??q())===`fr`?gHe(e):_He(e)),yHe=()=>`Convex n’a pas pu joindre le bridge. Vérifiez que le conteneur bridge tourne et BRIDGE_URL (http://<ip-hôte>:8787).`,bHe=()=>`Convex could not reach the bridge. Check the bridge container is running and BRIDGE_URL (http://<host-ip>:8787).`,xHe=((e={},t={})=>(t.locale??q())===`fr`?yHe(e):bHe(e)),SHe=()=>`Pièce jointe trop volumineuse`,CHe=()=>`Attachment too large`,wHe=((e={},t={})=>(t.locale??q())===`fr`?SHe(e):CHe(e)),THe=()=>`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.`,EHe=()=>`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.`,DHe=((e={},t={})=>(t.locale??q())===`fr`?THe(e):EHe(e)),OHe=()=>`Pièce jointe non traitée`,kHe=()=>`Attachment could not be processed`,AHe=((e={},t={})=>(t.locale??q())===`fr`?OHe(e):kHe(e)),jHe=()=>`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.`,MHe=()=>`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.`,NHe=((e={},t={})=>(t.locale??q())===`fr`?jHe(e):MHe(e)),PHe=()=>`Requête invalide`,FHe=()=>`Invalid request`,IHe=((e={},t={})=>(t.locale??q())===`fr`?PHe(e):FHe(e)),LHe=()=>`La passerelle a rejeté la requête. Consultez les logs du bridge pour le détail brut.`,RHe=()=>`The gateway rejected the request. Check the bridge logs for the raw detail.`,zHe=((e={},t={})=>(t.locale??q())===`fr`?LHe(e):RHe(e)),BHe=()=>`Bridge non configuré`,VHe=()=>`Bridge not configured`,HHe=((e={},t={})=>(t.locale??q())===`fr`?BHe(e):VHe(e)),UHe=()=>`BRIDGE_URL / BRIDGE_SHARED_SECRET ne sont pas définis côté Convex (npx convex env set).`,WHe=()=>`BRIDGE_URL / BRIDGE_SHARED_SECRET are not set on the Convex side (npx convex env set).`,GHe=((e={},t={})=>(t.locale??q())===`fr`?UHe(e):WHe(e)),KHe=()=>`Utilisateur non routé`,qHe=()=>`User not routed`,JHe=((e={},t={})=>(t.locale??q())===`fr`?KHe(e):qHe(e)),YHe=()=>`Ce compte n’est rattaché à aucune instance. Settings → Users → Override instance, ou affectez un groupe.`,XHe=()=>`This account is not attached to any instance. Settings → Users → Override instance, or assign a group.`,ZHe=((e={},t={})=>(t.locale??q())===`fr`?YHe(e):XHe(e)),QHe=()=>`Erreur passerelle`,$He=()=>`Gateway error`,eUe=((e={},t={})=>(t.locale??q())===`fr`?QHe(e):$He(e)),tUe=()=>`Cause non catégorisée. Consultez les logs du bridge pour le message brut.`,nUe=()=>`Uncategorized cause. Check the bridge logs for the raw message.`,rUe=((e={},t={})=>(t.locale??q())===`fr`?tUe(e):nUe(e)),iUe=()=>`Cause inconnue`,aUe=()=>`Unknown cause`,oUe=((e={},t={})=>(t.locale??q())===`fr`?iUe(e):aUe(e)),sUe=()=>`Aucun code de cause n’a été remonté (bridge antérieur à cette version ?). Consultez les logs du bridge.`,cUe=()=>`No cause code was reported (bridge older than this version?). Check the bridge logs.`,lUe=((e={},t={})=>(t.locale??q())===`fr`?sUe(e):cUe(e)),uUe=()=>`Cause non répertoriée — voir les logs du bridge.`,dUe=()=>`Cause not catalogued — see the bridge logs.`,fUe=((e={},t={})=>(t.locale??q())===`fr`?uUe(e):dUe(e)),pUe=e=>`Notifications (${e?.count} non lues)`,mUe=e=>`Notifications (${e?.count} unread)`,hUe=((e,t={})=>(t.locale??q())===`fr`?pUe(e):mUe(e)),gUe=()=>`Notifications`,_Ue=()=>`Notifications`,vUe=((e={},t={})=>(t.locale??q())===`fr`?gUe(e):_Ue(e)),yUe=()=>`Notifications`,bUe=()=>`Notifications`,xUe=((e={},t={})=>(t.locale??q())===`fr`?yUe(e):bUe(e)),SUe=()=>`Tout lu`,CUe=()=>`Mark all read`,wUe=((e={},t={})=>(t.locale??q())===`fr`?SUe(e):CUe(e)),TUe=()=>`Tout effacer`,EUe=()=>`Clear all`,DUe=((e={},t={})=>(t.locale??q())===`fr`?TUe(e):EUe(e)),OUe=()=>`Aucune notification.`,kUe=()=>`No notifications.`,AUe=((e={},t={})=>(t.locale??q())===`fr`?OUe(e):kUe(e)),jUe=()=>`Marquer comme lue`,MUe=()=>`Mark as read`,AQ=((e={},t={})=>(t.locale??q())===`fr`?jUe(e):MUe(e)),NUe=()=>`Effacer la notification`,PUe=()=>`Clear notification`,jQ=((e={},t={})=>(t.locale??q())===`fr`?NUe(e):PUe(e)),FUe=()=>`Mes signalements`,IUe=()=>`My reports`,LUe=((e={},t={})=>(t.locale??q())===`fr`?FUe(e):IUe(e)),RUe=()=>`Répondu`,zUe=()=>`Answered`,BUe=((e={},t={})=>(t.locale??q())===`fr`?RUe(e):zUe(e)),VUe=()=>`En attente`,HUe=()=>`Pending`,UUe=((e={},t={})=>(t.locale??q())===`fr`?VUe(e):HUe(e)),WUe=()=>`Administrateur`,GUe=()=>`Administrator`,KUe=((e={},t={})=>(t.locale??q())===`fr`?WUe(e):GUe(e)),qUe=()=>`Vous`,JUe=()=>`You`,YUe=((e={},t={})=>(t.locale??q())===`fr`?qUe(e):JUe(e)),XUe=()=>`Voir la conversation`,ZUe=()=>`View the conversation`,QUe=((e={},t={})=>(t.locale??q())===`fr`?XUe(e):ZUe(e)),$Ue=()=>`Message signalé`,eWe=()=>`Reported message`,tWe=((e={},t={})=>(t.locale??q())===`fr`?$Ue(e):eWe(e)),nWe=()=>`Clore le signalement`,rWe=()=>`Close report`,MQ=((e={},t={})=>(t.locale??q())===`fr`?nWe(e):rWe(e)),iWe=()=>`Pourquoi clore ce signalement ? (facultatif)`,aWe=()=>`Why close this report? (optional)`,oWe=((e={},t={})=>(t.locale??q())===`fr`?iWe(e):aWe(e)),sWe=()=>`Clore`,cWe=()=>`Close`,lWe=((e={},t={})=>(t.locale??q())===`fr`?sWe(e):cWe(e)),uWe=()=>`Annuler`,dWe=()=>`Cancel`,fWe=((e={},t={})=>(t.locale??q())===`fr`?uWe(e):dWe(e)),pWe=()=>`Réponse à votre signalement`,mWe=()=>`Reply to your report`,hWe=((e={},t={})=>(t.locale??q())===`fr`?pWe(e):mWe(e)),gWe=()=>`Un administrateur a répondu à un signalement que vous avez envoyé.`,_We=()=>`An administrator replied to a report you sent.`,vWe=((e={},t={})=>(t.locale??q())===`fr`?gWe(e):_We(e)),yWe=()=>`Mots modifiés / altérés`,bWe=()=>`Modified / altered words`,xWe=((e={},t={})=>(t.locale??q())===`fr`?yWe(e):bWe(e)),SWe=()=>`Réponse incorrecte`,CWe=()=>`Incorrect answer`,wWe=((e={},t={})=>(t.locale??q())===`fr`?SWe(e):CWe(e)),TWe=()=>`Incohérence`,EWe=()=>`Incoherence`,DWe=((e={},t={})=>(t.locale??q())===`fr`?TWe(e):EWe(e)),OWe=()=>`Formatage`,kWe=()=>`Formatting`,AWe=((e={},t={})=>(t.locale??q())===`fr`?OWe(e):kWe(e)),jWe=()=>`Latence`,MWe=()=>`Latency`,NWe=((e={},t={})=>(t.locale??q())===`fr`?jWe(e):MWe(e)),PWe=()=>`Erreur API`,FWe=()=>`API error`,IWe=((e={},t={})=>(t.locale??q())===`fr`?PWe(e):FWe(e)),LWe=()=>`Autre`,RWe=()=>`Other`,zWe=((e={},t={})=>(t.locale??q())===`fr`?LWe(e):RWe(e)),BWe=()=>`Utilisateurs`,VWe=()=>`Users`,HWe=((e={},t={})=>(t.locale??q())===`fr`?BWe(e):VWe(e)),UWe=()=>`Instances`,WWe=()=>`Instances`,GWe=((e={},t={})=>(t.locale??q())===`fr`?UWe(e):WWe(e)),KWe=()=>`Bridge`,qWe=()=>`Bridge`,JWe=((e={},t={})=>(t.locale??q())===`fr`?KWe(e):qWe(e)),YWe=()=>`Comptes de service`,XWe=()=>`Service accounts`,ZWe=((e={},t={})=>(t.locale??q())===`fr`?YWe(e):XWe(e)),QWe=()=>`Rôles`,$We=()=>`Roles`,eGe=((e={},t={})=>(t.locale??q())===`fr`?QWe(e):$We(e)),tGe=()=>`Traces`,nGe=()=>`Traces`,rGe=((e={},t={})=>(t.locale??q())===`fr`?tGe(e):nGe(e)),iGe=()=>`KPI`,aGe=()=>`KPI`,oGe=((e={},t={})=>(t.locale??q())===`fr`?iGe(e):aGe(e)),sGe=()=>`Anomalies`,cGe=()=>`Anomalies`,lGe=((e={},t={})=>(t.locale??q())===`fr`?sGe(e):cGe(e)),uGe=()=>`Intégrations`,dGe=()=>`Integrations`,fGe=((e={},t={})=>(t.locale??q())===`fr`?uGe(e):dGe(e)),pGe=()=>`Audit`,mGe=()=>`Audit`,hGe=((e={},t={})=>(t.locale??q())===`fr`?pGe(e):mGe(e)),gGe=()=>`Feedbacks`,_Ge=()=>`Feedbacks`,vGe=((e={},t={})=>(t.locale??q())===`fr`?gGe(e):_Ge(e)),yGe=()=>`Groupes`,bGe=()=>`Groups`,xGe=((e={},t={})=>(t.locale??q())===`fr`?yGe(e):bGe(e)),SGe=()=>`Accès`,CGe=()=>`Access`,wGe=((e={},t={})=>(t.locale??q())===`fr`?SGe(e):CGe(e)),TGe=()=>`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.`,EGe=()=>`Inspect a user’s access: their groups, the agents and charts available to them (with provenance), and their effective permissions. Read-only.`,DGe=((e={},t={})=>(t.locale??q())===`fr`?TGe(e):EGe(e)),OGe=()=>`Choisir un utilisateur`,kGe=()=>`Pick a user`,NQ=((e={},t={})=>(t.locale??q())===`fr`?OGe(e):kGe(e)),AGe=()=>`Sélectionnez un utilisateur pour voir ses accès.`,jGe=()=>`Select a user to see their access.`,MGe=((e={},t={})=>(t.locale??q())===`fr`?AGe(e):jGe(e)),NGe=()=>`Identité`,PGe=()=>`Identity`,FGe=((e={},t={})=>(t.locale??q())===`fr`?NGe(e):PGe(e)),IGe=()=>`Groupes`,LGe=()=>`Groups`,RGe=((e={},t={})=>(t.locale??q())===`fr`?IGe(e):LGe(e)),zGe=()=>`Agents disponibles`,BGe=()=>`Available agents`,VGe=((e={},t={})=>(t.locale??q())===`fr`?zGe(e):BGe(e)),HGe=()=>`Chartes disponibles`,UGe=()=>`Available charts`,WGe=((e={},t={})=>(t.locale??q())===`fr`?HGe(e):UGe(e)),GGe=()=>`Permissions effectives`,KGe=()=>`Effective permissions`,qGe=((e={},t={})=>(t.locale??q())===`fr`?GGe(e):KGe(e)),JGe=()=>`Aucun`,YGe=()=>`None`,PQ=((e={},t={})=>(t.locale??q())===`fr`?JGe(e):YGe(e)),XGe=()=>`Défaut`,ZGe=()=>`Default`,QGe=((e={},t={})=>(t.locale??q())===`fr`?XGe(e):ZGe(e)),$Ge=()=>`Direct`,eKe=()=>`Direct`,tKe=((e={},t={})=>(t.locale??q())===`fr`?$Ge(e):eKe(e)),nKe=e=>`Groupe : ${e?.group}`,rKe=e=>`Group: ${e?.group}`,FQ=((e,t={})=>(t.locale??q())===`fr`?nKe(e):rKe(e)),iKe=()=>`Commune`,aKe=()=>`Common`,oKe=((e={},t={})=>(t.locale??q())===`fr`?iKe(e):aKe(e)),sKe=()=>`Perso`,cKe=()=>`Personal`,lKe=((e={},t={})=>(t.locale??q())===`fr`?sKe(e):cKe(e)),uKe=()=>`Groupes`,dKe=()=>`Groups`,fKe=((e={},t={})=>(t.locale??q())===`fr`?uKe(e):dKe(e)),pKe=()=>`Regroupez des utilisateurs et partagez des agents par groupe. Chaque membre hérite des agents du groupe en plus de ses agents directs.`,mKe=()=>`Group users and share agents by group. Each member inherits the group's agents on top of their direct agents.`,hKe=((e={},t={})=>(t.locale??q())===`fr`?pKe(e):mKe(e)),gKe=()=>`Nouveau groupe`,_Ke=()=>`New group`,vKe=((e={},t={})=>(t.locale??q())===`fr`?gKe(e):_Ke(e)),yKe=()=>`Aucun groupe pour le moment.`,bKe=()=>`No groups yet.`,xKe=((e={},t={})=>(t.locale??q())===`fr`?yKe(e):bKe(e)),SKe=()=>`Nom`,CKe=()=>`Name`,wKe=((e={},t={})=>(t.locale??q())===`fr`?SKe(e):CKe(e)),TKe=()=>`Membres`,EKe=()=>`Members`,DKe=((e={},t={})=>(t.locale??q())===`fr`?TKe(e):EKe(e)),OKe=()=>`Agents`,kKe=()=>`Agents`,AKe=((e={},t={})=>(t.locale??q())===`fr`?OKe(e):kKe(e)),jKe=()=>`Chartes`,MKe=()=>`Charts`,NKe=((e={},t={})=>(t.locale??q())===`fr`?jKe(e):MKe(e)),PKe=()=>`Filtrer les groupes (nom, membre, agent, charte)…`,FKe=()=>`Filter groups (name, member, agent, chart)…`,IKe=((e={},t={})=>(t.locale??q())===`fr`?PKe(e):FKe(e)),LKe=()=>`Gérer`,RKe=()=>`Manage`,zKe=((e={},t={})=>(t.locale??q())===`fr`?LKe(e):RKe(e)),BKe=()=>`Renommer`,VKe=()=>`Rename`,HKe=((e={},t={})=>(t.locale??q())===`fr`?BKe(e):VKe(e)),UKe=()=>`Supprimer`,WKe=()=>`Delete`,GKe=((e={},t={})=>(t.locale??q())===`fr`?UKe(e):WKe(e)),KKe=()=>`Enregistrer`,qKe=()=>`Save`,JKe=((e={},t={})=>(t.locale??q())===`fr`?KKe(e):qKe(e)),YKe=()=>`Annuler`,XKe=()=>`Cancel`,ZKe=((e={},t={})=>(t.locale??q())===`fr`?YKe(e):XKe(e)),QKe=()=>`Nouveau groupe`,$Ke=()=>`New group`,eqe=((e={},t={})=>(t.locale??q())===`fr`?QKe(e):$Ke(e)),tqe=()=>`Renommer le groupe`,nqe=()=>`Rename group`,rqe=((e={},t={})=>(t.locale??q())===`fr`?tqe(e):nqe(e)),iqe=()=>`Le nom est libre ; un identifiant stable est généré automatiquement.`,aqe=()=>`The name is free-form; a stable identifier is generated automatically.`,oqe=((e={},t={})=>(t.locale??q())===`fr`?iqe(e):aqe(e)),sqe=()=>`Nom`,cqe=()=>`Name`,lqe=((e={},t={})=>(t.locale??q())===`fr`?sqe(e):cqe(e)),uqe=()=>`Description`,dqe=()=>`Description`,fqe=((e={},t={})=>(t.locale??q())===`fr`?uqe(e):dqe(e)),pqe=e=>`Supprimer le groupe « ${e?.name} » ?`,mqe=e=>`Delete group "${e?.name}"?`,hqe=((e,t={})=>(t.locale??q())===`fr`?pqe(e):mqe(e)),gqe=()=>`Cette action supprime le groupe, ses adhésions et les agents partagés. Elle est irréversible.`,_qe=()=>`This deletes the group, its memberships and shared agents. It cannot be undone.`,vqe=((e={},t={})=>(t.locale??q())===`fr`?gqe(e):_qe(e)),yqe=()=>`Supprimer le groupe`,bqe=()=>`Delete group`,xqe=((e={},t={})=>(t.locale??q())===`fr`?yqe(e):bqe(e)),Sqe=e=>`Gérer « ${e?.name} »`,Cqe=e=>`Manage "${e?.name}"`,wqe=((e,t={})=>(t.locale??q())===`fr`?Sqe(e):Cqe(e)),Tqe=()=>`Ajoutez ou retirez des membres et partagez des agents découverts avec ce groupe.`,Eqe=()=>`Add or remove members and share discovered agents with this group.`,Dqe=((e={},t={})=>(t.locale??q())===`fr`?Tqe(e):Eqe(e)),Oqe=()=>`Membres`,kqe=()=>`Members`,Aqe=((e={},t={})=>(t.locale??q())===`fr`?Oqe(e):kqe(e)),jqe=()=>`Rechercher un utilisateur…`,Mqe=()=>`Search a user…`,Nqe=((e={},t={})=>(t.locale??q())===`fr`?jqe(e):Mqe(e)),Pqe=()=>`Agents partagés`,Fqe=()=>`Shared agents`,Iqe=((e={},t={})=>(t.locale??q())===`fr`?Pqe(e):Fqe(e)),Lqe=()=>`Rechercher un agent…`,Rqe=()=>`Search an agent…`,zqe=((e={},t={})=>(t.locale??q())===`fr`?Lqe(e):Rqe(e)),Bqe=()=>`Aucun résultat.`,Vqe=()=>`No results.`,Hqe=((e={},t={})=>(t.locale??q())===`fr`?Bqe(e):Vqe(e)),Uqe=()=>`Tout sélectionner`,Wqe=()=>`Select all`,IQ=((e={},t={})=>(t.locale??q())===`fr`?Uqe(e):Wqe(e)),Gqe=()=>`Précédent`,Kqe=()=>`Previous`,qqe=((e={},t={})=>(t.locale??q())===`fr`?Gqe(e):Kqe(e)),Jqe=()=>`Suivant`,Yqe=()=>`Next`,Xqe=((e={},t={})=>(t.locale??q())===`fr`?Jqe(e):Yqe(e)),Zqe=e=>`Page ${e?.page} sur ${e?.pages}`,Qqe=e=>`Page ${e?.page} of ${e?.pages}`,$qe=((e,t={})=>(t.locale??q())===`fr`?Zqe(e):Qqe(e)),eJe=()=>`Administrateur`,tJe=()=>`Admin`,nJe=((e={},t={})=>(t.locale??q())===`fr`?eJe(e):tJe(e)),rJe=()=>`Utilisateur`,iJe=()=>`User`,aJe=((e={},t={})=>(t.locale??q())===`fr`?rJe(e):iJe(e)),oJe=()=>`En attente`,sJe=()=>`Pending`,cJe=((e={},t={})=>(t.locale??q())===`fr`?oJe(e):sJe(e)),lJe=e=>`Basculer l'adhésion de ${e?.user}`,uJe=e=>`Toggle membership of ${e?.user}`,dJe=((e,t={})=>(t.locale??q())===`fr`?lJe(e):uJe(e)),fJe=e=>`Partager l'agent ${e?.name}`,pJe=e=>`Share agent ${e?.name}`,mJe=((e,t={})=>(t.locale??q())===`fr`?fJe(e):pJe(e)),hJe=()=>`Chargement…`,gJe=()=>`Loading…`,LQ=((e={},t={})=>(t.locale??q())===`fr`?hJe(e):gJe(e)),_Je=()=>`Chargement des agents…`,vJe=()=>`Loading agents…`,yJe=((e={},t={})=>(t.locale??q())===`fr`?_Je(e):vJe(e)),bJe=()=>`Aucun utilisateur.`,xJe=()=>`No users.`,SJe=((e={},t={})=>(t.locale??q())===`fr`?bJe(e):xJe(e)),CJe=()=>`Aucune instance configurée.`,wJe=()=>`No instances configured.`,TJe=((e={},t={})=>(t.locale??q())===`fr`?CJe(e):wJe(e)),EJe=()=>`Aucun agent découvert.`,DJe=()=>`No discovered agents.`,OJe=((e={},t={})=>(t.locale??q())===`fr`?EJe(e):DJe(e)),kJe=()=>`Instance hors ligne ; agents indisponibles.`,AJe=()=>`Instance offline; agents unavailable.`,jJe=((e={},t={})=>(t.locale??q())===`fr`?kJe(e):AJe(e)),MJe=()=>`hors ligne`,NJe=()=>`offline`,PJe=((e={},t={})=>(t.locale??q())===`fr`?MJe(e):NJe(e)),FJe=()=>`retiré`,IJe=()=>`removed`,LJe=((e={},t={})=>(t.locale??q())===`fr`?FJe(e):IJe(e)),RJe=()=>`Agent par défaut de l'instance`,zJe=()=>`Instance default agent`,RQ=((e={},t={})=>(t.locale??q())===`fr`?RJe(e):zJe(e)),BJe=()=>`Chartes`,VJe=()=>`Charts`,HJe=((e={},t={})=>(t.locale??q())===`fr`?BJe(e):VJe(e)),UJe=()=>`Aucune charte disponible pour ce groupe pour l'instant. Demandez à un administrateur d'ajouter des chartes au pool de ce groupe.`,WJe=()=>`No charts available for this group yet. Ask an admin to add charts to this group's pool.`,GJe=((e={},t={})=>(t.locale??q())===`fr`?UJe(e):WJe(e)),KJe=()=>`Ajoutez des chartes au pool de ce groupe ci-dessous, puis sélectionnez celles que le groupe propose.`,qJe=()=>`Add charts to this group's pool below, then select which ones the group offers.`,JJe=((e={},t={})=>(t.locale??q())===`fr`?KJe(e):qJe(e)),YJe=()=>`Ajouter une charte au pool…`,XJe=()=>`Add a chart to the pool…`,ZJe=((e={},t={})=>(t.locale??q())===`fr`?YJe(e):XJe(e)),QJe=e=>`Retirer ${e?.name} du pool`,$Je=e=>`Remove ${e?.name} from the pool`,zQ=((e,t={})=>(t.locale??q())===`fr`?QJe(e):$Je(e)),eYe=e=>`Proposer la charte ${e?.name} à ce groupe`,tYe=e=>`Offer chart ${e?.name} to this group`,nYe=((e,t={})=>(t.locale??q())===`fr`?eYe(e):tYe(e)),rYe=()=>`Charte par défaut du groupe`,iYe=()=>`Group default chart`,BQ=((e={},t={})=>(t.locale??q())===`fr`?rYe(e):iYe(e)),aYe=()=>`Définir par défaut`,oYe=()=>`Set as default`,sYe=((e={},t={})=>(t.locale??q())===`fr`?aYe(e):oYe(e)),cYe=()=>`Gestionnaire`,lYe=()=>`Manager`,VQ=((e={},t={})=>(t.locale??q())===`fr`?cYe(e):lYe(e)),uYe=()=>`Promouvoir gestionnaire`,dYe=()=>`Promote to manager`,HQ=((e={},t={})=>(t.locale??q())===`fr`?uYe(e):dYe(e)),fYe=()=>`Retirer gestionnaire`,pYe=()=>`Remove manager`,UQ=((e={},t={})=>(t.locale??q())===`fr`?fYe(e):pYe(e)),mYe=()=>`Changement de gestionnaire refusé`,hYe=()=>`Manager change rejected`,gYe=((e={},t={})=>(t.locale??q())===`fr`?mYe(e):hYe(e)),_Ye=()=>`Mise à jour de la charte refusée`,vYe=()=>`Chart update rejected`,WQ=((e={},t={})=>(t.locale??q())===`fr`?_Ye(e):vYe(e)),yYe=()=>`Enregistrement du groupe refusé`,bYe=()=>`Group save rejected`,xYe=((e={},t={})=>(t.locale??q())===`fr`?yYe(e):bYe(e)),SYe=()=>`Suppression du groupe refusée`,CYe=()=>`Group deletion rejected`,wYe=((e={},t={})=>(t.locale??q())===`fr`?SYe(e):CYe(e)),TYe=()=>`Mise à jour de l'adhésion refusée`,EYe=()=>`Membership update rejected`,GQ=((e={},t={})=>(t.locale??q())===`fr`?TYe(e):EYe(e)),DYe=()=>`Partage de l'agent refusé`,OYe=()=>`Agent sharing rejected`,KQ=((e={},t={})=>(t.locale??q())===`fr`?DYe(e):OYe(e)),kYe=()=>`Réordonner cet onglet`,AYe=()=>`Reorder this tab`,jYe=((e={},t={})=>(t.locale??q())===`fr`?kYe(e):AYe(e)),MYe=()=>`Réglages`,NYe=()=>`Settings`,PYe=((e={},t={})=>(t.locale??q())===`fr`?MYe(e):NYe(e)),FYe=()=>`← Retour au chat`,IYe=()=>`← Back to chat`,LYe=((e={},t={})=>(t.locale??q())===`fr`?FYe(e):IYe(e)),RYe=()=>`Réglages`,zYe=()=>`Settings`,BYe=((e={},t={})=>(t.locale??q())===`fr`?RYe(e):zYe(e)),VYe=()=>`Personnel`,HYe=()=>`Personal`,UYe=((e={},t={})=>(t.locale??q())===`fr`?VYe(e):HYe(e)),WYe=()=>`Agents`,GYe=()=>`Agents`,KYe=((e={},t={})=>(t.locale??q())===`fr`?WYe(e):GYe(e)),qYe=()=>`Accès & utilisateurs`,JYe=()=>`Access & users`,YYe=((e={},t={})=>(t.locale??q())===`fr`?qYe(e):JYe(e)),XYe=()=>`Observabilité`,ZYe=()=>`Observability`,QYe=((e={},t={})=>(t.locale??q())===`fr`?XYe(e):ZYe(e)),$Ye=()=>`Fermer`,eXe=()=>`Close`,qQ=((e={},t={})=>(t.locale??q())===`fr`?$Ye(e):eXe(e)),tXe=()=>`héritée`,nXe=()=>`inherited`,rXe=((e={},t={})=>(t.locale??q())===`fr`?tXe(e):nXe(e)),iXe=()=>`Revenir à la valeur héritée`,aXe=()=>`Back to the inherited value`,JQ=((e={},t={})=>(t.locale??q())===`fr`?iXe(e):aXe(e)),oXe=()=>`Application…`,sXe=()=>`Applying…`,YQ=((e={},t={})=>(t.locale??q())===`fr`?oXe(e):sXe(e)),cXe=()=>`Échec de l’application.`,lXe=()=>`Failed to apply.`,uXe=((e={},t={})=>(t.locale??q())===`fr`?cXe(e):lXe(e)),dXe=()=>`Réessayer`,fXe=()=>`Retry`,XQ=((e={},t={})=>(t.locale??q())===`fr`?dXe(e):fXe(e)),pXe=()=>`Réflexion`,mXe=()=>`Reasoning`,hXe=((e={},t={})=>(t.locale??q())===`fr`?pXe(e):mXe(e)),gXe=()=>`Vitesse`,_Xe=()=>`Speed`,vXe=((e={},t={})=>(t.locale??q())===`fr`?gXe(e):_Xe(e)),yXe=()=>`Hérité`,bXe=()=>`Inherited`,xXe=((e={},t={})=>(t.locale??q())===`fr`?yXe(e):bXe(e)),SXe=()=>`Rapide`,CXe=()=>`Fast`,ZQ=((e={},t={})=>(t.locale??q())===`fr`?SXe(e):CXe(e)),wXe=()=>`Standard`,TXe=()=>`Standard`,QQ=((e={},t={})=>(t.locale??q())===`fr`?wXe(e):TXe(e)),EXe=()=>`Tous les réglages de session`,DXe=()=>`All session settings`,OXe=((e={},t={})=>(t.locale??q())===`fr`?EXe(e):DXe(e)),kXe=()=>`Réglages de session`,AXe=()=>`Session settings`,jXe=((e={},t={})=>(t.locale??q())===`fr`?kXe(e):AXe(e)),MXe=()=>`Réglages appliqués à cette conversation.`,NXe=()=>`Settings applied to this conversation.`,PXe=((e={},t={})=>(t.locale??q())===`fr`?MXe(e):NXe(e)),FXe=()=>`Génération`,IXe=()=>`Generation`,LXe=((e={},t={})=>(t.locale??q())===`fr`?FXe(e):IXe(e)),RXe=()=>`Session`,zXe=()=>`Session`,BXe=((e={},t={})=>(t.locale??q())===`fr`?RXe(e):zXe(e)),VXe=()=>`Agent`,HXe=()=>`Agent`,UXe=((e={},t={})=>(t.locale??q())===`fr`?VXe(e):HXe(e)),WXe=()=>`Actions`,GXe=()=>`Actions`,KXe=((e={},t={})=>(t.locale??q())===`fr`?WXe(e):GXe(e)),qXe=()=>`Contexte`,JXe=()=>`Context`,YXe=((e={},t={})=>(t.locale??q())===`fr`?qXe(e):JXe(e)),XXe=e=>`${e?.pct} % · ${e?.used} / ${e?.total} jetons`,ZXe=e=>`${e?.pct}% · ${e?.used} / ${e?.total} tokens`,QXe=((e,t={})=>(t.locale??q())===`fr`?XXe(e):ZXe(e)),$Xe=()=>`Verbosité`,eZe=()=>`Verbosity`,tZe=((e={},t={})=>(t.locale??q())===`fr`?$Xe(e):eZe(e)),nZe=e=>`${e?.level} · fixée`,rZe=e=>`${e?.level} · pinned`,iZe=((e,t={})=>(t.locale??q())===`fr`?nZe(e):rZe(e)),aZe=()=>`Fixée par la passerelle pour un streaming complet.`,oZe=()=>`Pinned by the bridge for complete streaming.`,sZe=((e={},t={})=>(t.locale??q())===`fr`?aZe(e):oZe(e)),cZe=()=>`Coût / jetons`,lZe=()=>`Cost / tokens`,uZe=((e={},t={})=>(t.locale??q())===`fr`?cZe(e):lZe(e)),dZe=e=>`~${e?.cost} $ · ${e?.tokens} jetons`,fZe=e=>`~$${e?.cost} · ${e?.tokens} tokens`,pZe=((e,t={})=>(t.locale??q())===`fr`?dZe(e):fZe(e)),mZe=e=>`~${e?.cost} $`,hZe=e=>`~$${e?.cost}`,gZe=((e,t={})=>(t.locale??q())===`fr`?mZe(e):hZe(e)),_Ze=e=>`${e?.tokens} jetons`,vZe=e=>`${e?.tokens} tokens`,yZe=((e,t={})=>(t.locale??q())===`fr`?_Ze(e):vZe(e)),bZe=()=>`Compacter le contexte`,xZe=()=>`Compact the context`,SZe=((e={},t={})=>(t.locale??q())===`fr`?bZe(e):xZe(e)),CZe=()=>`Compacter le contexte ?`,wZe=()=>`Compact the context?`,TZe=((e={},t={})=>(t.locale??q())===`fr`?CZe(e):wZe(e)),EZe=()=>`L’agent résume la conversation pour libérer de l’espace dans la fenêtre de contexte. Les messages restent visibles ici.`,DZe=()=>`The agent summarizes the conversation to free space in the context window. Messages stay visible here.`,OZe=((e={},t={})=>(t.locale??q())===`fr`?EZe(e):DZe(e)),kZe=()=>`Compacter`,AZe=()=>`Compact`,jZe=((e={},t={})=>(t.locale??q())===`fr`?kZe(e):AZe(e)),MZe=()=>`Réinitialiser la session`,NZe=()=>`Reset the session`,PZe=((e={},t={})=>(t.locale??q())===`fr`?MZe(e):NZe(e)),FZe=()=>`Réinitialiser la session ?`,IZe=()=>`Reset the session?`,LZe=((e={},t={})=>(t.locale??q())===`fr`?FZe(e):IZe(e)),RZe=()=>`La session de l’agent repart à zéro et se réhydrate depuis la conversation au prochain message. Aucun message n’est supprimé.`,zZe=()=>`The agent session starts fresh and re-hydrates from the conversation on the next message. No message is deleted.`,BZe=((e={},t={})=>(t.locale??q())===`fr`?RZe(e):zZe(e)),VZe=()=>`Réinitialiser`,HZe=()=>`Reset`,UZe=((e={},t={})=>(t.locale??q())===`fr`?VZe(e):HZe(e)),WZe=()=>`Demande envoyée à l’agent.`,GZe=()=>`Request sent to the agent.`,KZe=((e={},t={})=>(t.locale??q())===`fr`?WZe(e):GZe(e)),qZe=()=>`Échec de l’action.`,JZe=()=>`Action failed.`,YZe=((e={},t={})=>(t.locale??q())===`fr`?qZe(e):JZe(e)),XZe=()=>`Fichiers d’agent`,ZZe=()=>`Agent files`,QZe=((e={},t={})=>(t.locale??q())===`fr`?XZe(e):ZZe(e)),$Ze=()=>`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.`,eQe=()=>`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.`,tQe=((e={},t={})=>(t.locale??q())===`fr`?$Ze(e):eQe(e)),nQe=()=>`Instance`,rQe=()=>`Instance`,$Q=((e={},t={})=>(t.locale??q())===`fr`?nQe(e):rQe(e)),iQe=()=>`Agent`,aQe=()=>`Agent`,oQe=((e={},t={})=>(t.locale??q())===`fr`?iQe(e):aQe(e)),sQe=()=>`Aucun agent disponible.`,cQe=()=>`No agent available.`,lQe=((e={},t={})=>(t.locale??q())===`fr`?sQe(e):cQe(e)),uQe=()=>`Aucun fichier.`,dQe=()=>`No files.`,fQe=((e={},t={})=>(t.locale??q())===`fr`?uQe(e):dQe(e)),pQe=()=>`Bridge injoignable — impossible de lister les fichiers.`,mQe=()=>`Bridge unreachable — cannot list the files.`,hQe=((e={},t={})=>(t.locale??q())===`fr`?pQe(e):mQe(e)),gQe=()=>`absent`,_Qe=()=>`missing`,vQe=((e={},t={})=>(t.locale??q())===`fr`?gQe(e):_Qe(e)),yQe=e=>`${e?.size} ko`,bQe=e=>`${e?.size} kB`,xQe=((e,t={})=>(t.locale??q())===`fr`?yQe(e):bQe(e)),SQe=e=>`${e?.pct} %`,CQe=e=>`${e?.pct}%`,wQe=((e,t={})=>(t.locale??q())===`fr`?SQe(e):CQe(e)),TQe=()=>`Proche de la limite bootstrap`,EQe=()=>`Near the bootstrap limit`,DQe=((e={},t={})=>(t.locale??q())===`fr`?TQe(e):EQe(e)),OQe=e=>`Budget total : ${e?.used} ko / ${e?.total} ko (${e?.pct} %)`,kQe=e=>`Total budget: ${e?.used} kB / ${e?.total} kB (${e?.pct}%)`,AQe=((e,t={})=>(t.locale??q())===`fr`?OQe(e):kQe(e)),jQe=()=>`Éditer`,MQe=()=>`Edit`,NQe=((e={},t={})=>(t.locale??q())===`fr`?jQe(e):MQe(e)),PQe=()=>`Consulter`,FQe=()=>`View`,IQe=((e={},t={})=>(t.locale??q())===`fr`?PQe(e):FQe(e)),LQe=e=>`${e?.name}`,RQe=e=>`${e?.name}`,e$=((e,t={})=>(t.locale??q())===`fr`?LQe(e):RQe(e)),zQe=e=>`Agent ${e?.agent} · instance ${e?.instance}`,BQe=e=>`Agent ${e?.agent} · instance ${e?.instance}`,VQe=((e,t={})=>(t.locale??q())===`fr`?zQe(e):BQe(e)),HQe=()=>`lecture seule`,UQe=()=>`read-only`,WQe=((e={},t={})=>(t.locale??q())===`fr`?HQe(e):UQe(e)),GQe=()=>`Source markdown brute — l’aperçu rendu n’est pas disponible ici.`,KQe=()=>`Raw markdown source — a rendered preview is not available here.`,qQe=((e={},t={})=>(t.locale??q())===`fr`?GQe(e):KQe(e)),JQe=e=>`${e?.count} / ${e?.max} caractères`,YQe=e=>`${e?.count} / ${e?.max} characters`,XQe=((e,t={})=>(t.locale??q())===`fr`?JQe(e):YQe(e)),ZQe=()=>`Enregistrer`,QQe=()=>`Save`,$Qe=((e={},t={})=>(t.locale??q())===`fr`?ZQe(e):QQe(e)),e$e=e=>`${e?.name} enregistré.`,t$e=e=>`${e?.name} saved.`,n$e=((e,t={})=>(t.locale??q())===`fr`?e$e(e):t$e(e)),r$e=()=>`Échec de l’enregistrement.`,i$e=()=>`Save failed.`,a$e=((e={},t={})=>(t.locale??q())===`fr`?r$e(e):i$e(e)),o$e=()=>`Impossible de charger le fichier.`,s$e=()=>`Could not load the file.`,c$e=((e={},t={})=>(t.locale??q())===`fr`?o$e(e):s$e(e)),l$e=()=>`Le fichier a changé depuis le chargement. Rechargez avant d’enregistrer (vos modifications sont conservées).`,u$e=()=>`The file changed since it was loaded. Reload before saving (your edits are kept).`,d$e=((e={},t={})=>(t.locale??q())===`fr`?l$e(e):u$e(e)),f$e=()=>`Recharger`,p$e=()=>`Reload`,m$e=((e={},t={})=>(t.locale??q())===`fr`?f$e(e):p$e(e)),h$e=e=>`Écrire ${e?.name} ?`,g$e=e=>`Write ${e?.name}?`,_$e=((e,t={})=>(t.locale??q())===`fr`?h$e(e):g$e(e)),v$e=e=>`Le fichier sera écrit sur l’agent ${e?.agent}. Une révision complète avant/après est conservée.`,y$e=e=>`The file will be written to agent ${e?.agent}. A full before/after revision is kept.`,b$e=((e,t={})=>(t.locale??q())===`fr`?v$e(e):y$e(e)),x$e=e=>`${e?.added} ligne(s) ajoutée(s) · ${e?.removed} ligne(s) retirée(s)`,S$e=e=>`${e?.added} line(s) added · ${e?.removed} line(s) removed`,C$e=((e,t={})=>(t.locale??q())===`fr`?x$e(e):S$e(e)),w$e=()=>`Ajoutées (extrait) :`,T$e=()=>`Added (sample):`,E$e=((e={},t={})=>(t.locale??q())===`fr`?w$e(e):T$e(e)),D$e=()=>`Retirées (extrait) :`,O$e=()=>`Removed (sample):`,k$e=((e={},t={})=>(t.locale??q())===`fr`?D$e(e):O$e(e)),A$e=()=>`Écrire le fichier`,j$e=()=>`Write the file`,M$e=((e={},t={})=>(t.locale??q())===`fr`?A$e(e):j$e(e)),N$e=()=>`Défauts de chat`,P$e=()=>`Chat defaults`,F$e=((e={},t={})=>(t.locale??q())===`fr`?N$e(e):P$e(e)),I$e=()=>`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.`,L$e=()=>`Default settings for new chat sessions, read from the gateway’s global configuration. Per-chat and per-agent settings keep precedence.`,R$e=((e={},t={})=>(t.locale??q())===`fr`?I$e(e):L$e(e)),z$e=()=>`Réflexion par défaut`,B$e=()=>`Default thinking`,V$e=((e={},t={})=>(t.locale??q())===`fr`?z$e(e):B$e(e)),H$e=()=>`Niveau de raisonnement appliqué quand un chat ne définit pas le sien.`,U$e=()=>`Reasoning level applied when a chat does not set its own.`,W$e=((e={},t={})=>(t.locale??q())===`fr`?H$e(e):U$e(e)),G$e=()=>`Vitesse par défaut`,K$e=()=>`Default speed`,q$e=((e={},t={})=>(t.locale??q())===`fr`?G$e(e):K$e(e)),J$e=()=>`Mode rapide ou standard appliqué quand un chat ne définit pas le sien.`,Y$e=()=>`Fast or standard mode applied when a chat does not set its own.`,X$e=((e={},t={})=>(t.locale??q())===`fr`?J$e(e):Y$e(e)),Z$e=()=>`Bridge injoignable — impossible de lire les défauts globaux.`,Q$e=()=>`Bridge unreachable — cannot read the global defaults.`,$$e=((e={},t={})=>(t.locale??q())===`fr`?Z$e(e):Q$e(e)),e1e=()=>`Enregistrer`,t1e=()=>`Save`,n1e=((e={},t={})=>(t.locale??q())===`fr`?e1e(e):t1e(e)),r1e=()=>`Défauts globaux enregistrés.`,i1e=()=>`Global defaults saved.`,a1e=((e={},t={})=>(t.locale??q())===`fr`?r1e(e):i1e(e)),o1e=()=>`Échec de l’écriture des défauts globaux.`,s1e=()=>`Failed to write the global defaults.`,c1e=((e={},t={})=>(t.locale??q())===`fr`?o1e(e):s1e(e)),l1e=()=>`Ces valeurs sont écrites dans openclaw.json, la configuration globale de l’instance — elles s’appliquent à tous les utilisateurs.`,u1e=()=>`These values are written to openclaw.json, the instance’s global configuration — they apply to every user.`,d1e=((e={},t={})=>(t.locale??q())===`fr`?l1e(e):u1e(e)),f1e=()=>`Modifier les défauts globaux ?`,p1e=()=>`Change the global defaults?`,m1e=((e={},t={})=>(t.locale??q())===`fr`?f1e(e):p1e(e)),h1e=()=>`Cette écriture modifie openclaw.json pour toute l’instance : tous les chats qui héritent du défaut changeront de comportement.`,g1e=()=>`This write changes openclaw.json for the whole instance: every chat inheriting the default will change behavior.`,_1e=((e={},t={})=>(t.locale??q())===`fr`?h1e(e):g1e(e)),v1e=()=>`Modifier`,y1e=()=>`Change`,b1e=((e={},t={})=>(t.locale??q())===`fr`?v1e(e):y1e(e)),x1e=()=>`Compatibilité`,S1e=()=>`Compatibility`,C1e=((e={},t={})=>(t.locale??q())===`fr`?x1e(e):S1e(e)),w1e=()=>`Aucun relevé de compatibilité pour l’instant — le sondage tourne toutes les 5 minutes.`,T1e=()=>`No compatibility reading yet — the poll runs every 5 minutes.`,E1e=((e={},t={})=>(t.locale??q())===`fr`?w1e(e):T1e(e)),D1e=()=>`Protocole :`,O1e=()=>`Protocol:`,k1e=((e={},t={})=>(t.locale??q())===`fr`?D1e(e):O1e(e)),A1e=()=>`inconnue`,j1e=()=>`unknown`,t$=((e={},t={})=>(t.locale??q())===`fr`?A1e(e):j1e(e)),M1e=()=>`Dernier sondage en échec — affichage du dernier relevé valide.`,N1e=()=>`Last poll failed — showing the last good reading.`,P1e=((e={},t={})=>(t.locale??q())===`fr`?M1e(e):N1e(e)),F1e=()=>`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.`,I1e=()=>`This bridge does not publish a compatibility manifest (older version) — legacy policy: only model and reasoning are offered.`,L1e=((e={},t={})=>(t.locale??q())===`fr`?F1e(e):I1e(e)),R1e=()=>`OpenClaw supporté :`,z1e=()=>`OpenClaw supported:`,B1e=((e={},t={})=>(t.locale??q())===`fr`?R1e(e):z1e(e)),V1e=e=>`de ${e?.min} à ${e?.max} (validé)`,H1e=e=>`from ${e?.min} to ${e?.max} (validated)`,U1e=((e,t={})=>(t.locale??q())===`fr`?V1e(e):H1e(e)),W1e=()=>`1 version validée`,G1e=()=>`1 validated version`,K1e=((e={},t={})=>(t.locale??q())===`fr`?W1e(e):G1e(e)),q1e=e=>`${e?.count} versions validées`,J1e=e=>`${e?.count} validated versions`,Y1e=((e,t={})=>(t.locale??q())===`fr`?q1e(e):J1e(e)),X1e=()=>`Validées au banc`,Z1e=()=>`Bench-validated`,Q1e=((e={},t={})=>(t.locale??q())===`fr`?X1e(e):Z1e(e)),$1e=()=>`Aucune connexion connue du relevé de compatibilité.`,e0e=()=>`No connection known to the compatibility reading.`,t0e=((e={},t={})=>(t.locale??q())===`fr`?$1e(e):e0e(e)),n0e=()=>`✓ dans le support`,r0e=()=>`✓ within support`,i0e=((e={},t={})=>(t.locale??q())===`fr`?n0e(e):r0e(e)),a0e=()=>`⚠ au-delà du validé`,o0e=()=>`⚠ beyond validated`,s0e=((e={},t={})=>(t.locale??q())===`fr`?a0e(e):o0e(e)),c0e=()=>`? inconnue`,l0e=()=>`? unknown`,u0e=((e={},t={})=>(t.locale??q())===`fr`?c0e(e):l0e(e)),d0e=()=>`Hermes : adaptateur à venir.`,f0e=()=>`Hermes: adapter coming.`,p0e=((e={},t={})=>(t.locale??q())===`fr`?d0e(e):f0e(e)),m0e=e=>`Non supporté par cette instance (version gateway ${e?.version}).`,h0e=e=>`Not supported by this instance (gateway version ${e?.version}).`,g0e=((e,t={})=>(t.locale??q())===`fr`?m0e(e):h0e(e)),_0e=()=>`Non supporté par cette instance (version gateway inconnue).`,v0e=()=>`Not supported by this instance (unknown gateway version).`,y0e=((e={},t={})=>(t.locale??q())===`fr`?_0e(e):v0e(e)),n$=(0,N.createContext)({label:`Atrium`,logoUrl:null,isDefault:!0,initials:`A`,agentName:null,agentEmoji:null});function r$(){return(0,N.useContext)(n$)}function b0e(e){return e.agentName??e.label}function x0e(e){return e.agentName?GK({name:e.agentName}):HK({name:e.label})}var S0e={user:jze(),assistant:`OpenClaw`,system:Pze()},C0e=Lze();function i$(e){return new Date(e).toISOString().slice(0,16).replace(`T`,` `)+` UTC`}function a$(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 w0e(e,t={}){let n=[];n.push(`# ${t.title?.trim()||kQ()}`),t.exportedAt!=null&&(n.push(``),n.push(`_${Hze({date:i$(t.exportedAt)})}_`)),t.truncated&&(n.push(``),n.push(C0e));for(let t of e){n.push(``),n.push(`## ${S0e[t.role]} · ${i$(t.createdAt)}`);let e=t.text.trim();e.length>0&&(n.push(``),n.push(e));for(let e of a$(t.parts))n.push(``),n.push(Gze({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},Ux=Ox,Wx=kx,Gx=Ax,Kx=Nx,qx=zx,Jx=Vx,Yx=Fx,Xx=Lx;function Zx(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 Qx(e){let[t,n]=N.useState(void 0);return Uy(()=>{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 $x=`Checkbox`,[eS,Doe]=Vy($x),[tS,nS]=eS($x);function rS(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]=Wy({prop:n,defaultProp:i??!1,onChange:c,caller:$x}),[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:fS(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,I.jsx)(tS,{scope:t,...b,children:dS(d)?d(b):r})}var iS=`CheckboxTrigger`,aS=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}=nS(iS,e),h=_y(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)(Ey.button,{type:`button`,role:`checkbox`,"aria-checked":fS(c)?`mixed`:c,"aria-required":l,"data-state":pS(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=>fS(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});aS.displayName=iS;var oS=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)(rS,{__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)(aS,{...d,ref:t,__scopeCheckbox:n}),e&&(0,I.jsx)(uS,{__scopeCheckbox:n})]})})});oS.displayName=$x;var sS=`CheckboxIndicator`,cS=N.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=nS(sS,n);return(0,I.jsx)(Gy,{present:r||fS(a.checked)||a.checked===!0,children:(0,I.jsx)(Ey.span,{"data-state":pS(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});cS.displayName=sS;var lS=`CheckboxBubbleInput`,uS=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}=nS(lS,e),m=_y(n,p),h=Zx(a),g=Qx(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=fS(a),n.call(e,fS(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=N.useRef(fS(a)?!1:a);return(0,I.jsx)(Ey.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%)`}})});uS.displayName=lS;function dS(e){return typeof e==`function`}function fS(e){return e===`indeterminate`}function pS(e){return fS(e)?`indeterminate`:e?`checked`:`unchecked`}var mS=[`top`,`right`,`bottom`,`left`],hS=Math.min,gS=Math.max,_S=Math.round,vS=Math.floor,yS=e=>({x:e,y:e}),Ooe={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bS(e,t,n){return gS(e,hS(t,n))}function xS(e,t){return typeof e==`function`?e(t):e}function SS(e){return e.split(`-`)[0]}function CS(e){return e.split(`-`)[1]}function wS(e){return e===`x`?`y`:`x`}function TS(e){return e===`y`?`height`:`width`}function ES(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function DS(e){return wS(ES(e))}function koe(e,t,n){n===void 0&&(n=!1);let r=CS(e),i=DS(e),a=TS(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=jS(o)),[o,jS(o)]}function Aoe(e){let t=jS(e);return[OS(e),t,OS(t)]}function OS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var kS=[`left`,`right`],AS=[`right`,`left`],joe=[`top`,`bottom`],Moe=[`bottom`,`top`];function Noe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?AS:kS:t?kS:AS;case`left`:case`right`:return t?joe:Moe;default:return[]}}function Poe(e,t,n,r){let i=CS(e),a=Noe(SS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(OS)))),a}function jS(e){let t=SS(e);return Ooe[t]+e.slice(t.length)}function Foe(e){return{top:0,right:0,bottom:0,left:0,...e}}function MS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Foe(e)}function NS(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 PS(e,t,n){let{reference:r,floating:i}=e,a=ES(t),o=DS(t),s=TS(o),c=SS(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(CS(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}=xS(t,e),p=MS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=NS(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=NS(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}=PS(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}=PS(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}=xS(e,t)||{};if(l==null)return{};let d=MS(u),f={x:n,y:r},p=DS(i),m=TS(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=hS(d[_],T),D=hS(d[v],T),O=E,ee=C-h[m]-D,te=C/2-h[m]/2+w,k=bS(O,te,ee),A=!c.arrow&&CS(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}=xS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=SS(r),_=ES(o),v=SS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[jS(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`&&_!==ES(t))||T.every(e=>ES(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=ES(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 FS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IS(e){return mS.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}=xS(e,t);switch(i){case`referenceHidden`:{let e=FS(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:IS(e)}}}case`escaped`:{let e=FS(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:IS(e)}}}default:return{}}}}},LS=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=SS(n),s=CS(n),c=ES(n)===`y`,l=LS.has(o)?-1:1,u=a&&c?-1:1,d=xS(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}=xS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ES(SS(i)),p=wS(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=bS(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=bS(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}=xS(e,t),u={x:n,y:r},d=ES(i),f=wS(d),p=u[f],m=u[d],h=xS(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=LS.has(SS(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}=xS(e,t),u=await o.detectOverflow(t,l),d=SS(i),f=CS(i),p=ES(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=hS(h-u[g],v),x=hS(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=gS(u.left,0),t=gS(u.right,0),n=gS(u.top,0),r=gS(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:gS(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:gS(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 RS(){return typeof window<`u`}function zS(e){return HS(e)?(e.nodeName||``).toLowerCase():`#document`}function BS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function VS(e){return((HS(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function HS(e){return RS()?e instanceof Node||e instanceof BS(e).Node:!1}function US(e){return RS()?e instanceof Element||e instanceof BS(e).Element:!1}function WS(e){return RS()?e instanceof HTMLElement||e instanceof BS(e).HTMLElement:!1}function GS(e){return!RS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof BS(e).ShadowRoot}function KS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$S(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function qoe(e){return/^(table|td|th)$/.test(zS(e))}function qS(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/,JS=e=>!!e&&e!==`none`,YS;function XS(e){let t=US(e)?$S(e):e;return JS(t.transform)||JS(t.translate)||JS(t.scale)||JS(t.rotate)||JS(t.perspective)||!ZS()&&(JS(t.backdropFilter)||JS(t.filter))||Joe.test(t.willChange||``)||Yoe.test(t.contain||``)}function Xoe(e){let t=tC(e);for(;WS(t)&&!QS(t);){if(XS(t))return t;if(qS(t))return null;t=tC(t)}return null}function ZS(){return YS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),YS}function QS(e){return/^(html|body|#document)$/.test(zS(e))}function $S(e){return BS(e).getComputedStyle(e)}function eC(e){return US(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tC(e){if(zS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||GS(e)&&e.host||VS(e);return GS(t)?t.host:t}function nC(e){let t=tC(e);return QS(t)?e.ownerDocument?e.ownerDocument.body:e.body:WS(t)&&KS(t)?t:nC(t)}function rC(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=nC(e),i=r===e.ownerDocument?.body,a=BS(r);if(i){let e=iC(a);return t.concat(a,a.visualViewport||[],KS(r)?r:[],e&&n?rC(e):[])}else return t.concat(r,rC(r,[],n))}function iC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function aC(e){let t=$S(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=WS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=_S(n)!==a||_S(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function oC(e){return US(e)?e:e.contextElement}function sC(e){let t=oC(e);if(!WS(t))return yS(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=aC(t),o=(a?_S(n.width):n.width)/r,s=(a?_S(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Zoe=yS(0);function cC(e){let t=BS(e);return!ZS()||!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!==BS(e)?!1:t}function lC(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=oC(e),o=yS(1);t&&(r?US(r)&&(o=sC(r)):o=sC(e));let s=Qoe(a,n,r)?cC(a):yS(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=BS(a),t=r&&US(r)?BS(r):r,n=e,i=iC(n);for(;i&&r&&t!==n;){let e=sC(i),t=i.getBoundingClientRect(),r=$S(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=BS(i),i=iC(n)}}return NS({width:u,height:d,x:c,y:l})}function uC(e,t){let n=eC(e).scrollLeft;return t?t.left+n:lC(VS(e)).left+n}function dC(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-uC(e,n),y:n.top+t.scrollTop}}function $oe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=VS(r),s=t?qS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=yS(1),u=yS(0),d=WS(r);if((d||!d&&!a)&&((zS(r)!==`body`||KS(o))&&(c=eC(r)),d)){let e=lC(r);l=sC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?dC(o,c):yS(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=VS(e),n=eC(e),r=e.ownerDocument.body,i=gS(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=gS(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+uC(e),s=-n.scrollTop;return $S(r).direction===`rtl`&&(o+=gS(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var fC=25;function nse(e,t){let n=BS(e),r=VS(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ZS();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=uC(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<=fC&&(a-=o)}else l<=fC&&(a+=l);return{width:a,height:o,x:s,y:c}}function rse(e,t){let n=lC(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=WS(e)?sC(e):yS(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function pC(e,t,n){let r;if(t===`viewport`)r=nse(e,n);else if(t===`document`)r=tse(VS(e));else if(US(t))r=rse(t,n);else{let n=cC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return NS(r)}function mC(e,t){let n=tC(e);return n===t||!US(n)||QS(n)?!1:$S(n).position===`fixed`||mC(n,t)}function ise(e,t){let n=t.get(e);if(n)return n;let r=rC(e,[],!1).filter(e=>US(e)&&zS(e)!==`body`),i=null,a=$S(e).position===`fixed`,o=a?tC(e):e;for(;US(o)&&!QS(o);){let t=$S(o),n=XS(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||KS(o)&&!n&&mC(e,o))?r=r.filter(e=>e!==o):i=t,o=tC(o)}return t.set(e,r),r}function ase(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?qS(t)?[]:ise(t,this._c):[].concat(n),r],o=pC(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=pC(t,a[e],i);s=gS(n.top,s),c=hS(n.right,c),l=hS(n.bottom,l),u=gS(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ose(e){let{width:t,height:n}=aC(e);return{width:t,height:n}}function sse(e,t,n){let r=WS(t),i=VS(t),a=n===`fixed`,o=lC(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=yS(0);function l(){c.x=uC(i)}if(r||!r&&!a)if((zS(t)!==`body`||KS(i))&&(s=eC(t)),r){let e=lC(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?dC(i,s):yS(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 hC(e){return $S(e).position===`static`}function gC(e,t){if(!WS(e)||$S(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return VS(e)===n&&(n=n.ownerDocument.body),n}function _C(e,t){let n=BS(e);if(qS(e))return n;if(!WS(e)){let t=tC(e);for(;t&&!QS(t);){if(US(t)&&!hC(t))return t;t=tC(t)}return n}let r=gC(e,t);for(;r&&qoe(r)&&hC(r);)r=gC(r,t);return r&&QS(r)&&hC(r)&&!XS(r)?n:r||Xoe(e)||n}var cse=async function(e){let t=this.getOffsetParent||_C,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 $S(e).direction===`rtl`}var use={convertOffsetParentRelativeRectToViewportRelativeRect:$oe,getDocumentElement:VS,getClippingRect:ase,getOffsetParent:_C,getElementRects:cse,getClientRects:ese,getDimensions:ose,getScale:sC,isElement:US,isRTL:lse};function vC(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=VS(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=vS(d),h=vS(i.clientWidth-(u+f)),g=vS(i.clientHeight-(d+p)),_=vS(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:gS(0,hS(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&&!vC(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=oC(e),u=i||a?[...l?rC(l):[],...t?rC(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?lC(e):null;c&&g();function g(){let t=lC(e);h&&!vC(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,yC=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})},bC=typeof document<`u`?N.useLayoutEffect:function(){};function xC(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(!xC(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)&&!xC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function SC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function CC(e,t){let n=SC(e);return Math.round(t*n)/n}function wC(e){let t=N.useRef(e);return bC(()=>{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);xC(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=wC(c),D=wC(i),O=wC(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&&!xC(w.current,t)&&(w.current=t,ls.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);bC(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=N.useRef(!1);bC(()=>(te.current=!0,()=>{te.current=!1}),[]),bC(()=>{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=CC(A.floating,u.x),r=CC(A.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...SC(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?{}:yC({element:r.current,padding:i}).fn(n):r?yC({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`,TC=N.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,I.jsx)(Ey.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`})})});TC.displayName=kse;var Ase=TC,EC=`Popper`,[DC,OC]=Vy(EC),[jse,kC]=DC(EC),AC=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})};AC.displayName=EC;var jC=`PopperAnchor`,MC=N.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=kC(jC,n),o=N.useRef(null),s=a.onAnchorChange,c=_y(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&&LC(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,I.jsx)(Ey.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});MC.displayName=jC;var NC=`PopperContent`,[Mse,Nse]=DC(NC),PC=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=kC(NC,n),[_,v]=N.useState(null),y=_y(t,e=>v(e)),[b,x]=N.useState(null),S=Qx(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;Uy(()=>(re(A),()=>{re(void 0)}),[A,re]);let[M,ie]=LC(A),ae=My(m);Uy(()=>{j&&ae?.()},[j,ae]);let oe=ne.arrow?.x,se=ne.arrow?.y,ce=ne.arrow?.centerOffset!==0,[le,ue]=N.useState();return Uy(()=>{_&&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)(Ey.div,{"data-side":M,"data-align":ie,...h,ref:y,style:{...h.style,animation:j?void 0:`none`}})})})});PC.displayName=NC;var FC=`PopperArrow`,Pse={top:`bottom`,right:`left`,bottom:`top`,left:`right`},IC=N.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Nse(FC,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`}})})});IC.displayName=FC;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]=LC(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 LC(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var RC=AC,zC=MC,BC=PC,VC=IC,HC=`rovingFocusGroup.onEntryFocus`,Lse={bubbles:!1,cancelable:!0},UC=`RovingFocusGroup`,[WC,GC,Rse]=Hy(UC),[zse,KC]=Vy(UC,[Rse]),[Bse,Vse]=zse(UC),qC=N.forwardRef((e,t)=>(0,I.jsx)(WC.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(WC.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,I.jsx)(Hse,{...e,ref:t})})}));qC.displayName=UC;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=_y(t,f),m=Yy(a),[h,g]=Wy({prop:o,defaultProp:s??null,onChange:c,caller:UC}),[_,v]=N.useState(!1),y=My(l),b=GC(n),x=N.useRef(!1),[S,C]=N.useState(0);return N.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(HC,y),()=>e.removeEventListener(HC,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)(Ey.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(HC,Lse);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);XC([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))})})}),JC=`RovingFocusGroupItem`,YC=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Jy(),l=a||c,u=Vse(JC,n),d=u.currentTabStopId===l,f=GC(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return N.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,I.jsx)(WC.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,I.jsx)(Ey.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(()=>XC(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});YC.displayName=JC;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 XC(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 ZC=qC,QC=YC,$C=[`Enter`,` `],qse=[`ArrowDown`,`PageUp`,`Home`],ew=[`ArrowUp`,`PageDown`,`End`],Jse=[...qse,...ew],Yse={ltr:[...$C,`ArrowRight`],rtl:[...$C,`ArrowLeft`]},Xse={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},tw=`Menu`,[nw,Zse,Qse]=Hy(tw),[rw,iw]=Vy(tw,[Qse,OC,KC]),aw=OC(),ow=KC(),[sw,cw]=rw(tw),[$se,lw]=rw(tw),uw=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=aw(t),[c,l]=N.useState(null),u=N.useRef(!1),d=My(a),f=Yy(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)(RC,{...s,children:(0,I.jsx)(sw,{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})})})};uw.displayName=tw;var ece=`MenuAnchor`,dw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=aw(n);return(0,I.jsx)(zC,{...i,...r,ref:t})});dw.displayName=ece;var fw=`MenuPortal`,[tce,pw]=rw(fw,{forceMount:void 0}),mw=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=cw(fw,t);return(0,I.jsx)(tce,{scope:t,forceMount:n,children:(0,I.jsx)(Gy,{present:n||a.open,children:(0,I.jsx)(db,{asChild:!0,container:i,children:r})})})};mw.displayName=fw;var hw=`MenuContent`,[nce,gw]=rw(hw),_w=N.forwardRef((e,t)=>{let n=pw(hw,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=cw(hw,e.__scopeMenu),o=lw(hw,e.__scopeMenu);return(0,I.jsx)(nw.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Gy,{present:r||a.open,children:(0,I.jsx)(nw.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=cw(hw,e.__scopeMenu),r=N.useRef(null),i=_y(t,r);return N.useEffect(()=>{let e=r.current;if(e)return Jb(e)},[]),(0,I.jsx)(vw,{...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=cw(hw,e.__scopeMenu);return(0,I.jsx)(vw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ace=by(`MenuContent.ScrollLock`),vw=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=cw(hw,n),_=lw(hw,n),v=aw(n),y=ow(n),b=Zse(n),[x,S]=N.useState(null),C=N.useRef(null),w=_y(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?Hb: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),[]),mb();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)(ab,{asChild:!0,trapped:i,onMountAutoFocus:K(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,I.jsx)($y,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,I.jsx)(ZC,{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)(BC,{role:`menu`,"aria-orientation":`vertical`,"data-state":Vw(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);ew.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,Ww(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)}))})})})})})})});_w.displayName=hw;var oce=`MenuGroup`,yw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Ey.div,{role:`group`,...r,ref:t})});yw.displayName=oce;var sce=`MenuLabel`,bw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Ey.div,{...r,ref:t})});bw.displayName=sce;var xw=`MenuItem`,Sw=`menu.itemSelect`,Cw=N.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=N.useRef(null),o=lw(xw,e.__scopeMenu),s=gw(xw,e.__scopeMenu),c=_y(t,a),l=N.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Sw,{bubbles:!0,cancelable:!0});e.addEventListener(Sw,e=>r?.(e),{once:!0}),Dy(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,I.jsx)(ww,{...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===` `||$C.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Cw.displayName=xw;var ww=N.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=gw(xw,n),s=ow(n),c=N.useRef(null),l=_y(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)(nw.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,I.jsx)(QC,{asChild:!0,...s,focusable:!r,children:(0,I.jsx)(Ey.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,Ww(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Ww(e=>o.onItemLeave(e))),onFocus:K(e.onFocus,()=>d(!0)),onBlur:K(e.onBlur,()=>d(!1))})})})}),cce=`MenuCheckboxItem`,Tw=N.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,I.jsx)(jw,{scope:e.__scopeMenu,checked:n,children:(0,I.jsx)(Cw,{role:`menuitemcheckbox`,"aria-checked":Hw(n)?`mixed`:n,...i,ref:t,"data-state":Uw(n),onSelect:K(i.onSelect,()=>r?.(Hw(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Tw.displayName=cce;var Ew=`MenuRadioGroup`,[lce,uce]=rw(Ew,{value:void 0,onValueChange:()=>{}}),Dw=N.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=My(r);return(0,I.jsx)(lce,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,I.jsx)(yw,{...i,ref:t})})});Dw.displayName=Ew;var Ow=`MenuRadioItem`,kw=N.forwardRef((e,t)=>{let{value:n,...r}=e,i=uce(Ow,e.__scopeMenu),a=n===i.value;return(0,I.jsx)(jw,{scope:e.__scopeMenu,checked:a,children:(0,I.jsx)(Cw,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Uw(a),onSelect:K(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});kw.displayName=Ow;var Aw=`MenuItemIndicator`,[jw,dce]=rw(Aw,{checked:!1}),Mw=N.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=dce(Aw,n);return(0,I.jsx)(Gy,{present:r||Hw(a.checked)||a.checked===!0,children:(0,I.jsx)(Ey.span,{...i,ref:t,"data-state":Uw(a.checked)})})});Mw.displayName=Aw;var fce=`MenuSeparator`,Nw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,I.jsx)(Ey.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Nw.displayName=fce;var pce=`MenuArrow`,Pw=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=aw(n);return(0,I.jsx)(VC,{...i,...r,ref:t})});Pw.displayName=pce;var Fw=`MenuSub`,[mce,Iw]=rw(Fw),hce=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=cw(Fw,t),o=aw(t),[s,c]=N.useState(null),[l,u]=N.useState(null),d=My(i);return N.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,I.jsx)(RC,{...o,children:(0,I.jsx)(sw,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,I.jsx)(mce,{scope:t,contentId:Jy(),triggerId:Jy(),trigger:s,onTriggerChange:c,children:n})})})};hce.displayName=Fw;var Lw=`MenuSubTrigger`,Rw=N.forwardRef((e,t)=>{let n=cw(Lw,e.__scopeMenu),r=lw(Lw,e.__scopeMenu),i=Iw(Lw,e.__scopeMenu),a=gw(Lw,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)(dw,{asChild:!0,...l,children:(0,I.jsx)(ww,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Vw(n.open),...e,ref:gy(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Ww(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,Ww(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())})})})});Rw.displayName=Lw;var zw=`MenuSubContent`,Bw=N.forwardRef((e,t)=>{let n=pw(hw,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=cw(hw,e.__scopeMenu),s=lw(hw,e.__scopeMenu),c=Iw(zw,e.__scopeMenu),l=N.useRef(null),u=_y(t,l);return(0,I.jsx)(nw.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(Gy,{present:r||o.open,children:(0,I.jsx)(nw.Slot,{scope:e.__scopeMenu,children:(0,I.jsx)(vw,{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())})})})})})});Bw.displayName=zw;function Vw(e){return e?`open`:`closed`}function Hw(e){return e===`indeterminate`}function Uw(e){return Hw(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 Ww(e){return t=>t.pointerType===`mouse`?e(t):void 0}var xce=uw,Sce=dw,Cce=mw,wce=_w,Tce=yw,Ece=bw,Dce=Cw,Oce=Tw,kce=Dw,Ace=kw,jce=Mw,Mce=Nw,Nce=Pw,Pce=Rw,Fce=Bw,Gw=`DropdownMenu`,[Ice,Lce]=Vy(Gw,[iw]),Kw=iw(),[Rce,qw]=Ice(Gw),Jw=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Kw(t),l=N.useRef(null),[u,d]=Wy({prop:i,defaultProp:a??!1,onChange:o,caller:Gw});return(0,I.jsx)(Rce,{scope:t,triggerId:Jy(),triggerRef:l,contentId:Jy(),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})})};Jw.displayName=Gw;var Yw=`DropdownMenuTrigger`,Xw=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=qw(Yw,n),o=Kw(n);return(0,I.jsx)(Sce,{asChild:!0,...o,children:(0,I.jsx)(Ey.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:gy(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())})})})});Xw.displayName=Yw;var zce=`DropdownMenuPortal`,Zw=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Kw(t);return(0,I.jsx)(Cce,{...r,...n})};Zw.displayName=zce;var Qw=`DropdownMenuContent`,$w=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qw(Qw,n),a=Kw(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)`}})});$w.displayName=Qw;var Bce=`DropdownMenuGroup`,Vce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Tce,{...i,...r,ref:t})});Vce.displayName=Bce;var Hce=`DropdownMenuLabel`,eT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Ece,{...i,...r,ref:t})});eT.displayName=Hce;var Uce=`DropdownMenuItem`,tT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Dce,{...i,...r,ref:t})});tT.displayName=Uce;var Wce=`DropdownMenuCheckboxItem`,Gce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Oce,{...i,...r,ref:t})});Gce.displayName=Wce;var Kce=`DropdownMenuRadioGroup`,nT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(kce,{...i,...r,ref:t})});nT.displayName=Kce;var qce=`DropdownMenuRadioItem`,rT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Ace,{...i,...r,ref:t})});rT.displayName=qce;var Jce=`DropdownMenuItemIndicator`,iT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(jce,{...i,...r,ref:t})});iT.displayName=Jce;var Yce=`DropdownMenuSeparator`,aT=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(n);return(0,I.jsx)(Mce,{...i,...r,ref:t})});aT.displayName=Yce;var Xce=`DropdownMenuArrow`,Zce=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Kw(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=Kw(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=Kw(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=Jw,rle=Xw,ile=Zw,ale=$w,ole=eT,sle=tT,cle=nT,lle=rT,ule=iT,dle=aT;function oT(e,[t,n]){return Math.min(n,Math.max(t,e))}var sT=`Popover`,[cT,fle]=Vy(sT,[OC]),lT=OC(),[ple,uT]=cT(sT),dT=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=lT(t),c=N.useRef(null),[l,u]=N.useState(!1),[d,f]=Wy({prop:r,defaultProp:i??!1,onChange:a,caller:sT});return(0,I.jsx)(RC,{...s,children:(0,I.jsx)(ple,{scope:t,contentId:Jy(),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})})};dT.displayName=sT;var fT=`PopoverAnchor`,mle=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=uT(fT,n),a=lT(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return N.useEffect(()=>(o(),()=>s()),[o,s]),(0,I.jsx)(zC,{...a,...r,ref:t})});mle.displayName=fT;var pT=`PopoverTrigger`,mT=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=uT(pT,n),a=lT(n),o=_y(t,i.triggerRef),s=(0,I.jsx)(Ey.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":xT(i.open),...r,ref:o,onClick:K(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,I.jsx)(zC,{asChild:!0,...a,children:s})});mT.displayName=pT;var hT=`PopoverPortal`,[hle,gle]=cT(hT,{forceMount:void 0}),gT=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=uT(hT,t);return(0,I.jsx)(hle,{scope:t,forceMount:n,children:(0,I.jsx)(Gy,{present:n||a.open,children:(0,I.jsx)(db,{asChild:!0,container:i,children:r})})})};gT.displayName=hT;var _T=`PopoverContent`,vT=N.forwardRef((e,t)=>{let n=gle(_T,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=uT(_T,e.__scopePopover);return(0,I.jsx)(Gy,{present:r||a.open,children:a.modal?(0,I.jsx)(vle,{...i,ref:t}):(0,I.jsx)(yle,{...i,ref:t})})});vT.displayName=_T;var _le=by(`PopoverContent.RemoveScroll`),vle=N.forwardRef((e,t)=>{let n=uT(_T,e.__scopePopover),r=N.useRef(null),i=_y(t,r),a=N.useRef(!1);return N.useEffect(()=>{let e=r.current;if(e)return Jb(e)},[]),(0,I.jsx)(Hb,{as:_le,allowPinchZoom:!0,children:(0,I.jsx)(yT,{...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=uT(_T,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return(0,I.jsx)(yT,{...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()}})}),yT=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=uT(_T,n),p=lT(n);return mb(),(0,I.jsx)(ab,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)($y,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,I.jsx)(BC,{"data-state":xT(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)`}})})})}),bT=`PopoverClose`,ble=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=uT(bT,n);return(0,I.jsx)(Ey.button,{type:`button`,...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})});ble.displayName=bT;var xle=`PopoverArrow`,Sle=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=lT(n);return(0,I.jsx)(VC,{...i,...r,ref:t})});Sle.displayName=xle;function xT(e){return e?`open`:`closed`}var ST=dT,CT=mT,wT=gT,TT=vT,Cle=[` `,`Enter`,`ArrowUp`,`ArrowDown`],wle=[` `,`Enter`],ET=`Select`,[DT,OT,Tle]=Hy(ET),[kT,Ele]=Vy(ET,[Tle,OC]),AT=OC(),[Dle,jT]=kT(ET),[Ole,kle]=kT(ET),Ale=`SelectProvider`;function MT(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=AT(t),[_,v]=N.useState(null),[y,b]=N.useState(null),[x,S]=N.useState(!1),C=Yy(l),[w,T]=Wy({prop:r,defaultProp:i??!1,onChange:a,caller:ET}),[E,D]=Wy({prop:o,defaultProp:s,onChange:c,caller:ET}),O=N.useRef(null),ee=_?!!m||!!_.closest(`form`):!0,[te,k]=N.useState(new Set),A=Jy(),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)(RC,{...g,children:(0,I.jsx)(Dle,{scope:t,...M,children:(0,I.jsx)(DT.Provider,{scope:t,children:(0,I.jsx)(Ole,{scope:t,onNativeOptionAdd:ne,onNativeOptionRemove:re,children:qle(h)?h(M):n})})})})}MT.displayName=Ale;var NT=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,I.jsx)(MT,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,I.jsxs)(I.Fragment,{children:[n,e?(0,I.jsx)(hE,{__scopeSelect:t}):null]})})};NT.displayName=ET;var PT=`SelectTrigger`,FT=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=AT(n),o=jT(PT,n),s=o.disabled||r,c=_y(t,o.onTriggerChange),l=OT(n),u=N.useRef(`touch`),[d,f,p]=_E(e=>{let t=l().filter(e=>!e.disabled),n=vE(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)(zC,{asChild:!0,...a,children:(0,I.jsx)(Ey.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":gE(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())})})})});FT.displayName=PT;var IT=`SelectValue`,LT=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=jT(IT,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=_y(t,c.onValueNodeChange);Uy(()=>{l(u)},[l,u]);let f=gE(c.value);return(0,I.jsx)(Ey.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`)})});LT.displayName=IT;var jle=`SelectIcon`,RT=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,I.jsx)(Ey.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});RT.displayName=jle;var zT=`SelectPortal`,[Mle,Nle]=kT(zT,{forceMount:void 0}),BT=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,I.jsx)(Mle,{scope:e.__scopeSelect,forceMount:n,children:(0,I.jsx)(db,{asChild:!0,...r})})};BT.displayName=zT;var VT=`SelectContent`,HT=N.forwardRef((e,t)=>{let n=Nle(VT,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=jT(VT,e.__scopeSelect),[o,s]=N.useState();return Uy(()=>{s(new DocumentFragment)},[]),(0,I.jsx)(Gy,{present:r||a.open,children:({present:e})=>e?(0,I.jsx)(qT,{...i,ref:t}):(0,I.jsx)(UT,{...i,fragment:o})})});HT.displayName=VT;var UT=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?ls.createPortal((0,I.jsx)(GT,{scope:n,children:(0,I.jsx)(DT.Slot,{scope:n,children:(0,I.jsx)(`div`,{ref:t,children:r})})}),i):null});UT.displayName=`SelectContentFragment`;var WT=10,[GT,KT]=kT(VT),Ple=`SelectContentImpl`,Fle=by(`SelectContent.RemoveScroll`),qT=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=jT(VT,n),[y,b]=N.useState(null),[x,S]=N.useState(null),C=_y(t,e=>b(e)),[w,T]=N.useState(null),[E,D]=N.useState(null),O=OT(n),[ee,te]=N.useState(!1),k=N.useRef(!1);N.useEffect(()=>{if(y)return Jb(y)},[y]),mb();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]=_E(e=>{let t=O().filter(e=>!e.disabled),n=vE(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`?YT:JT,le=ce===YT?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,I.jsx)(GT,{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)(Hb,{as:Fle,allowPinchZoom:!0,children:(0,I.jsx)(ab,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:K(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,I.jsx)($y,{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()}})})})})})})});qT.displayName=Ple;var Ile=`SelectItemAlignedPosition`,JT=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=jT(VT,n),o=KT(VT,n),[s,c]=N.useState(null),[l,u]=N.useState(null),d=_y(t,e=>u(e)),f=OT(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-WT,d=oT(a,[WT,Math.max(WT,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-WT,d=oT(a,[WT,Math.max(WT,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-WT*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-WT,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=`${WT}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]);Uy(()=>y(),[y]);let[b,x]=N.useState();return Uy(()=>{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)(Ey.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});JT.displayName=Ile;var Lle=`SelectPopperPosition`,YT=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=WT,...a}=e,o=AT(n);return(0,I.jsx)(BC,{...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)`}})});YT.displayName=Lle;var[Rle,XT]=kT(VT,{}),ZT=`SelectViewport`,QT=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=KT(ZT,n),o=XT(ZT,n),s=_y(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)(DT.Slot,{scope:n,children:(0,I.jsx)(Ey.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-WT*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})})})]})});QT.displayName=ZT;var $T=`SelectGroup`,[zle,Ble]=kT($T),Vle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Jy();return(0,I.jsx)(zle,{scope:n,id:i,children:(0,I.jsx)(Ey.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Vle.displayName=$T;var eE=`SelectLabel`,Hle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ble(eE,n);return(0,I.jsx)(Ey.div,{id:i.id,...r,ref:t})});Hle.displayName=eE;var tE=`SelectItem`,[Ule,nE]=kT(tE),rE=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=jT(tE,n),c=KT(tE,n),l=s.value===r,[u,d]=N.useState(a??``),[f,p]=N.useState(!1),m=_y(t,e=>c.itemRefCallback?.(e,r,i)),h=Jy(),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)(DT.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,I.jsx)(Ey.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())})})})})});rE.displayName=tE;var iE=`SelectItemText`,aE=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=jT(iE,n),s=KT(iE,n),c=nE(iE,n),l=kle(iE,n),[u,d]=N.useState(null),f=_y(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 Uy(()=>(h(m),()=>g(m)),[h,g,m]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ey.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ls.createPortal(a.children,o.valueNode):null]})});aE.displayName=iE;var oE=`SelectItemIndicator`,sE=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return nE(oE,n).isSelected?(0,I.jsx)(Ey.span,{"aria-hidden":!0,...r,ref:t}):null});sE.displayName=oE;var cE=`SelectScrollUpButton`,lE=N.forwardRef((e,t)=>{let n=KT(cE,e.__scopeSelect),r=XT(cE,e.__scopeSelect),[i,a]=N.useState(!1),o=_y(t,r.onScrollButtonChange);return Uy(()=>{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)(fE,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});lE.displayName=cE;var uE=`SelectScrollDownButton`,dE=N.forwardRef((e,t)=>{let n=KT(uE,e.__scopeSelect),r=XT(uE,e.__scopeSelect),[i,a]=N.useState(!1),o=_y(t,r.onScrollButtonChange);return Uy(()=>{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)(fE,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});dE.displayName=uE;var fE=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=KT(`SelectScrollButton`,n),o=N.useRef(null),s=OT(n),c=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>c(),[c]),Uy(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,I.jsx)(Ey.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)(Ey.div,{"aria-hidden":!0,...r,ref:t})});Gle.displayName=Wle;var pE=`SelectArrow`,Kle=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=AT(n);return KT(pE,n).position===`popper`?(0,I.jsx)(VC,{...i,...r,ref:t}):null});Kle.displayName=pE;var mE=`SelectBubbleInput`,hE=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=jT(mE,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=_y(n,p),h=i??``,g=Zx(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)(Ey.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...zy,...t.style},ref:m,defaultValue:h,children:[gE(i)?(0,I.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});hE.displayName=mE;function qle(e){return typeof e==`function`}function gE(e){return e===``||e===void 0}function _E(e){let t=My(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 vE(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 yE=`Tabs`,[Yle,Xle]=Vy(yE,[KC]),bE=KC(),[Zle,xE]=Yle(yE),SE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Yy(s),[d,f]=Wy({prop:r,onChange:i,defaultProp:a??``,caller:yE});return(0,I.jsx)(Zle,{scope:n,baseId:Jy(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,I.jsx)(Ey.div,{dir:u,"data-orientation":o,...l,ref:t})})});SE.displayName=yE;var CE=`TabsList`,wE=N.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=xE(CE,n),o=bE(n);return(0,I.jsx)(ZC,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,I.jsx)(Ey.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});wE.displayName=CE;var TE=`TabsTrigger`,EE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=xE(TE,n),s=bE(n),c=kE(o.baseId,r),l=AE(o.baseId,r),u=r===o.value;return(0,I.jsx)(QC,{asChild:!0,...s,focusable:!i,active:u,children:(0,I.jsx)(Ey.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)})})})});EE.displayName=TE;var DE=`TabsContent`,OE=N.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=xE(DE,n),c=kE(s.baseId,r),l=AE(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)(Gy,{present:i||u,children:({present:n})=>(0,I.jsx)(Ey.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})})});OE.displayName=DE;function kE(e,t){return`${e}-trigger-${t}`}function AE(e,t){return`${e}-content-${t}`}var Qle=SE,$le=wE,eue=EE,tue=OE,[jE,nue]=Vy(`Tooltip`,[OC]),ME=OC(),NE=`TooltipProvider`,rue=700,PE=`tooltip.open`,[iue,FE]=jE(NE),IE=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})};IE.displayName=NE;var LE=`Tooltip`,[aue,RE]=jE(LE),zE=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=FE(LE,e.__scopeTooltip),l=ME(t),[u,d]=N.useState(null),f=Jy(),p=N.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=N.useRef(!1),[_,v]=Wy({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(PE))):c.onClose(),a?.(e)},caller:LE}),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)(RC,{...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})})};zE.displayName=LE;var BE=`TooltipTrigger`,VE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=RE(BE,n),a=FE(BE,n),o=ME(n),s=_y(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)(zC,{asChild:!0,...o,children:(0,I.jsx)(Ey.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)})})});VE.displayName=BE;var HE=`TooltipPortal`,[oue,sue]=jE(HE,{forceMount:void 0}),UE=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=RE(HE,t);return(0,I.jsx)(oue,{scope:t,forceMount:n,children:(0,I.jsx)(Gy,{present:n||a.open,children:(0,I.jsx)(db,{asChild:!0,container:i,children:r})})})};UE.displayName=HE;var WE=`TooltipContent`,GE=N.forwardRef((e,t)=>{let n=sue(WE,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=RE(WE,e.__scopeTooltip);return(0,I.jsx)(Gy,{present:r||o.open,children:o.disableHoverableContent?(0,I.jsx)(KE,{side:i,...a,ref:t}):(0,I.jsx)(cue,{side:i,...a,ref:t})})}),cue=N.forwardRef((e,t)=>{let n=RE(WE,e.__scopeTooltip),r=FE(WE,e.__scopeTooltip),i=N.useRef(null),a=_y(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)(KE,{...e,ref:a})}),[lue,uue]=jE(LE,{isInside:!1}),due=Cy(`TooltipContent`),KE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=RE(WE,n),l=ME(n),{onClose:u}=c;return N.useEffect(()=>(document.addEventListener(PE,u),()=>document.removeEventListener(PE,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)($y,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,I.jsxs)(BC,{"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)(Yie,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});GE.displayName=WE;var qE=`TooltipArrow`,JE=N.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=ME(n);return uue(qE,n).isInside?null:(0,I.jsx)(VC,{...i,...r,ref:t})});JE.displayName=qE;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=IE,yue=zE,bue=VE,xue=UE,Sue=GE,Cue=JE,YE=(0,H.forwardRef)((e,t)=>(0,I.jsx)(Oy.div,{...e,ref:t}));YE.displayName=`AttachmentPrimitive.Root`;var XE=(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)(Oy.div,{...e,ref:t,children:[`.`,n]})});XE.displayName=`AttachmentPrimitive.unstable_Thumb`;var ZE=()=>(0,I.jsx)(I.Fragment,{children:G(e=>e.attachment.name)});ZE.displayName=`AttachmentPrimitive.Name`;var wue=jy(`AttachmentPrimitive.Remove`,()=>{let e=Dg();return W(()=>{e.attachment().remove()},[e])}),QE=yy({Name:()=>ZE,Remove:()=>wue,Root:()=>YE,unstable_Thumb:()=>XE}),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)}),$E=({children:e,...t})=>Tue(t)?e:null;$E.displayName=`MessagePrimitive.If`;var eD=(0,H.createContext)(null),tD=()=>Th(eD),Eue=({children:e})=>{let t=bh(new Map),n=bh([]),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)(eD.Provider,{value:o,children:e})},nD=(0,H.createContext)(null),rD=(0,H.createContext)(null),iD=()=>{let e=Th(nD);if(!e)throw Error(`useTriggerPopoverRootContext must be used within ComposerPrimitive.TriggerPopoverRoot`);return e},aD=()=>Th(nD),Due=()=>{let e=Th(rD);if(!e)throw Error(`useTriggerPopoverAriaPublish must be used within ComposerPrimitive.TriggerPopoverRoot`);return e},Oue=()=>{let e=iD();return(0,H.useSyncExternalStore)(e.subscribe,e.getTriggers,e.getTriggers)},kue=new Map,oD=()=>()=>{},sD=()=>kue,Aue=()=>{let e=aD();return(0,H.useSyncExternalStore)(e?e.subscribe:oD,e?e.getTriggers:sD,e?e.getTriggers:sD)},cD=()=>null,jue=()=>{let e=aD();return(0,H.useSyncExternalStore)(e?e.subscribeAria:oD,e?e.getActiveAria:cD,e?e.getActiveAria:cD)};function lD(){let e=bh(new Set);return{notify:W(()=>{for(let t of e.current)t()},[]),subscribe:W(t=>(e.current.add(t),()=>{e.current.delete(t)}),[])}}var uD=({children:e})=>{let t=bh(new Map),n=bh(new Set),{notify:r,subscribe:i}=lD(),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=bh(null),l=bh(null),{notify:u,subscribe:d}=lD(),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)(nD.Provider,{value:m,children:(0,I.jsx)(rD.Provider,{value:h,children:e})})},dD=({children:e})=>tD()?(0,I.jsx)(uD,{children:e}):(0,I.jsx)(Eue,{children:(0,I.jsx)(uD,{children:e})});dD.displayName=`ComposerPrimitive.TriggerPopoverRoot`;var fD=/\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(fD.test(n))return null;if(r.startsWith(t,e)){if(e>0&&!fD.test(r[e-1]))continue;return{query:r.slice(e+t.length),offset:e}}}return null}var Nue=Dh(function({text:e,triggerChar:t}){let[n,r]=yh(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=Dh(function({navigableList:e,isSearchMode:t,activeCategoryId:n,query:r,popoverId:i,open:a,selectItem:o,selectCategory:s,goBack:c,close:l}){let[u,d]=yh(0);xh(()=>{d(0)},[e]),xh(()=>{d(0)},[t,n]);let f=Ch(t=>{t<0||t>=e.length||t!==u&&d(t)}),p=Ch(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 pD(e,t){return e.id.toLowerCase().includes(t)||e.label.toLowerCase().includes(t)||(e.description?.toLowerCase().includes(t)??!1)}var Iue=Dh(function({adapter:e,query:t,open:n}){let[r,i]=yh(null);xh(()=>{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))pD(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=>pD(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:Ch(e=>{i(e)}),goBack:Ch(()=>{i(null)})}}),Lue=Dh(function({behavior:e,trigger:t,aui:n,triggerChar:r,setCursorPosition:i,onSelected:a}){let o=bh(null),s=Ch(e=>(o.current=e,()=>{o.current===e&&(o.current=null)}));return{selectItem:Ch(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:Ch(()=>{a(),t&&i(t.offset)}),registerSelectItemOverride:s}}),Rue=Dh(function({adapter:e,text:t,triggerChar:n,behavior:r,aui:i,popoverId:a}){let o=Hh(Nue({text:t,triggerChar:n})),s=o.trigger!==null&&e!==void 0&&r!==void 0,c=Hh(Iue({adapter:e,query:o.query,open:s})),l=Ch(()=>{c.goBack()}),u=Hh(Lue({behavior:r,trigger:o.trigger,aui:i,triggerChar:n,setCursorPosition:o.setCursorPosition,onSelected:l})),d=Hh(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}}),mD=(0,H.createContext)(null),hD=()=>{let e=Th(mD);if(!e)throw Error(`useTriggerPopoverScopeContext must be used within ComposerPrimitive.TriggerPopover`);return e},zue=()=>Th(mD),gD=(0,H.createContext)(null),_D=()=>{let e=Th(gD);if(!e)throw Error(`TriggerPopover.Directive / TriggerPopover.Action must be rendered inside ComposerPrimitive.TriggerPopover`);return e},vD=(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=bh(null),[u,d]=yh(null),f=bh(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=Hh(Rue({adapter:t,text:s,triggerChar:e,behavior:u??void 0,aui:o,popoverId:c})),g=bh(h);g.current=h;let _=iD();xh(()=>_.register({char:e,...u?{behavior:u}:{},resource:g.current}),[_,e,u]);let v=tD();xh(()=>{if(v)return v.register(g.current)},[v]);let y=u!==null&&h.open,b=Due();return xh(()=>{if(y)return()=>{b.setActiveAria(e,null)}},[b,e,y]),xh(()=>{y&&b.setActiveAria(e,{popoverId:c,highlightedItemId:h.highlightedItemId})},[b,e,c,y,h.highlightedItemId]),(0,I.jsx)(gD.Provider,{value:m,children:(0,I.jsx)(mD.Provider,{value:h,children:y?(0,I.jsx)(Oy.div,{role:`listbox`,id:c,"aria-label":n??`Suggestions`,"aria-activedescendant":h.highlightedItemId,"data-state":`open`,...i,ref:a,children:r}):r})})});vD.displayName=`ComposerPrimitive.TriggerPopover`;var yD=()=>{let{disabled:e,send:t}=$re(),n=W(()=>t(),[t]);return e?null:n},Bue=jy(`ComposerPrimitive.Send`,yD),bD=(0,H.forwardRef)(({onSubmit:e,...t},n)=>{let r=yD(),i=e=>{e.preventDefault(),r&&r()};return(0,I.jsx)(Oy.form,{...t,ref:n,onSubmit:K(e,i)})});bD.displayName=`ComposerPrimitive.Root`;var xD=e=>{let t=My(e),n=oy(e=>e.onScrollToBottom);xh(()=>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 SD(){return SD=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},SD.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},CD=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&&CD(n.current,null),n.current=t,t&&CD(t,r)},[t])},wD={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},TD=function(e){Object.keys(wD).forEach(function(t){e.style.setProperty(t,wD[t],`important`)})},ED=null,DD=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),ED||(ED=document.createElement(`textarea`),ED.setAttribute(`tabindex`,`-1`),ED.setAttribute(`aria-hidden`,`true`),TD(ED)),ED.parentNode===null&&document.body.appendChild(ED);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;ED.style[t]=o[t]}),TD(ED),ED.value=t;var c=DD(ED,e);ED.value=t,c=DD(ED,e),ED.value=`x`;var l=ED.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 OD=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 kD(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){kD(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},ede=function(e){kD(window,`resize`,e)},tde=function(e){kD(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?OD:a,s=e.onHeightChange,c=s===void 0?OD: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`,SD({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),ide=`(pointer: coarse) and (not (any-pointer: fine))`,AD=(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=tD(),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=bh(null),D=_y(_,E),O=bh(!1);Ny(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]);xh(()=>A(),[A]),xD(()=>{v.composer().getState().type===`thread`&&f&&A()}),xh(()=>{if(!(v.composer().getState().type!==`thread`||!d))return v.on(`thread.runStart`,A)},[d,A,v]),xh(()=>{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(jh(()=>{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;jh(()=>{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)(xy,{...ne,children:(0,H.cloneElement)(n,void 0,e)})}return(0,I.jsx)(t?xy:rde,{...ne})});AD.displayName=`ComposerPrimitive.Input`;var ade=jy(`ComposerPrimitive.Cancel`,()=>{let{disabled:e,cancel:t}=eie();return e?null:t}),ode=jy(`ComposerPrimitive.AddAttachment`,({multiple:e=!0}={})=>{let{disabled:t,addAttachment:n}=nie(),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`]),jD=(0,H.forwardRef)(({disabled:e,asChild:t=!1,render:n,children:r,...i},a)=>{let[o,s]=yh(!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)(xy,{...p,children:(0,H.cloneElement)(n,void 0,e)})}return(0,I.jsx)(t?xy:`div`,{...p,children:r})});jD.displayName=`ComposerPrimitive.AttachmentDropzone`;var sde=jy(`ComposerPrimitive.Dictate`,()=>{let{disabled:e,startDictation:t}=tie();return e?null:t}),cde=jy(`ComposerPrimitive.StopDictation`,()=>{let e=Dg(),t=G(e=>e.composer.dictation!=null),n=W(()=>{e.composer().stopDictation()},[e]);return t?n:null}),MD=(0,H.forwardRef)(({children:e,...t},n)=>{let r=G(e=>e.composer.dictation?.transcript);return r?(0,I.jsx)(Oy.span,{...t,ref:n,children:e??r}):null});MD.displayName=`ComposerPrimitive.DictationTranscript`;var ND=(0,H.forwardRef)((e,t)=>G(e=>e.composer.quote)?(0,I.jsx)(Oy.div,{...e,ref:t}):null);ND.displayName=`ComposerPrimitive.Quote`;var PD=(0,H.forwardRef)(({children:e,...t},n)=>{let r=G(e=>e.composer.quote?.text);return r?(0,I.jsx)(Oy.span,{...t,ref:n,children:e??r}):null});PD.displayName=`ComposerPrimitive.QuoteText`;var FD=(0,H.forwardRef)(({onClick:e,...t},n)=>{let r=Dg(),i=W(()=>{r.composer().setQuote(void 0)},[r]);return(0,I.jsx)(Oy.button,{type:`button`,...t,ref:n,onClick:K(e,i)})});FD.displayName=`ComposerPrimitive.QuoteDismiss`;var ID=(0,H.forwardRef)(({children:e,"aria-label":t,...n},r)=>{let{categories:i,activeCategoryId:a,isSearchMode:o,open:s}=hD();return!s||a||o?null:(0,I.jsx)(Oy.div,{role:`group`,"aria-label":t??`Categories`,...n,ref:r,children:e(i)})});ID.displayName=`ComposerPrimitive.TriggerPopoverCategories`;var LD=(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}=hD(),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)(Oy.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)})});LD.displayName=`ComposerPrimitive.TriggerPopoverCategoryItem`;var RD=(0,H.forwardRef)(({children:e,"aria-label":t,...n},r)=>{let{items:i,activeCategoryId:a,isSearchMode:o,open:s}=hD();return!s||!a&&!o?null:(0,I.jsx)(Oy.div,{role:`group`,"aria-label":t??`Items`,...n,ref:r,children:e(i)})});RD.displayName=`ComposerPrimitive.TriggerPopoverItems`;var zD=(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}=hD(),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)(Oy.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)})});zD.displayName=`ComposerPrimitive.TriggerPopoverItem`;var BD=(0,H.forwardRef)(({onClick:e,...t},n)=>{let{activeCategoryId:r,isSearchMode:i,goBack:a,open:o}=hD();return!o||!r||i?null:(0,I.jsx)(Oy.button,{type:`button`,...t,ref:n,onClick:K(e,a)})});BD.displayName=`ComposerPrimitive.TriggerPopoverBack`;var VD=({formatter:e,onExecute:t,removeOnExecute:n})=>{let{register:r}=_D(),i=bh(t);return i.current=t,xh(()=>r({kind:`action`,formatter:e??ry,onExecute:e=>i.current(e),...n===void 0?{}:{removeOnExecute:n}}),[r,e,n]),null};VD.displayName=`ComposerPrimitive.TriggerPopoverAction`;var HD=({formatter:e,onInserted:t})=>{let{register:n}=_D(),r=bh(t);return r.current=t,xh(()=>n({kind:`directive`,formatter:e??ry,onInserted:e=>r.current?.(e)}),[n,e]),null};HD.displayName=`ComposerPrimitive.TriggerPopoverDirective`;var lde=Object.assign(vD,{Directive:HD,Action:VD}),UD=yy({AddAttachment:()=>ode,AttachmentByIndex:()=>qv,AttachmentDropzone:()=>jD,Attachments:()=>Yv,Cancel:()=>ade,Dictate:()=>sde,DictationTranscript:()=>MD,If:()=>ny,Input:()=>AD,Queue:()=>Xv,Quote:()=>ND,QuoteDismiss:()=>FD,QuoteText:()=>PD,Root:()=>bD,Send:()=>Bue,StopDictation:()=>cde,Unstable_TriggerPopover:()=>lde,Unstable_TriggerPopoverBack:()=>BD,Unstable_TriggerPopoverCategories:()=>ID,Unstable_TriggerPopoverCategoryItem:()=>LD,Unstable_TriggerPopoverItem:()=>zD,Unstable_TriggerPopoverItems:()=>RD,Unstable_TriggerPopoverRoot:()=>dD,unstable_useTriggerPopoverRootContext:()=>iD,unstable_useTriggerPopoverRootContextOptional:()=>aD,unstable_useTriggerPopoverScopeContext:()=>hD,unstable_useTriggerPopoverScopeContextOptional:()=>zue,unstable_useTriggerPopoverTriggers:()=>Oue,unstable_useTriggerPopoverTriggersOptional:()=>Aue}),WD=()=>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}),GD=(0,H.createContext)(null),dde=e=>({useSmoothStatus:zg(()=>e)}),fde=({children:e})=>{let t=KD({optional:!0}),n=Dg(),[r]=yh(()=>dde(n.part().getState().status));return t?e:(0,I.jsx)(GD.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 KD(e){let t=Th(GD);if(!e?.optional&&!t)throw Error(`This component must be used within a SmoothContextProvider.`);return t}var{useSmoothStatus:mde,useSmoothStatusStore:hde}=iy(KD,`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))}},qD=Object.freeze({type:`running`}),JD=(e,t=!1)=>{let{text:n}=e,[r,i]=yh(e.status.type===`running`?``:n),a=Dg(),o=G(()=>a.part()),[s,c]=yh(o);(o!==s||!n.startsWith(r))&&(c(o),i(e.status.type===`running`?``:n));let l=hde({optional:!0}),u=My(t=>{if(i(t),l){let n=r!==t||e.status.type===`running`?qD:e.status;ly(l).setState(n,!0)}});xh(()=>{if(l){let i=t&&(r!==n||e.status.type===`running`)?qD:e.status;ly(l).setState(i,!0)}},[l,t,n,r,e.status]);let[d]=yh(new gde(r,u)),f=bh(o);return xh(()=>{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]),xh(()=>()=>{d.stop()},[d]),U(()=>t?{type:`text`,text:r,status:n===r?e.status:qD}:e,[t,r,e,n])},YD=(0,H.forwardRef)(({smooth:e=!0,component:t=`span`,...n},r)=>{let{text:i,status:a}=JD(WD(),e);return(0,I.jsx)(t,{"data-status":a.type,...n,ref:r,children:i})});YD.displayName=`MessagePartPrimitive.Text`;var XD=(0,H.forwardRef)((e,t)=>{let{image:n}=ude();return(0,I.jsx)(Oy.img,{src:n,...e,ref:t})});XD.displayName=`MessagePartPrimitive.Image`;var ZD=e=>{let t=bh(void 0);return W(n=>{t.current&&=(t.current(),void 0),n&&(t.current=e(n))},[e])},QD=(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},$D=(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},eO=()=>{let e=Dg(),t=G(()=>e.message());return ZD(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=oy(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=oy(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)=>ZD(W(n=>{if(e)return t.getState().registerAnchorElement(n)},[e,t])),Cde=({active:e,threadViewportStore:t})=>ZD(W(n=>{if(!e)return;let r=t.getState(),i=r.topAnchorMessageClamp;return r.registerAnchorTargetElement(n,{tallerThan:QD(i.tallerThan,n),visibleHeight:QD(i.visibleHeight,n)})},[e,t])),wde=({forwardedRef:e,...t})=>{let n=_y(e,eO()),r=G(e=>e.message.id);return(0,I.jsx)(Oy.div,{...t,ref:n,"data-message-id":r})},Tde=({forwardedRef:e,threadViewportStore:t,...n})=>{let r=eO(),i=bde(),a=xde(),o=_y(e,r,Sde(i,t),Cde({active:a,threadViewportStore:t})),s=G(e=>e.message.id);return(0,I.jsx)(Oy.div,{...n,ref:o,"data-message-id":s,"data-aui-top-anchor-user":i?``:void 0,"data-aui-top-anchor-target":a?``:void 0})},tO=(0,H.forwardRef)((e,t)=>{let n=sy();return n.getState().turnAnchor===`top`?(0,I.jsx)(Tde,{...e,forwardedRef:t,threadViewportStore:n}):(0,I.jsx)(wde,{...e,forwardedRef:t})});tO.displayName=`MessagePrimitive.Root`;var nO={...kv,Text:()=>(0,I.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,I.jsx)(YD,{}),(0,I.jsx)(Zv,{children:(0,I.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Image:()=>(0,I.jsx)(XD,{})},rO=e=>{if(`children`in e)return(0,I.jsx)(Iv,{children:e.children});let{components:t,...n}=e;return(0,I.jsx)(Iv,{components:t?{Text:t.Text??nO.Text,Image:t.Image??nO.Image,Reasoning:t.Reasoning??kv.Reasoning,Source:t.Source??kv.Source,File:t.File??kv.File,Unstable_Audio:t.Unstable_Audio??kv.Unstable_Audio,...`ChainOfThought`in t?{ChainOfThought:t.ChainOfThought}:{tools:t.tools,data:t.data,ToolGroup:t.ToolGroup??kv.ToolGroup,ReasoningGroup:t.ReasoningGroup??kv.ReasoningGroup},Empty:t.Empty,Quote:t.Quote,generativeUI:t.generativeUI}:nO,...n})};rO.displayName=`MessagePrimitive.Parts`;var iO=({children:e})=>die()===void 0?null:e;iO.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},aO={Text:()=>(0,I.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,I.jsx)(YD,{}),(0,I.jsx)(Zv,{children:(0,I.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Reasoning:()=>null,Source:()=>null,Image:()=>(0,I.jsx)(XD,{}),File:()=>null,Unstable_Audio:()=>null,Group:({children:e})=>e},Ade=({components:{Text:e=aO.Text,Reasoning:t=aO.Reasoning,Image:n=aO.Image,Source:r=aO.Source,File:i=aO.File,Unstable_Audio:a=aO.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??aO.Text})},(e,t)=>e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),oO=({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??aO.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])})};oO.displayName=`MessagePrimitive.Unstable_PartsGrouped`;var sO=({components:e,...t})=>(0,I.jsx)(oO,{...t,components:e,groupingFunction:Ede});sO.displayName=`MessagePrimitive.Unstable_PartsGroupedByParentId`;var cO=yy({AttachmentByIndex:()=>Uv,Attachments:()=>Gv,Content:()=>rO,Error:()=>iO,GenerativeUI:()=>Sv,GroupedParts:()=>Bv,If:()=>$E,PartByIndex:()=>Av,Parts:()=>rO,Quote:()=>Vv,Root:()=>tO,Unstable_PartsGrouped:()=>oO,Unstable_PartsGroupedByParentId:()=>sO}),Fde=e=>{let t=My(e);return ZD(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=bh(null),a=G(e=>e.thread.messages.length>0),o=bh(!1),s=bh(null),c=sy();e===void 0&&(e=c.getState().turnAnchor!==`top`);let l=bh(0),u=bh(0),d=bh(0),f=bh(0),p=bh(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]);Sh(()=>()=>{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&&ly(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=ZD(e=>(e.addEventListener(`scroll`,_),()=>{e.removeEventListener(`scroll`,_)}));return Sh(()=>{if(n){if(!a){o.current=!1;return}o.current||(o.current=!0,p.current===null&&h(`instant`))}},[a,h,n]),xD(({behavior:e})=>{m(e)}),Ag(`thread.runStart`,()=>{t&&c.getState().turnAnchor!==`top`&&h(`auto`)}),Ag(`threadListItem.switchedTo`,()=>{r&&h(`instant`)}),_y(v,y,i)},lO=(0,H.forwardRef)((e,t)=>(0,I.jsx)(Oy.div,{...e,ref:t}));lO.displayName=`ThreadPrimitive.Root`;var uO=({children:e})=>G(e=>e.thread.isEmpty)?e:null;uO.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)),dO=({children:e,...t})=>Lde(t)?e:null;dO.displayName=`ThreadPrimitive.If`;var fO=(e,t)=>ZD(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])),pO=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:pO(e)-pO(t)},mO=({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=mO(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&&($D(t,0),t.remove());return}if(t??=vde(),(t.parentElement!==c.parentElement||t.previousElementSibling!==c)&&c.after(t),a.target(o,s,c),$D(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(mO({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=sy();Sh(()=>{if(e)return Ude(t)},[e,t])},hO=({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=>hO(e)?.anchorId,Kde=e=>hO(e)?.targetId,qde=()=>fO(oy(e=>e.registerViewport),W(e=>e.clientHeight,[])),Jde=()=>ZD(oy(e=>e.registerViewportElement)),Yde=e=>{let t=sy(),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]);Sh(()=>{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)},gO=(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=sy().getState().turnAnchor===`top`;Yde(u),Wde(u);let d=_y(o,s,c,l);return(0,I.jsx)(Oy.div,{...a,ref:d,children:i})});gO.displayName=`ThreadPrimitive.ViewportScrollable`;var _O=(0,H.forwardRef)(({turnAnchor:e,topAnchorMessageClamp:t,...n},r)=>(0,I.jsx)(uy,{options:{turnAnchor:e,topAnchorMessageClamp:t},children:(0,I.jsx)(gO,{...n,ref:r})}));_O.displayName=`ThreadPrimitive.Viewport`;var vO=(0,H.forwardRef)((e,t)=>{let n=_y(t,fO(oy(e=>e.registerContentInset),W(e=>{let t=parseFloat(getComputedStyle(e).marginTop)||0;return e.offsetHeight+t},[])));return(0,I.jsx)(Oy.div,{...e,ref:n})});vO.displayName=`ThreadPrimitive.ViewportFooter`;var Xde=jy(`ThreadPrimitive.ScrollToBottom`,({behavior:e}={})=>{let t=oy(e=>e.isAtBottom),n=sy(),r=W(()=>{n.getState().scrollToBottom({behavior:e})},[n,e]);return t?null:r},[`behavior`]),Zde=jy(`ThreadPrimitive.Suggestion`,({prompt:e,send:t,clearComposer:n,autoSend:r,method:i})=>{let{disabled:a,trigger:o}=uie({prompt:e,send:t??r??!1,clearComposer:n});return a?null:o},[`prompt`,`send`,`clearComposer`,`autoSend`,`method`]),yO=yy({Empty:()=>uO,If:()=>dO,MessageByIndex:()=>gv,Messages:()=>Cre,Root:()=>lO,ScrollToBottom:()=>Xde,Suggestion:()=>Zde,SuggestionByIndex:()=>$v,Suggestions:()=>Zre,Viewport:()=>_O,ViewportFooter:()=>vO,ViewportProvider:()=>uy}),Qde=yy({AssistantRuntimeImpl:()=>A_,BaseAssistantRuntimeCore:()=>j_,CompositeContextProvider:()=>Wh,DefaultThreadComposerRuntimeCore:()=>X_,MessageRepository:()=>H_,ThreadRuntimeImpl:()=>E_,fromThreadMessageLike:()=>z_,generateId:()=>F_,getAutoStatus:()=>L_,splitLocalRuntimeOptions:()=>fie,useComposerInputPluginRegistryOptional:()=>tD,useSmooth:()=>JD,useSmoothStatus:()=>mde,withSmoothContextProvider:()=>pde}),bO=typeof window<`u`&&window.location?window.location.hostname:``,xO=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(xO(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(xO(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(`.`),SO=[{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(SO.map(e=>e.key));function CO(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 wO(e,t){(0,N.useEffect)(()=>{rfe(e??null,t)},[e,t])}var TO=new Map,EO={active:!1,percent:0,count:0},DO=new Set;function OO(){let e=0,t=0;for(let n of TO.values())e+=n.loaded,t+=n.total;let n=TO.size;EO={active:n>0,percent:t>0?Math.min(100,Math.round(e/t*100)):0,count:n};for(let e of DO)e()}var kO={subscribe(e){return DO.add(e),()=>DO.delete(e)},getSnapshot(){return EO},report(e,t,n){TO.set(e,{loaded:t,total:n}),OO()},clear(e){TO.delete(e)&&OO()}};function AO(e,t){return(t===`dark`?e?.logoDarkUrl:e?.logoLightUrl)??(t===`dark`?e?.logoLightUrl:e?.logoDarkUrl)??null}function ife(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 jO({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 afe={},MO=[`fr`,`en`],ofe=`PARAGLIDE_LOCALE`,NO=[`localStorage`,`baseLocale`],PO=[],FO,IO;function sfe(e){if(PO.length===0)return;let t=typeof e==`string`?e:e.href;if(FO===t)return IO;let n=new URL(t,`http://dummy.com`),r;for(let e of PO)if(new afe(e.match,n.href).exec(n.href)){r=e;break}return FO=t,IO=r,r}function LO(e){let t=sfe(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:NO}var RO=void 0;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var zO=!1,q=()=>{if(RO){let e=RO?.getStore()?.locale;if(e)return e}let e=NO;typeof window<`u`&&window.location?.href&&(e=LO(window.location.href));let t=cfe(e,typeof window<`u`?window.location?.href:void 0);if(t)return zO||(zO=!0,BO(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 cfe(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(UO(t)&&HO.has(t)){let e=HO.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return ufe(t)}}let e=VO(n);if(e)return e}}var lfe=e=>{e?window.location.href=e:window.location.reload()},BO=(e,t)=>{let n={reload:!0,...t},r;try{r=q()}catch{}let i=[],a=NO;typeof window<`u`&&window.location?.href&&(a=LO(window.location.href));for(let t of a)if(t===`baseLocale`)continue;else if(t===`localStorage`&&typeof window<`u`)localStorage.setItem(ofe,e);else if(UO(t)&&HO.has(t)){let n=HO.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&&lfe(void 0)};if(i.length)return Promise.all(i).then(()=>{o()});o()};function VO(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of MO)if(e.toLowerCase()===t)return e}function ufe(e){let t=VO(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${MO.join(`, `)}`)}var HO=new Map;function UO(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}var dfe=e=>`Fichier trop volumineux (${e?.size} Mo, max ${e?.max} Mo). Réduisez-le (p. ex. compressez les images) et réessayez.`,ffe=e=>`File too large (${e?.size} MB, max ${e?.max} MB). Reduce it (e.g. compress images) and try again.`,pfe=((e,t={})=>(t.locale??q())===`fr`?dfe(e):ffe(e)),WO=()=>`Chargement…`,GO=()=>`Loading…`,KO=((e={},t={})=>(t.locale??q())===`fr`?WO(e):GO(e)),qO=()=>`Thème`,JO=()=>`Theme`,YO=((e={},t={})=>(t.locale??q())===`fr`?qO(e):JO(e)),XO=()=>`Clair`,ZO=()=>`Light`,QO=((e={},t={})=>(t.locale??q())===`fr`?XO(e):ZO(e)),$O=()=>`Sombre`,ek=()=>`Dark`,tk=((e={},t={})=>(t.locale??q())===`fr`?$O(e):ek(e)),nk=()=>`Système`,rk=()=>`System`,ik=((e={},t={})=>(t.locale??q())===`fr`?nk(e):rk(e)),ak=()=>`Défaut de l’app`,ok=()=>`App default`,sk=((e={},t={})=>(t.locale??q())===`fr`?ak(e):ok(e)),ck=()=>`Se déconnecter`,lk=()=>`Sign out`,uk=((e={},t={})=>(t.locale??q())===`fr`?ck(e):lk(e)),dk=()=>`Préférences`,fk=()=>`Preferences`,pk=((e={},t={})=>(t.locale??q())===`fr`?dk(e):fk(e)),mk=()=>`Nom affiché`,hk=()=>`Display name`,gk=((e={},t={})=>(t.locale??q())===`fr`?mk(e):hk(e)),_k=()=>`Le nom et prénom affichés dans la liste des utilisateurs et le menu de compte. Vous pouvez le modifier à tout moment.`,vk=()=>`The name shown in the user list and the account menu. You can change it at any time.`,yk=((e={},t={})=>(t.locale??q())===`fr`?_k(e):vk(e)),bk=()=>`Votre nom et prénom`,xk=()=>`Your name`,Sk=((e={},t={})=>(t.locale??q())===`fr`?bk(e):xk(e)),Ck=()=>`Laissez vide pour n’afficher que votre email.`,wk=()=>`Leave empty to show only your email.`,Tk=((e={},t={})=>(t.locale??q())===`fr`?Ck(e):wk(e)),Ek=()=>`Nom affiché mis à jour.`,Dk=()=>`Display name updated.`,Ok=((e={},t={})=>(t.locale??q())===`fr`?Ek(e):Dk(e)),kk=()=>`Échec de la mise à jour du nom`,Ak=()=>`Failed to update the name`,jk=((e={},t={})=>(t.locale??q())===`fr`?kk(e):Ak(e)),Mk=()=>`Langue`,Nk=()=>`Language`,Pk=((e={},t={})=>(t.locale??q())===`fr`?Mk(e):Nk(e)),Fk=()=>`Choisissez la langue de l’interface. « Défaut de l’app » suit le réglage de l’administrateur.`,Ik=()=>`Choose the interface language. “App default” follows the administrator setting.`,Lk=((e={},t={})=>(t.locale??q())===`fr`?Fk(e):Ik(e)),Rk=()=>`Le changement de langue recharge la page une fois.`,zk=()=>`Changing the language reloads the page once.`,Bk=((e={},t={})=>(t.locale??q())===`fr`?Rk(e):zk(e)),Vk=()=>`Interface`,Hk=()=>`Interface`,Uk=((e={},t={})=>(t.locale??q())===`fr`?Vk(e):Hk(e)),Wk=()=>`Activez ou masquez des éléments d’interface. Les options grisées sont verrouillées par l’administrateur.`,Gk=()=>`Enable or hide interface elements. Greyed options are locked by the administrator.`,Kk=((e={},t={})=>(t.locale??q())===`fr`?Wk(e):Gk(e)),qk=()=>`Français`,Jk=()=>`French`,Yk=((e={},t={})=>(t.locale??q())===`fr`?qk(e):Jk(e)),Xk=()=>`Anglais`,Zk=()=>`English`,Qk=((e={},t={})=>(t.locale??q())===`fr`?Xk(e):Zk(e)),$k=()=>`Fichiers`,eA=()=>`Files`,tA=((e={},t={})=>(t.locale??q())===`fr`?$k(e):eA(e)),nA=()=>`Tous les fichiers échangés dans vos conversations (envoyés et reçus).`,rA=()=>`Every file exchanged across your conversations (sent and received).`,iA=((e={},t={})=>(t.locale??q())===`fr`?nA(e):rA(e)),aA=()=>`Sens`,oA=()=>`Direction`,sA=((e={},t={})=>(t.locale??q())===`fr`?aA(e):oA(e)),cA=()=>`Tous les sens`,lA=()=>`All directions`,uA=((e={},t={})=>(t.locale??q())===`fr`?cA(e):lA(e)),dA=()=>`Envoyé`,fA=()=>`Sent`,pA=((e={},t={})=>(t.locale??q())===`fr`?dA(e):fA(e)),mA=()=>`Reçu`,hA=()=>`Received`,gA=((e={},t={})=>(t.locale??q())===`fr`?mA(e):hA(e)),_A=()=>`Conversation`,vA=()=>`Conversation`,yA=((e={},t={})=>(t.locale??q())===`fr`?_A(e):vA(e)),bA=()=>`Toutes les conversations`,xA=()=>`All conversations`,SA=((e={},t={})=>(t.locale??q())===`fr`?bA(e):xA(e)),CA=()=>`Bridge`,wA=()=>`Bridge`,TA=((e={},t={})=>(t.locale??q())===`fr`?CA(e):wA(e)),EA=()=>`Tous les bridges`,DA=()=>`All bridges`,OA=((e={},t={})=>(t.locale??q())===`fr`?EA(e):DA(e)),kA=()=>`Type`,AA=()=>`Type`,jA=((e={},t={})=>(t.locale??q())===`fr`?kA(e):AA(e)),MA=()=>`Tous les types`,NA=()=>`All types`,PA=((e={},t={})=>(t.locale??q())===`fr`?MA(e):NA(e)),FA=()=>`Image`,IA=()=>`Image`,LA=((e={},t={})=>(t.locale??q())===`fr`?FA(e):IA(e)),RA=()=>`Audio`,zA=()=>`Audio`,BA=((e={},t={})=>(t.locale??q())===`fr`?RA(e):zA(e)),VA=()=>`Vidéo`,HA=()=>`Video`,UA=((e={},t={})=>(t.locale??q())===`fr`?VA(e):HA(e)),WA=()=>`PDF`,GA=()=>`PDF`,KA=((e={},t={})=>(t.locale??q())===`fr`?WA(e):GA(e)),qA=()=>`Document`,JA=()=>`Document`,YA=((e={},t={})=>(t.locale??q())===`fr`?qA(e):JA(e)),XA=()=>`Archive`,ZA=()=>`Archive`,QA=((e={},t={})=>(t.locale??q())===`fr`?XA(e):ZA(e)),$A=()=>`Autre`,ej=()=>`Other`,tj=((e={},t={})=>(t.locale??q())===`fr`?$A(e):ej(e)),nj=()=>`Nom`,rj=()=>`Name`,ij=((e={},t={})=>(t.locale??q())===`fr`?nj(e):rj(e)),aj=()=>`Type`,oj=()=>`Type`,sj=((e={},t={})=>(t.locale??q())===`fr`?aj(e):oj(e)),cj=()=>`Sens`,lj=()=>`Direction`,uj=((e={},t={})=>(t.locale??q())===`fr`?cj(e):lj(e)),dj=()=>`Conversation`,fj=()=>`Conversation`,pj=((e={},t={})=>(t.locale??q())===`fr`?dj(e):fj(e)),mj=()=>`Date`,hj=()=>`Date`,gj=((e={},t={})=>(t.locale??q())===`fr`?mj(e):hj(e)),_j=()=>`Action`,vj=()=>`Action`,yj=((e={},t={})=>(t.locale??q())===`fr`?_j(e):vj(e)),bj=()=>`Télécharger`,xj=()=>`Download`,Sj=((e={},t={})=>(t.locale??q())===`fr`?bj(e):xj(e)),Cj=()=>`Réinitialiser`,wj=()=>`Reset`,Tj=((e={},t={})=>(t.locale??q())===`fr`?Cj(e):wj(e)),Ej=()=>`Actions`,Dj=()=>`Actions`,Oj=((e={},t={})=>(t.locale??q())===`fr`?Ej(e):Dj(e)),kj=()=>`Supprimer`,Aj=()=>`Delete`,jj=((e={},t={})=>(t.locale??q())===`fr`?kj(e):Aj(e)),Mj=()=>`Fichier supprimé`,Nj=()=>`File removed`,Pj=((e={},t={})=>(t.locale??q())===`fr`?Mj(e):Nj(e)),Fj=()=>`Échec de la suppression du fichier`,Ij=()=>`Could not remove the file`,Lj=((e={},t={})=>(t.locale??q())===`fr`?Fj(e):Ij(e)),Rj=()=>`Supprimer ce fichier ?`,zj=()=>`Remove this file?`,Bj=((e={},t={})=>(t.locale??q())===`fr`?Rj(e):zj(e)),Vj=()=>`Il sera retiré de vos fichiers. La conversation où il a été échangé n'est pas modifiée.`,Hj=()=>`It will be removed from your files. The conversation where it was exchanged is unchanged.`,Uj=((e={},t={})=>(t.locale??q())===`fr`?Vj(e):Hj(e)),Wj=()=>`Indisponible`,Gj=()=>`Unavailable`,Kj=((e={},t={})=>(t.locale??q())===`fr`?Wj(e):Gj(e)),qj=()=>`Aucun fichier pour le moment.`,Jj=()=>`No files yet.`,Yj=((e={},t={})=>(t.locale??q())===`fr`?qj(e):Jj(e)),Xj=()=>`Aucun fichier ne correspond aux filtres.`,Zj=()=>`No files match the filters.`,Qj=((e={},t={})=>(t.locale??q())===`fr`?Xj(e):Zj(e)),$j=e=>`Affichage des ${e?.cap} fichiers les plus récents.`,eM=e=>`Showing the ${e?.cap} most recent files.`,tM=((e,t={})=>(t.locale??q())===`fr`?$j(e):eM(e)),nM=()=>`Apparence`,rM=()=>`Appearance`,iM=((e={},t={})=>(t.locale??q())===`fr`?nM(e):rM(e)),aM=()=>`Thème par défaut de l’application`,oM=()=>`Default app theme`,sM=((e={},t={})=>(t.locale??q())===`fr`?aM(e):oM(e)),cM=()=>`Appliqué aux utilisateurs sans préférence personnelle.`,lM=()=>`Applied to users without a personal preference.`,uM=((e={},t={})=>(t.locale??q())===`fr`?cM(e):lM(e)),dM=()=>`Langue par défaut de l’application`,fM=()=>`Default app language`,pM=((e={},t={})=>(t.locale??q())===`fr`?dM(e):fM(e)),mM=()=>`Langue des nouveaux utilisateurs qui n’ont pas encore choisi la leur.`,hM=()=>`Language for new users who haven’t picked their own yet.`,gM=((e={},t={})=>(t.locale??q())===`fr`?mM(e):hM(e)),_M=()=>`Si vous n’avez pas défini votre propre langue, changer ce défaut rechargera votre vue.`,vM=()=>`If you haven’t set your own language, changing this default will reload your view.`,yM=((e={},t={})=>(t.locale??q())===`fr`?_M(e):vM(e)),bM=()=>`Référence des composants (design)`,xM=()=>`Component reference (design)`,SM=((e={},t={})=>(t.locale??q())===`fr`?bM(e):xM(e)),CM=()=>`Administration de l’apparence`,wM=()=>`Appearance administration`,TM=((e={},t={})=>(t.locale??q())===`fr`?CM(e):wM(e)),EM=()=>`Réservé aux administrateurs. S’applique à toute l’organisation.`,DM=()=>`Admins only. Applies to the whole organization.`,OM=((e={},t={})=>(t.locale??q())===`fr`?EM(e):DM(e)),kM=()=>`Ma charte graphique`,AM=()=>`My graphic chart`,jM=((e={},t={})=>(t.locale??q())===`fr`?kM(e):AM(e)),MM=()=>`Choisissez la palette appliquée à votre interface, en clair comme en sombre.`,NM=()=>`Pick the palette applied to your interface, in light and dark.`,PM=((e={},t={})=>(t.locale??q())===`fr`?MM(e):NM(e)),FM=()=>`Défaut de l’application`,IM=()=>`Application default`,LM=((e={},t={})=>(t.locale??q())===`fr`?FM(e):IM(e)),RM=()=>`Suit le défaut de l’application.`,zM=()=>`Follows the application default.`,BM=((e={},t={})=>(t.locale??q())===`fr`?RM(e):zM(e)),VM=()=>`Commune`,HM=()=>`Common`,UM=((e={},t={})=>(t.locale??q())===`fr`?VM(e):HM(e)),WM=()=>`La vôtre`,GM=()=>`Yours`,KM=((e={},t={})=>(t.locale??q())===`fr`?WM(e):GM(e)),qM=e=>`Via le groupe ${e?.group}`,JM=e=>`Via group ${e?.group}`,YM=((e,t={})=>(t.locale??q())===`fr`?qM(e):JM(e)),XM=()=>`Aucune charte disponible pour le moment.`,ZM=()=>`No chart available yet.`,QM=((e={},t={})=>(t.locale??q())===`fr`?XM(e):ZM(e)),$M=()=>`Charte par défaut de l’application`,eN=()=>`Application default chart`,tN=((e={},t={})=>(t.locale??q())===`fr`?$M(e):eN(e)),nN=()=>`Appliquée aux utilisateurs sans charte personnelle.`,rN=()=>`Applied to users without a personal chart.`,iN=((e={},t={})=>(t.locale??q())===`fr`?nN(e):rN(e)),aN=()=>`Pools de chartes par groupe`,oN=()=>`Group chart pools`,sN=((e={},t={})=>(t.locale??q())===`fr`?aN(e):oN(e)),cN=()=>`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.`,lN=()=>`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.`,uN=((e={},t={})=>(t.locale??q())===`fr`?cN(e):lN(e)),dN=()=>`Charte par domaine`,fN=()=>`Chart by domain`,pN=((e={},t={})=>(t.locale??q())===`fr`?dN(e):fN(e)),mN=()=>`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.`,hN=()=>`Map a domain to a public chart (builtin or common): it becomes the default chart on that host, including the login page.`,gN=((e={},t={})=>(t.locale??q())===`fr`?mN(e):hN(e)),_N=()=>`Commune`,vN=()=>`Common`,yN=((e={},t={})=>(t.locale??q())===`fr`?_N(e):vN(e)),bN=()=>`Restreinte`,xN=()=>`Restricted`,SN=((e={},t={})=>(t.locale??q())===`fr`?bN(e):xN(e)),CN=()=>`Défaut`,wN=()=>`Default`,TN=((e={},t={})=>(t.locale??q())===`fr`?CN(e):wN(e)),EN=()=>`Aucun groupe à associer.`,DN=()=>`No group to attach.`,ON=((e={},t={})=>(t.locale??q())===`fr`?EN(e):DN(e)),kN=()=>`Disponible aux groupes (pool)`,AN=()=>`Available to groups (pool)`,jN=((e={},t={})=>(t.locale??q())===`fr`?kN(e):AN(e)),MN=()=>`Ajouter au pool d'un groupe…`,NN=()=>`Add to a group's pool…`,PN=((e={},t={})=>(t.locale??q())===`fr`?MN(e):NN(e)),FN=e=>`Retirer ${e?.group} du pool`,IN=e=>`Remove ${e?.group} from the pool`,LN=((e,t={})=>(t.locale??q())===`fr`?FN(e):IN(e)),RN=()=>`Importer une charte`,zN=()=>`Import a chart`,BN=((e={},t={})=>(t.locale??q())===`fr`?RN(e):zN(e)),VN=()=>`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.`,HN=()=>`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.`,UN=((e={},t={})=>(t.locale??q())===`fr`?VN(e):HN(e)),WN=()=>`Nom de la charte`,GN=()=>`Chart name`,KN=((e={},t={})=>(t.locale??q())===`fr`?WN(e):GN(e)),qN=()=>`Ma charte`,JN=()=>`My chart`,YN=((e={},t={})=>(t.locale??q())===`fr`?qN(e):JN(e)),XN=()=>`JSON des tokens`,ZN=()=>`Tokens JSON`,QN=((e={},t={})=>(t.locale??q())===`fr`?XN(e):ZN(e)),$N=()=>`Collez ici le JSON des tokens (colors.light / colors.dark en oklch, radius, fontSans, fontMono)…`,eP=()=>`Paste the tokens JSON here (colors.light / colors.dark in oklch, radius, fontSans, fontMono)…`,tP=((e={},t={})=>(t.locale??q())===`fr`?$N(e):eP(e)),nP=()=>`Charger un fichier .json`,rP=()=>`Load a .json file`,iP=((e={},t={})=>(t.locale??q())===`fr`?nP(e):rP(e)),aP=()=>`Importer`,oP=()=>`Import`,sP=((e={},t={})=>(t.locale??q())===`fr`?aP(e):oP(e)),cP=()=>`JSON invalide : impossible d’analyser le contenu.`,lP=()=>`Invalid JSON: could not parse the content.`,uP=((e={},t={})=>(t.locale??q())===`fr`?cP(e):lP(e)),dP=()=>`Charte importée.`,fP=()=>`Chart imported.`,pP=((e={},t={})=>(t.locale??q())===`fr`?dP(e):fP(e)),mP=()=>`Indiquez un nom de charte.`,hP=()=>`Please provide a chart name.`,gP=((e={},t={})=>(t.locale??q())===`fr`?mP(e):hP(e)),_P=()=>`Mes chartes`,vP=()=>`My charts`,yP=((e={},t={})=>(t.locale??q())===`fr`?_P(e):vP(e)),bP=()=>`Les chartes que vous avez importées. Vous pouvez les renommer, modifier leurs tokens, les associer à vos groupes ou les supprimer.`,xP=()=>`The charts you have imported. You can rename them, edit their tokens, associate them with your groups, or delete them.`,SP=((e={},t={})=>(t.locale??q())===`fr`?bP(e):xP(e)),CP=()=>`Vous n’avez pas encore importé de charte.`,wP=()=>`You haven't imported any chart yet.`,TP=((e={},t={})=>(t.locale??q())===`fr`?CP(e):wP(e)),EP=()=>`Modifier`,DP=()=>`Edit`,OP=((e={},t={})=>(t.locale??q())===`fr`?EP(e):DP(e)),kP=()=>`Supprimer`,AP=()=>`Delete`,jP=((e={},t={})=>(t.locale??q())===`fr`?kP(e):AP(e)),MP=()=>`Logo de marque`,NP=()=>`Brand logo`,PP=((e={},t={})=>(t.locale??q())===`fr`?MP(e):NP(e)),FP=()=>`Mode clair`,IP=()=>`Light mode`,LP=((e={},t={})=>(t.locale??q())===`fr`?FP(e):IP(e)),RP=()=>`Mode sombre`,zP=()=>`Dark mode`,BP=((e={},t={})=>(t.locale??q())===`fr`?RP(e):zP(e)),VP=()=>`Téléverser`,HP=()=>`Upload`,UP=((e={},t={})=>(t.locale??q())===`fr`?VP(e):HP(e)),WP=()=>`Remplacer`,GP=()=>`Replace`,KP=((e={},t={})=>(t.locale??q())===`fr`?WP(e):GP(e)),qP=()=>`Retirer`,JP=()=>`Remove`,YP=((e={},t={})=>(t.locale??q())===`fr`?qP(e):JP(e)),XP=()=>`Générer depuis l’autre mode`,ZP=()=>`Generate from the other mode`,QP=((e={},t={})=>(t.locale??q())===`fr`?XP(e):ZP(e)),$P=()=>`Traitement…`,eF=()=>`Processing…`,tF=((e={},t={})=>(t.locale??q())===`fr`?$P(e):eF(e)),nF=()=>`Le fichier doit être une image.`,rF=()=>`The file must be an image.`,iF=((e={},t={})=>(t.locale??q())===`fr`?nF(e):rF(e)),aF=()=>`Image trop volumineuse (max 12 Mo).`,oF=()=>`Image too large (max 12 MB).`,sF=((e={},t={})=>(t.locale??q())===`fr`?aF(e):oF(e)),cF=()=>`Format d’image non pris en charge.`,lF=()=>`Unsupported image format.`,uF=((e={},t={})=>(t.locale??q())===`fr`?cF(e):lF(e)),dF=()=>`Traitement de l’image impossible.`,fF=()=>`Could not process the image.`,pF=((e={},t={})=>(t.locale??q())===`fr`?dF(e):fF(e)),mF=()=>`Encodage de l’image impossible.`,hF=()=>`Could not encode the image.`,gF=((e={},t={})=>(t.locale??q())===`fr`?mF(e):hF(e)),_F=()=>`Domaines (admin)`,vF=()=>`Domains (admin)`,yF=((e={},t={})=>(t.locale??q())===`fr`?_F(e):vF(e)),bF=()=>`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.`,xF=()=>`When Atrium is opened on this domain, this chart applies by default (including the login page). E.g. chat.acme.com or *.acme.com.`,SF=((e={},t={})=>(t.locale??q())===`fr`?bF(e):xF(e)),CF=()=>`chat.acme.com ou *.acme.com`,wF=()=>`chat.acme.com or *.acme.com`,TF=((e={},t={})=>(t.locale??q())===`fr`?CF(e):wF(e)),EF=()=>`Ajouter`,DF=()=>`Add`,OF=((e={},t={})=>(t.locale??q())===`fr`?EF(e):DF(e)),kF=()=>`Aucun domaine.`,AF=()=>`No domain.`,jF=((e={},t={})=>(t.locale??q())===`fr`?kF(e):AF(e)),MF=e=>`Retirer ${e?.domain}`,NF=e=>`Remove ${e?.domain}`,PF=((e,t={})=>(t.locale??q())===`fr`?MF(e):NF(e)),FF=()=>`Enregistrer`,IF=()=>`Save`,LF=((e={},t={})=>(t.locale??q())===`fr`?FF(e):IF(e)),RF=()=>`Annuler`,zF=()=>`Cancel`,BF=((e={},t={})=>(t.locale??q())===`fr`?RF(e):zF(e)),VF=()=>`Nom`,HF=()=>`Name`,UF=((e={},t={})=>(t.locale??q())===`fr`?VF(e):HF(e)),WF=()=>`Tokens (JSON)`,GF=()=>`Tokens (JSON)`,KF=((e={},t={})=>(t.locale??q())===`fr`?WF(e):GF(e)),qF=()=>`Supprimer définitivement cette charte ?`,JF=()=>`Permanently delete this chart?`,YF=((e={},t={})=>(t.locale??q())===`fr`?qF(e):JF(e)),XF=()=>`Chartes personnalisées`,ZF=()=>`Custom charts`,QF=((e={},t={})=>(t.locale??q())===`fr`?XF(e):ZF(e)),$F=()=>`Gérez les chartes importées par les utilisateurs : promouvoir en commune (offerte à tous) ou supprimer.`,eI=()=>`Manage charts imported by users: promote to common (offered to everyone) or delete.`,tI=((e={},t={})=>(t.locale??q())===`fr`?$F(e):eI(e)),nI=e=>`Propriétaire : ${e?.owner}`,rI=e=>`Owner: ${e?.owner}`,iI=((e,t={})=>(t.locale??q())===`fr`?nI(e):rI(e)),aI=()=>`Personnelle`,oI=()=>`Personal`,sI=((e={},t={})=>(t.locale??q())===`fr`?aI(e):oI(e)),cI=()=>`Commune`,lI=()=>`Common`,uI=((e={},t={})=>(t.locale??q())===`fr`?cI(e):lI(e)),dI=()=>`Promouvoir en commune`,fI=()=>`Promote to common`,pI=((e={},t={})=>(t.locale??q())===`fr`?dI(e):fI(e)),mI=()=>`Supprimer`,hI=()=>`Delete`,gI=((e={},t={})=>(t.locale??q())===`fr`?mI(e):hI(e)),_I=()=>`Aucune charte personnalisée pour le moment.`,vI=()=>`No custom chart yet.`,yI=((e={},t={})=>(t.locale??q())===`fr`?_I(e):vI(e)),bI=()=>`Messages`,xI=()=>`Messages`,SI=((e={},t={})=>(t.locale??q())===`fr`?bI(e):xI(e)),CI=()=>`Composeur`,wI=()=>`Composer`,TI=((e={},t={})=>(t.locale??q())===`fr`?CI(e):wI(e)),EI=()=>`Barre latérale`,DI=()=>`Sidebar`,OI=((e={},t={})=>(t.locale??q())===`fr`?EI(e):DI(e)),kI=()=>`Autre`,AI=()=>`Other`,jI=((e={},t={})=>(t.locale??q())===`fr`?kI(e):AI(e)),MI=()=>`Vue source des messages`,NI=()=>`Message source view`,PI=((e={},t={})=>(t.locale??q())===`fr`?MI(e):NI(e)),FI=()=>`Le bouton </> qui montre le texte brut exact d’un message.`,II=()=>`The </> button that shows a message’s exact raw text.`,LI=((e={},t={})=>(t.locale??q())===`fr`?FI(e):II(e)),RI=()=>`Signaler un problème`,zI=()=>`Report a problem`,BI=((e={},t={})=>(t.locale??q())===`fr`?RI(e):zI(e)),VI=()=>`Le drapeau qui envoie un signalement (feedback) sur un message.`,HI=()=>`The flag that sends feedback about a message.`,UI=((e={},t={})=>(t.locale??q())===`fr`?VI(e):HI(e)),WI=()=>`Copier les réponses de l’IA`,GI=()=>`Copy AI replies`,KI=((e={},t={})=>(t.locale??q())===`fr`?WI(e):GI(e)),qI=()=>`Copier vos messages`,JI=()=>`Copy your messages`,YI=((e={},t={})=>(t.locale??q())===`fr`?qI(e):JI(e)),XI=()=>`Supprimer un message`,ZI=()=>`Delete a message`,QI=((e={},t={})=>(t.locale??q())===`fr`?XI(e):ZI(e)),$I=()=>`Activité des outils`,eL=()=>`Tool activity`,tL=((e={},t={})=>(t.locale??q())===`fr`?$I(e):eL(e)),nL=()=>`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.`,rL=()=>`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.`,iL=((e={},t={})=>(t.locale??q())===`fr`?nL(e):rL(e)),aL=()=>`Saisie vocale (micro)`,oL=()=>`Voice input (mic)`,sL=((e={},t={})=>(t.locale??q())===`fr`?aL(e):oL(e)),cL=()=>`Le bouton micro dans le composeur.`,lL=()=>`The mic button in the composer.`,uL=((e={},t={})=>(t.locale??q())===`fr`?cL(e):lL(e)),dL=()=>`Âge des conversations`,fL=()=>`Conversation age`,pL=((e={},t={})=>(t.locale??q())===`fr`?dL(e):fL(e)),mL=()=>`Afficher l’ancienneté de chaque conversation (ex. « 3j », « 2sem ») dans la liste à gauche.`,hL=()=>`Show each conversation’s age (e.g. “3d”, “2w”) in the left list.`,gL=((e={},t={})=>(t.locale??q())===`fr`?mL(e):hL(e)),_L=()=>`Bridge des conversations`,vL=()=>`Conversation bridge`,yL=((e={},t={})=>(t.locale??q())===`fr`?_L(e):vL(e)),bL=()=>`Marquer le bridge (OpenClaw / Hermes) de chaque conversation dans la liste à gauche. Apparaît uniquement si vos conversations utilisent plusieurs bridges.`,xL=()=>`Tag each conversation’s bridge (OpenClaw / Hermes) in the left list. Shown only if your conversations use more than one bridge.`,SL=((e={},t={})=>(t.locale??q())===`fr`?bL(e):xL(e)),CL=()=>`Filtrer les préférences…`,wL=()=>`Filter preferences…`,TL=((e={},t={})=>(t.locale??q())===`fr`?CL(e):wL(e)),EL=()=>`Aucune préférence ne correspond.`,DL=()=>`No preference matches.`,OL=((e={},t={})=>(t.locale??q())===`fr`?EL(e):DL(e)),kL=()=>`Non activé`,AL=()=>`Not enabled`,jL=((e={},t={})=>(t.locale??q())===`fr`?kL(e):AL(e)),ML=()=>`défaut`,NL=()=>`default`,PL=((e={},t={})=>(t.locale??q())===`fr`?ML(e):NL(e)),FL=()=>`Réinitialiser`,IL=()=>`Reset`,LL=((e={},t={})=>(t.locale??q())===`fr`?FL(e):IL(e)),RL=()=>`Gérer les défauts et verrous`,zL=()=>`Manage defaults and locks`,BL=((e={},t={})=>(t.locale??q())===`fr`?RL(e):zL(e)),VL=()=>`Défaut admin`,HL=()=>`Admin default`,UL=((e={},t={})=>(t.locale??q())===`fr`?VL(e):HL(e)),WL=()=>`Fonctionnalité activée (système)`,GL=()=>`Feature enabled (system)`,KL=((e={},t={})=>(t.locale??q())===`fr`?WL(e):GL(e)),qL=()=>`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).`,JL=()=>`Configure the interface: enable system features and set the defaults users inherit (each can then override them in their own preferences).`,YL=((e={},t={})=>(t.locale??q())===`fr`?qL(e):JL(e)),XL=()=>`Une fonctionnalité non activée ici ne peut pas être activée par les utilisateurs (option grisée).`,ZL=()=>`A feature not enabled here cannot be turned on by users (greyed out).`,QL=((e={},t={})=>(t.locale??q())===`fr`?XL(e):ZL(e)),$L=()=>`Active le pipeline vocal. Tant que c’est désactivé, l’option reste grisée et non activable par les utilisateurs.`,eR=()=>`Enables the voice pipeline. While off, the option stays greyed and users can’t turn it on.`,tR=((e={},t={})=>(t.locale??q())===`fr`?$L(e):eR(e)),nR=()=>`« Hérité » = la valeur intégrée par défaut de l’application.`,rR=()=>`“Inherited” = the app’s built-in default value.`,iR=((e={},t={})=>(t.locale??q())===`fr`?nR(e):rR(e)),aR=()=>`Activé`,oR=()=>`On`,sR=((e={},t={})=>(t.locale??q())===`fr`?aR(e):oR(e)),cR=()=>`Désactivé`,lR=()=>`Off`,uR=((e={},t={})=>(t.locale??q())===`fr`?cR(e):lR(e)),dR=()=>`Hérité`,fR=()=>`Inherited`,pR=((e={},t={})=>(t.locale??q())===`fr`?dR(e):fR(e)),mR=()=>`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.`,hR=()=>`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.`,gR=((e={},t={})=>(t.locale??q())===`fr`?mR(e):hR(e)),_R=()=>`Rechercher un compte`,vR=()=>`Search an account`,yR=((e={},t={})=>(t.locale??q())===`fr`?_R(e):vR(e)),bR=()=>`Rôle`,xR=()=>`Role`,SR=((e={},t={})=>(t.locale??q())===`fr`?bR(e):xR(e)),CR=()=>`Tous les rôles`,wR=()=>`All roles`,TR=((e={},t={})=>(t.locale??q())===`fr`?CR(e):wR(e)),ER=()=>`Tous les statuts`,DR=()=>`All statuses`,OR=((e={},t={})=>(t.locale??q())===`fr`?ER(e):DR(e)),kR=()=>`actif`,AR=()=>`active`,jR=((e={},t={})=>(t.locale??q())===`fr`?kR(e):AR(e)),MR=()=>`désactivé`,NR=()=>`disabled`,PR=((e={},t={})=>(t.locale??q())===`fr`?MR(e):NR(e)),FR=()=>`Comptes de service`,IR=()=>`Service accounts`,LR=((e={},t={})=>(t.locale??q())===`fr`?FR(e):IR(e)),RR=()=>`Ajouter un compte`,zR=()=>`Add an account`,BR=((e={},t={})=>(t.locale??q())===`fr`?RR(e):zR(e)),VR=()=>`Aucun compte de service.`,HR=()=>`No service account.`,UR=((e={},t={})=>(t.locale??q())===`fr`?VR(e):HR(e)),WR=()=>`Générer une clé API`,GR=()=>`Generate an API key`,KR=((e={},t={})=>(t.locale??q())===`fr`?WR(e):GR(e)),qR=()=>`Masquer les clés`,JR=()=>`Hide keys`,YR=((e={},t={})=>(t.locale??q())===`fr`?qR(e):JR(e)),XR=()=>`Afficher les clés`,ZR=()=>`Show keys`,QR=((e={},t={})=>(t.locale??q())===`fr`?XR(e):ZR(e)),$R=()=>`Modifier`,ez=()=>`Edit`,tz=((e={},t={})=>(t.locale??q())===`fr`?$R(e):ez(e)),nz=()=>`Supprimer le compte`,rz=()=>`Delete account`,iz=((e={},t={})=>(t.locale??q())===`fr`?nz(e):rz(e)),az=()=>`Replier`,oz=()=>`Collapse`,sz=((e={},t={})=>(t.locale??q())===`fr`?az(e):oz(e)),cz=()=>`Déplier`,lz=()=>`Expand`,uz=((e={},t={})=>(t.locale??q())===`fr`?cz(e):lz(e)),dz=()=>`Nom`,fz=()=>`Name`,pz=((e={},t={})=>(t.locale??q())===`fr`?dz(e):fz(e)),mz=()=>`Rôle`,hz=()=>`Role`,gz=((e={},t={})=>(t.locale??q())===`fr`?mz(e):hz(e)),_z=()=>`Statut`,vz=()=>`Status`,yz=((e={},t={})=>(t.locale??q())===`fr`?_z(e):vz(e)),bz=()=>`Expiration de la prochaine clé`,xz=()=>`Next key expiry`,Sz=((e={},t={})=>(t.locale??q())===`fr`?bz(e):xz(e)),Cz=()=>`Clés`,wz=()=>`Keys`,Tz=((e={},t={})=>(t.locale??q())===`fr`?Cz(e):wz(e)),Ez=()=>`génération…`,Dz=()=>`generating…`,Oz=((e={},t={})=>(t.locale??q())===`fr`?Ez(e):Dz(e)),kz=e=>`${e?.count} active(s)`,Az=e=>`${e?.count} active`,jz=((e,t={})=>(t.locale??q())===`fr`?kz(e):Az(e)),Mz=()=>`Modifier le compte de service`,Nz=()=>`Edit service account`,Pz=((e={},t={})=>(t.locale??q())===`fr`?Mz(e):Nz(e)),Fz=()=>`Modifier le nom, le rôle et la description.`,Iz=()=>`Update the name, role and description.`,Lz=((e={},t={})=>(t.locale??q())===`fr`?Fz(e):Iz(e)),Rz=()=>`Enregistrer`,zz=()=>`Save`,Bz=((e={},t={})=>(t.locale??q())===`fr`?Rz(e):zz(e)),Vz=()=>`Nouveau compte de service`,Hz=()=>`New service account`,Uz=((e={},t={})=>(t.locale??q())===`fr`?Vz(e):Hz(e)),Wz=()=>`Principal authentifié par clé API (jamais un humain).`,Gz=()=>`Principal authenticated by API key (never a human).`,Kz=((e={},t={})=>(t.locale??q())===`fr`?Wz(e):Gz(e)),qz=()=>`Ajouter`,Jz=()=>`Add`,Yz=((e={},t={})=>(t.locale??q())===`fr`?qz(e):Jz(e)),Xz=()=>`Nom`,Zz=()=>`Name`,Qz=((e={},t={})=>(t.locale??q())===`fr`?Xz(e):Zz(e)),$z=()=>`Rôle`,eB=()=>`Role`,tB=((e={},t={})=>(t.locale??q())===`fr`?$z(e):eB(e)),nB=()=>`Choisir un rôle`,rB=()=>`Choose a role`,iB=((e={},t={})=>(t.locale??q())===`fr`?nB(e):rB(e)),aB=()=>`Description (optionnel)`,oB=()=>`Description (optional)`,sB=((e={},t={})=>(t.locale??q())===`fr`?aB(e):oB(e)),cB=()=>`Échec de la création du compte`,lB=()=>`Failed to create the account`,uB=((e={},t={})=>(t.locale??q())===`fr`?cB(e):lB(e)),dB=()=>`Échec de la modification du compte`,fB=()=>`Failed to update the account`,pB=((e={},t={})=>(t.locale??q())===`fr`?dB(e):fB(e)),mB=()=>`Compte de service mis à jour.`,hB=()=>`Service account updated.`,gB=((e={},t={})=>(t.locale??q())===`fr`?mB(e):hB(e)),_B=()=>`Échec de la génération de la clé`,vB=()=>`Failed to generate the key`,yB=((e={},t={})=>(t.locale??q())===`fr`?_B(e):vB(e)),bB=()=>`Supprimer ce compte de service ?`,xB=()=>`Delete this service account?`,SB=((e={},t={})=>(t.locale??q())===`fr`?bB(e):xB(e)),CB=()=>`Le compte`,wB=()=>`The account`,TB=((e={},t={})=>(t.locale??q())===`fr`?CB(e):wB(e)),EB=()=>`et`,DB=()=>`and`,OB=((e={},t={})=>(t.locale??q())===`fr`?EB(e):DB(e)),kB=()=>`toutes ses clés API`,AB=()=>`all its API keys`,jB=((e={},t={})=>(t.locale??q())===`fr`?kB(e):AB(e)),MB=()=>`seront supprimés définitivement. Cette action est irréversible. Tapez le nom du compte pour confirmer.`,NB=()=>`will be permanently deleted. This action is irreversible. Type the account name to confirm.`,PB=((e={},t={})=>(t.locale??q())===`fr`?MB(e):NB(e)),FB=()=>`Supprimer`,IB=()=>`Delete`,LB=((e={},t={})=>(t.locale??q())===`fr`?FB(e):IB(e)),RB=()=>`Compte de service supprimé`,zB=()=>`Service account deleted`,BB=((e={},t={})=>(t.locale??q())===`fr`?RB(e):zB(e)),VB=()=>`Échec de la suppression du compte`,HB=()=>`Failed to delete the account`,UB=((e={},t={})=>(t.locale??q())===`fr`?VB(e):HB(e)),WB=()=>`Révoquer cette clé API ?`,GB=()=>`Revoke this API key?`,KB=((e={},t={})=>(t.locale??q())===`fr`?WB(e):GB(e)),qB=()=>`La clé`,JB=()=>`The key`,YB=((e={},t={})=>(t.locale??q())===`fr`?qB(e):JB(e)),XB=()=>`sera désactivée immédiatement et ne pourra plus authentifier de requêtes. Cette action est irréversible.`,ZB=()=>`will be disabled immediately and will no longer be able to authenticate requests. This action is irreversible.`,QB=((e={},t={})=>(t.locale??q())===`fr`?XB(e):ZB(e)),$B=()=>`Révoquer`,eV=()=>`Revoke`,tV=((e={},t={})=>(t.locale??q())===`fr`?$B(e):eV(e)),nV=()=>`Échec de la révocation`,rV=()=>`Failed to revoke`,iV=((e={},t={})=>(t.locale??q())===`fr`?nV(e):rV(e)),aV=()=>`Clés de`,oV=()=>`Keys of`,sV=((e={},t={})=>(t.locale??q())===`fr`?aV(e):oV(e)),cV=()=>`Aucune clé pour ce compte.`,lV=()=>`No key for this account.`,uV=((e={},t={})=>(t.locale??q())===`fr`?cV(e):lV(e)),dV=()=>`Clé`,fV=()=>`Key`,pV=((e={},t={})=>(t.locale??q())===`fr`?dV(e):fV(e)),mV=()=>`Rôle`,hV=()=>`Role`,gV=((e={},t={})=>(t.locale??q())===`fr`?mV(e):hV(e)),_V=()=>`Créée`,vV=()=>`Created`,yV=((e={},t={})=>(t.locale??q())===`fr`?_V(e):vV(e)),bV=()=>`Dernier usage`,xV=()=>`Last used`,SV=((e={},t={})=>(t.locale??q())===`fr`?bV(e):xV(e)),CV=()=>`Expiration`,wV=()=>`Expiry`,TV=((e={},t={})=>(t.locale??q())===`fr`?CV(e):wV(e)),EV=()=>`Statut`,DV=()=>`Status`,OV=((e={},t={})=>(t.locale??q())===`fr`?EV(e):DV(e)),kV=()=>`Révocation…`,AV=()=>`Revoking…`,jV=((e={},t={})=>(t.locale??q())===`fr`?kV(e):AV(e)),MV=()=>`Révoquer`,NV=()=>`Revoke`,PV=((e={},t={})=>(t.locale??q())===`fr`?MV(e):NV(e)),FV=()=>`Clé API créée`,IV=()=>`API key created`,LV=((e={},t={})=>(t.locale??q())===`fr`?FV(e):IV(e)),RV=e=>`Pour le compte « ${e?.name} ». Copiez-la maintenant.`,zV=e=>`For the account « ${e?.name} ». Copy it now.`,BV=((e,t={})=>(t.locale??q())===`fr`?RV(e):zV(e)),VV=()=>`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.`,HV=()=>`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.`,UV=((e={},t={})=>(t.locale??q())===`fr`?VV(e):HV(e)),WV=()=>`Copier la clé`,GV=()=>`Copy the key`,KV=((e={},t={})=>(t.locale??q())===`fr`?WV(e):GV(e)),qV=()=>`Copié`,JV=()=>`Copied`,YV=((e={},t={})=>(t.locale??q())===`fr`?qV(e):JV(e)),XV=()=>`Copier`,ZV=()=>`Copy`,QV=((e={},t={})=>(t.locale??q())===`fr`?XV(e):ZV(e)),$V=()=>`J’ai copié la clé`,eH=()=>`I have copied the key`,tH=((e={},t={})=>(t.locale??q())===`fr`?$V(e):eH(e)),nH=()=>`Jamais`,rH=()=>`Never`,iH=((e={},t={})=>(t.locale??q())===`fr`?nH(e):rH(e)),aH=()=>`30 jours`,oH=()=>`30 days`,sH=((e={},t={})=>(t.locale??q())===`fr`?aH(e):oH(e)),cH=()=>`90 jours`,lH=()=>`90 days`,uH=((e={},t={})=>(t.locale??q())===`fr`?cH(e):lH(e)),dH=()=>`Jamais`,fH=()=>`Never`,pH=((e={},t={})=>(t.locale??q())===`fr`?dH(e):fH(e)),mH=()=>`révoquée`,hH=()=>`revoked`,gH=((e={},t={})=>(t.locale??q())===`fr`?mH(e):hH(e)),_H=()=>`expirée`,vH=()=>`expired`,yH=((e={},t={})=>(t.locale??q())===`fr`?_H(e):vH(e)),bH=()=>`active`,xH=()=>`active`,SH=((e={},t={})=>(t.locale??q())===`fr`?bH(e):xH(e)),CH=()=>`Sélectionnez ou créez une conversation pour commencer.`,wH=()=>`Select or create a chat to begin.`,TH=((e={},t={})=>(t.locale??q())===`fr`?CH(e):wH(e)),EH=()=>`Conversation introuvable`,DH=()=>`Conversation not found`,OH=((e={},t={})=>(t.locale??q())===`fr`?EH(e):DH(e)),kH=()=>`Ce lien ne correspond à aucune conversation. Elle a peut-être été supprimée, ou l’adresse est incomplète.`,AH=()=>`This link does not match any conversation. It may have been deleted, or the address is incomplete.`,jH=((e={},t={})=>(t.locale??q())===`fr`?kH(e):AH(e)),MH=()=>`Nouvelle conversation`,NH=()=>`New conversation`,PH=((e={},t={})=>(t.locale??q())===`fr`?MH(e):NH(e)),FH=()=>`Derniers messages`,IH=()=>`Latest messages`,LH=((e={},t={})=>(t.locale??q())===`fr`?FH(e):IH(e)),RH=()=>`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.`,zH=()=>`The chat service is temporarily unavailable. Sending messages is suspended — try again in a moment. If this persists, contact your administrator.`,BH=((e={},t={})=>(t.locale??q())===`fr`?RH(e):zH(e)),VH=()=>`Réponse reçue.`,HH=()=>`Reply received.`,UH=((e={},t={})=>(t.locale??q())===`fr`?VH(e):HH(e)),WH=()=>`Comment puis-je aider ?`,GH=()=>`How can I help?`,KH=((e={},t={})=>(t.locale??q())===`fr`?WH(e):GH(e)),qH=()=>`Conversation`,JH=()=>`Conversation`,YH=((e={},t={})=>(t.locale??q())===`fr`?qH(e):JH(e)),XH=e=>`Agent de cette conversation : ${e?.name}`,ZH=e=>`Agent for this conversation: ${e?.name}`,QH=((e,t={})=>(t.locale??q())===`fr`?XH(e):ZH(e)),$H=()=>` (agent par défaut)`,eU=()=>` (default agent)`,tU=((e={},t={})=>(t.locale??q())===`fr`?$H(e):eU(e)),nU=()=>` — cet agent n’existe plus sur la gateway`,rU=()=>` — this agent no longer exists on the gateway`,iU=((e={},t={})=>(t.locale??q())===`fr`?nU(e):rU(e)),aU=()=>` — état non confirmé (gateway injoignable)`,oU=()=>` — state not confirmed (gateway unreachable)`,sU=((e={},t={})=>(t.locale??q())===`fr`?aU(e):oU(e)),cU=e=>`Instance : ${e?.instance}`,lU=e=>`Instance: ${e?.instance}`,uU=((e,t={})=>(t.locale??q())===`fr`?cU(e):lU(e)),dU=()=>`Modèle`,fU=()=>`Model`,pU=((e={},t={})=>(t.locale??q())===`fr`?dU(e):fU(e)),mU=e=>`Modèle · ${e?.provider}`,hU=e=>`Model · ${e?.provider}`,gU=((e,t={})=>(t.locale??q())===`fr`?mU(e):hU(e)),_U=()=>`Niveau de réflexion hérité de l’agent`,vU=()=>`Thinking level inherited from the agent`,yU=((e={},t={})=>(t.locale??q())===`fr`?_U(e):vU(e)),bU=()=>`Niveau de réflexion (spécifique à ce chat)`,xU=()=>`Thinking level (specific to this chat)`,SU=((e={},t={})=>(t.locale??q())===`fr`?bU(e):xU(e)),CU=()=>`Réflexion`,wU=()=>`Thinking`,TU=((e={},t={})=>(t.locale??q())===`fr`?CU(e):wU(e)),EU=()=>`héritée`,DU=()=>`inherited`,OU=((e={},t={})=>(t.locale??q())===`fr`?EU(e):DU(e)),kU=e=>`Contexte utilisé : ${e?.pct}% (${e?.used} / ${e?.total} tokens)`,AU=e=>`Context used: ${e?.pct}% (${e?.used} / ${e?.total} tokens)`,jU=((e,t={})=>(t.locale??q())===`fr`?kU(e):AU(e)),MU=()=>`Contexte`,NU=()=>`Context`,PU=((e={},t={})=>(t.locale??q())===`fr`?MU(e):NU(e)),FU=()=>`Exporter la conversation`,IU=()=>`Export the conversation`,LU=((e={},t={})=>(t.locale??q())===`fr`?FU(e):IU(e)),RU=()=>`Exporter`,zU=()=>`Export`,BU=((e={},t={})=>(t.locale??q())===`fr`?RU(e):zU(e)),VU=()=>`Markdown (.md)`,HU=()=>`Markdown (.md)`,UU=((e={},t={})=>(t.locale??q())===`fr`?VU(e):HU(e)),WU=()=>`JSON (.json)`,GU=()=>`JSON (.json)`,KU=((e={},t={})=>(t.locale??q())===`fr`?WU(e):GU(e)),qU=()=>`Réglages avancés (réflexion, modèle)`,JU=()=>`Advanced settings (thinking, model)`,YU=((e={},t={})=>(t.locale??q())===`fr`?qU(e):JU(e)),XU=()=>`Avancé`,ZU=()=>`Advanced`,QU=((e={},t={})=>(t.locale??q())===`fr`?XU(e):ZU(e)),$U=()=>`Supprimer et régénérer cette réponse ?`,eW=()=>`Delete and regenerate this reply?`,tW=((e={},t={})=>(t.locale??q())===`fr`?$U(e):eW(e)),nW=()=>`Cette réponse sera supprimée, puis régénérée à partir de votre dernier message.`,rW=()=>`This reply will be deleted, then regenerated from your last message.`,iW=((e={},t={})=>(t.locale??q())===`fr`?nW(e):rW(e)),aW=()=>`Régénérer`,oW=()=>`Regenerate`,sW=((e={},t={})=>(t.locale??q())===`fr`?aW(e):oW(e)),cW=()=>`Annuler`,lW=()=>`Cancel`,uW=((e={},t={})=>(t.locale??q())===`fr`?cW(e):lW(e)),dW=()=>`Supprimer ce message et les suivants ?`,fW=()=>`Delete this message and the following ones?`,pW=((e={},t={})=>(t.locale??q())===`fr`?dW(e):fW(e)),mW=()=>`Ce message et tous les messages qui le suivent seront supprimés de la conversation. Cette action est irréversible.`,hW=()=>`This message and all messages following it will be deleted from the conversation. This action is irreversible.`,gW=((e={},t={})=>(t.locale??q())===`fr`?mW(e):hW(e)),_W=()=>`Supprimer`,vW=()=>`Delete`,yW=((e={},t={})=>(t.locale??q())===`fr`?_W(e):vW(e)),bW=()=>`Supprimer et régénérer la réponse`,xW=()=>`Delete and regenerate the reply`,SW=((e={},t={})=>(t.locale??q())===`fr`?bW(e):xW(e)),CW=()=>`Supprimer ce message et les suivants`,wW=()=>`Delete this message and the following ones`,TW=((e={},t={})=>(t.locale??q())===`fr`?CW(e):wW(e)),EW=()=>`Supprimer le message`,DW=()=>`Delete the message`,OW=((e={},t={})=>(t.locale??q())===`fr`?EW(e):DW(e)),kW=()=>`La suppression a échoué`,AW=()=>`Delete failed`,jW=((e={},t={})=>(t.locale??q())===`fr`?kW(e):AW(e)),MW=()=>`Sources`,NW=()=>`Sources`,PW=((e={},t={})=>(t.locale??q())===`fr`?MW(e):NW(e)),FW=()=>`1 souvenir`,IW=()=>`1 memory`,LW=((e={},t={})=>(t.locale??q())===`fr`?FW(e):IW(e)),RW=e=>`${e?.count} souvenirs`,zW=e=>`${e?.count} memories`,BW=((e,t={})=>(t.locale??q())===`fr`?RW(e):zW(e)),VW=()=>`1 document`,HW=()=>`1 document`,UW=((e={},t={})=>(t.locale??q())===`fr`?VW(e):HW(e)),WW=e=>`${e?.count} documents`,GW=e=>`${e?.count} documents`,KW=((e,t={})=>(t.locale??q())===`fr`?WW(e):GW(e)),qW=()=>`Mémoire conversationnelle`,JW=()=>`Conversational memory`,YW=((e={},t={})=>(t.locale??q())===`fr`?qW(e):JW(e)),XW=()=>`Documents`,ZW=()=>`Documents`,QW=((e={},t={})=>(t.locale??q())===`fr`?XW(e):ZW(e)),$W=e=>`score ${e?.score}`,eG=e=>`score ${e?.score}`,tG=((e,t={})=>(t.locale??q())===`fr`?$W(e):eG(e)),nG=()=>`(sans titre)`,rG=()=>`(untitled)`,iG=((e={},t={})=>(t.locale??q())===`fr`?nG(e):rG(e)),aG=()=>`Sources de la réponse`,oG=()=>`Sources of the reply`,sG=((e={},t={})=>(t.locale??q())===`fr`?aG(e):oG(e)),cG=()=>`Voir les sources de la réponse`,lG=()=>`View the sources of the reply`,uG=((e={},t={})=>(t.locale??q())===`fr`?cG(e):lG(e)),dG=()=>`Rechercher dans les sources…`,fG=()=>`Search the sources…`,pG=((e={},t={})=>(t.locale??q())===`fr`?dG(e):fG(e)),mG=()=>`Aucune source ne correspond à votre recherche.`,hG=()=>`No source matches your search.`,gG=((e={},t={})=>(t.locale??q())===`fr`?mG(e):hG(e)),_G=()=>`Tout sélectionner`,vG=()=>`Select all`,yG=((e={},t={})=>(t.locale??q())===`fr`?_G(e):vG(e)),bG=e=>`${e?.count} document(s) sélectionné(s)`,xG=e=>`${e?.count} document(s) selected`,SG=((e,t={})=>(t.locale??q())===`fr`?bG(e):xG(e)),CG=()=>`Joindre les documents`,wG=()=>`Attach the documents`,TG=((e={},t={})=>(t.locale??q())===`fr`?CG(e):wG(e)),EG=()=>`Récupère les fichiers sources des documents cochés en liens téléchargeables (slot « Source d'origine »).`,DG=()=>`Fetches the checked documents' source files as downloadable links (the "Original source" slot).`,OG=((e={},t={})=>(t.locale??q())===`fr`?EG(e):DG(e)),kG=e=>`${e?.count} document(s) joint(s) téléchargeable(s) — ouvrir le panneau Sources`,AG=e=>`${e?.count} attached document(s) available for download — open the Sources panel`,jG=((e,t={})=>(t.locale??q())===`fr`?kG(e):AG(e)),MG=()=>`Source d'origine`,NG=()=>`Original source`,PG=((e={},t={})=>(t.locale??q())===`fr`?MG(e):NG(e)),FG=()=>`Aucun agent documentaire configuré`,IG=()=>`No documentary agent configured`,LG=((e={},t={})=>(t.locale??q())===`fr`?FG(e):IG(e)),RG=()=>`Récupération des documents en cours…`,zG=()=>`Fetching the documents…`,BG=((e={},t={})=>(t.locale??q())===`fr`?RG(e):zG(e)),VG=()=>`Récupération des documents lancée — voir le panneau Sources`,HG=()=>`Document fetch started — see the Sources panel`,UG=((e={},t={})=>(t.locale??q())===`fr`?VG(e):HG(e)),WG=()=>`Impossible de lancer la récupération des documents`,GG=()=>`Could not start the document fetch`,KG=((e={},t={})=>(t.locale??q())===`fr`?WG(e):GG(e)),qG=()=>`Récupération…`,JG=()=>`Fetching…`,YG=((e={},t={})=>(t.locale??q())===`fr`?qG(e):JG(e)),XG=()=>`Télécharger la source`,ZG=()=>`Download the source`,QG=((e={},t={})=>(t.locale??q())===`fr`?XG(e):ZG(e)),$G=()=>`Source introuvable`,eK=()=>`Source not found`,tK=((e={},t={})=>(t.locale??q())===`fr`?$G(e):eK(e)),nK=()=>`Voir plus`,rK=()=>`Show more`,iK=((e={},t={})=>(t.locale??q())===`fr`?nK(e):rK(e)),aK=()=>`Voir moins`,oK=()=>`Show less`,sK=((e={},t={})=>(t.locale??q())===`fr`?aK(e):oK(e)),cK=()=>`Fermer le panneau des sources`,lK=()=>`Close the sources panel`,uK=((e={},t={})=>(t.locale??q())===`fr`?cK(e):lK(e)),dK=()=>`Redimensionner le panneau des sources`,fK=()=>`Resize the sources panel`,pK=((e={},t={})=>(t.locale??q())===`fr`?dK(e):fK(e)),mK=e=>`Source · texte brut exact · ${e?.count} caractère`,hK=e=>`Source · exact raw text · ${e?.count} character`,gK=((e,t={})=>(t.locale??q())===`fr`?mK(e):hK(e)),_K=e=>`Source · texte brut exact · ${e?.count} caractères`,vK=e=>`Source · exact raw text · ${e?.count} characters`,yK=((e,t={})=>(t.locale??q())===`fr`?_K(e):vK(e)),bK=()=>`Copier la source exacte`,xK=()=>`Copy the exact source`,SK=((e={},t={})=>(t.locale??q())===`fr`?bK(e):xK(e)),CK=()=>`(aucun texte)`,wK=()=>`(no text)`,TK=((e={},t={})=>(t.locale??q())===`fr`?CK(e):wK(e)),EK=()=>`Afficher le message rendu`,DK=()=>`Show the rendered message`,OK=((e={},t={})=>(t.locale??q())===`fr`?EK(e):DK(e)),kK=()=>`Afficher la source (texte brut exact)`,AK=()=>`Show the source (exact raw text)`,jK=((e={},t={})=>(t.locale??q())===`fr`?kK(e):AK(e)),MK=()=>`Afficher la source du message`,NK=()=>`Show the message source`,PK=((e={},t={})=>(t.locale??q())===`fr`?MK(e):NK(e)),FK=()=>`Copier le message`,IK=()=>`Copy the message`,LK=((e={},t={})=>(t.locale??q())===`fr`?FK(e):IK(e)),RK=()=>`Envoi…`,zK=()=>`Sending…`,BK=((e={},t={})=>(t.locale??q())===`fr`?RK(e):zK(e)),VK=e=>`${e?.name} traite votre message…`,HK=e=>`${e?.name} is processing your message…`,UK=((e,t={})=>(t.locale??q())===`fr`?VK(e):HK(e)),WK=e=>`L'agent ${e?.name} traite votre message…`,GK=e=>`The agent ${e?.name} is processing your message…`,KK=((e,t={})=>(t.locale??q())===`fr`?WK(e):GK(e)),qK=()=>`Copier la réponse`,JK=()=>`Copy the reply`,YK=((e={},t={})=>(t.locale??q())===`fr`?qK(e):JK(e)),XK=()=>`Chat indisponible…`,ZK=()=>`Chat unavailable…`,QK=((e={},t={})=>(t.locale??q())===`fr`?XK(e):ZK(e)),$K=()=>`Message OpenClaw…`,eq=()=>`Message OpenClaw…`,tq=((e={},t={})=>(t.locale??q())===`fr`?$K(e):eq(e)),nq=()=>`Joindre un fichier`,rq=()=>`Attach a file`,iq=((e={},t={})=>(t.locale??q())===`fr`?nq(e):rq(e)),aq=()=>`échec`,oq=()=>`failed`,sq=((e={},t={})=>(t.locale??q())===`fr`?aq(e):oq(e)),cq=e=>`Téléversement du fichier… ${e?.percent}%`,lq=e=>`Uploading file… ${e?.percent}%`,uq=((e,t={})=>(t.locale??q())===`fr`?cq(e):lq(e)),dq=e=>`Téléversement de ${e?.count} fichiers… ${e?.percent}%`,fq=e=>`Uploading ${e?.count} files… ${e?.percent}%`,pq=((e,t={})=>(t.locale??q())===`fr`?dq(e):fq(e)),mq=()=>`Retirer la pièce jointe`,hq=()=>`Remove attachment`,gq=((e={},t={})=>(t.locale??q())===`fr`?mq(e):hq(e)),_q=()=>`Masquer l'activité des outils et revenir à la vue épurée`,vq=()=>`Hide tool activity and return to the clean view`,yq=((e={},t={})=>(t.locale??q())===`fr`?_q(e):vq(e)),bq=()=>`Afficher l'activité des outils (traitements réalisés et en cours)`,xq=()=>`Show tool activity (completed and in-progress processing)`,Sq=((e={},t={})=>(t.locale??q())===`fr`?bq(e):xq(e)),Cq=()=>`Outils`,wq=()=>`Tools`,Tq=((e={},t={})=>(t.locale??q())===`fr`?Cq(e):wq(e)),Eq=e=>`${e?.count} appel d'outil`,Dq=e=>`${e?.count} tool call`,Oq=((e,t={})=>(t.locale??q())===`fr`?Eq(e):Dq(e)),kq=e=>`${e?.count} appels d'outils`,Aq=e=>`${e?.count} tool calls`,jq=((e,t={})=>(t.locale??q())===`fr`?kq(e):Aq(e)),Mq=()=>`en cours`,Nq=()=>`running`,Pq=((e={},t={})=>(t.locale??q())===`fr`?Mq(e):Nq(e)),Fq=()=>`terminé`,Iq=()=>`done`,Lq=((e={},t={})=>(t.locale??q())===`fr`?Fq(e):Iq(e)),Rq=()=>`Afficher le détail des appels d'outils`,zq=()=>`Show tool call details`,Bq=((e={},t={})=>(t.locale??q())===`fr`?Rq(e):zq(e)),Vq=()=>`Masquer le détail des appels d'outils`,Hq=()=>`Hide tool call details`,Uq=((e={},t={})=>(t.locale??q())===`fr`?Vq(e):Hq(e)),Wq=()=>`Dictée vocale — bientôt disponible`,Gq=()=>`Voice dictation — coming soon`,Kq=((e={},t={})=>(t.locale??q())===`fr`?Wq(e):Gq(e)),qq=()=>`Dictée vocale (bientôt disponible)`,Jq=()=>`Voice dictation (coming soon)`,Yq=((e={},t={})=>(t.locale??q())===`fr`?qq(e):Jq(e)),Xq=()=>`Envoi indisponible (service de chat hors ligne)`,Zq=()=>`Sending unavailable (chat service offline)`,Qq=((e={},t={})=>(t.locale??q())===`fr`?Xq(e):Zq(e)),$q=()=>`Envoyer`,eJ=()=>`Send`,tJ=((e={},t={})=>(t.locale??q())===`fr`?$q(e):eJ(e)),nJ=()=>`Réponse en cours…`,rJ=()=>`Response in progress…`,iJ=((e={},t={})=>(t.locale??q())===`fr`?nJ(e):rJ(e)),aJ=()=>`Mettre en file (envoyé après la réponse en cours)`,oJ=()=>`Queue (sent after the current reply)`,sJ=((e={},t={})=>(t.locale??q())===`fr`?aJ(e):oJ(e)),cJ=()=>`Envoyer après la réponse en cours`,lJ=()=>`Send after the current reply`,uJ=((e={},t={})=>(t.locale??q())===`fr`?cJ(e):lJ(e)),dJ=()=>`Trop de messages en attente. Patientez la fin de la réponse en cours.`,fJ=()=>`Too many messages waiting. Wait for the current reply to finish.`,pJ=((e={},t={})=>(t.locale??q())===`fr`?dJ(e):fJ(e)),mJ=()=>`Impossible de mettre le message en file. Réessayez.`,hJ=()=>`Could not queue the message. Try again.`,gJ=((e={},t={})=>(t.locale??q())===`fr`?mJ(e):hJ(e)),_J=()=>`Chargement…`,vJ=()=>`Loading…`,yJ=((e={},t={})=>(t.locale??q())===`fr`?_J(e):vJ(e)),bJ=()=>`Configuration des intégrations.`,xJ=()=>`Integrations configuration.`,SJ=((e={},t={})=>(t.locale??q())===`fr`?bJ(e):xJ(e)),CJ=()=>`Aucune clé API ici`,wJ=()=>`No API key here`,TJ=((e={},t={})=>(t.locale??q())===`fr`?CJ(e):wJ(e)),EJ=()=>`— 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.`,DJ=()=>`— 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.`,OJ=((e={},t={})=>(t.locale??q())===`fr`?EJ(e):DJ(e)),kJ=()=>`actif`,AJ=()=>`active`,jJ=((e={},t={})=>(t.locale??q())===`fr`?kJ(e):AJ(e)),MJ=()=>`en pause`,NJ=()=>`paused`,PJ=((e={},t={})=>(t.locale??q())===`fr`?MJ(e):NJ(e)),FJ=()=>`clé manquante (env)`,IJ=()=>`key missing (env)`,LJ=((e={},t={})=>(t.locale??q())===`fr`?FJ(e):IJ(e)),RJ=()=>`appliqué par le bridge (à venir)`,zJ=()=>`applied by the bridge (coming soon)`,BJ=((e={},t={})=>(t.locale??q())===`fr`?RJ(e):zJ(e)),VJ=()=>`Export des traces. Clés : LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY (env).`,HJ=()=>`Trace export. Keys: LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY (env).`,UJ=((e={},t={})=>(t.locale??q())===`fr`?VJ(e):HJ(e)),WJ=()=>`Export des traces. Clé : OPIK_API_KEY (env).`,GJ=()=>`Trace export. Key: OPIK_API_KEY (env).`,KJ=((e={},t={})=>(t.locale??q())===`fr`?WJ(e):GJ(e)),qJ=()=>`Host`,JJ=()=>`Host`,YJ=((e={},t={})=>(t.locale??q())===`fr`?qJ(e):JJ(e)),XJ=()=>`Base URL`,ZJ=()=>`Base URL`,QJ=((e={},t={})=>(t.locale??q())===`fr`?XJ(e):ZJ(e)),$J=()=>`Workspace`,eY=()=>`Workspace`,tY=((e={},t={})=>(t.locale??q())===`fr`?$J(e):eY(e)),nY=()=>`(défaut serveur)`,rY=()=>`(server default)`,iY=((e={},t={})=>(t.locale??q())===`fr`?nY(e):rY(e)),aY=()=>`Activé (expédition des traces)`,oY=()=>`Enabled (trace shipping)`,sY=((e={},t={})=>(t.locale??q())===`fr`?aY(e):oY(e)),cY=()=>`Synthèse vocale (TTS)`,lY=()=>`Text-to-speech (TTS)`,uY=((e={},t={})=>(t.locale??q())===`fr`?cY(e):lY(e)),dY=()=>`Lecture audio des réponses. Clé du provider via env (ex. OPENAI_API_KEY, ELEVENLABS_API_KEY).`,fY=()=>`Audio playback of replies. Provider key via env (e.g. OPENAI_API_KEY, ELEVENLABS_API_KEY).`,pY=((e={},t={})=>(t.locale??q())===`fr`?dY(e):fY(e)),mY=()=>`Mode auto`,hY=()=>`Auto mode`,gY=((e={},t={})=>(t.locale??q())===`fr`?mY(e):hY(e)),_Y=()=>`Désactivé`,vY=()=>`Disabled`,yY=((e={},t={})=>(t.locale??q())===`fr`?_Y(e):vY(e)),bY=()=>`Toujours`,xY=()=>`Always`,SY=((e={},t={})=>(t.locale??q())===`fr`?bY(e):xY(e)),CY=()=>`Après un message vocal`,wY=()=>`After a voice message`,TY=((e={},t={})=>(t.locale??q())===`fr`?CY(e):wY(e)),EY=()=>`Sur directive [[tts:…]]`,DY=()=>`On [[tts:…]] directive`,OY=((e={},t={})=>(t.locale??q())===`fr`?EY(e):DY(e)),kY=()=>`Provider`,AY=()=>`Provider`,jY=((e={},t={})=>(t.locale??q())===`fr`?kY(e):AY(e)),MY=()=>`Microsoft (sans clé)`,NY=()=>`Microsoft (no key)`,PY=((e={},t={})=>(t.locale??q())===`fr`?MY(e):NY(e)),FY=()=>`Modèle`,IY=()=>`Model`,LY=((e={},t={})=>(t.locale??q())===`fr`?FY(e):IY(e)),RY=()=>`Voix`,zY=()=>`Voice`,BY=((e={},t={})=>(t.locale??q())===`fr`?RY(e):zY(e)),VY=()=>`speakerVoiceId / nom de voix`,HY=()=>`speakerVoiceId / voice name`,UY=((e={},t={})=>(t.locale??q())===`fr`?VY(e):HY(e)),WY=()=>`Mode conversation (Talk / STS)`,GY=()=>`Conversation mode (Talk / STS)`,KY=((e={},t={})=>(t.locale??q())===`fr`?WY(e):GY(e)),qY=()=>`OpenAI realtime : OPENAI_API_KEY présent (env). Le navigateur recevra un jeton éphémère minté côté serveur — jamais la clé brute.`,JY=()=>`OpenAI realtime: OPENAI_API_KEY present (env). The browser will receive an ephemeral token minted server-side — never the raw key.`,YY=((e={},t={})=>(t.locale??q())===`fr`?qY(e):JY(e)),XY=()=>`OpenAI realtime : OPENAI_API_KEY ABSENT (env). À définir côté déploiement pour activer gpt-realtime.`,ZY=()=>`OpenAI realtime: OPENAI_API_KEY ABSENT (env). To be set on the deployment side to enable gpt-realtime.`,QY=((e={},t={})=>(t.locale??q())===`fr`?XY(e):ZY(e)),$Y=()=>`Activer le mode conversation`,eX=()=>`Enable conversation mode`,tX=((e={},t={})=>(t.locale??q())===`fr`?$Y(e):eX(e)),nX=()=>`Provider realtime`,rX=()=>`Realtime provider`,iX=((e={},t={})=>(t.locale??q())===`fr`?nX(e):rX(e)),aX=()=>`Modèle realtime`,oX=()=>`Realtime model`,sX=((e={},t={})=>(t.locale??q())===`fr`?aX(e):oX(e)),cX=()=>`Transport`,lX=()=>`Transport`,uX=((e={},t={})=>(t.locale??q())===`fr`?cX(e):lX(e)),dX=()=>`WebRTC (navigateur)`,fX=()=>`WebRTC (browser)`,pX=((e={},t={})=>(t.locale??q())===`fr`?dX(e):fX(e)),mX=()=>`Locale`,hX=()=>`Locale`,gX=((e={},t={})=>(t.locale??q())===`fr`?mX(e):hX(e)),_X=()=>`Interrompre la lecture quand l'utilisateur parle`,vX=()=>`Interrupt playback when the user speaks`,yX=((e={},t={})=>(t.locale??q())===`fr`?_X(e):vX(e)),bX=()=>`Voice wake (mot d'activation)`,xX=()=>`Voice wake (wake word)`,SX=((e={},t={})=>(t.locale??q())===`fr`?bX(e):xX(e)),CX=()=>`non câblable dans le navigateur`,wX=()=>`not wireable in the browser`,TX=((e={},t={})=>(t.locale??q())===`fr`?CX(e):wX(e)),EX=()=>`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`,DX=()=>`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`,OX=((e={},t={})=>(t.locale??q())===`fr`?EX(e):DX(e)),kX=()=>`Curseurs d'expédition`,AX=()=>`Shipping cursors`,jX=((e={},t={})=>(t.locale??q())===`fr`?kX(e):AX(e)),MX=()=>`Aucun curseur — aucune trace n'a encore été expédiée.`,NX=()=>`No cursor — no trace has been shipped yet.`,PX=((e={},t={})=>(t.locale??q())===`fr`?MX(e):NX(e)),FX=()=>`Vendeur`,IX=()=>`Vendor`,LX=((e={},t={})=>(t.locale??q())===`fr`?FX(e):IX(e)),RX=()=>`Dernier envoi`,zX=()=>`Last send`,BX=((e={},t={})=>(t.locale??q())===`fr`?RX(e):zX(e)),VX=()=>`Échecs consécutifs`,HX=()=>`Consecutive failures`,UX=((e={},t={})=>(t.locale??q())===`fr`?VX(e):HX(e)),WX=()=>`Dernier statut HTTP`,GX=()=>`Last HTTP status`,KX=((e={},t={})=>(t.locale??q())===`fr`?WX(e):GX(e)),qX=()=>`Dernière erreur`,JX=()=>`Last error`,YX=((e={},t={})=>(t.locale??q())===`fr`?qX(e):JX(e)),XX=()=>`Mots modifiés / altérés`,ZX=()=>`Modified / altered words`,QX=((e={},t={})=>(t.locale??q())===`fr`?XX(e):ZX(e)),$X=()=>`Réponse incorrecte`,eZ=()=>`Incorrect answer`,tZ=((e={},t={})=>(t.locale??q())===`fr`?$X(e):eZ(e)),nZ=()=>`Incohérence`,rZ=()=>`Inconsistency`,iZ=((e={},t={})=>(t.locale??q())===`fr`?nZ(e):rZ(e)),aZ=()=>`Formatage`,oZ=()=>`Formatting`,sZ=((e={},t={})=>(t.locale??q())===`fr`?aZ(e):oZ(e)),cZ=()=>`Latence`,lZ=()=>`Latency`,uZ=((e={},t={})=>(t.locale??q())===`fr`?cZ(e):lZ(e)),dZ=()=>`Erreur API`,fZ=()=>`API error`,pZ=((e={},t={})=>(t.locale??q())===`fr`?dZ(e):fZ(e)),mZ=()=>`Autre`,hZ=()=>`Other`,gZ=((e={},t={})=>(t.locale??q())===`fr`?mZ(e):hZ(e)),_Z=()=>`reçu = stocké`,vZ=()=>`received = stored`,yZ=((e={},t={})=>(t.locale??q())===`fr`?_Z(e):vZ(e)),bZ=()=>`affichage fidèle ✓`,xZ=()=>`faithful display ✓`,SZ=((e={},t={})=>(t.locale??q())===`fr`?bZ(e):xZ(e)),CZ=()=>`écart ⚠`,wZ=()=>`mismatch ⚠`,TZ=((e={},t={})=>(t.locale??q())===`fr`?CZ(e):wZ(e)),EZ=()=>`régénération`,DZ=()=>`regeneration`,OZ=((e={},t={})=>(t.locale??q())===`fr`?EZ(e):DZ(e)),kZ=()=>`Commentaire du rapporteur`,AZ=()=>`Reporter's comment`,jZ=((e={},t={})=>(t.locale??q())===`fr`?kZ(e):AZ(e)),MZ=()=>`Échange avec l'utilisateur`,NZ=()=>`Exchange with the user`,PZ=((e={},t={})=>(t.locale??q())===`fr`?MZ(e):NZ(e)),FZ=()=>`Administrateur`,IZ=()=>`Administrator`,LZ=((e={},t={})=>(t.locale??q())===`fr`?FZ(e):IZ(e)),RZ=()=>`Utilisateur`,zZ=()=>`User`,BZ=((e={},t={})=>(t.locale??q())===`fr`?RZ(e):zZ(e)),VZ=()=>`Aucune réponse envoyée.`,HZ=()=>`No reply sent.`,UZ=((e={},t={})=>(t.locale??q())===`fr`?VZ(e):HZ(e)),WZ=()=>`Répondre à l'utilisateur (visible dans sa zone de notification)…`,GZ=()=>`Reply to the user (visible in their notification area)…`,KZ=((e={},t={})=>(t.locale??q())===`fr`?WZ(e):GZ(e)),qZ=()=>`Envoi…`,mfe=()=>`Sending…`,hfe=((e={},t={})=>(t.locale??q())===`fr`?qZ(e):mfe(e)),gfe=()=>`Répondre`,_fe=()=>`Reply`,vfe=((e={},t={})=>(t.locale??q())===`fr`?gfe(e):_fe(e)),yfe=()=>`Texte stocké (serveur, autoritatif)`,bfe=()=>`Stored text (server, authoritative)`,xfe=((e={},t={})=>(t.locale??q())===`fr`?yfe(e):bfe(e)),Sfe=()=>`(vide)`,Cfe=()=>`(empty)`,JZ=((e={},t={})=>(t.locale??q())===`fr`?Sfe(e):Cfe(e)),wfe=()=>`Texte affiché (navigateur, au signalement)`,Tfe=()=>`Displayed text (browser, at report time)`,Efe=((e={},t={})=>(t.locale??q())===`fr`?wfe(e):Tfe(e)),Dfe=()=>`Prompt générateur`,Ofe=()=>`Generator prompt`,kfe=((e={},t={})=>(t.locale??q())===`fr`?Dfe(e):Ofe(e)),Afe=e=>`Contexte figé (${e?.count} tours${e?.truncated})`,jfe=e=>`Frozen context (${e?.count} turns${e?.truncated})`,Mfe=((e,t={})=>(t.locale??q())===`fr`?Afe(e):jfe(e)),Nfe=()=>`, tronqué`,Pfe=()=>`, truncated`,Ffe=((e={},t={})=>(t.locale??q())===`fr`?Nfe(e):Pfe(e)),Ife=()=>`Payload dispatché (outbox)`,Lfe=()=>`Dispatched payload (outbox)`,Rfe=((e={},t={})=>(t.locale??q())===`fr`?Ife(e):Lfe(e)),zfe=()=>`Extensions de correction détectées (peuvent altérer le texte)`,Bfe=()=>`Correction extensions detected (may alter the text)`,Vfe=((e={},t={})=>(t.locale??q())===`fr`?zfe(e):Bfe(e)),Hfe=()=>`Environnement client`,Ufe=()=>`Client environment`,Wfe=((e={},t={})=>(t.locale??q())===`fr`?Hfe(e):Ufe(e)),Gfe=e=>`thème ${e?.theme}`,Kfe=e=>`theme ${e?.theme}`,qfe=((e,t={})=>(t.locale??q())===`fr`?Gfe(e):Kfe(e)),Jfe=()=>`Plugins :`,Yfe=()=>`Plugins:`,Xfe=((e={},t={})=>(t.locale??q())===`fr`?Jfe(e):Yfe(e)),Zfe=()=>`(navigator.plugins — neutralisé/partiel dans les navigateurs modernes)`,Qfe=()=>`(navigator.plugins — neutralized/partial in modern browsers)`,$fe=((e={},t={})=>(t.locale??q())===`fr`?Zfe(e):Qfe(e)),epe=()=>`Signalements « Report Feedback » enregistrés. La liste est en métadonnées ; ouvrir le détail lit le contenu figé et`,tpe=()=>`Recorded "Report Feedback" reports. The list shows metadata; opening the detail reads the frozen content and`,npe=((e={},t={})=>(t.locale??q())===`fr`?epe(e):tpe(e)),rpe=()=>`trace cet accès dans l'Audit`,ipe=()=>`traces this access in the Audit`,ape=((e={},t={})=>(t.locale??q())===`fr`?rpe(e):ipe(e)),ope=()=>`(lecture de contenu d'un autre utilisateur). Fenêtre récente bornée.`,spe=()=>`(reading another user's content). Bounded recent window.`,cpe=((e={},t={})=>(t.locale??q())===`fr`?ope(e):spe(e)),lpe=()=>`Signalements`,upe=()=>`Reports`,dpe=((e={},t={})=>(t.locale??q())===`fr`?lpe(e):upe(e)),fpe=()=>`Aucun signalement pour l'instant.`,ppe=()=>`No reports yet.`,mpe=((e={},t={})=>(t.locale??q())===`fr`?fpe(e):ppe(e)),hpe=()=>`Quand`,gpe=()=>`When`,_pe=((e={},t={})=>(t.locale??q())===`fr`?hpe(e):gpe(e)),vpe=()=>`Catégorie`,ype=()=>`Category`,bpe=((e={},t={})=>(t.locale??q())===`fr`?vpe(e):ype(e)),xpe=()=>`Type`,Spe=()=>`Type`,Cpe=((e={},t={})=>(t.locale??q())===`fr`?xpe(e):Spe(e)),wpe=()=>`user`,Tpe=()=>`user`,Epe=((e={},t={})=>(t.locale??q())===`fr`?wpe(e):Tpe(e)),Dpe=()=>`AI`,Ope=()=>`AI`,kpe=((e={},t={})=>(t.locale??q())===`fr`?Dpe(e):Ope(e)),Ape=()=>`Rapporteur`,jpe=()=>`Reporter`,Mpe=((e={},t={})=>(t.locale??q())===`fr`?Ape(e):jpe(e)),Npe=e=>`(via ${e?.operator})`,Ppe=e=>`(via ${e?.operator})`,Fpe=((e,t={})=>(t.locale??q())===`fr`?Npe(e):Ppe(e)),Ipe=()=>`Fidélité`,Lpe=()=>`Fidelity`,Rpe=((e={},t={})=>(t.locale??q())===`fr`?Ipe(e):Lpe(e)),zpe=()=>`Note`,Bpe=()=>`Note`,Vpe=((e={},t={})=>(t.locale??q())===`fr`?zpe(e):Bpe(e)),Hpe=()=>`Statut`,Upe=()=>`Status`,Wpe=((e={},t={})=>(t.locale??q())===`fr`?Hpe(e):Upe(e)),Gpe=()=>`Répondu`,Kpe=()=>`Answered`,qpe=((e={},t={})=>(t.locale??q())===`fr`?Gpe(e):Kpe(e)),Jpe=()=>`En attente`,Ype=()=>`Pending`,Xpe=((e={},t={})=>(t.locale??q())===`fr`?Jpe(e):Ype(e)),Zpe=()=>`Clos par l'utilisateur`,Qpe=()=>`Closed by user`,$pe=((e={},t={})=>(t.locale??q())===`fr`?Zpe(e):Qpe(e)),eme=()=>`Raison de clôture`,tme=()=>`Close reason`,nme=((e={},t={})=>(t.locale??q())===`fr`?eme(e):tme(e)),rme=()=>`Masquer`,ime=()=>`Hide`,ame=((e={},t={})=>(t.locale??q())===`fr`?rme(e):ime(e)),ome=()=>`Voir le détail`,sme=()=>`View detail`,cme=((e={},t={})=>(t.locale??q())===`fr`?ome(e):sme(e)),lme=()=>`Supprimer`,ume=()=>`Delete`,dme=((e={},t={})=>(t.locale??q())===`fr`?lme(e):ume(e)),fme=()=>`Supprimer ce signalement ?`,pme=()=>`Delete this report?`,mme=((e={},t={})=>(t.locale??q())===`fr`?fme(e):pme(e)),hme=()=>`L'instantané forensique figé sera définitivement supprimé. Cette action est irréversible.`,gme=()=>`The frozen forensic snapshot will be permanently deleted. This action is irreversible.`,_me=((e={},t={})=>(t.locale??q())===`fr`?hme(e):gme(e)),vme=()=>`Supprimer`,yme=()=>`Delete`,bme=((e={},t={})=>(t.locale??q())===`fr`?vme(e):yme(e)),xme=()=>`Aucun onglet`,Sme=()=>`No tabs`,Cme=((e={},t={})=>(t.locale??q())===`fr`?xme(e):Sme(e)),wme=e=>`${e?.count} onglets`,Tme=e=>`${e?.count} tabs`,Eme=((e,t={})=>(t.locale??q())===`fr`?wme(e):Tme(e)),Dme=()=>`Onglets Settings autorisés`,Ome=()=>`Allowed Settings tabs`,kme=((e={},t={})=>(t.locale??q())===`fr`?Dme(e):Ome(e)),Ame=()=>`Changement de rôle refusé`,jme=()=>`Role change refused`,Mme=((e={},t={})=>(t.locale??q())===`fr`?Ame(e):jme(e)),Nme=()=>`Mise à jour des permissions refusée`,Pme=()=>`Permission update refused`,Fme=((e={},t={})=>(t.locale??q())===`fr`?Nme(e):Pme(e)),Ime=()=>`Rechercher (email, nom)`,Lme=()=>`Search (email, name)`,Rme=((e={},t={})=>(t.locale??q())===`fr`?Ime(e):Lme(e)),zme=()=>`Tous les rôles`,Bme=()=>`All roles`,Vme=((e={},t={})=>(t.locale??q())===`fr`?zme(e):Bme(e)),Hme=()=>`Utilisateurs`,Ume=()=>`Users`,Wme=((e={},t={})=>(t.locale??q())===`fr`?Hme(e):Ume(e)),Gme=()=>`Aucun utilisateur.`,Kme=()=>`No users.`,qme=((e={},t={})=>(t.locale??q())===`fr`?Gme(e):Kme(e)),Jme=()=>`Voir comme cet utilisateur`,Yme=()=>`View as this user`,Xme=((e={},t={})=>(t.locale??q())===`fr`?Jme(e):Yme(e)),Zme=()=>`Supprimer l’utilisateur`,Qme=()=>`Delete user`,$me=((e={},t={})=>(t.locale??q())===`fr`?Zme(e):Qme(e)),ehe=()=>`Supprimer cet utilisateur ?`,the=()=>`Delete this user?`,nhe=((e={},t={})=>(t.locale??q())===`fr`?ehe(e):the(e)),rhe=e=>`« ${e?.user} » et toutes ses données (conversations, fichiers, accès) seront définitivement supprimés. Cette action est irréversible.`,ihe=e=>`“${e?.user}” and all their data (conversations, files, access) will be permanently deleted. This action cannot be undone.`,ahe=((e,t={})=>(t.locale??q())===`fr`?rhe(e):ihe(e)),ohe=()=>`SUPPRIMER`,she=()=>`DELETE`,che=((e={},t={})=>(t.locale??q())===`fr`?ohe(e):she(e)),lhe=()=>`Supprimer définitivement`,uhe=()=>`Delete permanently`,dhe=((e={},t={})=>(t.locale??q())===`fr`?lhe(e):uhe(e)),fhe=()=>`Suppression de l’utilisateur refusée`,phe=()=>`User deletion refused`,mhe=((e={},t={})=>(t.locale??q())===`fr`?fhe(e):phe(e)),hhe=e=>`Utilisateur « ${e?.user} » supprimé.`,ghe=e=>`User “${e?.user}” deleted.`,_he=((e,t={})=>(t.locale??q())===`fr`?hhe(e):ghe(e)),vhe=()=>`Renommer`,yhe=()=>`Rename`,bhe=((e={},t={})=>(t.locale??q())===`fr`?vhe(e):yhe(e)),xhe=()=>`Renommer l’utilisateur`,She=()=>`Rename user`,Che=((e={},t={})=>(t.locale??q())===`fr`?xhe(e):She(e)),whe=e=>`Nom affiché pour « ${e?.user} »`,The=e=>`Display name for “${e?.user}”`,Ehe=((e,t={})=>(t.locale??q())===`fr`?whe(e):The(e)),Dhe=()=>`Nom et prénom`,Ohe=()=>`Name`,khe=((e={},t={})=>(t.locale??q())===`fr`?Dhe(e):Ohe(e)),Ahe=()=>`Nom mis à jour.`,jhe=()=>`Name updated.`,Mhe=((e={},t={})=>(t.locale??q())===`fr`?Ahe(e):jhe(e)),Nhe=()=>`Renommage refusé`,Phe=()=>`Rename refused`,Fhe=((e={},t={})=>(t.locale??q())===`fr`?Nhe(e):Phe(e)),Ihe=()=>`Utilisateur`,Lhe=()=>`User`,Rhe=((e={},t={})=>(t.locale??q())===`fr`?Ihe(e):Lhe(e)),zhe=()=>`Rôle`,Bhe=()=>`Role`,Vhe=((e={},t={})=>(t.locale??q())===`fr`?zhe(e):Bhe(e)),Hhe=()=>`Accès Settings`,Uhe=()=>`Settings access`,Whe=((e={},t={})=>(t.locale??q())===`fr`?Hhe(e):Uhe(e)),Ghe=()=>`Tous (admin)`,Khe=()=>`All (admin)`,qhe=((e={},t={})=>(t.locale??q())===`fr`?Ghe(e):Khe(e)),Jhe=()=>`Agents`,Yhe=()=>`Agents`,YZ=((e={},t={})=>(t.locale??q())===`fr`?Jhe(e):Yhe(e)),Xhe=()=>`Gérer les agents`,Zhe=()=>`Manage agents`,XZ=((e={},t={})=>(t.locale??q())===`fr`?Xhe(e):Zhe(e)),Qhe=()=>`Échec de l’enregistrement de l’instance`,$he=()=>`Failed to save instance`,ege=((e={},t={})=>(t.locale??q())===`fr`?Qhe(e):$he(e)),tge=()=>`Les agents sont `,nge=()=>`Agents are `,rge=((e={},t={})=>(t.locale??q())===`fr`?tge(e):nge(e)),ige=()=>`découverts par le bridge`,age=()=>`discovered by the bridge`,oge=((e={},t={})=>(t.locale??q())===`fr`?ige(e):age(e)),sge=()=>` (jamais saisis à la main). Les identifiants gateway (token, device, clé API) se configurent par instance via « Identifiants » — chiffrés au repos.`,cge=()=>` (never entered by hand). Gateway credentials (token, device identity, API key) are set per instance via “Credentials” — encrypted at rest.`,lge=((e={},t={})=>(t.locale??q())===`fr`?sge(e):cge(e)),uge=()=>`Instances`,dge=()=>`Instances`,fge=((e={},t={})=>(t.locale??q())===`fr`?uge(e):dge(e)),pge=()=>`Ajouter une instance`,mge=()=>`Add instance`,hge=((e={},t={})=>(t.locale??q())===`fr`?pge(e):mge(e)),gge=()=>`Aucune instance.`,_ge=()=>`No instances.`,vge=((e={},t={})=>(t.locale??q())===`fr`?gge(e):_ge(e)),yge=()=>`Nom`,bge=()=>`Name`,xge=((e={},t={})=>(t.locale??q())===`fr`?yge(e):bge(e)),Sge=()=>`Bridge`,Cge=()=>`Bridge`,wge=((e={},t={})=>(t.locale??q())===`fr`?Sge(e):Cge(e)),Tge=()=>`Gateway URL`,Ege=()=>`Gateway URL`,Dge=((e={},t={})=>(t.locale??q())===`fr`?Tge(e):Ege(e)),Oge=()=>`Affichage`,kge=()=>`Display`,Age=((e={},t={})=>(t.locale??q())===`fr`?Oge(e):kge(e)),jge=()=>`Configurer le bridge`,Mge=()=>`Configure bridge`,Nge=((e={},t={})=>(t.locale??q())===`fr`?jge(e):Mge(e)),Pge=()=>`Supprimer`,Fge=()=>`Delete`,ZZ=((e={},t={})=>(t.locale??q())===`fr`?Pge(e):Fge(e)),Ige=()=>`Nouvelle instance`,Lge=()=>`New instance`,Rge=((e={},t={})=>(t.locale??q())===`fr`?Ige(e):Lge(e)),zge=()=>`Modifier`,Bge=()=>`Edit`,Vge=((e={},t={})=>(t.locale??q())===`fr`?zge(e):Bge(e)),Hge=()=>`Modifier l'instance`,Uge=()=>`Edit instance`,Wge=((e={},t={})=>(t.locale??q())===`fr`?Hge(e):Uge(e)),Gge=()=>`Le nom est la clé de routage et ne peut pas être modifié après création.`,Kge=()=>`The name is the routing key and can't be changed after creation.`,qge=((e={},t={})=>(t.locale??q())===`fr`?Gge(e):Kge(e)),Jge=()=>`Métadonnées non-secrètes.`,Yge=()=>`Non-secret metadata.`,Xge=((e={},t={})=>(t.locale??q())===`fr`?Jge(e):Yge(e)),Zge=()=>`Enregistrer`,Qge=()=>`Save`,QZ=((e={},t={})=>(t.locale??q())===`fr`?Zge(e):Qge(e)),$ge=()=>`Nom de l’instance (ex. main)`,e_e=()=>`Instance name (e.g. main)`,t_e=((e={},t={})=>(t.locale??q())===`fr`?$ge(e):e_e(e)),n_e=()=>`Technologie (bridge)`,r_e=()=>`Technology (bridge)`,i_e=((e={},t={})=>(t.locale??q())===`fr`?n_e(e):r_e(e)),a_e=()=>`Gateway URL (ws(s)://)`,o_e=()=>`Gateway URL (ws(s)://)`,s_e=((e={},t={})=>(t.locale??q())===`fr`?a_e(e):o_e(e)),c_e=()=>`URL du bridge (optionnel)`,l_e=()=>`Bridge URL (optional)`,u_e=((e={},t={})=>(t.locale??q())===`fr`?c_e(e):l_e(e)),d_e=()=>`http://bridge-host:8787 — sinon BRIDGE_URL`,f_e=()=>`http://bridge-host:8787 — falls back to BRIDGE_URL`,p_e=((e={},t={})=>(t.locale??q())===`fr`?d_e(e):f_e(e)),m_e=()=>`Nom affiché (optionnel)`,h_e=()=>`Display name (optional)`,g_e=((e={},t={})=>(t.locale??q())===`fr`?m_e(e):h_e(e)),__e=()=>`Version de la gateway (optionnel)`,v_e=()=>`Gateway version (optional)`,y_e=((e={},t={})=>(t.locale??q())===`fr`?__e(e):v_e(e)),b_e=()=>`ex. 2026.6.5 — repli de compatibilité`,x_e=()=>`e.g. 2026.6.5 — compat fallback`,S_e=((e={},t={})=>(t.locale??q())===`fr`?b_e(e):x_e(e)),C_e=()=>`URL HTTP média (optionnel)`,w_e=()=>`Media HTTP URL (optional)`,T_e=((e={},t={})=>(t.locale??q())===`fr`?C_e(e):w_e(e)),E_e=()=>`Seulement si le média est servi sur un autre hôte/port`,D_e=()=>`Only if media is served on another host/port`,O_e=((e={},t={})=>(t.locale??q())===`fr`?E_e(e):D_e(e)),k_e=()=>`Identifiants`,A_e=()=>`Credentials`,j_e=((e={},t={})=>(t.locale??q())===`fr`?k_e(e):A_e(e)),M_e=e=>`Identifiants de la gateway — instance « ${e?.instance} »`,N_e=e=>`Gateway credentials — instance « ${e?.instance} »`,P_e=((e,t={})=>(t.locale??q())===`fr`?M_e(e):N_e(e)),F_e=()=>`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.`,I_e=()=>`Stored encrypted at rest. Write-only: a value is never shown again — set or replace it, or clear it.`,L_e=((e={},t={})=>(t.locale??q())===`fr`?F_e(e):I_e(e)),R_e=()=>`Jeton opérateur`,z_e=()=>`Operator token`,B_e=((e={},t={})=>(t.locale??q())===`fr`?R_e(e):z_e(e)),V_e=()=>`Identité d'appareil (JSON Ed25519)`,H_e=()=>`Device identity (Ed25519 JSON)`,U_e=((e={},t={})=>(t.locale??q())===`fr`?V_e(e):H_e(e)),W_e=()=>`Clé API`,G_e=()=>`API key`,K_e=((e={},t={})=>(t.locale??q())===`fr`?W_e(e):G_e(e)),q_e=()=>`Configuré`,J_e=()=>`Configured`,$Z=((e={},t={})=>(t.locale??q())===`fr`?q_e(e):J_e(e)),Y_e=()=>`Non défini`,X_e=()=>`Not set`,eQ=((e={},t={})=>(t.locale??q())===`fr`?Y_e(e):X_e(e)),Z_e=()=>`Saisir la valeur…`,Q_e=()=>`Enter value…`,$_e=((e={},t={})=>(t.locale??q())===`fr`?Z_e(e):Q_e(e)),eve=()=>`Remplacer la valeur…`,tve=()=>`Replace value…`,nve=((e={},t={})=>(t.locale??q())===`fr`?eve(e):tve(e)),rve=()=>`Définir`,ive=()=>`Set`,ave=((e={},t={})=>(t.locale??q())===`fr`?rve(e):ive(e)),ove=()=>`Effacer`,sve=()=>`Clear`,cve=((e={},t={})=>(t.locale??q())===`fr`?ove(e):sve(e)),lve=()=>`Identifiant enregistré`,uve=()=>`Credential saved`,dve=((e={},t={})=>(t.locale??q())===`fr`?lve(e):uve(e)),fve=()=>`Impossible d'enregistrer l'identifiant`,pve=()=>`Could not save the credential`,tQ=((e={},t={})=>(t.locale??q())===`fr`?fve(e):pve(e)),mve=()=>`Identifiant effacé`,hve=()=>`Credential cleared`,gve=((e={},t={})=>(t.locale??q())===`fr`?mve(e):hve(e)),_ve=()=>`Générer`,vve=()=>`Generate`,yve=((e={},t={})=>(t.locale??q())===`fr`?_ve(e):vve(e)),bve=()=>`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.`,xve=()=>`Mints an Ed25519 identity server-side (the private key never reaches the browser) and saves it. You'll then pair it on the gateway.`,Sve=((e={},t={})=>(t.locale??q())===`fr`?bve(e):xve(e)),Cve=()=>`Identité générée et enregistrée`,wve=()=>`Device identity generated and saved`,nQ=((e={},t={})=>(t.locale??q())===`fr`?Cve(e):wve(e)),Tve=()=>`Appairez cet appareil sur votre gateway avec :`,Eve=()=>`Pair this device on your gateway with:`,Dve=((e={},t={})=>(t.locale??q())===`fr`?Tve(e):Eve(e)),Ove=()=>`Impossible de générer l'identité d'appareil`,kve=()=>`Could not generate the device identity`,Ave=((e={},t={})=>(t.locale??q())===`fr`?Ove(e):kve(e)),jve=()=>`Synchroniser maintenant`,Mve=()=>`Sync now`,Nve=((e={},t={})=>(t.locale??q())===`fr`?jve(e):Mve(e)),Pve=()=>`Synchronisation…`,Fve=()=>`Syncing…`,Ive=((e={},t={})=>(t.locale??q())===`fr`?Pve(e):Fve(e)),Lve=()=>`Synchronisation effectuée`,Rve=()=>`Synced`,zve=((e={},t={})=>(t.locale??q())===`fr`?Lve(e):Rve(e)),Bve=()=>`Échec de la synchronisation`,Vve=()=>`Sync failed`,Hve=((e={},t={})=>(t.locale??q())===`fr`?Bve(e):Vve(e)),Uve=()=>`Aucun agent récupéré — appairez l'appareil sur la gateway (ou vérifiez la configuration de l'instance), puis re-synchronisez`,Wve=()=>`No agents retrieved — pair the device on the gateway (or check the instance configuration), then sync again`,Gve=((e={},t={})=>(t.locale??q())===`fr`?Uve(e):Wve(e)),Kve=()=>`Aucun bridge ne sert cette instance — définissez son « Bridge URL » dans Settings → Agents → Instances.`,qve=()=>`No bridge serves this instance — set its “Bridge URL” in Settings → Agents → Instances.`,Jve=((e={},t={})=>(t.locale??q())===`fr`?Kve(e):qve(e)),Yve=()=>`Configuration Convex incomplète : BRIDGE_SHARED_SECRET manquant sur le déploiement.`,Xve=()=>`Convex deployment is misconfigured: BRIDGE_SHARED_SECRET is missing.`,Zve=((e={},t={})=>(t.locale??q())===`fr`?Yve(e):Xve(e)),Qve=()=>`Bridge injoignable — vérifiez qu'il tourne et que son URL est correcte.`,$ve=()=>`Bridge unreachable — check it is running and its URL is correct.`,eye=((e={},t={})=>(t.locale??q())===`fr`?Qve(e):$ve(e)),tye=()=>`Le bridge a rejeté l'authentification — BRIDGE_SHARED_SECRET désynchronisé entre Convex et le bridge.`,nye=()=>`The bridge rejected authentication — BRIDGE_SHARED_SECRET is out of sync between Convex and the bridge.`,rye=((e={},t={})=>(t.locale??q())===`fr`?tye(e):nye(e)),iye=()=>`Le bridge ne sert pas cette instance — son secret doit figurer dans BRIDGE_INSTANCE_SECRETS et ses identifiants doivent être valides.`,aye=()=>`The bridge does not serve this instance — its secret must be in BRIDGE_INSTANCE_SECRETS and its credentials must be valid.`,oye=((e={},t={})=>(t.locale??q())===`fr`?iye(e):aye(e)),sye=()=>`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é.`,cye=()=>`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.`,lye=((e={},t={})=>(t.locale??q())===`fr`?sye(e):cye(e)),uye=()=>`Secret du bridge (bridge → Convex)`,dye=()=>`Bridge secret (bridge → Convex)`,fye=((e={},t={})=>(t.locale??q())===`fr`?uye(e):dye(e)),pye=()=>`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.`,mye=()=>`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.`,hye=((e={},t={})=>(t.locale??q())===`fr`?pye(e):mye(e)),gye=()=>`Générer`,_ye=()=>`Generate`,vye=((e={},t={})=>(t.locale??q())===`fr`?gye(e):_ye(e)),yye=()=>`Régénérer`,bye=()=>`Regenerate`,xye=((e={},t={})=>(t.locale??q())===`fr`?yye(e):bye(e)),Sye=()=>`Révoquer`,Cye=()=>`Revoke`,wye=((e={},t={})=>(t.locale??q())===`fr`?Sye(e):Cye(e)),Tye=()=>`Secret du bridge révoqué`,Eye=()=>`Bridge secret revoked`,Dye=((e={},t={})=>(t.locale??q())===`fr`?Tye(e):Eye(e)),Oye=()=>`Impossible de générer le secret du bridge`,kye=()=>`Could not generate the bridge secret`,rQ=((e={},t={})=>(t.locale??q())===`fr`?Oye(e):kye(e)),Aye=()=>`Copiez ce secret maintenant — il ne sera plus jamais affiché. Placez-le dans la variable d'environnement du bridge.`,jye=()=>`Copy this secret now — it is never shown again. Put it in the bridge's environment variable.`,Mye=((e={},t={})=>(t.locale??q())===`fr`?Aye(e):jye(e)),Nye=()=>`J'ai copié le secret`,Pye=()=>`I've copied the secret`,iQ=((e={},t={})=>(t.locale??q())===`fr`?Nye(e):Pye(e)),Fye=e=>`Agents — instance « ${e?.name} »`,Iye=e=>`Agents — instance « ${e?.name} »`,Lye=((e,t={})=>(t.locale??q())===`fr`?Fye(e):Iye(e)),Rye=()=>`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é.`,zye=()=>`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.`,Bye=((e={},t={})=>(t.locale??q())===`fr`?Rye(e):zye(e)),Vye=()=>`Impossible de mettre à jour l’agent`,Hye=()=>`Could not update the agent`,aQ=((e={},t={})=>(t.locale??q())===`fr`?Vye(e):Hye(e)),Uye=()=>`Types`,Wye=()=>`Types`,Gye=((e={},t={})=>(t.locale??q())===`fr`?Uye(e):Wye(e)),Kye=()=>`Gérer`,qye=()=>`Manage`,Jye=((e={},t={})=>(t.locale??q())===`fr`?Kye(e):qye(e)),Yye=()=>`Types de l'agent`,Xye=()=>`Agent types`,Zye=((e={},t={})=>(t.locale??q())===`fr`?Yye(e):Xye(e)),Qye=()=>`Un agent peut avoir plusieurs types. Chaque type indique à Atrium comment l'agent peut être utilisé.`,$ye=()=>`An agent may hold several types. Each type tells Atrium how the agent can be used.`,ebe=((e={},t={})=>(t.locale??q())===`fr`?Qye(e):$ye(e)),tbe=()=>`Conversationnel`,nbe=()=>`Conversational`,rbe=((e={},t={})=>(t.locale??q())===`fr`?tbe(e):nbe(e)),ibe=()=>`Agent de chat standard — répond aux messages des utilisateurs dans une conversation.`,abe=()=>`Standard chat agent — answers users' messages in a conversation.`,obe=((e={},t={})=>(t.locale??q())===`fr`?ibe(e):abe(e)),sbe=()=>`Source documentaire`,cbe=()=>`Documentary source`,lbe=((e={},t={})=>(t.locale??q())===`fr`?sbe(e):cbe(e)),ube=()=>`Agent spécialisé appelé par une action Atrium dédiée pour exploiter une source documentaire — pas de chat direct.`,dbe=()=>`Specialised agent invoked by a dedicated Atrium action to exploit a documentary source — not used for direct chat.`,fbe=((e={},t={})=>(t.locale??q())===`fr`?ube(e):dbe(e)),pbe=()=>`Définir par défaut`,mbe=()=>`Set as default`,hbe=((e={},t={})=>(t.locale??q())===`fr`?pbe(e):mbe(e)),gbe=()=>`Retirer`,_be=()=>`Remove`,vbe=((e={},t={})=>(t.locale??q())===`fr`?gbe(e):_be(e)),ybe=e=>`Retirer ${e?.name} ?`,bbe=e=>`Remove ${e?.name}?`,xbe=((e,t={})=>(t.locale??q())===`fr`?ybe(e):bbe(e)),Sbe=()=>`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.`,Cbe=()=>`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.`,wbe=((e={},t={})=>(t.locale??q())===`fr`?Sbe(e):Cbe(e)),Tbe=()=>`Retirer`,Ebe=()=>`Remove`,Dbe=((e={},t={})=>(t.locale??q())===`fr`?Tbe(e):Ebe(e)),Obe=()=>`Agent retiré`,kbe=()=>`Agent removed`,Abe=((e={},t={})=>(t.locale??q())===`fr`?Obe(e):kbe(e)),jbe=()=>`Chargement…`,Mbe=()=>`Loading…`,Nbe=((e={},t={})=>(t.locale??q())===`fr`?jbe(e):Mbe(e)),Pbe=()=>`Jamais sondé.`,Fbe=()=>`Never polled.`,Ibe=((e={},t={})=>(t.locale??q())===`fr`?Pbe(e):Fbe(e)),Lbe=()=>`Découverte OK.`,Rbe=()=>`Discovery OK.`,zbe=((e={},t={})=>(t.locale??q())===`fr`?Lbe(e):Rbe(e)),Bbe=e=>`Hors-ligne (${e?.error}) — dernier bon résultat servi.`,Vbe=e=>`Offline (${e?.error}) — last good result served.`,Hbe=((e,t={})=>(t.locale??q())===`fr`?Bbe(e):Vbe(e)),Ube=()=>`Aucun agent découvert.`,Wbe=()=>`No agent discovered.`,Gbe=((e={},t={})=>(t.locale??q())===`fr`?Ube(e):Wbe(e)),Kbe=()=>`défaut`,qbe=()=>`default`,oQ=((e={},t={})=>(t.locale??q())===`fr`?Kbe(e):qbe(e)),Jbe=()=>`supprimé`,Ybe=()=>`removed`,Xbe=((e={},t={})=>(t.locale??q())===`fr`?Jbe(e):Ybe(e)),Zbe=()=>`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é.`,Qbe=()=>`Trace of actions performed under impersonation: who really acted (real actor) and on behalf of which user. Message content is never recorded.`,$be=((e={},t={})=>(t.locale??q())===`fr`?Zbe(e):Qbe(e)),exe=()=>`Fenêtre récente bornée — une plage antérieure peut être partielle.`,txe=()=>`Bounded recent window — an earlier range may be partial.`,nxe=((e={},t={})=>(t.locale??q())===`fr`?exe(e):txe(e)),rxe=()=>`Rechercher (action, acteur, ressource)`,ixe=()=>`Search (action, actor, resource)`,axe=((e={},t={})=>(t.locale??q())===`fr`?rxe(e):ixe(e)),oxe=()=>`Action`,sxe=()=>`Action`,sQ=((e={},t={})=>(t.locale??q())===`fr`?oxe(e):sxe(e)),cxe=()=>`Toutes les actions`,lxe=()=>`All actions`,uxe=((e={},t={})=>(t.locale??q())===`fr`?cxe(e):lxe(e)),dxe=()=>`Usurpation : toutes`,fxe=()=>`Impersonation: all`,pxe=((e={},t={})=>(t.locale??q())===`fr`?dxe(e):fxe(e)),mxe=()=>`Sous usurpation`,hxe=()=>`Under impersonation`,gxe=((e={},t={})=>(t.locale??q())===`fr`?mxe(e):hxe(e)),_xe=()=>`Sans usurpation`,vxe=()=>`Without impersonation`,yxe=((e={},t={})=>(t.locale??q())===`fr`?_xe(e):vxe(e)),bxe=()=>`Ressource`,xxe=()=>`Resource`,cQ=((e={},t={})=>(t.locale??q())===`fr`?bxe(e):xxe(e)),Sxe=()=>`Toutes les ressources`,Cxe=()=>`All resources`,wxe=((e={},t={})=>(t.locale??q())===`fr`?Sxe(e):Cxe(e)),Txe=()=>`Audit`,Exe=()=>`Audit`,Dxe=((e={},t={})=>(t.locale??q())===`fr`?Txe(e):Exe(e)),Oxe=()=>`Aucune action tracée pour l’instant.`,kxe=()=>`No action traced yet.`,Axe=((e={},t={})=>(t.locale??q())===`fr`?Oxe(e):kxe(e)),jxe=()=>`Quand`,Mxe=()=>`When`,Nxe=((e={},t={})=>(t.locale??q())===`fr`?jxe(e):Mxe(e)),Pxe=()=>`Acteur réel`,Fxe=()=>`Real actor`,Ixe=((e={},t={})=>(t.locale??q())===`fr`?Pxe(e):Fxe(e)),Lxe=()=>`Au nom de`,Rxe=()=>`On behalf of`,zxe=((e={},t={})=>(t.locale??q())===`fr`?Lxe(e):Rxe(e)),Bxe=()=>`Traces`,Vxe=()=>`Traces`,Hxe=((e={},t={})=>(t.locale??q())===`fr`?Bxe(e):Vxe(e)),Uxe=()=>`KPI`,Wxe=()=>`KPI`,Gxe=((e={},t={})=>(t.locale??q())===`fr`?Uxe(e):Wxe(e)),Kxe=()=>`OpenClaw / Anomalies`,qxe=()=>`OpenClaw / Anomalies`,Jxe=((e={},t={})=>(t.locale??q())===`fr`?Kxe(e):qxe(e)),Yxe=()=>`Chats`,Xxe=()=>`Chats`,Zxe=((e={},t={})=>(t.locale??q())===`fr`?Yxe(e):Xxe(e)),Qxe=()=>`Admin`,$xe=()=>`Admin`,eSe=((e={},t={})=>(t.locale??q())===`fr`?Qxe(e):$xe(e)),tSe=()=>`Lire`,nSe=()=>`Read`,lQ=((e={},t={})=>(t.locale??q())===`fr`?tSe(e):nSe(e)),rSe=()=>`Contenu`,iSe=()=>`Content`,aSe=((e={},t={})=>(t.locale??q())===`fr`?rSe(e):iSe(e)),oSe=()=>`Écrire`,sSe=()=>`Write`,uQ=((e={},t={})=>(t.locale??q())===`fr`?oSe(e):sSe(e)),cSe=()=>`Requête`,lSe=()=>`Query`,uSe=((e={},t={})=>(t.locale??q())===`fr`?cSe(e):lSe(e)),dSe=()=>`Anomalies`,fSe=()=>`Anomalies`,pSe=((e={},t={})=>(t.locale??q())===`fr`?dSe(e):fSe(e)),mSe=()=>`Signaler`,hSe=()=>`Report`,gSe=((e={},t={})=>(t.locale??q())===`fr`?mSe(e):hSe(e)),_Se=()=>`Gérer`,vSe=()=>`Manage`,ySe=((e={},t={})=>(t.locale??q())===`fr`?_Se(e):vSe(e)),bSe=()=>`Auto-correction`,xSe=()=>`Self-heal`,SSe=((e={},t={})=>(t.locale??q())===`fr`?bSe(e):xSe(e)),CSe=e=>`${e?.key} — accès au contenu brut (PHI), à accorder avec prudence`,wSe=e=>`${e?.key} — access to raw content (PHI), grant with caution`,TSe=((e,t={})=>(t.locale??q())===`fr`?CSe(e):wSe(e)),ESe=()=>`Échec de l’initialisation des rôles`,DSe=()=>`Failed to initialize roles`,OSe=((e={},t={})=>(t.locale??q())===`fr`?ESe(e):DSe(e)),kSe=e=>`Modifier le rôle intégré « ${e?.name} » ?`,ASe=e=>`Edit the built-in role “${e?.name}”?`,jSe=((e,t={})=>(t.locale??q())===`fr`?kSe(e):ASe(e)),MSe=()=>`Les rôles intégrés sont la base du modèle de permissions. Les modifier peut affecter les comptes existants. Continuer ?`,NSe=()=>`Built-in roles are the foundation of the permission model. Editing them may affect existing accounts. Continue?`,PSe=((e={},t={})=>(t.locale??q())===`fr`?MSe(e):NSe(e)),FSe=()=>`Modifier`,ISe=()=>`Edit`,LSe=((e={},t={})=>(t.locale??q())===`fr`?FSe(e):ISe(e)),RSe=()=>`Échec de la mise à jour des permissions`,zSe=()=>`Failed to update permissions`,BSe=((e={},t={})=>(t.locale??q())===`fr`?RSe(e):zSe(e)),VSe=()=>`Échec de la création du rôle`,HSe=()=>`Failed to create role`,USe=((e={},t={})=>(t.locale??q())===`fr`?VSe(e):HSe(e)),WSe=()=>`Matrice de permissions. Lignes = rôles (intégrés + personnalisés), colonnes = clés de permission. Le rôle`,GSe=()=>`Permission matrix. Rows = roles (built-in + custom), columns = permission keys. The`,KSe=((e={},t={})=>(t.locale??q())===`fr`?WSe(e):GSe(e)),qSe=()=>`détient le joker « * » (toutes les permissions) et est verrouillé. La colonne`,JSe=()=>`role holds the “*” wildcard (all permissions) and is locked. The`,YSe=((e={},t={})=>(t.locale??q())===`fr`?qSe(e):JSe(e)),XSe=()=>`donne accès au contenu brut (PHI) — à n’accorder qu’à bon escient.`,ZSe=()=>`column grants access to raw content (PHI) — grant only when justified.`,QSe=((e={},t={})=>(t.locale??q())===`fr`?XSe(e):ZSe(e)),$Se=()=>`Rôles`,eCe=()=>`Roles`,tCe=((e={},t={})=>(t.locale??q())===`fr`?$Se(e):eCe(e)),nCe=()=>`Ajouter un rôle`,rCe=()=>`Add a role`,iCe=((e={},t={})=>(t.locale??q())===`fr`?nCe(e):rCe(e)),aCe=()=>`Chargement…`,oCe=()=>`Loading…`,sCe=((e={},t={})=>(t.locale??q())===`fr`?aCe(e):oCe(e)),cCe=()=>`Initialisation des rôles…`,lCe=()=>`Initializing roles…`,uCe=((e={},t={})=>(t.locale??q())===`fr`?cCe(e):lCe(e)),dCe=()=>`Rôle`,fCe=()=>`Role`,pCe=((e={},t={})=>(t.locale??q())===`fr`?dCe(e):fCe(e)),mCe=()=>`intégré`,hCe=()=>`built-in`,gCe=((e={},t={})=>(t.locale??q())===`fr`?mCe(e):hCe(e)),_Ce=()=>`personnalisé`,vCe=()=>`custom`,yCe=((e={},t={})=>(t.locale??q())===`fr`?_Ce(e):vCe(e)),bCe=()=>`Authentifié mais pas encore approuvé — l’accès est bloqué tant qu’un administrateur n’a pas validé le compte.`,xCe=()=>`Authenticated but not yet approved — access is blocked until an admin approves the account.`,SCe=((e={},t={})=>(t.locale??q())===`fr`?bCe(e):xCe(e)),CCe=()=>`Personne approuvée, avec accès au chat.`,wCe=()=>`Approved person with chat access.`,TCe=((e={},t={})=>(t.locale??q())===`fr`?CCe(e):wCe(e)),ECe=()=>`Accès total (superset) : gère les utilisateurs, rôles, agents, instances et l’observabilité.`,DCe=()=>`Full access (superset): manages users, roles, agents, instances and observability.`,OCe=((e={},t={})=>(t.locale??q())===`fr`?ECe(e):DCe(e)),kCe=()=>`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.`,ACe=()=>`READ-ONLY service account for monitoring: views traces, KPIs, anomalies and bridge/version status through the API. Cannot write or trigger anything.`,jCe=((e={},t={})=>(t.locale??q())===`fr`?kCe(e):ACe(e)),MCe=()=>`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.`,NCe=()=>`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.`,PCe=((e={},t={})=>(t.locale??q())===`fr`?MCe(e):NCe(e)),FCe=()=>`Accordé via « * » (toutes les permissions)`,ICe=()=>`Granted via “*” (all permissions)`,LCe=((e={},t={})=>(t.locale??q())===`fr`?FCe(e):ICe(e)),RCe=()=>`Écriture en cours…`,zCe=()=>`Writing…`,BCe=((e={},t={})=>(t.locale??q())===`fr`?RCe(e):zCe(e)),VCe=()=>`Nouveau rôle`,HCe=()=>`New role`,UCe=((e={},t={})=>(t.locale??q())===`fr`?VCe(e):HCe(e)),WCe=()=>`Rôle personnalisé. Ajustez les permissions dans la matrice après création.`,GCe=()=>`Custom role. Adjust the permissions in the matrix after creation.`,KCe=((e={},t={})=>(t.locale??q())===`fr`?WCe(e):GCe(e)),qCe=()=>`Créer`,JCe=()=>`Create`,YCe=((e={},t={})=>(t.locale??q())===`fr`?qCe(e):JCe(e)),XCe=()=>`Clé (identifiant stable)`,ZCe=()=>`Key (stable identifier)`,QCe=((e={},t={})=>(t.locale??q())===`fr`?XCe(e):ZCe(e)),$Ce=()=>`ex. analyst`,ewe=()=>`e.g. analyst`,twe=((e={},t={})=>(t.locale??q())===`fr`?$Ce(e):ewe(e)),nwe=()=>`Nom affiché`,rwe=()=>`Display name`,iwe=((e={},t={})=>(t.locale??q())===`fr`?nwe(e):rwe(e)),awe=()=>`Description (optionnel)`,owe=()=>`Description (optional)`,swe=((e={},t={})=>(t.locale??q())===`fr`?awe(e):owe(e)),cwe=()=>`Ouvertes`,lwe=()=>`Open`,uwe=((e={},t={})=>(t.locale??q())===`fr`?cwe(e):lwe(e)),dwe=()=>`En sourdine`,fwe=()=>`Muted`,pwe=((e={},t={})=>(t.locale??q())===`fr`?dwe(e):fwe(e)),mwe=()=>`Résolues`,hwe=()=>`Resolved`,gwe=((e={},t={})=>(t.locale??q())===`fr`?mwe(e):hwe(e)),_we=()=>`Résoudre cette anomalie ?`,vwe=()=>`Resolve this anomaly?`,ywe=((e={},t={})=>(t.locale??q())===`fr`?_we(e):vwe(e)),bwe=()=>`L’anomalie`,xwe=()=>`The anomaly`,Swe=((e={},t={})=>(t.locale??q())===`fr`?bwe(e):xwe(e)),Cwe=()=>`sera marquée comme`,wwe=()=>`will be marked as`,Twe=((e={},t={})=>(t.locale??q())===`fr`?Cwe(e):wwe(e)),Ewe=()=>`résolue`,Dwe=()=>`resolved`,Owe=((e={},t={})=>(t.locale??q())===`fr`?Ewe(e):Dwe(e)),kwe=()=>`Elle sortira du décompte des anomalies ouvertes (signal de self-repair OpenClaw).`,Awe=()=>`It will be removed from the open anomalies count (OpenClaw self-repair signal).`,jwe=((e={},t={})=>(t.locale??q())===`fr`?kwe(e):Awe(e)),Mwe=()=>`Résoudre`,Nwe=()=>`Resolve`,Pwe=((e={},t={})=>(t.locale??q())===`fr`?Mwe(e):Nwe(e)),Fwe=()=>`Anomalie résolue`,Iwe=()=>`Anomaly resolved`,Lwe=((e={},t={})=>(t.locale??q())===`fr`?Fwe(e):Iwe(e)),Rwe=()=>`Échec de la résolution`,zwe=()=>`Resolution failed`,Bwe=((e={},t={})=>(t.locale??q())===`fr`?Rwe(e):zwe(e)),Vwe=()=>`Anomalie acquittée`,Hwe=()=>`Anomaly acknowledged`,Uwe=((e={},t={})=>(t.locale??q())===`fr`?Vwe(e):Hwe(e)),Wwe=()=>`Échec de l’acquittement`,Gwe=()=>`Acknowledgement failed`,Kwe=((e={},t={})=>(t.locale??q())===`fr`?Wwe(e):Gwe(e)),qwe=()=>`Anomalies détectées (cron) ou signalées par les agents OpenClaw. Données non-PHI uniquement (type, sévérité, message, corrélation).`,Jwe=()=>`Anomalies detected (cron) or reported by OpenClaw agents. Non-PHI data only (type, severity, message, correlation).`,Ywe=((e={},t={})=>(t.locale??q())===`fr`?qwe(e):Jwe(e)),Xwe=()=>`Ouverte`,Zwe=()=>`Open`,Qwe=((e={},t={})=>(t.locale??q())===`fr`?Xwe(e):Zwe(e)),$we=()=>`= active, elle alerte et compte dans le heartbeat.`,eTe=()=>`= active, it alerts and counts in the heartbeat.`,tTe=((e={},t={})=>(t.locale??q())===`fr`?$we(e):eTe(e)),nTe=()=>`En sourdine`,rTe=()=>`Muted`,iTe=((e={},t={})=>(t.locale??q())===`fr`?nTe(e):rTe(e)),aTe=()=>`= vue, plus d'alerte, mais pas forcément corrigée (les admins sont notifiés des nouvelles anomalies).`,oTe=()=>`= seen, no more alerts, but not necessarily fixed (admins are notified of new anomalies).`,sTe=((e={},t={})=>(t.locale??q())===`fr`?aTe(e):oTe(e)),cTe=()=>`Résolue`,lTe=()=>`Resolved`,uTe=((e={},t={})=>(t.locale??q())===`fr`?cTe(e):lTe(e)),dTe=()=>`= le problème est réglé (le détecteur résout automatiquement quand la condition cesse). Les deux la sortent du décompte heartbeat.`,fTe=()=>`= the problem is fixed (the detector resolves automatically when the condition clears). Both remove it from the heartbeat count.`,pTe=((e={},t={})=>(t.locale??q())===`fr`?dTe(e):fTe(e)),mTe=()=>`La plage temporelle filtre la fenêtre récente — une plage antérieure peut être partielle.`,hTe=()=>`The time range filters the recent window — an earlier range may be partial.`,gTe=((e={},t={})=>(t.locale??q())===`fr`?mTe(e):hTe(e)),_Te=()=>`Rechercher (message, type, corrélation)`,vTe=()=>`Search (message, type, correlation)`,yTe=((e={},t={})=>(t.locale??q())===`fr`?_Te(e):vTe(e)),bTe=()=>`Tous les statuts`,xTe=()=>`All statuses`,STe=((e={},t={})=>(t.locale??q())===`fr`?bTe(e):xTe(e)),CTe=()=>`Sévérité`,wTe=()=>`Severity`,dQ=((e={},t={})=>(t.locale??q())===`fr`?CTe(e):wTe(e)),TTe=()=>`Toutes sévérités`,ETe=()=>`All severities`,DTe=((e={},t={})=>(t.locale??q())===`fr`?TTe(e):ETe(e)),OTe=()=>`Source`,kTe=()=>`Source`,fQ=((e={},t={})=>(t.locale??q())===`fr`?OTe(e):kTe(e)),ATe=()=>`Toutes sources`,jTe=()=>`All sources`,MTe=((e={},t={})=>(t.locale??q())===`fr`?ATe(e):jTe(e)),NTe=()=>`Type`,PTe=()=>`Type`,pQ=((e={},t={})=>(t.locale??q())===`fr`?NTe(e):PTe(e)),FTe=()=>`Tous les types`,ITe=()=>`All types`,LTe=((e={},t={})=>(t.locale??q())===`fr`?FTe(e):ITe(e)),RTe=()=>`Anomalies`,zTe=()=>`Anomalies`,BTe=((e={},t={})=>(t.locale??q())===`fr`?RTe(e):zTe(e)),VTe=()=>`Aucune anomalie ouverte. 🎉`,HTe=()=>`No open anomalies. 🎉`,UTe=((e={},t={})=>(t.locale??q())===`fr`?VTe(e):HTe(e)),WTe=()=>`Aucune anomalie enregistrée.`,GTe=()=>`No anomalies recorded.`,KTe=((e={},t={})=>(t.locale??q())===`fr`?WTe(e):GTe(e)),qTe=()=>`Résoudre (corrigé)`,JTe=()=>`Resolve (fixed)`,YTe=((e={},t={})=>(t.locale??q())===`fr`?qTe(e):JTe(e)),XTe=()=>`Marquer comme vue (sourdine)`,ZTe=()=>`Mark as seen (mute)`,QTe=((e={},t={})=>(t.locale??q())===`fr`?XTe(e):ZTe(e)),$Te=()=>`Quand`,eEe=()=>`When`,tEe=((e={},t={})=>(t.locale??q())===`fr`?$Te(e):eEe(e)),nEe=()=>`Statut`,rEe=()=>`Status`,iEe=((e={},t={})=>(t.locale??q())===`fr`?nEe(e):rEe(e)),aEe=()=>`Message`,oEe=()=>`Message`,sEe=((e={},t={})=>(t.locale??q())===`fr`?aEe(e):oEe(e)),cEe=()=>`Cause & correctif`,lEe=()=>`Cause & fix`,uEe=((e={},t={})=>(t.locale??q())===`fr`?cEe(e):lEe(e)),dEe=()=>`Corrélation`,fEe=()=>`Correlation`,pEe=((e={},t={})=>(t.locale??q())===`fr`?dEe(e):fEe(e)),mEe=()=>`Voir la trace`,hEe=()=>`View trace`,gEe=((e={},t={})=>(t.locale??q())===`fr`?mEe(e):hEe(e)),_Ee=()=>`ouverte`,vEe=()=>`open`,yEe=((e={},t={})=>(t.locale??q())===`fr`?_Ee(e):vEe(e)),bEe=()=>`en sourdine`,xEe=()=>`muted`,SEe=((e={},t={})=>(t.locale??q())===`fr`?bEe(e):xEe(e)),CEe=()=>`résolue`,wEe=()=>`resolved`,TEe=((e={},t={})=>(t.locale??q())===`fr`?CEe(e):wEe(e)),EEe=()=>`Réponse incorrecte`,DEe=()=>`Incorrect response`,OEe=((e={},t={})=>(t.locale??q())===`fr`?EEe(e):DEe(e)),kEe=()=>`Incohérence`,AEe=()=>`Inconsistency`,jEe=((e={},t={})=>(t.locale??q())===`fr`?kEe(e):AEe(e)),MEe=()=>`Mots / orthographe erronés`,NEe=()=>`Wrong words / spelling`,PEe=((e={},t={})=>(t.locale??q())===`fr`?MEe(e):NEe(e)),FEe=()=>`Formatage`,IEe=()=>`Formatting`,LEe=((e={},t={})=>(t.locale??q())===`fr`?FEe(e):IEe(e)),REe=()=>`Latence`,zEe=()=>`Latency`,BEe=((e={},t={})=>(t.locale??q())===`fr`?REe(e):zEe(e)),VEe=()=>`Erreur API`,HEe=()=>`API error`,UEe=((e={},t={})=>(t.locale??q())===`fr`?VEe(e):HEe(e)),WEe=()=>`Autre`,GEe=()=>`Other`,mQ=((e={},t={})=>(t.locale??q())===`fr`?WEe(e):GEe(e)),KEe=()=>`Mots modifiés à l'envoi`,qEe=()=>`Words altered on send`,JEe=((e={},t={})=>(t.locale??q())===`fr`?KEe(e):qEe(e)),YEe=()=>`Caractères / mise en forme altérés`,XEe=()=>`Characters / formatting altered`,ZEe=((e={},t={})=>(t.locale??q())===`fr`?YEe(e):XEe(e)),QEe=()=>`Signaler un problème`,$Ee=()=>`Report an issue`,eDe=((e={},t={})=>(t.locale??q())===`fr`?QEe(e):$Ee(e)),tDe=()=>`Merci. Un instantané complet de ce message a été figé pour analyse.`,nDe=()=>`Thank you. A complete snapshot of this message has been frozen for analysis.`,rDe=((e={},t={})=>(t.locale??q())===`fr`?tDe(e):nDe(e)),iDe=()=>`Signalez un problème avec votre message tel qu'il a été envoyé. Un instantané forensique exact est enregistré.`,aDe=()=>`Report an issue with your message as it was sent. An exact forensic snapshot is recorded.`,oDe=((e={},t={})=>(t.locale??q())===`fr`?iDe(e):aDe(e)),sDe=()=>`Signalez un problème avec cette réponse. Un instantané forensique exact est enregistré au moment de l'envoi.`,cDe=()=>`Report an issue with this response. An exact forensic snapshot is recorded at send time.`,lDe=((e={},t={})=>(t.locale??q())===`fr`?sDe(e):cDe(e)),uDe=()=>`✓ 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.`,dDe=()=>`✓ The displayed text (source view) matches exactly, character for character, the text stored on the server. The comparison is frozen as evidence.`,fDe=((e={},t={})=>(t.locale??q())===`fr`?uDe(e):dDe(e)),pDe=()=>`⚠ Écart détecté entre le texte affiché (vue source) et le texte stocké. L'instantané a figé les deux versions.`,mDe=()=>`⚠ Discrepancy detected between the displayed text (source view) and the stored text. The snapshot has frozen both versions.`,hDe=((e={},t={})=>(t.locale??q())===`fr`?pDe(e):mDe(e)),gDe=()=>`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.`,_De=()=>`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.`,vDe=((e={},t={})=>(t.locale??q())===`fr`?gDe(e):_De(e)),yDe=()=>`Catégorie`,bDe=()=>`Category`,xDe=((e={},t={})=>(t.locale??q())===`fr`?yDe(e):bDe(e)),SDe=()=>`Choisir une catégorie`,CDe=()=>`Choose a category`,wDe=((e={},t={})=>(t.locale??q())===`fr`?SDe(e):CDe(e)),TDe=()=>`Commentaire`,EDe=()=>`Comment`,DDe=((e={},t={})=>(t.locale??q())===`fr`?TDe(e):EDe(e)),ODe=()=>`Décrivez le problème…`,kDe=()=>`Describe the issue…`,ADe=((e={},t={})=>(t.locale??q())===`fr`?ODe(e):kDe(e)),jDe=()=>`Fermer`,MDe=()=>`Close`,NDe=((e={},t={})=>(t.locale??q())===`fr`?jDe(e):MDe(e)),PDe=()=>`Annuler`,FDe=()=>`Cancel`,IDe=((e={},t={})=>(t.locale??q())===`fr`?PDe(e):FDe(e)),LDe=()=>`Envoi…`,RDe=()=>`Sending…`,zDe=((e={},t={})=>(t.locale??q())===`fr`?LDe(e):RDe(e)),BDe=()=>`Envoyer`,VDe=()=>`Send`,HDe=((e={},t={})=>(t.locale??q())===`fr`?BDe(e):VDe(e)),UDe=()=>`Problème signalé`,WDe=()=>`Issue reported`,GDe=((e={},t={})=>(t.locale??q())===`fr`?UDe(e):WDe(e)),KDe=()=>`Signaler un problème`,qDe=()=>`Report an issue`,JDe=((e={},t={})=>(t.locale??q())===`fr`?KDe(e):qDe(e)),YDe=()=>`Signaler un problème avec ce message`,XDe=()=>`Report an issue with this message`,ZDe=((e={},t={})=>(t.locale??q())===`fr`?YDe(e):XDe(e)),QDe=()=>`Événements récents (fenêtre bornée, plus récents d’abord). Toutes les traces sont des métadonnées `,$De=()=>`Recent events (bounded window, newest first). All traces are redacted metadata `,eOe=((e={},t={})=>(t.locale??q())===`fr`?QDe(e):$De(e)),tOe=()=>`expurgées`,nOe=()=>`redacted`,rOe=((e={},t={})=>(t.locale??q())===`fr`?tOe(e):nOe(e)),iOe=()=>` : aucun contenu de message, pièce jointe ou jeton n’est stocké — uniquement des longueurs, codes et indicateurs.`,aOe=()=>`: no message content, attachment or token is stored — only lengths, codes and flags.`,oOe=((e={},t={})=>(t.locale??q())===`fr`?iOe(e):aOe(e)),sOe=()=>`La plage temporelle filtre la fenêtre récente — une plage antérieure peut être partielle.`,cOe=()=>`The time range filters the recent window — an older range may be partial.`,lOe=((e={},t={})=>(t.locale??q())===`fr`?sOe(e):cOe(e)),uOe=()=>`Rechercher (kind, principal, rôle, route, correlationId)`,dOe=()=>`Search (kind, principal, role, route, correlationId)`,fOe=((e={},t={})=>(t.locale??q())===`fr`?uOe(e):dOe(e)),pOe=()=>`Statut`,mOe=()=>`Status`,hOe=((e={},t={})=>(t.locale??q())===`fr`?pOe(e):mOe(e)),gOe=()=>`Tous statuts`,_Oe=()=>`All statuses`,vOe=((e={},t={})=>(t.locale??q())===`fr`?gOe(e):_Oe(e)),yOe=()=>`Principal`,bOe=()=>`Principal`,xOe=((e={},t={})=>(t.locale??q())===`fr`?yOe(e):bOe(e)),SOe=()=>`Tous principaux`,COe=()=>`All principals`,wOe=((e={},t={})=>(t.locale??q())===`fr`?SOe(e):COe(e)),TOe=()=>`Direction`,EOe=()=>`Direction`,DOe=((e={},t={})=>(t.locale??q())===`fr`?TOe(e):EOe(e)),OOe=()=>`Toutes directions`,kOe=()=>`All directions`,AOe=((e={},t={})=>(t.locale??q())===`fr`?OOe(e):kOe(e)),jOe=()=>`Rôle`,MOe=()=>`Role`,NOe=((e={},t={})=>(t.locale??q())===`fr`?jOe(e):MOe(e)),POe=()=>`Tous les rôles`,FOe=()=>`All roles`,IOe=((e={},t={})=>(t.locale??q())===`fr`?POe(e):FOe(e)),LOe=()=>`Tous les kinds`,ROe=()=>`All kinds`,zOe=((e={},t={})=>(t.locale??q())===`fr`?LOe(e):ROe(e)),BOe=()=>`tous les kinds`,VOe=()=>`all kinds`,HOe=((e={},t={})=>(t.locale??q())===`fr`?BOe(e):VOe(e)),UOe=e=>`${e?.count} lignes`,WOe=e=>`${e?.count} rows`,GOe=((e,t={})=>(t.locale??q())===`fr`?UOe(e):WOe(e)),KOe=()=>`Effacer le filtre de corrélation`,qOe=()=>`Clear correlation filter`,JOe=((e={},t={})=>(t.locale??q())===`fr`?KOe(e):qOe(e)),YOe=()=>`filtre: correlationId=`,XOe=()=>`filter: correlationId=`,ZOe=((e={},t={})=>(t.locale??q())===`fr`?YOe(e):XOe(e)),QOe=()=>`Effacer`,$Oe=()=>`Clear`,eke=((e={},t={})=>(t.locale??q())===`fr`?QOe(e):$Oe(e)),tke=()=>`Traces`,nke=()=>`Traces`,rke=((e={},t={})=>(t.locale??q())===`fr`?tke(e):nke(e)),ike=()=>`Aucun événement pour cette corrélation dans la fenêtre.`,ake=()=>`No event for this correlation in the window.`,oke=((e={},t={})=>(t.locale??q())===`fr`?ike(e):ake(e)),ske=()=>`Aucun événement tracé pour l’instant.`,cke=()=>`No traced event yet.`,lke=((e={},t={})=>(t.locale??q())===`fr`?ske(e):cke(e)),uke=()=>`Quand`,dke=()=>`When`,fke=((e={},t={})=>(t.locale??q())===`fr`?uke(e):dke(e)),pke=()=>`Kind`,mke=()=>`Kind`,hke=((e={},t={})=>(t.locale??q())===`fr`?pke(e):mke(e)),gke=()=>`Résultat`,_ke=()=>`Result`,vke=((e={},t={})=>(t.locale??q())===`fr`?gke(e):_ke(e)),yke=()=>`ok`,bke=()=>`ok`,xke=((e={},t={})=>(t.locale??q())===`fr`?yke(e):bke(e)),Ske=()=>`Direction`,Cke=()=>`Direction`,wke=((e={},t={})=>(t.locale??q())===`fr`?Ske(e):Cke(e)),Tke=()=>`Principal`,Eke=()=>`Principal`,Dke=((e={},t={})=>(t.locale??q())===`fr`?Tke(e):Eke(e)),Oke=()=>`Rôle`,kke=()=>`Role`,Ake=((e={},t={})=>(t.locale??q())===`fr`?Oke(e):kke(e)),jke=()=>`Route`,Mke=()=>`Route`,Nke=((e={},t={})=>(t.locale??q())===`fr`?jke(e):Mke(e)),Pke=()=>`Statut`,Fke=()=>`Status`,Ike=((e={},t={})=>(t.locale??q())===`fr`?Pke(e):Fke(e)),Lke=()=>`Latence`,Rke=()=>`Latency`,zke=((e={},t={})=>(t.locale??q())===`fr`?Lke(e):Rke(e)),Bke=()=>`Corrélation`,Vke=()=>`Correlation`,Hke=((e={},t={})=>(t.locale??q())===`fr`?Bke(e):Vke(e)),Uke=()=>`Suivre ce tour (filtrer par correlationId)`,Wke=()=>`Follow this turn (filter by correlationId)`,Gke=((e={},t={})=>(t.locale??q())===`fr`?Uke(e):Wke(e)),Kke=()=>`Meta`,qke=()=>`Meta`,Jke=((e={},t={})=>(t.locale??q())===`fr`?Kke(e):qke(e)),Yke=()=>`Voir`,Xke=()=>`View`,Zke=((e={},t={})=>(t.locale??q())===`fr`?Yke(e):Xke(e)),Qke=()=>`Meta ·`,$ke=()=>`Meta ·`,eAe=((e={},t={})=>(t.locale??q())===`fr`?Qke(e):$ke(e)),tAe=()=>`expurgé`,nAe=()=>`redacted`,rAe=((e={},t={})=>(t.locale??q())===`fr`?tAe(e):nAe(e)),iAe=()=>`Métadonnées non-PHI uniquement (longueurs, codes, indicateurs). Aucun contenu de message n’est stocké.`,aAe=()=>`Non-PHI metadata only (lengths, codes, flags). No message content is stored.`,oAe=((e={},t={})=>(t.locale??q())===`fr`?iAe(e):aAe(e)),sAe=()=>`Chargement…`,cAe=()=>`Loading…`,hQ=((e={},t={})=>(t.locale??q())===`fr`?sAe(e):cAe(e)),lAe=()=>`Connexion refusée. Le domaine de ce compte n’est pas autorisé.`,uAe=()=>`Sign-in refused. This account’s email domain is not allowed.`,dAe=((e={},t={})=>(t.locale??q())===`fr`?lAe(e):uAe(e)),fAe=()=>`Bon retour`,pAe=()=>`Welcome back`,mAe=((e={},t={})=>(t.locale??q())===`fr`?fAe(e):pAe(e)),hAe=()=>`Connectez-vous pour continuer`,gAe=()=>`Sign in to continue`,_Ae=((e={},t={})=>(t.locale??q())===`fr`?hAe(e):gAe(e)),vAe=()=>`Se connecter avec Google`,yAe=()=>`Sign in with Google`,bAe=((e={},t={})=>(t.locale??q())===`fr`?vAe(e):yAe(e)),xAe=()=>`Aucun mode de connexion configuré.`,SAe=()=>`No sign-in method configured.`,CAe=((e={},t={})=>(t.locale??q())===`fr`?xAe(e):SAe(e)),wAe=()=>`Continuer (dev, sans compte)`,TAe=()=>`Continue (dev, no account)`,EAe=((e={},t={})=>(t.locale??q())===`fr`?wAe(e):TAe(e)),DAe=()=>`Compte`,OAe=()=>`Account`,kAe=((e={},t={})=>(t.locale??q())===`fr`?DAe(e):OAe(e)),AAe=()=>`En attente d’approbation`,jAe=()=>`Awaiting approval`,MAe=((e={},t={})=>(t.locale??q())===`fr`?AAe(e):jAe(e)),NAe=()=>`Ton compte est créé mais doit être approuvé par un administrateur avant d’accéder au chat.`,PAe=()=>`Your account has been created but must be approved by an administrator before you can access the chat.`,FAe=((e={},t={})=>(t.locale??q())===`fr`?NAe(e):PAe(e)),IAe=()=>`Vous explorez l’application en tant que`,LAe=()=>`You are exploring the application as`,RAe=((e={},t={})=>(t.locale??q())===`fr`?IAe(e):LAe(e)),zAe=()=>`. Toute action est exécutée et tracée en votre nom (`,BAe=()=>`. Every action is executed and traced in your name (`,VAe=((e={},t={})=>(t.locale??q())===`fr`?zAe(e):BAe(e)),HAe=()=>`).`,UAe=()=>`).`,WAe=((e={},t={})=>(t.locale??q())===`fr`?HAe(e):UAe(e)),GAe=()=>`Quitter`,KAe=()=>`Exit`,qAe=((e={},t={})=>(t.locale??q())===`fr`?GAe(e):KAe(e)),JAe=()=>`Afficher la barre latérale`,YAe=()=>`Show sidebar`,XAe=((e={},t={})=>(t.locale??q())===`fr`?JAe(e):YAe(e)),ZAe=()=>`Réduire la barre latérale`,QAe=()=>`Collapse sidebar`,$Ae=((e={},t={})=>(t.locale??q())===`fr`?ZAe(e):QAe(e)),eje=()=>`Paramètres`,tje=()=>`Settings`,nje=((e={},t={})=>(t.locale??q())===`fr`?eje(e):tje(e)),rje=()=>`Redimensionner la barre latérale`,ije=()=>`Resize sidebar`,aje=((e={},t={})=>(t.locale??q())===`fr`?rje(e):ije(e)),oje=()=>`Accès non autorisé`,sje=()=>`Access denied`,cje=((e={},t={})=>(t.locale??q())===`fr`?oje(e):sje(e)),lje=()=>`Vous n’avez pas la permission de consulter cet onglet. Choisissez un onglet disponible dans le menu, ou contactez votre administrateur.`,uje=()=>`You do not have permission to view this tab. Choose an available tab from the menu, or contact your administrator.`,dje=((e={},t={})=>(t.locale??q())===`fr`?lje(e):uje(e)),fje=()=>`Une erreur est survenue`,pje=()=>`Something went wrong`,mje=((e={},t={})=>(t.locale??q())===`fr`?fje(e):pje(e)),hje=()=>`Cette page n’a pas pu être affichée. Réessayez, ou revenez à l’accueil. Si le problème persiste, contactez votre administrateur.`,gje=()=>`This page could not be displayed. Try again, or return home. If the problem persists, contact your administrator.`,_je=((e={},t={})=>(t.locale??q())===`fr`?hje(e):gje(e)),vje=()=>`Réessayer`,yje=()=>`Retry`,bje=((e={},t={})=>(t.locale??q())===`fr`?vje(e):yje(e)),xje=()=>`Accueil`,Sje=()=>`Home`,gQ=((e={},t={})=>(t.locale??q())===`fr`?xje(e):Sje(e)),Cje=()=>`Page introuvable`,wje=()=>`Page not found`,Tje=((e={},t={})=>(t.locale??q())===`fr`?Cje(e):wje(e)),Eje=()=>`Cette adresse ne correspond à aucune page de l’application.`,Dje=()=>`This address does not match any page in the application.`,Oje=((e={},t={})=>(t.locale??q())===`fr`?Eje(e):Dje(e)),kje=e=>`Agents de ${e?.user}`,Aje=e=>`${e?.user}'s agents`,jje=((e,t={})=>(t.locale??q())===`fr`?kje(e):Aje(e)),Mje=()=>`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.`,Nje=()=>`Assign the discovered agents (per instance) and designate the default agent. At least one agent is required to create conversations.`,Pje=((e={},t={})=>(t.locale??q())===`fr`?Mje(e):Nje(e)),Fje=()=>`Chargement…`,Ije=()=>`Loading…`,Lje=((e={},t={})=>(t.locale??q())===`fr`?Fje(e):Ije(e)),Rje=()=>`Aucune instance configurée. Ajoutez-en une dans l'onglet Instances.`,zje=()=>`No instance configured. Add one in the Instances tab.`,Bje=((e={},t={})=>(t.locale??q())===`fr`?Rje(e):zje(e)),Vje=()=>`Mise à jour de l'accès refusée`,Hje=()=>`Access update denied`,Uje=((e={},t={})=>(t.locale??q())===`fr`?Vje(e):Hje(e)),Wje=()=>`Définition de l'agent par défaut refusée`,Gje=()=>`Setting the default agent was denied`,Kje=((e={},t={})=>(t.locale??q())===`fr`?Wje(e):Gje(e)),qje=()=>`hors-ligne`,Jje=()=>`offline`,Yje=((e={},t={})=>(t.locale??q())===`fr`?qje(e):Jje(e)),Xje=()=>`Chargement des agents…`,Zje=()=>`Loading agents…`,Qje=((e={},t={})=>(t.locale??q())===`fr`?Xje(e):Zje(e)),$je=()=>`Aucun agent découvert.`,eMe=()=>`No agent discovered.`,tMe=((e={},t={})=>(t.locale??q())===`fr`?$je(e):eMe(e)),nMe=()=>`Aucun agent découvert (instance hors-ligne).`,rMe=()=>`No agent discovered (instance offline).`,iMe=((e={},t={})=>(t.locale??q())===`fr`?nMe(e):rMe(e)),aMe=e=>`Assigner ${e?.name}`,oMe=e=>`Assign ${e?.name}`,sMe=((e,t={})=>(t.locale??q())===`fr`?aMe(e):oMe(e)),cMe=()=>`supprimé`,lMe=()=>`removed`,uMe=((e={},t={})=>(t.locale??q())===`fr`?cMe(e):lMe(e)),dMe=()=>`Agent par défaut`,fMe=()=>`Default agent`,_Q=((e={},t={})=>(t.locale??q())===`fr`?dMe(e):fMe(e)),pMe=()=>`Définir comme agent par défaut`,mMe=()=>`Set as default agent`,vQ=((e={},t={})=>(t.locale??q())===`fr`?pMe(e):mMe(e)),hMe=e=>`Configurer l'instance « ${e?.instance} »`,gMe=e=>`Configure instance « ${e?.instance} »`,_Me=((e,t={})=>(t.locale??q())===`fr`?hMe(e):gMe(e)),vMe=()=>`Configurer`,yMe=()=>`Configure`,yQ=((e={},t={})=>(t.locale??q())===`fr`?vMe(e):yMe(e)),bMe=()=>`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.`,xMe=()=>`Non-secret bridge config, applied hot on the next message (no restart). Secrets (tokens, device identity) live in the bridge environment, never here.`,SMe=((e={},t={})=>(t.locale??q())===`fr`?bMe(e):xMe(e)),CMe=()=>`Aucune instance — ajoutez-en une dans Agents › Instances d’abord.`,wMe=()=>`No instances yet — add one under Agents › Instances first.`,TMe=((e={},t={})=>(t.locale??q())===`fr`?CMe(e):wMe(e)),EMe=()=>`Mode média sortant`,DMe=()=>`Outbound media mode`,OMe=((e={},t={})=>(t.locale??q())===`fr`?EMe(e):DMe(e)),kMe=()=>`Mode média entrant`,AMe=()=>`Inbound media mode`,jMe=((e={},t={})=>(t.locale??q())===`fr`?kMe(e):AMe(e)),MMe=()=>`Taille média max (Mo)`,NMe=()=>`Max media size (MB)`,PMe=((e={},t={})=>(t.locale??q())===`fr`?MMe(e):NMe(e)),FMe=()=>`Ré-hydratation de session`,IMe=()=>`Session re-hydration`,LMe=((e={},t={})=>(t.locale??q())===`fr`?FMe(e):IMe(e)),RMe=()=>`Enregistrer`,zMe=()=>`Save`,BMe=((e={},t={})=>(t.locale??q())===`fr`?RMe(e):zMe(e)),VMe=()=>`Impossible d’enregistrer la configuration`,HMe=()=>`Could not save the configuration`,UMe=((e={},t={})=>(t.locale??q())===`fr`?VMe(e):HMe(e)),WMe=()=>`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).`,GMe=()=>`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).`,KMe=((e={},t={})=>(t.locale??q())===`fr`?WMe(e):GMe(e)),qMe=()=>`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).`,JMe=()=>`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).`,YMe=((e={},t={})=>(t.locale??q())===`fr`?qMe(e):JMe(e)),XMe=()=>`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.`,ZMe=()=>`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.`,QMe=((e={},t={})=>(t.locale??q())===`fr`?XMe(e):ZMe(e)),$Me=()=>`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.`,eNe=()=>`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.`,tNe=((e={},t={})=>(t.locale??q())===`fr`?$Me(e):eNe(e)),nNe=()=>`Chemin entrant (vu par l’agent)`,rNe=()=>`Inbound path (agent view)`,iNe=((e={},t={})=>(t.locale??q())===`fr`?nNe(e):rNe(e)),aNe=()=>`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.`,oNe=()=>`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.`,sNe=((e={},t={})=>(t.locale??q())===`fr`?aNe(e):oNe(e)),cNe=()=>`Chemin sortant (vu par l’agent)`,lNe=()=>`Outbound path (agent view)`,uNe=((e={},t={})=>(t.locale??q())===`fr`?cNe(e):lNe(e)),dNe=()=>`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.`,fNe=()=>`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.`,pNe=((e={},t={})=>(t.locale??q())===`fr`?dNe(e):fNe(e)),mNe=()=>`Vérifier les chemins`,hNe=()=>`Check paths`,gNe=((e={},t={})=>(t.locale??q())===`fr`?mNe(e):hNe(e)),_Ne=()=>`Vérification…`,vNe=()=>`Checking…`,yNe=((e={},t={})=>(t.locale??q())===`fr`?_Ne(e):vNe(e)),bNe=()=>`Échec de la vérification des chemins`,xNe=()=>`Path check failed`,SNe=((e={},t={})=>(t.locale??q())===`fr`?bNe(e):xNe(e)),CNe=()=>`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.`,wNe=()=>`Checks the BRIDGE's access to the shared dirs. The agent-side mount (inside the gateway container) must be verified separately.`,TNe=((e={},t={})=>(t.locale??q())===`fr`?CNe(e):wNe(e)),ENe=()=>`Entrant (écriture bridge)`,DNe=()=>`Inbound (bridge write)`,ONe=((e={},t={})=>(t.locale??q())===`fr`?ENe(e):DNe(e)),kNe=()=>`Sortant (lecture bridge)`,ANe=()=>`Outbound (bridge read)`,jNe=((e={},t={})=>(t.locale??q())===`fr`?kNe(e):ANe(e)),MNe=()=>`Accessible`,NNe=()=>`Accessible`,PNe=((e={},t={})=>(t.locale??q())===`fr`?MNe(e):NNe(e)),FNe=()=>`Non concerné (pas shared-fs)`,INe=()=>`Not applicable (not shared-fs)`,LNe=((e={},t={})=>(t.locale??q())===`fr`?FNe(e):INe(e)),RNe=()=>`Bridge injoignable — vérification impossible`,zNe=()=>`Bridge unreachable — could not check`,BNe=((e={},t={})=>(t.locale??q())===`fr`?RNe(e):zNe(e)),VNe=e=>`Bridge joignable mais la vérification a échoué (${e?.reason})`,HNe=e=>`Bridge reachable but the check failed (${e?.reason})`,UNe=((e,t={})=>(t.locale??q())===`fr`?VNe(e):HNe(e)),WNe=()=>`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.`,GNe=()=>`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.`,KNe=((e={},t={})=>(t.locale??q())===`fr`?WNe(e):GNe(e)),qNe=()=>`Chargement…`,JNe=()=>`Loading…`,bQ=((e={},t={})=>(t.locale??q())===`fr`?qNe(e):JNe(e)),YNe=()=>`Aucun relevé pour l’instant — le sondage tourne chaque minute. Reviens dans un moment.`,XNe=()=>`No reading yet — the poll runs every minute. Check back in a moment.`,ZNe=((e={},t={})=>(t.locale??q())===`fr`?YNe(e):XNe(e)),QNe=()=>`Bridge opérationnel`,$Ne=()=>`Bridge operational`,ePe=((e={},t={})=>(t.locale??q())===`fr`?QNe(e):$Ne(e)),tPe=()=>`Bridge injoignable`,nPe=()=>`Bridge unreachable`,rPe=((e={},t={})=>(t.locale??q())===`fr`?tPe(e):nPe(e)),iPe=e=>`Bridge : ${e?.count} connexion(s) en erreur`,aPe=e=>`Bridge: ${e?.count} connection(s) in error`,oPe=((e,t={})=>(t.locale??q())===`fr`?iPe(e):aPe(e)),sPe=e=>`Vérifié à ${e?.time}`,cPe=e=>`Checked at ${e?.time}`,lPe=((e,t={})=>(t.locale??q())===`fr`?sPe(e):cPe(e)),uPe=e=>`· Bridge démarré le ${e?.time}`,dPe=e=>`· Bridge started on ${e?.time}`,fPe=((e,t={})=>(t.locale??q())===`fr`?uPe(e):dPe(e)),pPe=()=>`↗ Anomalies`,mPe=()=>`↗ Anomalies`,hPe=((e={},t={})=>(t.locale??q())===`fr`?pPe(e):mPe(e)),gPe=e=>`Connexions (${e?.count})`,_Pe=e=>`Connections (${e?.count})`,vPe=((e,t={})=>(t.locale??q())===`fr`?gPe(e):_Pe(e)),yPe=()=>`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).`,bPe=()=>`No connection tested yet. A connection's state appears as soon as a message exercises it (the bridge connects on demand).`,xPe=((e={},t={})=>(t.locale??q())===`fr`?yPe(e):bPe(e)),SPe=e=>`${e?.ok} OK · ${e?.errors} échec(s) · ${e?.attempts} tentative(s)`,CPe=e=>`${e?.ok} OK · ${e?.errors} failure(s) · ${e?.attempts} attempt(s)`,wPe=((e,t={})=>(t.locale??q())===`fr`?SPe(e):CPe(e)),TPe=e=>`Rejeté par la passerelle : ${e?.label} — pas une défaillance du bridge.`,EPe=e=>`Rejected by the gateway: ${e?.label} — not a bridge fault.`,DPe=((e,t={})=>(t.locale??q())===`fr`?TPe(e):EPe(e)),OPe=()=>`Filtrer par cible ou hôte…`,kPe=()=>`Filter by target or host…`,APe=((e={},t={})=>(t.locale??q())===`fr`?OPe(e):kPe(e)),jPe=()=>`Tous`,MPe=()=>`All`,xQ=((e={},t={})=>(t.locale??q())===`fr`?jPe(e):MPe(e)),NPe=()=>`État`,PPe=()=>`State`,FPe=((e={},t={})=>(t.locale??q())===`fr`?NPe(e):PPe(e)),IPe=()=>`Instance`,LPe=()=>`Instance`,RPe=((e={},t={})=>(t.locale??q())===`fr`?IPe(e):LPe(e)),zPe=()=>`Version`,BPe=()=>`Version`,VPe=((e={},t={})=>(t.locale??q())===`fr`?zPe(e):BPe(e)),HPe=()=>`Aucune connexion ne correspond aux filtres.`,UPe=()=>`No connection matches the filters.`,WPe=((e={},t={})=>(t.locale??q())===`fr`?HPe(e):UPe(e)),GPe=()=>`Cible`,KPe=()=>`Target`,qPe=((e={},t={})=>(t.locale??q())===`fr`?GPe(e):KPe(e)),JPe=()=>`État`,YPe=()=>`State`,XPe=((e={},t={})=>(t.locale??q())===`fr`?JPe(e):YPe(e)),ZPe=()=>`Instance`,QPe=()=>`Instance`,$Pe=((e={},t={})=>(t.locale??q())===`fr`?ZPe(e):QPe(e)),eFe=()=>`Hôte passerelle`,tFe=()=>`Gateway host`,nFe=((e={},t={})=>(t.locale??q())===`fr`?eFe(e):tFe(e)),rFe=()=>`Version`,iFe=()=>`Version`,aFe=((e={},t={})=>(t.locale??q())===`fr`?rFe(e):iFe(e)),oFe=()=>`Stats`,sFe=()=>`Stats`,cFe=((e={},t={})=>(t.locale??q())===`fr`?oFe(e):sFe(e)),lFe=()=>`Dernier OK`,uFe=()=>`Last OK`,dFe=((e={},t={})=>(t.locale??q())===`fr`?lFe(e):uFe(e)),fFe=()=>`connectée`,pFe=()=>`connected`,SQ=((e={},t={})=>(t.locale??q())===`fr`?fFe(e):pFe(e)),mFe=()=>`erreur`,hFe=()=>`error`,CQ=((e={},t={})=>(t.locale??q())===`fr`?mFe(e):hFe(e)),gFe=()=>`inactive`,_Fe=()=>`inactive`,wQ=((e={},t={})=>(t.locale??q())===`fr`?gFe(e):_Fe(e)),vFe=()=>`5 dernières minutes`,yFe=()=>`Last 5 minutes`,bFe=((e={},t={})=>(t.locale??q())===`fr`?vFe(e):yFe(e)),xFe=()=>`15 dernières minutes`,SFe=()=>`Last 15 minutes`,CFe=((e={},t={})=>(t.locale??q())===`fr`?xFe(e):SFe(e)),wFe=()=>`30 dernières minutes`,TFe=()=>`Last 30 minutes`,EFe=((e={},t={})=>(t.locale??q())===`fr`?wFe(e):TFe(e)),DFe=()=>`Dernière heure`,OFe=()=>`Last hour`,kFe=((e={},t={})=>(t.locale??q())===`fr`?DFe(e):OFe(e)),AFe=()=>`3 dernières heures`,jFe=()=>`Last 3 hours`,MFe=((e={},t={})=>(t.locale??q())===`fr`?AFe(e):jFe(e)),NFe=()=>`6 dernières heures`,PFe=()=>`Last 6 hours`,FFe=((e={},t={})=>(t.locale??q())===`fr`?NFe(e):PFe(e)),IFe=()=>`12 dernières heures`,LFe=()=>`Last 12 hours`,RFe=((e={},t={})=>(t.locale??q())===`fr`?IFe(e):LFe(e)),zFe=()=>`Dernières 24 heures`,BFe=()=>`Last 24 hours`,VFe=((e={},t={})=>(t.locale??q())===`fr`?zFe(e):BFe(e)),HFe=()=>`2 derniers jours`,UFe=()=>`Last 2 days`,WFe=((e={},t={})=>(t.locale??q())===`fr`?HFe(e):UFe(e)),GFe=()=>`7 derniers jours`,KFe=()=>`Last 7 days`,qFe=((e={},t={})=>(t.locale??q())===`fr`?GFe(e):KFe(e)),JFe=()=>`30 derniers jours`,YFe=()=>`Last 30 days`,XFe=((e={},t={})=>(t.locale??q())===`fr`?JFe(e):YFe(e)),ZFe=()=>`90 derniers jours`,QFe=()=>`Last 90 days`,$Fe=((e={},t={})=>(t.locale??q())===`fr`?ZFe(e):QFe(e)),eIe=()=>`Appels API`,tIe=()=>`API calls`,nIe=((e={},t={})=>(t.locale??q())===`fr`?eIe(e):tIe(e)),rIe=()=>`Erreurs API`,iIe=()=>`API errors`,aIe=((e={},t={})=>(t.locale??q())===`fr`?rIe(e):iIe(e)),oIe=()=>`Latence moyenne`,sIe=()=>`Average latency`,cIe=((e={},t={})=>(t.locale??q())===`fr`?oIe(e):sIe(e)),lIe=()=>`Ingestion OpenClaw`,uIe=()=>`OpenClaw ingest`,dIe=((e={},t={})=>(t.locale??q())===`fr`?lIe(e):uIe(e)),fIe=()=>`Messages envoyés`,pIe=()=>`Messages sent`,mIe=((e={},t={})=>(t.locale??q())===`fr`?fIe(e):pIe(e)),hIe=()=>`Erreurs de stream`,gIe=()=>`Stream errors`,_Ie=((e={},t={})=>(t.locale??q())===`fr`?hIe(e):gIe(e)),vIe=()=>`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.`,yIe=()=>`Hourly aggregated indicators from redacted traces (non-PHI metadata only). Live updates (useQuery) — the rollup runs every hour.`,bIe=((e={},t={})=>(t.locale??q())===`fr`?vIe(e):yIe(e)),xIe=()=>`La plage filtre l’historique des rollups — une plage antérieure peut être partielle.`,SIe=()=>`The range filters the rollup history — an earlier range may be partial.`,CIe=((e={},t={})=>(t.locale??q())===`fr`?xIe(e):SIe(e)),wIe=()=>`Chargement des KPI…`,TIe=()=>`Loading KPIs…`,EIe=((e={},t={})=>(t.locale??q())===`fr`?wIe(e):TIe(e)),DIe=()=>`Aucune donnée KPI — le rollup tourne chaque heure ; lance-le ou attends.`,OIe=()=>`No KPI data — the rollup runs every hour; run it or wait.`,kIe=((e={},t={})=>(t.locale??q())===`fr`?DIe(e):OIe(e)),AIe=e=>`dernier : ${e?.value}`,jIe=e=>`latest: ${e?.value}`,MIe=((e,t={})=>(t.locale??q())===`fr`?AIe(e):jIe(e)),NIe=()=>`aucune donnée`,PIe=()=>`no data`,FIe=((e={},t={})=>(t.locale??q())===`fr`?NIe(e):PIe(e)),IIe=e=>`${e?.count} h`,LIe=e=>`${e?.count} h`,RIe=((e,t={})=>(t.locale??q())===`fr`?IIe(e):LIe(e)),zIe=e=>`Série horaire (max ${e?.max} ${e?.unit})`,BIe=e=>`Hourly series (max ${e?.max} ${e?.unit})`,VIe=((e,t={})=>(t.locale??q())===`fr`?zIe(e):BIe(e)),HIe=()=>`Mode dev — comptes & rôles`,UIe=()=>`Dev mode — accounts & roles`,WIe=((e={},t={})=>(t.locale??q())===`fr`?HIe(e):UIe(e)),GIe=()=>`Mode dev — comptes & rôles`,KIe=()=>`Dev mode — accounts & roles`,qIe=((e={},t={})=>(t.locale??q())===`fr`?GIe(e):KIe(e)),JIe=()=>`Change de rôle et « agis en tant que » pour tester plusieurs utilisateurs sans CLI. Visible uniquement en dev.`,YIe=()=>`Change roles and “act as” to test multiple users without the CLI. Visible in dev only.`,XIe=((e={},t={})=>(t.locale??q())===`fr`?JIe(e):YIe(e)),ZIe=e=>`Moi — ${e?.canonical}`,QIe=e=>`Me — ${e?.canonical}`,$Ie=((e,t={})=>(t.locale??q())===`fr`?ZIe(e):QIe(e)),eLe=()=>`Devenir admin`,tLe=()=>`Become admin`,nLe=((e={},t={})=>(t.locale??q())===`fr`?eLe(e):tLe(e)),rLe=()=>`Devenir user`,iLe=()=>`Become user`,aLe=((e={},t={})=>(t.locale??q())===`fr`?rLe(e):iLe(e)),oLe=()=>`Devenir pending`,sLe=()=>`Become pending`,cLe=((e={},t={})=>(t.locale??q())===`fr`?oLe(e):sLe(e)),lLe=()=>`Tu agis en tant que`,uLe=()=>`You are acting as`,dLe=((e={},t={})=>(t.locale??q())===`fr`?lLe(e):uLe(e)),fLe=()=>`Arrêter`,pLe=()=>`Stop`,mLe=((e={},t={})=>(t.locale??q())===`fr`?fLe(e):pLe(e)),hLe=()=>`Aucun autre compte. Déconnecte-toi puis reconnecte-toi (nouvelle identité anonyme) — elle sera active immédiatement.`,gLe=()=>`No other account. Sign out then sign back in (new anonymous identity) — it will be active immediately.`,_Le=((e={},t={})=>(t.locale??q())===`fr`?hLe(e):gLe(e)),vLe=()=>`Deviens admin d'abord`,yLe=()=>`Become admin first`,bLe=((e={},t={})=>(t.locale??q())===`fr`?vLe(e):yLe(e)),xLe=()=>`Un compte pending ne peut pas être impersonné`,SLe=()=>`A pending account cannot be impersonated`,CLe=((e={},t={})=>(t.locale??q())===`fr`?xLe(e):SLe(e)),wLe=()=>`Agir en tant que cet utilisateur`,TLe=()=>`Act as this user`,ELe=((e={},t={})=>(t.locale??q())===`fr`?wLe(e):TLe(e)),DLe=()=>`Agir en tant que`,OLe=()=>`Act as`,kLe=((e={},t={})=>(t.locale??q())===`fr`?DLe(e):OLe(e)),ALe=()=>`Nouveau chat`,jLe=()=>`New chat`,MLe=((e={},t={})=>(t.locale??q())===`fr`?ALe(e):jLe(e)),NLe=()=>`Nouveau projet`,PLe=()=>`New project`,TQ=((e={},t={})=>(t.locale??q())===`fr`?NLe(e):PLe(e)),FLe=()=>`Nom du projet`,ILe=()=>`Project name`,LLe=((e={},t={})=>(t.locale??q())===`fr`?FLe(e):ILe(e)),RLe=()=>`ex. Travail`,zLe=()=>`e.g. Work`,BLe=((e={},t={})=>(t.locale??q())===`fr`?RLe(e):zLe(e)),VLe=()=>`Créer`,HLe=()=>`Create`,ULe=((e={},t={})=>(t.locale??q())===`fr`?VLe(e):HLe(e)),WLe=()=>`Épinglés`,GLe=()=>`Pinned`,KLe=((e={},t={})=>(t.locale??q())===`fr`?WLe(e):GLe(e)),qLe=()=>`Glissez un chat ici`,JLe=()=>`Drop a chat here`,YLe=((e={},t={})=>(t.locale??q())===`fr`?qLe(e):JLe(e)),XLe=()=>`Chats`,ZLe=()=>`Chats`,QLe=((e={},t={})=>(t.locale??q())===`fr`?XLe(e):ZLe(e)),$Le=()=>`Sans titre`,eRe=()=>`Untitled`,EQ=((e={},t={})=>(t.locale??q())===`fr`?$Le(e):eRe(e)),tRe=()=>`Supprimer le projet`,nRe=()=>`Delete project`,DQ=((e={},t={})=>(t.locale??q())===`fr`?tRe(e):nRe(e)),rRe=e=>`Supprimer le projet « ${e?.name} » ?`,iRe=e=>`Delete project "${e?.name}"?`,aRe=((e,t={})=>(t.locale??q())===`fr`?rRe(e):iRe(e)),oRe=e=>`Cette action est irréversible : elle supprimera aussi définitivement ${e?.count} conversation(s) et tous leurs messages.`,sRe=e=>`This action is irreversible: it will also permanently delete ${e?.count} conversation(s) and all their messages.`,cRe=((e,t={})=>(t.locale??q())===`fr`?oRe(e):sRe(e)),lRe=()=>`Cette action est irréversible.`,uRe=()=>`This action is irreversible.`,dRe=((e={},t={})=>(t.locale??q())===`fr`?lRe(e):uRe(e)),fRe=()=>`Supprimer`,pRe=()=>`Delete`,OQ=((e={},t={})=>(t.locale??q())===`fr`?fRe(e):pRe(e)),mRe=()=>`Déplacer / réordonner`,hRe=()=>`Move / reorder`,gRe=((e={},t={})=>(t.locale??q())===`fr`?mRe(e):hRe(e)),_Re=()=>`Actions`,vRe=()=>`Actions`,yRe=((e={},t={})=>(t.locale??q())===`fr`?_Re(e):vRe(e)),bRe=()=>`Renommer`,xRe=()=>`Rename`,SRe=((e={},t={})=>(t.locale??q())===`fr`?bRe(e):xRe(e)),CRe=()=>`Désépingler`,wRe=()=>`Unpin`,TRe=((e={},t={})=>(t.locale??q())===`fr`?CRe(e):wRe(e)),ERe=()=>`Épingler`,DRe=()=>`Pin`,ORe=((e={},t={})=>(t.locale??q())===`fr`?ERe(e):DRe(e)),kRe=()=>`Couleur`,ARe=()=>`Color`,jRe=((e={},t={})=>(t.locale??q())===`fr`?kRe(e):ARe(e)),MRe=()=>`Aucune couleur`,NRe=()=>`No color`,PRe=((e={},t={})=>(t.locale??q())===`fr`?MRe(e):NRe(e)),FRe=()=>`Supprimer ce chat ?`,IRe=()=>`Delete this chat?`,LRe=((e={},t={})=>(t.locale??q())===`fr`?FRe(e):IRe(e)),RRe=()=>`Cette action est irréversible et supprimera ses messages.`,zRe=()=>`This action is irreversible and will delete its messages.`,BRe=((e={},t={})=>(t.locale??q())===`fr`?RRe(e):zRe(e)),VRe=e=>`Bridge : ${e?.provider}`,HRe=e=>`Bridge: ${e?.provider}`,URe=((e,t={})=>(t.locale??q())===`fr`?VRe(e):HRe(e)),WRe=()=>`Renommer le chat`,GRe=()=>`Rename chat`,KRe=((e={},t={})=>(t.locale??q())===`fr`?WRe(e):GRe(e)),qRe=()=>`Titre`,JRe=()=>`Title`,YRe=((e={},t={})=>(t.locale??q())===`fr`?qRe(e):JRe(e)),XRe=()=>`Réflexion…`,ZRe=()=>`Thinking…`,QRe=((e={},t={})=>(t.locale??q())===`fr`?XRe(e):ZRe(e)),$Re=()=>`Génération…`,eze=()=>`Generating…`,tze=((e={},t={})=>(t.locale??q())===`fr`?$Re(e):eze(e)),nze=()=>`Erreur`,rze=()=>`Error`,ize=((e={},t={})=>(t.locale??q())===`fr`?nze(e):rze(e)),aze=()=>`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.`,oze=()=>`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.`,sze=((e={},t={})=>(t.locale??q())===`fr`?aze(e):oze(e)),cze=()=>`Interrompu`,lze=()=>`Stopped`,uze=((e={},t={})=>(t.locale??q())===`fr`?cze(e):lze(e)),dze=()=>`contient`,fze=()=>`contains`,pze=((e={},t={})=>(t.locale??q())===`fr`?dze(e):fze(e)),mze=()=>`Filtre avancé`,hze=()=>`Advanced filter`,gze=((e={},t={})=>(t.locale??q())===`fr`?mze(e):hze(e)),_ze=()=>`Aucun critère. Ajoutez une condition (toutes les conditions sont cumulées avec ET).`,vze=()=>`No criteria. Add a condition (all conditions are combined with AND).`,yze=((e={},t={})=>(t.locale??q())===`fr`?_ze(e):vze(e)),bze=()=>`Champ`,xze=()=>`Field`,Sze=((e={},t={})=>(t.locale??q())===`fr`?bze(e):xze(e)),Cze=()=>`Valeur`,wze=()=>`Value`,Tze=((e={},t={})=>(t.locale??q())===`fr`?Cze(e):wze(e)),Eze=()=>`Supprimer la condition`,Dze=()=>`Remove condition`,Oze=((e={},t={})=>(t.locale??q())===`fr`?Eze(e):Dze(e)),kze=()=>`Ajouter une condition`,Aze=()=>`Add condition`,jze=((e={},t={})=>(t.locale??q())===`fr`?kze(e):Aze(e)),Mze=()=>`Bridge : pas encore de relevé (sondage chaque minute)`,Nze=()=>`Bridge: no reading yet (polled every minute)`,Pze=((e={},t={})=>(t.locale??q())===`fr`?Mze(e):Nze(e)),Fze=()=>`Bridge opérationnel`,Ize=()=>`Bridge operational`,Lze=((e={},t={})=>(t.locale??q())===`fr`?Fze(e):Ize(e)),Rze=e=>` · vérifié à ${e?.time}`,zze=e=>` · verified at ${e?.time}`,Bze=((e,t={})=>(t.locale??q())===`fr`?Rze(e):zze(e)),Vze=e=>`Bridge indisponible (${e?.reason}) — ouvre l’onglet Bridge pour le détail`,Hze=e=>`Bridge unavailable (${e?.reason}) — open the Bridge tab for details`,Uze=((e,t={})=>(t.locale??q())===`fr`?Vze(e):Hze(e)),Wze=()=>`Utilisateur`,Gze=()=>`User`,Kze=((e={},t={})=>(t.locale??q())===`fr`?Wze(e):Gze(e)),qze=()=>`Système`,Jze=()=>`System`,Yze=((e={},t={})=>(t.locale??q())===`fr`?qze(e):Jze(e)),Xze=()=>`[Export limité aux 200 messages les plus récents de cette conversation]`,Zze=()=>`[Export limited to the 200 most recent messages of this conversation]`,Qze=((e={},t={})=>(t.locale??q())===`fr`?Xze(e):Zze(e)),$ze=()=>`Conversation`,eBe=()=>`Conversation`,kQ=((e={},t={})=>(t.locale??q())===`fr`?$ze(e):eBe(e)),tBe=e=>`Exporté le ${e?.date}`,nBe=e=>`Exported on ${e?.date}`,rBe=((e,t={})=>(t.locale??q())===`fr`?tBe(e):nBe(e)),iBe=e=>`[fichier : ${e?.name}]`,aBe=e=>`[file: ${e?.name}]`,oBe=((e,t={})=>(t.locale??q())===`fr`?iBe(e):aBe(e)),sBe=()=>`Rechercher dans les conversations`,cBe=()=>`Search conversations`,lBe=((e={},t={})=>(t.locale??q())===`fr`?sBe(e):cBe(e)),uBe=()=>`Rechercher…`,dBe=()=>`Search…`,fBe=((e={},t={})=>(t.locale??q())===`fr`?uBe(e):dBe(e)),pBe=()=>`Rechercher dans les conversations`,mBe=()=>`Search conversations`,hBe=((e={},t={})=>(t.locale??q())===`fr`?pBe(e):mBe(e)),gBe=()=>`Rechercher dans toutes les conversations…`,_Be=()=>`Search across all conversations…`,vBe=((e={},t={})=>(t.locale??q())===`fr`?gBe(e):_Be(e)),yBe=()=>`Recherche`,bBe=()=>`Search`,xBe=((e={},t={})=>(t.locale??q())===`fr`?yBe(e):bBe(e)),SBe=e=>`Tapez au moins ${e?.count} caractères pour rechercher.`,CBe=e=>`Type at least ${e?.count} characters to search.`,wBe=((e,t={})=>(t.locale??q())===`fr`?SBe(e):CBe(e)),TBe=()=>`Recherche…`,EBe=()=>`Searching…`,DBe=((e={},t={})=>(t.locale??q())===`fr`?TBe(e):EBe(e)),OBe=e=>`Aucune conversation ne correspond à « ${e?.term} ».`,kBe=e=>`No conversation matches “${e?.term}”.`,ABe=((e,t={})=>(t.locale??q())===`fr`?OBe(e):kBe(e)),jBe=()=>`Nouveau chat`,MBe=()=>`New chat`,NBe=((e={},t={})=>(t.locale??q())===`fr`?jBe(e):MBe(e)),PBe=()=>`Titre`,FBe=()=>`Title`,IBe=((e={},t={})=>(t.locale??q())===`fr`?PBe(e):FBe(e)),LBe=()=>`Message`,RBe=()=>`Message`,zBe=((e={},t={})=>(t.locale??q())===`fr`?LBe(e):RBe(e)),BBe=()=>`naviguer`,VBe=()=>`navigate`,HBe=((e={},t={})=>(t.locale??q())===`fr`?BBe(e):VBe(e)),UBe=()=>`ouvrir`,WBe=()=>`open`,GBe=((e={},t={})=>(t.locale??q())===`fr`?UBe(e):WBe(e)),KBe=()=>`Échap`,qBe=()=>`Esc`,JBe=((e={},t={})=>(t.locale??q())===`fr`?KBe(e):qBe(e)),YBe=()=>`fermer`,XBe=()=>`close`,ZBe=((e={},t={})=>(t.locale??q())===`fr`?YBe(e):XBe(e)),QBe=()=>`Choisir un agent`,$Be=()=>`Choose an agent`,eVe=((e={},t={})=>(t.locale??q())===`fr`?QBe(e):$Be(e)),tVe=()=>`Sélectionnez l’agent (et l’instance) pour cette conversation.`,nVe=()=>`Select the agent (and instance) for this conversation.`,rVe=((e={},t={})=>(t.locale??q())===`fr`?tVe(e):nVe(e)),iVe=()=>`Chargement…`,aVe=()=>`Loading…`,oVe=((e={},t={})=>(t.locale??q())===`fr`?iVe(e):aVe(e)),sVe=()=>`Aucun agent ne vous est assigné. Contactez votre administrateur pour qu’il vous en attribue un.`,cVe=()=>`No agent is assigned to you. Contact your administrator to have one assigned.`,lVe=((e={},t={})=>(t.locale??q())===`fr`?sVe(e):cVe(e)),uVe=()=>`Rechercher un agent…`,dVe=()=>`Search for an agent…`,fVe=((e={},t={})=>(t.locale??q())===`fr`?uVe(e):dVe(e)),pVe=()=>`Rechercher un agent`,mVe=()=>`Search for an agent`,hVe=((e={},t={})=>(t.locale??q())===`fr`?pVe(e):mVe(e)),gVe=()=>`Cet agent n’existe plus sur la gateway`,_Ve=()=>`This agent no longer exists on the gateway`,vVe=((e={},t={})=>(t.locale??q())===`fr`?gVe(e):_Ve(e)),yVe=()=>`Agent par défaut`,bVe=()=>`Default agent`,xVe=((e={},t={})=>(t.locale??q())===`fr`?yVe(e):bVe(e)),SVe=()=>`Rechercher`,CVe=()=>`Search`,wVe=((e={},t={})=>(t.locale??q())===`fr`?SVe(e):CVe(e)),TVe=()=>`Réinitialiser`,EVe=()=>`Reset`,DVe=((e={},t={})=>(t.locale??q())===`fr`?TVe(e):EVe(e)),OVe=()=>`Ajouter`,kVe=()=>`Add`,AVe=((e={},t={})=>(t.locale??q())===`fr`?OVe(e):kVe(e)),jVe=()=>`Aucun élément.`,MVe=()=>`No items.`,NVe=((e={},t={})=>(t.locale??q())===`fr`?jVe(e):MVe(e)),PVe=()=>`Chargement…`,FVe=()=>`Loading…`,IVe=((e={},t={})=>(t.locale??q())===`fr`?PVe(e):FVe(e)),LVe=()=>`Tout sélectionner`,RVe=()=>`Select all`,zVe=((e={},t={})=>(t.locale??q())===`fr`?LVe(e):RVe(e)),BVe=()=>`Sélectionner la ligne`,VVe=()=>`Select row`,HVe=((e={},t={})=>(t.locale??q())===`fr`?BVe(e):VVe(e)),UVe=()=>`Actions`,WVe=()=>`Actions`,GVe=((e={},t={})=>(t.locale??q())===`fr`?UVe(e):WVe(e)),KVe=e=>`Trier par ${e?.column}`,qVe=e=>`Sort by ${e?.column}`,JVe=((e,t={})=>(t.locale??q())===`fr`?KVe(e):qVe(e)),YVe=()=>`Agent introuvable`,XVe=()=>`Agent not found`,ZVe=((e={},t={})=>(t.locale??q())===`fr`?YVe(e):XVe(e)),QVe=()=>`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).`,$Ve=()=>`The configured agent no longer exists on the gateway. Check OPENCLAW_AGENT_ID in the bridge .env (it must match a real gateway agent).`,eHe=((e={},t={})=>(t.locale??q())===`fr`?QVe(e):$Ve(e)),tHe=()=>`Authentification refusée`,nHe=()=>`Authentication refused`,rHe=((e={},t={})=>(t.locale??q())===`fr`?tHe(e):nHe(e)),iHe=()=>`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.`,aHe=()=>`The operator token does not match the paired device. Re-pair a dedicated bridge device on the gateway and report its token + device identity.`,oHe=((e={},t={})=>(t.locale??q())===`fr`?iHe(e):aHe(e)),sHe=()=>`Signature device impossible`,cHe=()=>`Device signing failed`,lHe=((e={},t={})=>(t.locale??q())===`fr`?sHe(e):cHe(e)),uHe=()=>`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.`,dHe=()=>`The device identity private key won’t decode. Check OPENCLAW_DEVICE_IDENTITY (JSON format, single \\n) — see fix-devid.mjs.`,fHe=((e={},t={})=>(t.locale??q())===`fr`?uHe(e):dHe(e)),pHe=()=>`Portée insuffisante`,mHe=()=>`Insufficient scope`,hHe=((e={},t={})=>(t.locale??q())===`fr`?pHe(e):mHe(e)),gHe=()=>`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.`,vHe=((e={},t={})=>(t.locale??q())===`fr`?gHe(e):_He(e)),yHe=()=>`Délai dépassé`,bHe=()=>`Timed out`,xHe=((e={},t={})=>(t.locale??q())===`fr`?yHe(e):bHe(e)),SHe=()=>`La passerelle n’a pas répondu à temps. Vérifiez qu’elle est démarrée et joignable (OPENCLAW_GATEWAY_URL).`,CHe=()=>`The gateway did not respond in time. Check it’s started and reachable (OPENCLAW_GATEWAY_URL).`,wHe=((e={},t={})=>(t.locale??q())===`fr`?SHe(e):CHe(e)),THe=()=>`Passerelle déconnectée`,EHe=()=>`Gateway disconnected`,DHe=((e={},t={})=>(t.locale??q())===`fr`?THe(e):EHe(e)),OHe=()=>`La connexion à la passerelle a été coupée. Vérifiez l’état du conteneur OpenClaw et l’URL/port de la passerelle.`,kHe=()=>`The connection to the gateway dropped. Check the OpenClaw container state and the gateway URL/port.`,AHe=((e={},t={})=>(t.locale??q())===`fr`?OHe(e):kHe(e)),jHe=()=>`Bridge injoignable`,MHe=()=>`Bridge unreachable`,NHe=((e={},t={})=>(t.locale??q())===`fr`?jHe(e):MHe(e)),PHe=()=>`Convex n’a pas pu joindre le bridge. Vérifiez que le conteneur bridge tourne et BRIDGE_URL (http://<ip-hôte>:8787).`,FHe=()=>`Convex could not reach the bridge. Check the bridge container is running and BRIDGE_URL (http://<host-ip>:8787).`,IHe=((e={},t={})=>(t.locale??q())===`fr`?PHe(e):FHe(e)),LHe=()=>`Pièce jointe trop volumineuse`,RHe=()=>`Attachment too large`,zHe=((e={},t={})=>(t.locale??q())===`fr`?LHe(e):RHe(e)),BHe=()=>`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.`,VHe=()=>`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.`,HHe=((e={},t={})=>(t.locale??q())===`fr`?BHe(e):VHe(e)),UHe=()=>`Pièce jointe non traitée`,WHe=()=>`Attachment could not be processed`,GHe=((e={},t={})=>(t.locale??q())===`fr`?UHe(e):WHe(e)),KHe=()=>`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.`,qHe=()=>`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.`,JHe=((e={},t={})=>(t.locale??q())===`fr`?KHe(e):qHe(e)),YHe=()=>`Requête invalide`,XHe=()=>`Invalid request`,ZHe=((e={},t={})=>(t.locale??q())===`fr`?YHe(e):XHe(e)),QHe=()=>`La passerelle a rejeté la requête. Consultez les logs du bridge pour le détail brut.`,$He=()=>`The gateway rejected the request. Check the bridge logs for the raw detail.`,eUe=((e={},t={})=>(t.locale??q())===`fr`?QHe(e):$He(e)),tUe=()=>`Bridge non configuré`,nUe=()=>`Bridge not configured`,rUe=((e={},t={})=>(t.locale??q())===`fr`?tUe(e):nUe(e)),iUe=()=>`BRIDGE_URL / BRIDGE_SHARED_SECRET ne sont pas définis côté Convex (npx convex env set).`,aUe=()=>`BRIDGE_URL / BRIDGE_SHARED_SECRET are not set on the Convex side (npx convex env set).`,oUe=((e={},t={})=>(t.locale??q())===`fr`?iUe(e):aUe(e)),sUe=()=>`Utilisateur non routé`,cUe=()=>`User not routed`,lUe=((e={},t={})=>(t.locale??q())===`fr`?sUe(e):cUe(e)),uUe=()=>`Ce compte n’est rattaché à aucune instance. Settings → Users → Override instance, ou affectez un groupe.`,dUe=()=>`This account is not attached to any instance. Settings → Users → Override instance, or assign a group.`,fUe=((e={},t={})=>(t.locale??q())===`fr`?uUe(e):dUe(e)),pUe=()=>`Erreur passerelle`,mUe=()=>`Gateway error`,hUe=((e={},t={})=>(t.locale??q())===`fr`?pUe(e):mUe(e)),gUe=()=>`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.`,vUe=((e={},t={})=>(t.locale??q())===`fr`?gUe(e):_Ue(e)),yUe=()=>`Cause inconnue`,bUe=()=>`Unknown cause`,xUe=((e={},t={})=>(t.locale??q())===`fr`?yUe(e):bUe(e)),SUe=()=>`Aucun code de cause n’a été remonté (bridge antérieur à cette version ?). Consultez les logs du bridge.`,CUe=()=>`No cause code was reported (bridge older than this version?). Check the bridge logs.`,wUe=((e={},t={})=>(t.locale??q())===`fr`?SUe(e):CUe(e)),TUe=()=>`Cause non répertoriée — voir les logs du bridge.`,EUe=()=>`Cause not catalogued — see the bridge logs.`,DUe=((e={},t={})=>(t.locale??q())===`fr`?TUe(e):EUe(e)),OUe=e=>`Notifications (${e?.count} non lues)`,kUe=e=>`Notifications (${e?.count} unread)`,AUe=((e,t={})=>(t.locale??q())===`fr`?OUe(e):kUe(e)),jUe=()=>`Notifications`,MUe=()=>`Notifications`,NUe=((e={},t={})=>(t.locale??q())===`fr`?jUe(e):MUe(e)),PUe=()=>`Notifications`,FUe=()=>`Notifications`,IUe=((e={},t={})=>(t.locale??q())===`fr`?PUe(e):FUe(e)),LUe=()=>`Tout lu`,RUe=()=>`Mark all read`,zUe=((e={},t={})=>(t.locale??q())===`fr`?LUe(e):RUe(e)),BUe=()=>`Tout effacer`,VUe=()=>`Clear all`,HUe=((e={},t={})=>(t.locale??q())===`fr`?BUe(e):VUe(e)),UUe=()=>`Aucune notification.`,WUe=()=>`No notifications.`,GUe=((e={},t={})=>(t.locale??q())===`fr`?UUe(e):WUe(e)),KUe=()=>`Marquer comme lue`,qUe=()=>`Mark as read`,AQ=((e={},t={})=>(t.locale??q())===`fr`?KUe(e):qUe(e)),JUe=()=>`Effacer la notification`,YUe=()=>`Clear notification`,jQ=((e={},t={})=>(t.locale??q())===`fr`?JUe(e):YUe(e)),XUe=()=>`Mes signalements`,ZUe=()=>`My reports`,QUe=((e={},t={})=>(t.locale??q())===`fr`?XUe(e):ZUe(e)),$Ue=()=>`Répondu`,eWe=()=>`Answered`,tWe=((e={},t={})=>(t.locale??q())===`fr`?$Ue(e):eWe(e)),nWe=()=>`En attente`,rWe=()=>`Pending`,iWe=((e={},t={})=>(t.locale??q())===`fr`?nWe(e):rWe(e)),aWe=()=>`Administrateur`,oWe=()=>`Administrator`,sWe=((e={},t={})=>(t.locale??q())===`fr`?aWe(e):oWe(e)),cWe=()=>`Vous`,lWe=()=>`You`,uWe=((e={},t={})=>(t.locale??q())===`fr`?cWe(e):lWe(e)),dWe=()=>`Voir la conversation`,fWe=()=>`View the conversation`,pWe=((e={},t={})=>(t.locale??q())===`fr`?dWe(e):fWe(e)),mWe=()=>`Message signalé`,hWe=()=>`Reported message`,gWe=((e={},t={})=>(t.locale??q())===`fr`?mWe(e):hWe(e)),_We=()=>`Clore le signalement`,vWe=()=>`Close report`,MQ=((e={},t={})=>(t.locale??q())===`fr`?_We(e):vWe(e)),yWe=()=>`Pourquoi clore ce signalement ? (facultatif)`,bWe=()=>`Why close this report? (optional)`,xWe=((e={},t={})=>(t.locale??q())===`fr`?yWe(e):bWe(e)),SWe=()=>`Clore`,CWe=()=>`Close`,wWe=((e={},t={})=>(t.locale??q())===`fr`?SWe(e):CWe(e)),TWe=()=>`Annuler`,EWe=()=>`Cancel`,DWe=((e={},t={})=>(t.locale??q())===`fr`?TWe(e):EWe(e)),OWe=()=>`Réponse à votre signalement`,kWe=()=>`Reply to your report`,AWe=((e={},t={})=>(t.locale??q())===`fr`?OWe(e):kWe(e)),jWe=()=>`Un administrateur a répondu à un signalement que vous avez envoyé.`,MWe=()=>`An administrator replied to a report you sent.`,NWe=((e={},t={})=>(t.locale??q())===`fr`?jWe(e):MWe(e)),PWe=()=>`Mots modifiés / altérés`,FWe=()=>`Modified / altered words`,IWe=((e={},t={})=>(t.locale??q())===`fr`?PWe(e):FWe(e)),LWe=()=>`Réponse incorrecte`,RWe=()=>`Incorrect answer`,zWe=((e={},t={})=>(t.locale??q())===`fr`?LWe(e):RWe(e)),BWe=()=>`Incohérence`,VWe=()=>`Incoherence`,HWe=((e={},t={})=>(t.locale??q())===`fr`?BWe(e):VWe(e)),UWe=()=>`Formatage`,WWe=()=>`Formatting`,GWe=((e={},t={})=>(t.locale??q())===`fr`?UWe(e):WWe(e)),KWe=()=>`Latence`,qWe=()=>`Latency`,JWe=((e={},t={})=>(t.locale??q())===`fr`?KWe(e):qWe(e)),YWe=()=>`Erreur API`,XWe=()=>`API error`,ZWe=((e={},t={})=>(t.locale??q())===`fr`?YWe(e):XWe(e)),QWe=()=>`Autre`,$We=()=>`Other`,eGe=((e={},t={})=>(t.locale??q())===`fr`?QWe(e):$We(e)),tGe=()=>`Utilisateurs`,nGe=()=>`Users`,rGe=((e={},t={})=>(t.locale??q())===`fr`?tGe(e):nGe(e)),iGe=()=>`Instances`,aGe=()=>`Instances`,oGe=((e={},t={})=>(t.locale??q())===`fr`?iGe(e):aGe(e)),sGe=()=>`Bridge`,cGe=()=>`Bridge`,lGe=((e={},t={})=>(t.locale??q())===`fr`?sGe(e):cGe(e)),uGe=()=>`Comptes de service`,dGe=()=>`Service accounts`,fGe=((e={},t={})=>(t.locale??q())===`fr`?uGe(e):dGe(e)),pGe=()=>`Rôles`,mGe=()=>`Roles`,hGe=((e={},t={})=>(t.locale??q())===`fr`?pGe(e):mGe(e)),gGe=()=>`Traces`,_Ge=()=>`Traces`,vGe=((e={},t={})=>(t.locale??q())===`fr`?gGe(e):_Ge(e)),yGe=()=>`KPI`,bGe=()=>`KPI`,xGe=((e={},t={})=>(t.locale??q())===`fr`?yGe(e):bGe(e)),SGe=()=>`Anomalies`,CGe=()=>`Anomalies`,wGe=((e={},t={})=>(t.locale??q())===`fr`?SGe(e):CGe(e)),TGe=()=>`Intégrations`,EGe=()=>`Integrations`,DGe=((e={},t={})=>(t.locale??q())===`fr`?TGe(e):EGe(e)),OGe=()=>`Audit`,kGe=()=>`Audit`,AGe=((e={},t={})=>(t.locale??q())===`fr`?OGe(e):kGe(e)),jGe=()=>`Feedbacks`,MGe=()=>`Feedbacks`,NGe=((e={},t={})=>(t.locale??q())===`fr`?jGe(e):MGe(e)),PGe=()=>`Groupes`,FGe=()=>`Groups`,IGe=((e={},t={})=>(t.locale??q())===`fr`?PGe(e):FGe(e)),LGe=()=>`Accès`,RGe=()=>`Access`,zGe=((e={},t={})=>(t.locale??q())===`fr`?LGe(e):RGe(e)),BGe=()=>`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.`,VGe=()=>`Inspect a user’s access: their groups, the agents and charts available to them (with provenance), and their effective permissions. Read-only.`,HGe=((e={},t={})=>(t.locale??q())===`fr`?BGe(e):VGe(e)),UGe=()=>`Choisir un utilisateur`,WGe=()=>`Pick a user`,NQ=((e={},t={})=>(t.locale??q())===`fr`?UGe(e):WGe(e)),GGe=()=>`Sélectionnez un utilisateur pour voir ses accès.`,KGe=()=>`Select a user to see their access.`,qGe=((e={},t={})=>(t.locale??q())===`fr`?GGe(e):KGe(e)),JGe=()=>`Identité`,YGe=()=>`Identity`,XGe=((e={},t={})=>(t.locale??q())===`fr`?JGe(e):YGe(e)),ZGe=()=>`Groupes`,QGe=()=>`Groups`,$Ge=((e={},t={})=>(t.locale??q())===`fr`?ZGe(e):QGe(e)),eKe=()=>`Agents disponibles`,tKe=()=>`Available agents`,nKe=((e={},t={})=>(t.locale??q())===`fr`?eKe(e):tKe(e)),rKe=()=>`Chartes disponibles`,iKe=()=>`Available charts`,aKe=((e={},t={})=>(t.locale??q())===`fr`?rKe(e):iKe(e)),oKe=()=>`Permissions effectives`,sKe=()=>`Effective permissions`,cKe=((e={},t={})=>(t.locale??q())===`fr`?oKe(e):sKe(e)),lKe=()=>`Aucun`,uKe=()=>`None`,PQ=((e={},t={})=>(t.locale??q())===`fr`?lKe(e):uKe(e)),dKe=()=>`Défaut`,fKe=()=>`Default`,pKe=((e={},t={})=>(t.locale??q())===`fr`?dKe(e):fKe(e)),mKe=()=>`Direct`,hKe=()=>`Direct`,gKe=((e={},t={})=>(t.locale??q())===`fr`?mKe(e):hKe(e)),_Ke=e=>`Groupe : ${e?.group}`,vKe=e=>`Group: ${e?.group}`,FQ=((e,t={})=>(t.locale??q())===`fr`?_Ke(e):vKe(e)),yKe=()=>`Commune`,bKe=()=>`Common`,xKe=((e={},t={})=>(t.locale??q())===`fr`?yKe(e):bKe(e)),SKe=()=>`Perso`,CKe=()=>`Personal`,wKe=((e={},t={})=>(t.locale??q())===`fr`?SKe(e):CKe(e)),TKe=()=>`Groupes`,EKe=()=>`Groups`,DKe=((e={},t={})=>(t.locale??q())===`fr`?TKe(e):EKe(e)),OKe=()=>`Regroupez des utilisateurs et partagez des agents par groupe. Chaque membre hérite des agents du groupe en plus de ses agents directs.`,kKe=()=>`Group users and share agents by group. Each member inherits the group's agents on top of their direct agents.`,AKe=((e={},t={})=>(t.locale??q())===`fr`?OKe(e):kKe(e)),jKe=()=>`Nouveau groupe`,MKe=()=>`New group`,NKe=((e={},t={})=>(t.locale??q())===`fr`?jKe(e):MKe(e)),PKe=()=>`Aucun groupe pour le moment.`,FKe=()=>`No groups yet.`,IKe=((e={},t={})=>(t.locale??q())===`fr`?PKe(e):FKe(e)),LKe=()=>`Nom`,RKe=()=>`Name`,zKe=((e={},t={})=>(t.locale??q())===`fr`?LKe(e):RKe(e)),BKe=()=>`Membres`,VKe=()=>`Members`,HKe=((e={},t={})=>(t.locale??q())===`fr`?BKe(e):VKe(e)),UKe=()=>`Agents`,WKe=()=>`Agents`,GKe=((e={},t={})=>(t.locale??q())===`fr`?UKe(e):WKe(e)),KKe=()=>`Chartes`,qKe=()=>`Charts`,JKe=((e={},t={})=>(t.locale??q())===`fr`?KKe(e):qKe(e)),YKe=()=>`Filtrer les groupes (nom, membre, agent, charte)…`,XKe=()=>`Filter groups (name, member, agent, chart)…`,ZKe=((e={},t={})=>(t.locale??q())===`fr`?YKe(e):XKe(e)),QKe=()=>`Gérer`,$Ke=()=>`Manage`,eqe=((e={},t={})=>(t.locale??q())===`fr`?QKe(e):$Ke(e)),tqe=()=>`Renommer`,nqe=()=>`Rename`,rqe=((e={},t={})=>(t.locale??q())===`fr`?tqe(e):nqe(e)),iqe=()=>`Supprimer`,aqe=()=>`Delete`,oqe=((e={},t={})=>(t.locale??q())===`fr`?iqe(e):aqe(e)),sqe=()=>`Enregistrer`,cqe=()=>`Save`,lqe=((e={},t={})=>(t.locale??q())===`fr`?sqe(e):cqe(e)),uqe=()=>`Annuler`,dqe=()=>`Cancel`,fqe=((e={},t={})=>(t.locale??q())===`fr`?uqe(e):dqe(e)),pqe=()=>`Nouveau groupe`,mqe=()=>`New group`,hqe=((e={},t={})=>(t.locale??q())===`fr`?pqe(e):mqe(e)),gqe=()=>`Renommer le groupe`,_qe=()=>`Rename group`,vqe=((e={},t={})=>(t.locale??q())===`fr`?gqe(e):_qe(e)),yqe=()=>`Le nom est libre ; un identifiant stable est généré automatiquement.`,bqe=()=>`The name is free-form; a stable identifier is generated automatically.`,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=()=>`Description`,Eqe=()=>`Description`,Dqe=((e={},t={})=>(t.locale??q())===`fr`?Tqe(e):Eqe(e)),Oqe=e=>`Supprimer le groupe « ${e?.name} » ?`,kqe=e=>`Delete group "${e?.name}"?`,Aqe=((e,t={})=>(t.locale??q())===`fr`?Oqe(e):kqe(e)),jqe=()=>`Cette action supprime le groupe, ses adhésions et les agents partagés. Elle est irréversible.`,Mqe=()=>`This deletes the group, its memberships and shared agents. It cannot be undone.`,Nqe=((e={},t={})=>(t.locale??q())===`fr`?jqe(e):Mqe(e)),Pqe=()=>`Supprimer le groupe`,Fqe=()=>`Delete group`,Iqe=((e={},t={})=>(t.locale??q())===`fr`?Pqe(e):Fqe(e)),Lqe=e=>`Gérer « ${e?.name} »`,Rqe=e=>`Manage "${e?.name}"`,zqe=((e,t={})=>(t.locale??q())===`fr`?Lqe(e):Rqe(e)),Bqe=()=>`Ajoutez ou retirez des membres et partagez des agents découverts avec ce groupe.`,Vqe=()=>`Add or remove members and share discovered agents with this group.`,Hqe=((e={},t={})=>(t.locale??q())===`fr`?Bqe(e):Vqe(e)),Uqe=()=>`Membres`,Wqe=()=>`Members`,Gqe=((e={},t={})=>(t.locale??q())===`fr`?Uqe(e):Wqe(e)),Kqe=()=>`Rechercher un utilisateur…`,qqe=()=>`Search a user…`,Jqe=((e={},t={})=>(t.locale??q())===`fr`?Kqe(e):qqe(e)),Yqe=()=>`Agents partagés`,Xqe=()=>`Shared agents`,Zqe=((e={},t={})=>(t.locale??q())===`fr`?Yqe(e):Xqe(e)),Qqe=()=>`Rechercher un agent…`,$qe=()=>`Search an agent…`,eJe=((e={},t={})=>(t.locale??q())===`fr`?Qqe(e):$qe(e)),tJe=()=>`Aucun résultat.`,nJe=()=>`No results.`,rJe=((e={},t={})=>(t.locale??q())===`fr`?tJe(e):nJe(e)),iJe=()=>`Tout sélectionner`,aJe=()=>`Select all`,IQ=((e={},t={})=>(t.locale??q())===`fr`?iJe(e):aJe(e)),oJe=()=>`Précédent`,sJe=()=>`Previous`,cJe=((e={},t={})=>(t.locale??q())===`fr`?oJe(e):sJe(e)),lJe=()=>`Suivant`,uJe=()=>`Next`,dJe=((e={},t={})=>(t.locale??q())===`fr`?lJe(e):uJe(e)),fJe=e=>`Page ${e?.page} sur ${e?.pages}`,pJe=e=>`Page ${e?.page} of ${e?.pages}`,mJe=((e,t={})=>(t.locale??q())===`fr`?fJe(e):pJe(e)),hJe=()=>`Administrateur`,gJe=()=>`Admin`,_Je=((e={},t={})=>(t.locale??q())===`fr`?hJe(e):gJe(e)),vJe=()=>`Utilisateur`,yJe=()=>`User`,bJe=((e={},t={})=>(t.locale??q())===`fr`?vJe(e):yJe(e)),xJe=()=>`En attente`,SJe=()=>`Pending`,CJe=((e={},t={})=>(t.locale??q())===`fr`?xJe(e):SJe(e)),wJe=e=>`Basculer l'adhésion de ${e?.user}`,TJe=e=>`Toggle membership of ${e?.user}`,EJe=((e,t={})=>(t.locale??q())===`fr`?wJe(e):TJe(e)),DJe=e=>`Partager l'agent ${e?.name}`,OJe=e=>`Share agent ${e?.name}`,kJe=((e,t={})=>(t.locale??q())===`fr`?DJe(e):OJe(e)),AJe=()=>`Chargement…`,jJe=()=>`Loading…`,LQ=((e={},t={})=>(t.locale??q())===`fr`?AJe(e):jJe(e)),MJe=()=>`Chargement des agents…`,NJe=()=>`Loading agents…`,PJe=((e={},t={})=>(t.locale??q())===`fr`?MJe(e):NJe(e)),FJe=()=>`Aucun utilisateur.`,IJe=()=>`No users.`,LJe=((e={},t={})=>(t.locale??q())===`fr`?FJe(e):IJe(e)),RJe=()=>`Aucune instance configurée.`,zJe=()=>`No instances configured.`,BJe=((e={},t={})=>(t.locale??q())===`fr`?RJe(e):zJe(e)),VJe=()=>`Aucun agent découvert.`,HJe=()=>`No discovered agents.`,UJe=((e={},t={})=>(t.locale??q())===`fr`?VJe(e):HJe(e)),WJe=()=>`Instance hors ligne ; agents indisponibles.`,GJe=()=>`Instance offline; agents unavailable.`,KJe=((e={},t={})=>(t.locale??q())===`fr`?WJe(e):GJe(e)),qJe=()=>`hors ligne`,JJe=()=>`offline`,YJe=((e={},t={})=>(t.locale??q())===`fr`?qJe(e):JJe(e)),XJe=()=>`retiré`,ZJe=()=>`removed`,QJe=((e={},t={})=>(t.locale??q())===`fr`?XJe(e):ZJe(e)),$Je=()=>`Agent par défaut de l'instance`,eYe=()=>`Instance default agent`,RQ=((e={},t={})=>(t.locale??q())===`fr`?$Je(e):eYe(e)),tYe=()=>`Chartes`,nYe=()=>`Charts`,rYe=((e={},t={})=>(t.locale??q())===`fr`?tYe(e):nYe(e)),iYe=()=>`Aucune charte disponible pour ce groupe pour l'instant. Demandez à un administrateur d'ajouter des chartes au pool de ce groupe.`,aYe=()=>`No charts available for this group yet. Ask an admin to add charts to this group's pool.`,oYe=((e={},t={})=>(t.locale??q())===`fr`?iYe(e):aYe(e)),sYe=()=>`Ajoutez des chartes au pool de ce groupe ci-dessous, puis sélectionnez celles que le groupe propose.`,cYe=()=>`Add charts to this group's pool below, then select which ones the group offers.`,lYe=((e={},t={})=>(t.locale??q())===`fr`?sYe(e):cYe(e)),uYe=()=>`Ajouter une charte au pool…`,dYe=()=>`Add a chart to the pool…`,fYe=((e={},t={})=>(t.locale??q())===`fr`?uYe(e):dYe(e)),pYe=e=>`Retirer ${e?.name} du pool`,mYe=e=>`Remove ${e?.name} from the pool`,zQ=((e,t={})=>(t.locale??q())===`fr`?pYe(e):mYe(e)),hYe=e=>`Proposer la charte ${e?.name} à ce groupe`,gYe=e=>`Offer chart ${e?.name} to this group`,_Ye=((e,t={})=>(t.locale??q())===`fr`?hYe(e):gYe(e)),vYe=()=>`Charte par défaut du groupe`,yYe=()=>`Group default chart`,BQ=((e={},t={})=>(t.locale??q())===`fr`?vYe(e):yYe(e)),bYe=()=>`Définir par défaut`,xYe=()=>`Set as default`,SYe=((e={},t={})=>(t.locale??q())===`fr`?bYe(e):xYe(e)),CYe=()=>`Gestionnaire`,wYe=()=>`Manager`,VQ=((e={},t={})=>(t.locale??q())===`fr`?CYe(e):wYe(e)),TYe=()=>`Promouvoir gestionnaire`,EYe=()=>`Promote to manager`,HQ=((e={},t={})=>(t.locale??q())===`fr`?TYe(e):EYe(e)),DYe=()=>`Retirer gestionnaire`,OYe=()=>`Remove manager`,UQ=((e={},t={})=>(t.locale??q())===`fr`?DYe(e):OYe(e)),kYe=()=>`Changement de gestionnaire refusé`,AYe=()=>`Manager change rejected`,jYe=((e={},t={})=>(t.locale??q())===`fr`?kYe(e):AYe(e)),MYe=()=>`Mise à jour de la charte refusée`,NYe=()=>`Chart update rejected`,WQ=((e={},t={})=>(t.locale??q())===`fr`?MYe(e):NYe(e)),PYe=()=>`Enregistrement du groupe refusé`,FYe=()=>`Group save rejected`,IYe=((e={},t={})=>(t.locale??q())===`fr`?PYe(e):FYe(e)),LYe=()=>`Suppression du groupe refusée`,RYe=()=>`Group deletion rejected`,zYe=((e={},t={})=>(t.locale??q())===`fr`?LYe(e):RYe(e)),BYe=()=>`Mise à jour de l'adhésion refusée`,VYe=()=>`Membership update rejected`,GQ=((e={},t={})=>(t.locale??q())===`fr`?BYe(e):VYe(e)),HYe=()=>`Partage de l'agent refusé`,UYe=()=>`Agent sharing rejected`,KQ=((e={},t={})=>(t.locale??q())===`fr`?HYe(e):UYe(e)),WYe=()=>`Réordonner cet onglet`,GYe=()=>`Reorder this tab`,KYe=((e={},t={})=>(t.locale??q())===`fr`?WYe(e):GYe(e)),qYe=()=>`Réglages`,JYe=()=>`Settings`,YYe=((e={},t={})=>(t.locale??q())===`fr`?qYe(e):JYe(e)),XYe=()=>`← Retour au chat`,ZYe=()=>`← Back to chat`,QYe=((e={},t={})=>(t.locale??q())===`fr`?XYe(e):ZYe(e)),$Ye=()=>`Réglages`,eXe=()=>`Settings`,tXe=((e={},t={})=>(t.locale??q())===`fr`?$Ye(e):eXe(e)),nXe=()=>`Personnel`,rXe=()=>`Personal`,iXe=((e={},t={})=>(t.locale??q())===`fr`?nXe(e):rXe(e)),aXe=()=>`Agents`,oXe=()=>`Agents`,sXe=((e={},t={})=>(t.locale??q())===`fr`?aXe(e):oXe(e)),cXe=()=>`Accès & utilisateurs`,lXe=()=>`Access & users`,uXe=((e={},t={})=>(t.locale??q())===`fr`?cXe(e):lXe(e)),dXe=()=>`Observabilité`,fXe=()=>`Observability`,pXe=((e={},t={})=>(t.locale??q())===`fr`?dXe(e):fXe(e)),mXe=()=>`Fermer`,hXe=()=>`Close`,qQ=((e={},t={})=>(t.locale??q())===`fr`?mXe(e):hXe(e)),gXe=()=>`héritée`,_Xe=()=>`inherited`,vXe=((e={},t={})=>(t.locale??q())===`fr`?gXe(e):_Xe(e)),yXe=()=>`Revenir à la valeur héritée`,bXe=()=>`Back to the inherited value`,JQ=((e={},t={})=>(t.locale??q())===`fr`?yXe(e):bXe(e)),xXe=()=>`Application…`,SXe=()=>`Applying…`,YQ=((e={},t={})=>(t.locale??q())===`fr`?xXe(e):SXe(e)),CXe=()=>`Échec de l’application.`,wXe=()=>`Failed to apply.`,TXe=((e={},t={})=>(t.locale??q())===`fr`?CXe(e):wXe(e)),EXe=()=>`Réessayer`,DXe=()=>`Retry`,XQ=((e={},t={})=>(t.locale??q())===`fr`?EXe(e):DXe(e)),OXe=()=>`Réflexion`,kXe=()=>`Reasoning`,AXe=((e={},t={})=>(t.locale??q())===`fr`?OXe(e):kXe(e)),jXe=()=>`Vitesse`,MXe=()=>`Speed`,NXe=((e={},t={})=>(t.locale??q())===`fr`?jXe(e):MXe(e)),PXe=()=>`Hérité`,FXe=()=>`Inherited`,IXe=((e={},t={})=>(t.locale??q())===`fr`?PXe(e):FXe(e)),LXe=()=>`Rapide`,RXe=()=>`Fast`,ZQ=((e={},t={})=>(t.locale??q())===`fr`?LXe(e):RXe(e)),zXe=()=>`Standard`,BXe=()=>`Standard`,QQ=((e={},t={})=>(t.locale??q())===`fr`?zXe(e):BXe(e)),VXe=()=>`Tous les réglages de session`,HXe=()=>`All session settings`,UXe=((e={},t={})=>(t.locale??q())===`fr`?VXe(e):HXe(e)),WXe=()=>`Réglages de session`,GXe=()=>`Session settings`,KXe=((e={},t={})=>(t.locale??q())===`fr`?WXe(e):GXe(e)),qXe=()=>`Réglages appliqués à cette conversation.`,JXe=()=>`Settings applied to this conversation.`,YXe=((e={},t={})=>(t.locale??q())===`fr`?qXe(e):JXe(e)),XXe=()=>`Génération`,ZXe=()=>`Generation`,QXe=((e={},t={})=>(t.locale??q())===`fr`?XXe(e):ZXe(e)),$Xe=()=>`Session`,eZe=()=>`Session`,tZe=((e={},t={})=>(t.locale??q())===`fr`?$Xe(e):eZe(e)),nZe=()=>`Agent`,rZe=()=>`Agent`,iZe=((e={},t={})=>(t.locale??q())===`fr`?nZe(e):rZe(e)),aZe=()=>`Actions`,oZe=()=>`Actions`,sZe=((e={},t={})=>(t.locale??q())===`fr`?aZe(e):oZe(e)),cZe=()=>`Contexte`,lZe=()=>`Context`,uZe=((e={},t={})=>(t.locale??q())===`fr`?cZe(e):lZe(e)),dZe=e=>`${e?.pct} % · ${e?.used} / ${e?.total} jetons`,fZe=e=>`${e?.pct}% · ${e?.used} / ${e?.total} tokens`,pZe=((e,t={})=>(t.locale??q())===`fr`?dZe(e):fZe(e)),mZe=()=>`Verbosité`,hZe=()=>`Verbosity`,gZe=((e={},t={})=>(t.locale??q())===`fr`?mZe(e):hZe(e)),_Ze=e=>`${e?.level} · fixée`,vZe=e=>`${e?.level} · pinned`,yZe=((e,t={})=>(t.locale??q())===`fr`?_Ze(e):vZe(e)),bZe=()=>`Fixée par la passerelle pour un streaming complet.`,xZe=()=>`Pinned by the bridge for complete streaming.`,SZe=((e={},t={})=>(t.locale??q())===`fr`?bZe(e):xZe(e)),CZe=()=>`Coût / jetons`,wZe=()=>`Cost / tokens`,TZe=((e={},t={})=>(t.locale??q())===`fr`?CZe(e):wZe(e)),EZe=e=>`~${e?.cost} $ · ${e?.tokens} jetons`,DZe=e=>`~$${e?.cost} · ${e?.tokens} tokens`,OZe=((e,t={})=>(t.locale??q())===`fr`?EZe(e):DZe(e)),kZe=e=>`~${e?.cost} $`,AZe=e=>`~$${e?.cost}`,jZe=((e,t={})=>(t.locale??q())===`fr`?kZe(e):AZe(e)),MZe=e=>`${e?.tokens} jetons`,NZe=e=>`${e?.tokens} tokens`,PZe=((e,t={})=>(t.locale??q())===`fr`?MZe(e):NZe(e)),FZe=()=>`Compacter le contexte`,IZe=()=>`Compact the context`,LZe=((e={},t={})=>(t.locale??q())===`fr`?FZe(e):IZe(e)),RZe=()=>`Compacter le contexte ?`,zZe=()=>`Compact the context?`,BZe=((e={},t={})=>(t.locale??q())===`fr`?RZe(e):zZe(e)),VZe=()=>`L’agent résume la conversation pour libérer de l’espace dans la fenêtre de contexte. Les messages restent visibles ici.`,HZe=()=>`The agent summarizes the conversation to free space in the context window. Messages stay visible here.`,UZe=((e={},t={})=>(t.locale??q())===`fr`?VZe(e):HZe(e)),WZe=()=>`Compacter`,GZe=()=>`Compact`,KZe=((e={},t={})=>(t.locale??q())===`fr`?WZe(e):GZe(e)),qZe=()=>`Réinitialiser la session`,JZe=()=>`Reset the session`,YZe=((e={},t={})=>(t.locale??q())===`fr`?qZe(e):JZe(e)),XZe=()=>`Réinitialiser la session ?`,ZZe=()=>`Reset the session?`,QZe=((e={},t={})=>(t.locale??q())===`fr`?XZe(e):ZZe(e)),$Ze=()=>`La session de l’agent repart à zéro et se réhydrate depuis la conversation au prochain message. Aucun message n’est supprimé.`,eQe=()=>`The agent session starts fresh and re-hydrates from the conversation on the next message. No message is deleted.`,tQe=((e={},t={})=>(t.locale??q())===`fr`?$Ze(e):eQe(e)),nQe=()=>`Réinitialiser`,rQe=()=>`Reset`,iQe=((e={},t={})=>(t.locale??q())===`fr`?nQe(e):rQe(e)),aQe=()=>`Demande envoyée à l’agent.`,oQe=()=>`Request sent to the agent.`,sQe=((e={},t={})=>(t.locale??q())===`fr`?aQe(e):oQe(e)),cQe=()=>`Échec de l’action.`,lQe=()=>`Action failed.`,uQe=((e={},t={})=>(t.locale??q())===`fr`?cQe(e):lQe(e)),dQe=()=>`Fichiers d’agent`,fQe=()=>`Agent files`,pQe=((e={},t={})=>(t.locale??q())===`fr`?dQe(e):fQe(e)),mQe=()=>`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.`,hQe=()=>`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.`,gQe=((e={},t={})=>(t.locale??q())===`fr`?mQe(e):hQe(e)),_Qe=()=>`Instance`,vQe=()=>`Instance`,$Q=((e={},t={})=>(t.locale??q())===`fr`?_Qe(e):vQe(e)),yQe=()=>`Agent`,bQe=()=>`Agent`,xQe=((e={},t={})=>(t.locale??q())===`fr`?yQe(e):bQe(e)),SQe=()=>`Aucun agent disponible.`,CQe=()=>`No agent available.`,wQe=((e={},t={})=>(t.locale??q())===`fr`?SQe(e):CQe(e)),TQe=()=>`Aucun fichier.`,EQe=()=>`No files.`,DQe=((e={},t={})=>(t.locale??q())===`fr`?TQe(e):EQe(e)),OQe=()=>`Bridge injoignable — impossible de lister les fichiers.`,kQe=()=>`Bridge unreachable — cannot list the files.`,AQe=((e={},t={})=>(t.locale??q())===`fr`?OQe(e):kQe(e)),jQe=()=>`absent`,MQe=()=>`missing`,NQe=((e={},t={})=>(t.locale??q())===`fr`?jQe(e):MQe(e)),PQe=e=>`${e?.size} ko`,FQe=e=>`${e?.size} kB`,IQe=((e,t={})=>(t.locale??q())===`fr`?PQe(e):FQe(e)),LQe=e=>`${e?.pct} %`,RQe=e=>`${e?.pct}%`,zQe=((e,t={})=>(t.locale??q())===`fr`?LQe(e):RQe(e)),BQe=()=>`Proche de la limite bootstrap`,VQe=()=>`Near the bootstrap limit`,HQe=((e={},t={})=>(t.locale??q())===`fr`?BQe(e):VQe(e)),UQe=e=>`Budget total : ${e?.used} ko / ${e?.total} ko (${e?.pct} %)`,WQe=e=>`Total budget: ${e?.used} kB / ${e?.total} kB (${e?.pct}%)`,GQe=((e,t={})=>(t.locale??q())===`fr`?UQe(e):WQe(e)),KQe=()=>`Éditer`,qQe=()=>`Edit`,JQe=((e={},t={})=>(t.locale??q())===`fr`?KQe(e):qQe(e)),YQe=()=>`Consulter`,XQe=()=>`View`,ZQe=((e={},t={})=>(t.locale??q())===`fr`?YQe(e):XQe(e)),QQe=e=>`${e?.name}`,$Qe=e=>`${e?.name}`,e$=((e,t={})=>(t.locale??q())===`fr`?QQe(e):$Qe(e)),e$e=e=>`Agent ${e?.agent} · instance ${e?.instance}`,t$e=e=>`Agent ${e?.agent} · instance ${e?.instance}`,n$e=((e,t={})=>(t.locale??q())===`fr`?e$e(e):t$e(e)),r$e=()=>`lecture seule`,i$e=()=>`read-only`,a$e=((e={},t={})=>(t.locale??q())===`fr`?r$e(e):i$e(e)),o$e=()=>`Source markdown brute — l’aperçu rendu n’est pas disponible ici.`,s$e=()=>`Raw markdown source — a rendered preview is not available here.`,c$e=((e={},t={})=>(t.locale??q())===`fr`?o$e(e):s$e(e)),l$e=e=>`${e?.count} / ${e?.max} caractères`,u$e=e=>`${e?.count} / ${e?.max} characters`,d$e=((e,t={})=>(t.locale??q())===`fr`?l$e(e):u$e(e)),f$e=()=>`Enregistrer`,p$e=()=>`Save`,m$e=((e={},t={})=>(t.locale??q())===`fr`?f$e(e):p$e(e)),h$e=e=>`${e?.name} enregistré.`,g$e=e=>`${e?.name} saved.`,_$e=((e,t={})=>(t.locale??q())===`fr`?h$e(e):g$e(e)),v$e=()=>`Échec de l’enregistrement.`,y$e=()=>`Save failed.`,b$e=((e={},t={})=>(t.locale??q())===`fr`?v$e(e):y$e(e)),x$e=()=>`Impossible de charger le fichier.`,S$e=()=>`Could not load the file.`,C$e=((e={},t={})=>(t.locale??q())===`fr`?x$e(e):S$e(e)),w$e=()=>`Le fichier a changé depuis le chargement. Rechargez avant d’enregistrer (vos modifications sont conservées).`,T$e=()=>`The file changed since it was loaded. Reload before saving (your edits are kept).`,E$e=((e={},t={})=>(t.locale??q())===`fr`?w$e(e):T$e(e)),D$e=()=>`Recharger`,O$e=()=>`Reload`,k$e=((e={},t={})=>(t.locale??q())===`fr`?D$e(e):O$e(e)),A$e=e=>`Écrire ${e?.name} ?`,j$e=e=>`Write ${e?.name}?`,M$e=((e,t={})=>(t.locale??q())===`fr`?A$e(e):j$e(e)),N$e=e=>`Le fichier sera écrit sur l’agent ${e?.agent}. Une révision complète avant/après est conservée.`,P$e=e=>`The file will be written to agent ${e?.agent}. A full before/after revision is kept.`,F$e=((e,t={})=>(t.locale??q())===`fr`?N$e(e):P$e(e)),I$e=e=>`${e?.added} ligne(s) ajoutée(s) · ${e?.removed} ligne(s) retirée(s)`,L$e=e=>`${e?.added} line(s) added · ${e?.removed} line(s) removed`,R$e=((e,t={})=>(t.locale??q())===`fr`?I$e(e):L$e(e)),z$e=()=>`Ajoutées (extrait) :`,B$e=()=>`Added (sample):`,V$e=((e={},t={})=>(t.locale??q())===`fr`?z$e(e):B$e(e)),H$e=()=>`Retirées (extrait) :`,U$e=()=>`Removed (sample):`,W$e=((e={},t={})=>(t.locale??q())===`fr`?H$e(e):U$e(e)),G$e=()=>`Écrire le fichier`,K$e=()=>`Write the file`,q$e=((e={},t={})=>(t.locale??q())===`fr`?G$e(e):K$e(e)),J$e=()=>`Défauts de chat`,Y$e=()=>`Chat defaults`,X$e=((e={},t={})=>(t.locale??q())===`fr`?J$e(e):Y$e(e)),Z$e=()=>`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.`,Q$e=()=>`Default settings for new chat sessions, read from the gateway’s global configuration. Per-chat and per-agent settings keep precedence.`,$$e=((e={},t={})=>(t.locale??q())===`fr`?Z$e(e):Q$e(e)),e1e=()=>`Réflexion par défaut`,t1e=()=>`Default thinking`,n1e=((e={},t={})=>(t.locale??q())===`fr`?e1e(e):t1e(e)),r1e=()=>`Niveau de raisonnement appliqué quand un chat ne définit pas le sien.`,i1e=()=>`Reasoning level applied when a chat does not set its own.`,a1e=((e={},t={})=>(t.locale??q())===`fr`?r1e(e):i1e(e)),o1e=()=>`Vitesse par défaut`,s1e=()=>`Default speed`,c1e=((e={},t={})=>(t.locale??q())===`fr`?o1e(e):s1e(e)),l1e=()=>`Mode rapide ou standard appliqué quand un chat ne définit pas le sien.`,u1e=()=>`Fast or standard mode applied when a chat does not set its own.`,d1e=((e={},t={})=>(t.locale??q())===`fr`?l1e(e):u1e(e)),f1e=()=>`Bridge injoignable — impossible de lire les défauts globaux.`,p1e=()=>`Bridge unreachable — cannot read the global defaults.`,m1e=((e={},t={})=>(t.locale??q())===`fr`?f1e(e):p1e(e)),h1e=()=>`Enregistrer`,g1e=()=>`Save`,_1e=((e={},t={})=>(t.locale??q())===`fr`?h1e(e):g1e(e)),v1e=()=>`Défauts globaux enregistrés.`,y1e=()=>`Global defaults saved.`,b1e=((e={},t={})=>(t.locale??q())===`fr`?v1e(e):y1e(e)),x1e=()=>`Échec de l’écriture des défauts globaux.`,S1e=()=>`Failed to write the global defaults.`,C1e=((e={},t={})=>(t.locale??q())===`fr`?x1e(e):S1e(e)),w1e=()=>`Ces valeurs sont écrites dans openclaw.json, la configuration globale de l’instance — elles s’appliquent à tous les utilisateurs.`,T1e=()=>`These values are written to openclaw.json, the instance’s global configuration — they apply to every user.`,E1e=((e={},t={})=>(t.locale??q())===`fr`?w1e(e):T1e(e)),D1e=()=>`Modifier les défauts globaux ?`,O1e=()=>`Change the global defaults?`,k1e=((e={},t={})=>(t.locale??q())===`fr`?D1e(e):O1e(e)),A1e=()=>`Cette écriture modifie openclaw.json pour toute l’instance : tous les chats qui héritent du défaut changeront de comportement.`,j1e=()=>`This write changes openclaw.json for the whole instance: every chat inheriting the default will change behavior.`,M1e=((e={},t={})=>(t.locale??q())===`fr`?A1e(e):j1e(e)),N1e=()=>`Modifier`,P1e=()=>`Change`,F1e=((e={},t={})=>(t.locale??q())===`fr`?N1e(e):P1e(e)),I1e=()=>`Compatibilité`,L1e=()=>`Compatibility`,R1e=((e={},t={})=>(t.locale??q())===`fr`?I1e(e):L1e(e)),z1e=()=>`Aucun relevé de compatibilité pour l’instant — le sondage tourne toutes les 5 minutes.`,B1e=()=>`No compatibility reading yet — the poll runs every 5 minutes.`,V1e=((e={},t={})=>(t.locale??q())===`fr`?z1e(e):B1e(e)),H1e=()=>`Protocole :`,U1e=()=>`Protocol:`,W1e=((e={},t={})=>(t.locale??q())===`fr`?H1e(e):U1e(e)),G1e=()=>`inconnue`,K1e=()=>`unknown`,t$=((e={},t={})=>(t.locale??q())===`fr`?G1e(e):K1e(e)),q1e=()=>`Dernier sondage en échec — affichage du dernier relevé valide.`,J1e=()=>`Last poll failed — showing the last good reading.`,Y1e=((e={},t={})=>(t.locale??q())===`fr`?q1e(e):J1e(e)),X1e=()=>`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.`,Z1e=()=>`This bridge does not publish a compatibility manifest (older version) — legacy policy: only model and reasoning are offered.`,Q1e=((e={},t={})=>(t.locale??q())===`fr`?X1e(e):Z1e(e)),$1e=()=>`OpenClaw supporté :`,e0e=()=>`OpenClaw supported:`,t0e=((e={},t={})=>(t.locale??q())===`fr`?$1e(e):e0e(e)),n0e=e=>`de ${e?.min} à ${e?.max} (validé)`,r0e=e=>`from ${e?.min} to ${e?.max} (validated)`,i0e=((e,t={})=>(t.locale??q())===`fr`?n0e(e):r0e(e)),a0e=()=>`1 version validée`,o0e=()=>`1 validated version`,s0e=((e={},t={})=>(t.locale??q())===`fr`?a0e(e):o0e(e)),c0e=e=>`${e?.count} versions validées`,l0e=e=>`${e?.count} validated versions`,u0e=((e,t={})=>(t.locale??q())===`fr`?c0e(e):l0e(e)),d0e=()=>`Validées au banc`,f0e=()=>`Bench-validated`,p0e=((e={},t={})=>(t.locale??q())===`fr`?d0e(e):f0e(e)),m0e=()=>`Aucune connexion connue du relevé de compatibilité.`,h0e=()=>`No connection known to the compatibility reading.`,g0e=((e={},t={})=>(t.locale??q())===`fr`?m0e(e):h0e(e)),_0e=()=>`✓ dans le support`,v0e=()=>`✓ within support`,y0e=((e={},t={})=>(t.locale??q())===`fr`?_0e(e):v0e(e)),b0e=()=>`⚠ au-delà du validé`,x0e=()=>`⚠ beyond validated`,S0e=((e={},t={})=>(t.locale??q())===`fr`?b0e(e):x0e(e)),C0e=()=>`? inconnue`,w0e=()=>`? unknown`,T0e=((e={},t={})=>(t.locale??q())===`fr`?C0e(e):w0e(e)),E0e=()=>`Hermes : adaptateur à venir.`,D0e=()=>`Hermes: adapter coming.`,O0e=((e={},t={})=>(t.locale??q())===`fr`?E0e(e):D0e(e)),k0e=e=>`Non supporté par cette instance (version gateway ${e?.version}).`,A0e=e=>`Not supported by this instance (gateway version ${e?.version}).`,j0e=((e,t={})=>(t.locale??q())===`fr`?k0e(e):A0e(e)),M0e=()=>`Non supporté par cette instance (version gateway inconnue).`,N0e=()=>`Not supported by this instance (unknown gateway version).`,P0e=((e={},t={})=>(t.locale??q())===`fr`?M0e(e):N0e(e)),n$=(0,N.createContext)({label:`Atrium`,logoUrl:null,isDefault:!0,initials:`A`,agentName:null,agentEmoji:null});function r$(){return(0,N.useContext)(n$)}function F0e(e){return e.agentName??e.label}function I0e(e){return e.agentName?KK({name:e.agentName}):UK({name:e.label})}var L0e={user:Kze(),assistant:`OpenClaw`,system:Yze()},R0e=Qze();function i$(e){return new Date(e).toISOString().slice(0,16).replace(`T`,` `)+` UTC`}function a$(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 z0e(e,t={}){let n=[];n.push(`# ${t.title?.trim()||kQ()}`),t.exportedAt!=null&&(n.push(``),n.push(`_${rBe({date:i$(t.exportedAt)})}_`)),t.truncated&&(n.push(``),n.push(R0e));for(let t of e){n.push(``),n.push(`## ${L0e[t.role]} · ${i$(t.createdAt)}`);let e=t.text.trim();e.length>0&&(n.push(``),n.push(e));for(let e of a$(t.parts))n.push(``),n.push(oBe({name:e}))}return n.join(`
128
128
  `)+`
129
- `}function T0e(e,t={}){let n={title:t.title?.trim()||kQ(),exportedAt:t.exportedAt??null,truncated:!!t.truncated,messageCount:e.length,messages:e.map(e=>({role:e.role,createdAt:e.createdAt,text:e.text,attachments:a$(e.parts)}))};return JSON.stringify(n,null,2)+`
130
- `}function E0e(e){return((e??``).trim()||`conversation`).toLowerCase().normalize(`NFD`).replace(/[̀-ͯ]/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,60)||`conversation`}function o$(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=o$(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function s$(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=o$(e))&&(r&&(r+=` `),r+=t);return r}var D0e=(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},O0e=(e,t)=>({classGroupId:e,validator:t}),c$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),l$=`-`,u$=[],k0e=`arbitrary..`,A0e=e=>{let t=M0e(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return j0e(e);let n=e.split(l$);return d$(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?D0e(i,t):t:i||u$}return n[e]||u$}}},d$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=d$(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(l$):e.slice(t).join(l$),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},j0e=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?k0e+r:void 0})(),M0e=e=>{let{theme:t,classGroups:n}=e;return N0e(n,t)},N0e=(e,t)=>{let n=c$();for(let r in e){let i=e[r];f$(i,n,r,t)}return n},f$=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];P0e(i,t,n,r)}},P0e=(e,t,n,r)=>{if(typeof e==`string`){F0e(e,t,n);return}if(typeof e==`function`){I0e(e,t,n,r);return}L0e(e,t,n,r)},F0e=(e,t,n)=>{let r=e===``?t:p$(t,e);r.classGroupId=n},I0e=(e,t,n,r)=>{if(R0e(e)){f$(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(O0e(n,e))},L0e=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];f$(o,p$(t,a),n,r)}},p$=(e,t)=>{let n=e,r=t.split(l$),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=c$(),n.nextPart.set(t,i)),n=i}return n},R0e=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,z0e=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)}}},m$=`!`,h$=`:`,B0e=[],g$=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),V0e=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===h$){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(m$)?(c=s.slice(0,-1),l=!0):s.startsWith(m$)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return g$(t,l,c,u)};if(t){let e=t+h$,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):g$(B0e,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},H0e=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}},U0e=e=>({cache:z0e(e.cacheSize),parseClassName:V0e(e),sortModifiers:H0e(e),postfixLookupClassGroupIds:W0e(e),...A0e(e)}),W0e=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},G0e=/\s+/,K0e=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(G0e),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?_+m$:_,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},q0e=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=_$(n))&&(i&&(i+=` `),i+=r);return i},_$=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=_$(e[r]))&&(n&&(n+=` `),n+=t);return n},J0e=(e,...t)=>{let n,r,i,a,o=o=>(n=U0e(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=K0e(e,n);return i(e,a),a};return a=o,(...e)=>a(q0e(...e))},Y0e=[],v$=e=>{let t=t=>t[e]||Y0e;return t.isThemeGetter=!0,t},y$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,b$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,X0e=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Z0e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Q0e=/\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$/,$0e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,e2e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t2e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,x$=e=>X0e.test(e),S$=e=>!!e&&!Number.isNaN(Number(e)),C$=e=>!!e&&Number.isInteger(Number(e)),w$=e=>e.endsWith(`%`)&&S$(e.slice(0,-1)),T$=e=>Z0e.test(e),E$=()=>!0,n2e=e=>Q0e.test(e)&&!$0e.test(e),D$=()=>!1,r2e=e=>e2e.test(e),i2e=e=>t2e.test(e),a2e=e=>!J(e)&&!Y(e),o2e=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)),s2e=e=>F$(e,z$,D$),J=e=>y$.test(e),O$=e=>F$(e,B$,n2e),k$=e=>F$(e,h2e,S$),c2e=e=>F$(e,H$,E$),l2e=e=>F$(e,V$,D$),A$=e=>F$(e,L$,D$),u2e=e=>F$(e,R$,i2e),j$=e=>F$(e,U$,r2e),Y=e=>b$.test(e),M$=e=>I$(e,B$),d2e=e=>I$(e,V$),N$=e=>I$(e,L$),f2e=e=>I$(e,z$),p2e=e=>I$(e,R$),P$=e=>I$(e,U$,!0),m2e=e=>I$(e,H$,!0),F$=(e,t,n)=>{let r=y$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},I$=(e,t,n=!1)=>{let r=b$.exec(e);return r?r[1]?t(r[1]):n:!1},L$=e=>e===`position`||e===`percentage`,R$=e=>e===`image`||e===`url`,z$=e=>e===`length`||e===`size`||e===`bg-size`,B$=e=>e===`length`,h2e=e=>e===`number`,V$=e=>e===`family-name`,H$=e=>e===`number`||e===`weight`,U$=e=>e===`shadow`,g2e=J0e(()=>{let e=v$(`color`),t=v$(`font`),n=v$(`text`),r=v$(`font-weight`),i=v$(`tracking`),a=v$(`leading`),o=v$(`breakpoint`),s=v$(`container`),c=v$(`spacing`),l=v$(`radius`),u=v$(`shadow`),d=v$(`inset-shadow`),f=v$(`text-shadow`),p=v$(`drop-shadow`),m=v$(`blur`),h=v$(`perspective`),g=v$(`aspect`),_=v$(`ease`),v=v$(`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=()=>[x$,`full`,`auto`,...w()],E=()=>[C$,`none`,`subgrid`,Y,J],D=()=>[`auto`,{span:[`full`,C$,Y,J]},C$,Y,J],O=()=>[C$,`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=()=>[x$,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[x$,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[x$,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,Y,J],ie=()=>[...b(),N$,A$,{position:[Y,J]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,f2e,s2e,{size:[Y,J]}],se=()=>[w$,M$,O$],ce=()=>[``,`none`,`full`,l,Y,J],le=()=>[``,S$,M$,O$],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=()=>[S$,w$,N$,A$],pe=()=>[``,`none`,m,Y,J],me=()=>[`none`,S$,Y,J],he=()=>[`none`,S$,Y,J],ge=()=>[S$,Y,J],_e=()=>[x$,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[T$],breakpoint:[T$],color:[E$],container:[T$],"drop-shadow":[T$],ease:[`in`,`out`,`in-out`],font:[a2e],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[T$],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[T$],shadow:[T$],spacing:[`px`,S$],text:[T$],"text-shadow":[T$],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,x$,J,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,J]}],"container-named":[o2e],columns:[{columns:[S$,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:[C$,`auto`,Y,J]}],basis:[{basis:[x$,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[S$,x$,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,S$,Y,J]}],shrink:[{shrink:[``,S$,Y,J]}],order:[{order:[C$,`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,M$,O$]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,m2e,c2e]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,w$,J]}],"font-family":[{font:[d2e,l2e,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":[S$,`none`,Y,k$]}],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:[S$,`from-font`,`auto`,Y,O$]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[S$,`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:[C$,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`]},C$,Y,J],radial:[``,Y,J],conic:[C$,Y,J]},p2e,u2e]}],"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":[S$,Y,J]}],"outline-w":[{outline:[``,S$,M$,O$]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,P$,j$]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,P$,j$]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:le()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[S$,O$]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,P$,j$]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[S$,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":[S$]}],"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":[S$]}],"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:[S$,Y,J]}],contrast:[{contrast:[S$,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,P$,j$]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,S$,Y,J]}],"hue-rotate":[{"hue-rotate":[S$,Y,J]}],invert:[{invert:[``,S$,Y,J]}],saturate:[{saturate:[S$,Y,J]}],sepia:[{sepia:[``,S$,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[S$,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[S$,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,S$,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[S$,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,S$,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[S$,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[S$,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,S$,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:[S$,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[S$,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:[C$,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:[S$,M$,O$,k$]}],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 W$(...e){return g2e(s$(e))}function G$(e){return(0,I.jsx)(nle,{"data-slot":`dropdown-menu`,...e})}function K$(e){return(0,I.jsx)(rle,{"data-slot":`dropdown-menu-trigger`,...e})}function q$({className:e,sideOffset:t=4,...n}){return(0,I.jsx)(ile,{children:(0,I.jsx)(ale,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:W$(`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 J$({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:W$(`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 Y$({className:e,inset:t,...n}){return(0,I.jsx)(ole,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:W$(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function X$({className:e,...t}){return(0,I.jsx)(dle,{"data-slot":`dropdown-menu-separator`,className:W$(`bg-border -mx-1 my-1 h-px`,e),...t})}function _2e(e){return(0,I.jsx)(cle,{"data-slot":`dropdown-menu-radio-group`,...e})}function Z$({className:e,children:t,...n}){return(0,I.jsxs)(lle,{"data-slot":`dropdown-menu-radio-item`,className:W$(`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)(See,{className:`size-2 fill-current`})})}),t]})}function Q$({...e}){return(0,I.jsx)(ST,{"data-slot":`popover`,...e})}function $$({...e}){return(0,I.jsx)(CT,{"data-slot":`popover-trigger`,...e})}function e1({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,I.jsx)(wT,{children:(0,I.jsx)(TT,{"data-slot":`popover-content`,align:t,sideOffset:n,className:W$(`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 t1=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,n1=s$,r1=(e,t)=>n=>{if(t?.variants==null)return n1(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=t1(t)||t1(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 n1(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)},i1=r1(`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?xy:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:W$(i1({variant:t,size:n,className:e})),...i})}function a1({className:e,type:t,...n}){return(0,I.jsx)(`input`,{type:t,"data-slot":`input`,className:W$(`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 o1({...e}){return(0,I.jsx)(Ux,{"data-slot":`alert-dialog`,...e})}function v2e({...e}){return(0,I.jsx)(Wx,{"data-slot":`alert-dialog-portal`,...e})}function y2e({className:e,...t}){return(0,I.jsx)(Gx,{"data-slot":`alert-dialog-overlay`,className:W$(`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 s1({className:e,...t}){return(0,I.jsxs)(v2e,{children:[(0,I.jsx)(y2e,{}),(0,I.jsx)(Kx,{"data-slot":`alert-dialog-content`,className:W$(`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 c1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:W$(`flex flex-col gap-1.5`,e),...t})}function l1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:W$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function u1({className:e,...t}){return(0,I.jsx)(Yx,{"data-slot":`alert-dialog-title`,className:W$(`text-base font-medium text-foreground`,e),...t})}function d1({className:e,...t}){return(0,I.jsx)(Xx,{"data-slot":`alert-dialog-description`,className:W$(`text-sm text-muted-foreground`,e),...t})}function f1({className:e,...t}){return(0,I.jsx)(qx,{className:W$(i1(),e),...t})}function p1({className:e,...t}){return(0,I.jsx)(Jx,{className:W$(i1({variant:`outline`}),e),...t})}function m1({...e}){return(0,I.jsx)(yx,{"data-slot":`dialog`,...e})}function b2e({...e}){return(0,I.jsx)(bx,{"data-slot":`dialog-portal`,...e})}function x2e({className:e,...t}){return(0,I.jsx)(xx,{"data-slot":`dialog-overlay`,className:W$(`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 h1({className:e,children:t,showCloseButton:n=!0,...r}){return(0,I.jsxs)(b2e,{children:[(0,I.jsx)(x2e,{}),(0,I.jsxs)(Sx,{"data-slot":`dialog-content`,className:W$(`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)(Tx,{"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)(Wm,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:qQ()})]})})]})]})}function g1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-header`,className:W$(`flex flex-col gap-1.5 pr-6`,e),...t})}function _1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-footer`,className:W$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function v1({className:e,...t}){return(0,I.jsx)(Cx,{"data-slot":`dialog-title`,className:W$(`text-base font-medium text-foreground`,e),...t})}function y1({className:e,...t}){return(0,I.jsx)(wx,{"data-slot":`dialog-description`,className:W$(`text-sm text-muted-foreground`,e),...t})}var b1=N.createContext(null);function S2e({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)(b1.Provider,{value:c,children:[e,(0,I.jsx)(o1,{open:l,onOpenChange:e=>{e||s(!1)},children:l?(0,I.jsxs)(s1,{onOpenAutoFocus:d?m:void 0,...t.opts.description?{}:{"aria-describedby":void 0},children:[(0,I.jsxs)(c1,{children:[(0,I.jsx)(u1,{children:t.opts.title}),t.opts.description?(0,I.jsx)(d1,{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)(a1,{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)(l1,{children:[(0,I.jsx)(p1,{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)(m1,{open:u,onOpenChange:e=>{e||s(null)},children:u?(0,I.jsxs)(h1,{onOpenAutoFocus:m,...t.opts.description?{}:{"aria-describedby":void 0},children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:t.opts.title}),t.opts.description?(0,I.jsx)(y1,{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)(a1,{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)(_1,{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 x1(){let e=N.useContext(b1);if(!e)throw Error(`useConfirm/usePrompt must be used within <DialogsProvider>`);return e}function S1(){return x1().confirm}function C1(){return x1().prompt}var w1=N.createContext(null),C2e=6e3;function T1(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return String(e)}catch{return`Erreur inconnue`}}function w2e({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),C2e);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:T1(t)}),success:(e,t)=>o({variant:`success`,title:e,description:t})}),[o]);return(0,I.jsxs)(w1.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:W$(`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)(Wm,{"aria-hidden":!0})})]},e.id))})]})}function E1(){let e=N.useContext(w1);if(!e)throw Error(`useToast must be used within <ToastProvider>`);return e}function T2e(e){return e.kind===`tool`}function E2e(e){return e.kind===`media`}function D2e(e){return e.kind===`file`}function O2e(e){return e.kind===`reasoning`}var k2e=/---[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?=\.[^.]+$|$)/i;function A2e(e){return e.replace(k2e,``)}function j2e(e,t){let n=e.runId??`norun`;return`${e._id}:${n}:${t}`}function M2e(e,t,n){return{toolCallId:j2e(e,t),toolName:n.name,args:n.input??{},result:n.output,argsText:n.input===void 0?void 0:F2e(n.input),phase:typeof n.phase==`string`?n.phase:void 0}}function N2e(e){return e&&A2e(e)}function P2e(e){return e.url?{type:`file`,mimeType:e.mimeType,data:e.url,filename:N2e(e.filename)}:null}function F2e(e){try{return typeof e==`string`?e:JSON.stringify(e,null,2)}catch{return String(e)}}function I2e(e){let t=[],n=[],r=[];return e.parts.forEach((i,a)=>{O2e(i)?t.push({type:`reasoning`,text:i.text}):T2e(i)?n.push(M2e(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(E2e(e)||D2e(e)){let n=P2e(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 L2e(e){return typeof e==`string`&&e.toLowerCase().startsWith(`image/`)}var R2e=128*1024;function z2e(e){let t=e-R2e;return t<=0?0:Math.floor(t/4)*3}function B2e(){return`att_${Math.random().toString(36).slice(2)}_${Date.now()}`}function V2e(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 H2e(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??z2e(26214400);if(n&&!L2e(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=pfe({size:e(r.size),max:e(a)});throw t?.(n),Error(n)}return{id:B2e(),type:U2e(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;kO.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&&kO.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{kO.clear(t.id)}},async remove(){}}}function U2e(e){return e.startsWith(`image/`)?`image`:`document`}function W2e({chatId:e}){let t=Zn(),n=E1(),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=(0,N.useMemo)(()=>H2e(t,e=>n.error(e),e),[t,n,e]),o=(0,N.useMemo)(()=>i??[],[i]),s=o.length>0?o[o.length-1].role:null,c=o.some(e=>e.status===`streaming`),[l,u]=(0,N.useState)(null);(0,N.useEffect)(()=>{u(null)},[e]),(0,N.useEffect)(()=>{s===`assistant`&&u(null)},[s,o]),(0,N.useEffect)(()=>{if(l===null)return;let e=window.setTimeout(()=>u(null),12e4);return()=>window.clearTimeout(e)},[l]);let d=l!==null||c,f=(0,N.useMemo)(()=>({messages:o,isRunning:d,convertMessage:I2e,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=V2e(t.attachments).map(e=>({storageId:e.storageId,filename:e.filename,mimeType:e.mimeType}));u(Date.now());try{await r({chatId:e,text:n,clientMessageId:crypto.randomUUID(),attachments:i})}catch(e){throw u(null),e}},adapters:{attachments:a}}),[o,d,e,r,a]),p=(0,N.useMemo)(()=>({begin:()=>u(Date.now()),cancel:()=>u(null)}),[]),m=(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`)?fJ():hJ()),!1}},[e,r,n]);return{runtime:bre(f),turnGate:p,queueSend:m}}function D1(e,{key:t,value:n}){let r=e.getQuery(V.me.getMe,{host:bO});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:bO},{...r,ui:{...r.ui,effective:i,userOverrides:a}})}function G2e(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 K2e(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 q2e(e){return e?e.some(e=>e?.type===`text`&&typeof e.text==`string`&&e.text.trim().length>0):!1}var J2e={thinking:LRe,generating:BRe,error:URe,aborted:YRe};function Y2e(e,t){let n=K2e(e,t);return n===null?null:{kind:n,label:J2e[n]()}}var X2e=q2e;function Z2e(e){return e===`stream_orphaned`?KRe():e}function Q2e(){let e=r$(),t=my(e=>e.metadata?.custom?.status),n=my(e=>e.metadata?.custom?.runId),r=my(e=>e.metadata?.custom?.error),i=Y2e(t,my(e=>X2e(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)(gm,{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:Z2e(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?x0e(e):i.label})]}):null}var $2e=new Set([`complete`,`error`,`aborted`]),e4e=new Set([`completed`,`error`]);function t4e(e,t){if(e.length===0)return!1;if(t===`streaming`)return!0;if(t!==void 0&&$2e.has(t))return!1;let n=e[e.length-1];return n.phase!==void 0&&e4e.has(n.phase)?!1:n.result===void 0||n.result===null}var n4e=[`command`,`query`,`url`,`path`,`pattern`,`file`,`cmd`,`prompt`];function r4e(e,t){let n=``;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;for(let e of n4e){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 i4e(e,t){let n=e.length,r=n===1?Dq({count:n}):Aq({count:n});return{count:n,running:t4e(e,t),label:r}}function O1({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)(dm,{size:13,"aria-hidden":!0}):(0,I.jsx)(vm,{size:13,"aria-hidden":!0})})}function a4e(e,t){let n=typeof e==`string`?e:void 0;return n===`error`?`error`:t||n===`completed`?`completed`:`running`}function k1(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function o4e({toolName:e,args:t,argsText:n,result:r,status:i}){let a=r!=null,o=a4e(i?.type,a),s=n??k1(t),c=r4e(t,n),l=o===`running`?wm:o===`error`?gm:bee;return(0,I.jsxs)(`details`,{className:`oc-tool oc-tool--${o}`,children:[(0,I.jsxs)(`summary`,{className:`oc-tool__header`,children:[(0,I.jsx)(l,{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)(pm,{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)(O1,{text:s})]})]}):null,a?(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:k1(r)}),(0,I.jsx)(O1,{text:k1(r)})]})]}):null]})]})}function s4e(){let e=my(e=>e.metadata?.custom?.toolParts),t=my(e=>e.metadata?.custom?.status),[n,r]=(0,N.useState)(!1);if(!e||e.length===0)return null;let i=n,a=i4e(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?Hq():zq(),onClick:()=>r(!i),children:[(0,I.jsx)(Um,{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)(wm,{size:12,className:`oc-toolact__spin`,"aria-hidden":!0}),Nq()]}):(0,I.jsxs)(`span`,{className:`oc-toolact__state oc-toolact__state--done`,children:[(0,I.jsx)(dm,{size:12,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-sr-only`,children:Iq()})]}),(0,I.jsx)(pm,{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)(o4e,{toolName:e.toolName,args:e.args,argsText:e.argsText,result:e.result,status:e.phase?{type:e.phase}:void 0},e.toolCallId))}):null]})}function A1({className:e,...t}){return(0,I.jsx)(oS,{"data-slot":`checkbox`,className:W$(`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)(cS,{"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)(dm,{className:`size-3.5`})})})}function j1(e){let t={memory:0,documents:0};for(let n of e)n.group===`memory`?t.memory+=n.items.length:t.documents+=n.items.length;return t}function M1(e){let t=[];return e.memory>0&&t.push(e.memory===1?IW():zW({count:e.memory})),e.documents>0&&t.push(e.documents===1?HW():GW({count:e.documents})),t.join(` · `)}function N1(e){return e.file_name??e.id??e.type??rG()}function P1(e){let t=[];return e.type&&N1(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(eG({score:e.score.toFixed(2)})),t}function F1(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 I1(e,t){let n=t.trim().toLowerCase();return n===``?!0:[N1(e.item),e.item.text??``,...P1(e.item)].join(` `).toLowerCase().includes(n)}var L1=(0,N.createContext)(null),c4e=[];function l4e(){let e=my(e=>e.metadata?.custom?.provenanceParts??c4e),t=my(e=>e.metadata?.custom?.messageId),n=my(e=>e.metadata?.custom?.attachedDocCount??0),r=(0,N.useContext)(L1),i=j1(e);if(e.length===0||i.memory+i.documents===0)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":lG(),children:[(0,I.jsx)(xm,{size:13,className:`oc-sources-trigger__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-sources-trigger__label`,children:NW()}),(0,I.jsx)(`span`,{className:`oc-sources-trigger__counts`,children:M1(i)}),n>0?(0,I.jsxs)(`span`,{className:`oc-sources-trigger__attached`,title:AG({count:n}),children:[(0,I.jsx)(ym,{size:12,"aria-hidden":!0}),n]}):null,(0,I.jsx)(pm,{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=E1(),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)(new Set);(0,N.useEffect)(()=>{d(``),p(!1),h(!1),_(new Set)},[e]);let v=(0,N.useMemo)(()=>F1(r,`documents`).filter(e=>I1(e,u)),[r,u]),y=(0,N.useMemo)(()=>F1(r,`memory`).filter(e=>I1(e,u)),[r,u]),b=j1(r),x=e=>_(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),S=(e,t)=>_(n=>{let r=new Set(n);for(let n of e)t?r.add(n):r.delete(n);return r}),C=(0,N.useMemo)(()=>F1(r,`documents`).filter(e=>g.has(e.key)),[r,g]),w=i!=null&&C.length>0&&!l;async function T(){if(w)try{await o({sourceMessageId:e,items:C.map(e=>({entryKey:e.key,reference:N1(e.item)}))}),s.success(HG())}catch(e){let t=T1(e);t.includes(`fetch_in_flight`)?s.error(zG()):t.includes(`no_documentary_agent`)?s.error(IG()):s.error(GG(),e)}}let E=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:oG()}),(0,I.jsx)(`p`,{className:`oc-sources-panel__sub`,children:M1(b)})]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn`,onClick:t,"aria-label":lK(),title:lK(),children:(0,I.jsx)(Wm,{size:16,"aria-hidden":!0})})]}),(0,I.jsxs)(`div`,{className:`oc-sources-panel__search`,children:[(0,I.jsx)(Pm,{size:15,"aria-hidden":!0}),(0,I.jsx)(a1,{value:u,onChange:e=>d(e.target.value),placeholder:fG(),"aria-label":fG()})]}),(0,I.jsx)(`div`,{className:`oc-sources-panel__body`,children:E?(0,I.jsx)(`p`,{className:`oc-sources-panel__empty`,children:(0,I.jsx)(wm,{size:14,className:`oc-iconbtn__spin`,"aria-hidden":!0})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(z1,{icon:(0,I.jsx)(xm,{size:14,"aria-hidden":!0}),label:ZW(),count:v.length,expanded:f,onToggle:()=>p(e=>!e),entries:v,selectable:!0,selected:g,onToggle1:x,onToggleAll:e=>S(v.map(e=>e.key),e),attachmentByKey:c}),(0,I.jsx)(z1,{icon:(0,I.jsx)(vee,{size:14,"aria-hidden":!0}),label:JW(),count:y.length,expanded:m,onToggle:()=>h(e=>!e),entries:y,selectable:!1,selected:g,onToggle1:x,onToggleAll:e=>S(y.map(e=>e.key),e),attachmentByKey:c}),v.length===0&&y.length===0?(0,I.jsx)(`p`,{className:`oc-sources-panel__empty`,children:hG()}):null]})}),C.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:xG({count:C.length})}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,disabled:!w,onClick:()=>void T(),children:[l?(0,I.jsx)(wm,{size:14,className:`oc-iconbtn__spin`,"aria-hidden":!0}):(0,I.jsx)(Ree,{size:14,"aria-hidden":!0}),wG()]})]}),(0,I.jsx)(`p`,{className:`oc-sources-panel__acthint`,children:i==null?IG():l?zG():DG()})]}):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)(fm,{size:14,"aria-hidden":!0}):(0,I.jsx)(pm,{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)(A1,{checked:d,onCheckedChange:e=>l(e===!0)}),(0,I.jsx)(`span`,{children:vG()})]}):null,a.map(e=>(0,I.jsx)(u4e,{entry:e,selectable:o,selected:s.has(e.key),onToggle:()=>c(e.key),attachment:u.get(e.key)},e.key))]}):null]})}function u4e({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=P1(u),f=typeof u.score==`number`?Math.max(0,Math.min(1,u.score)):null,p=e.group===`documents`;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)(A1,{checked:n,onCheckedChange:r})}):null,(0,I.jsxs)(`div`,{className:`oc-srccard__body`,children:[(0,I.jsx)(`div`,{className:`oc-srccard__title`,children:N1(u)}),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:eG({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?oK():rK()}):null]}):null,p?(0,I.jsx)(d4e,{attachment:i}):null]})]})}function d4e({attachment:e}){if(e?.status===`ready`&&e.url){let t=e.filename??ZG();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:ZG(),children:[(0,I.jsx)(ym,{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)(wm,{size:13,"aria-hidden":!0}),JG()]}):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)(Wm,{size:13,"aria-hidden":!0}),eK()]}):(0,I.jsxs)(`div`,{className:`oc-srccard__origin`,"aria-disabled":!0,children:[(0,I.jsx)(ym,{size:13,"aria-hidden":!0}),NG()]})}var f4e=`oc.sidebar.width`,B1=`oc.sidebar.collapsed`,V1=200,H1=520,p4e=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 m4e(){let{width:e,startResize:t}=G1({storageKey:f4e,defaultWidth:p4e,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)(yx,{"data-slot":`sheet`,...e})}function h4e({...e}){return(0,I.jsx)(bx,{"data-slot":`sheet-portal`,...e})}function g4e({className:e,...t}){return(0,I.jsx)(xx,{"data-slot":`sheet-overlay`,className:W$(`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)(h4e,{children:[(0,I.jsx)(g4e,{}),(0,I.jsxs)(Sx,{"data-slot":`sheet-content`,"data-side":n,className:W$(`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)(Tx,{"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)(Wm,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:qQ()})]})})]})]})}function J1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sheet-header`,className:W$(`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:W$(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function X1({className:e,...t}){return(0,I.jsx)(Cx,{"data-slot":`sheet-title`,className:W$(`font-heading text-base font-medium text-foreground`,e),...t})}function Z1({className:e,...t}){return(0,I.jsx)(wx,{"data-slot":`sheet-description`,className:W$(`text-sm text-muted-foreground`,e),...t})}function _4e({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 v4e=(e,t)=>typeof e==`string`?e===t:JSON.stringify(e)===JSON.stringify(t),y4e=(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))&&v4e(e.children,t.children)},Q1=(e,t)=>y4e(e.node,t.node),$1=(0,N.createContext)(null),b4e=()=>(0,N.useContext)($1)!==null,x4e=(0,N.memo)(({children:e,...t})=>(0,I.jsx)($1.Provider,{value:t,children:e}),Q1),S4e=({node:e,...t})=>(0,I.jsx)(`pre`,{...t}),C4e=({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})}),w4e=()=>null,T4e=({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}),E4e=({node:e,components:{Pre:t,Code:n,SyntaxHighlighter:r,CodeHeader:i},componentsByLanguage:a={},children:o,...s})=>{let c=n0((0,N.useContext)($1)),l=My(e=>(0,I.jsx)(t,{...c(e)})),u=n0(s),d=My(e=>(0,I.jsx)(n,{...u(e)})),f=/language-(\w+)/.exec(s.className||``)?.[1]??``;return typeof o==`string`?(0,I.jsx)(T4e,{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})},D4e=(0,N.memo)(({node:e,components:t,componentsByLanguage:n,...r})=>b4e()?(0,I.jsx)(E4e,{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 O4e(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var k4e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,A4e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,j4e={};function r0(e,t){return((t||j4e).jsx?A4e:k4e).test(e)}var M4e=/[ \t\n\f\r]/g;function N4e(e){return typeof e==`object`?e.type===`text`?i0(e.value):!1:i0(e)}function i0(e){return e.replace(M4e,``)===``}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}),P4e=0,u0=g0(),d0=g0(),f0=g0(),Z=g0(),p0=g0(),m0=g0(),h0=g0();function g0(){return 2**++P4e}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 F4e=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}),I4e=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()}}),L4e={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`},R4e=/[A-Z]/g,D0=/-[a-z]/g,z4e=/^data[-\w.:]+$/i;function B4e(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`&&z4e.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(D0,H4e);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!D0.test(e)){let n=e.replace(R4e,V4e);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=v0}return new i(r,t)}function V4e(e){return`-`+e.toLowerCase()}function H4e(e){return e.charAt(1).toUpperCase()}var U4e=o0([x0,F4e,w0,T0,E0],`html`),O0=o0([x0,I4e,w0,T0,E0],`svg`);function W4e(e){return e.join(` `).trim()}var G4e=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})),K4e=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(G4e());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}})),q4e=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))}})),J4e=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(K4e()),r=q4e();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 Y4e(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 X4e=u(J4e(),1),L0={}.hasOwnProperty,Z4e=new Map,Q4e=/[A-Z]/g,$4e=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),e3e=new Set([`td`,`th`]);function t3e(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=l3e(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=c3e(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:U4e,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 n3e(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return r3e(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return a3e(e,t,n);if(t.type===`mdxjsEsm`)return i3e(e,t);if(t.type===`root`)return o3e(e,t,n);if(t.type===`text`)return s3e(e,t)}function n3e(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=u3e(e,t),s=V0(e,t);return $4e.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!N4e(e):!0})),z0(e,o,a,t),B0(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function r3e(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 i3e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);U0(e,t.position)}function a3e(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=d3e(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 o3e(e,t,n){let r={};return B0(r,V0(e,t)),e.create(t,e.Fragment,r,n)}function s3e(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 c3e(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 l3e(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 u3e(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&L0.call(t.properties,i)){let a=f3e(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&e3e.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 d3e(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:Z4e;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 f3e(e,t,n){let r=B4e(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?O4e(n):W4e(n)),r.property===`style`){let t=typeof n==`object`?n:p3e(e,String(n));return e.stylePropertyNameCase===`css`&&(t=m3e(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?L4e[r.property]||r.property:r.attribute,n]}}function p3e(e,t){try{return(0,X4e.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 m3e(e){let t={},n;for(n in e)L0.call(e,n)&&(t[h3e(n)]=e[n]);return t}function h3e(e){let t=e.replace(Q4e,g3e);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function g3e(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`]},_3e={};function G0(e,t){let n=t||_3e;return K0(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function K0(e,t,n){if(v3e(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 v3e(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;)y3e(t,e[n]);return t}function y3e(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];b3e(r[a],Array.isArray(e)?e:e?[e]:[])}}}function b3e(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]/),x3e=d2(/[#-'*+\--9=?A-Z^-~]/);function i2(e){return e!==null&&(e<32||e===127)}var a2=d2(/\d/),S3e=d2(/[\dA-Fa-f]/),C3e=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 w3e={tokenize:T3e};function T3e(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 E3e={tokenize:D3e},m2={tokenize:O3e};function D3e(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 O3e(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:k3e,tokenize:A3e};function k3e(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 A3e(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 j3e={name:`autolink`,tokenize:M3e};function M3e(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):x3e(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:N3e};function N3e(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:F3e},exit:I3e,name:`blockQuote`,tokenize:P3e};function P3e(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 F3e(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 I3e(e){e.exit(`blockQuote`)}var x2={name:`characterEscape`,tokenize:L3e};function L3e(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 C3e(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var S2={name:`characterReference`,tokenize:R3e};function R3e(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=S3e,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:B3e},w2={concrete:!0,name:`codeFenced`,tokenize:z3e};function z3e(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 B3e(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:H3e},V3e={partial:!0,tokenize:U3e};function H3e(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(V3e,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 U3e(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 W3e={name:`codeText`,previous:K3e,resolve:G3e,tokenize:q3e};function G3e(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 K3e(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function q3e(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 J3e=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 J3e(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,Y3e(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 Y3e(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 X3e={resolve:Q3e,tokenize:$3e},Z3e={partial:!0,tokenize:e6e};function Q3e(e){return D2(e),e}function $3e(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(Z3e,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 e6e(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 t6e={name:`definition`,tokenize:r6e},n6e={partial:!0,tokenize:i6e};function r6e(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(n6e,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 i6e(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 a6e={name:`hardBreakEscape`,tokenize:o6e};function o6e(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 s6e={name:`headingAtx`,resolve:c6e,tokenize:l6e};function c6e(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 l6e(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 u6e=`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`],d6e={concrete:!0,name:`htmlFlow`,resolveTo:m6e,tokenize:h6e},f6e={partial:!0,tokenize:_6e},p6e={partial:!0,tokenize:g6e};function m6e(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 h6e(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)):u6e.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(f6e,ae,ee)(t)):t===null||o2(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(p6e,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 g6e(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 _6e(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(y2,t,n)}}var v6e={name:`htmlText`,tokenize:y6e};function y6e(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:C6e,resolveTo:w6e,tokenize:T6e},b6e={tokenize:E6e},x6e={tokenize:D6e},S6e={tokenize:O6e};function C6e(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 w6e(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 T6e(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(b6e,u,o?u:d)(t):t===91?e.attempt(x6e,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(S6e,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function E6e(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 D6e(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 O6e(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 k6e={name:`labelStartImage`,resolveAll:N2.resolveAll,tokenize:A6e};function A6e(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 j6e={name:`labelStartLink`,resolveAll:N2.resolveAll,tokenize:M6e};function M6e(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:N6e};function N6e(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:P6e};function P6e(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:R6e},exit:B6e,name:`list`,tokenize:L6e},F6e={partial:!0,tokenize:V6e},I6e={partial:!0,tokenize:z6e};function L6e(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(F6e,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 R6e(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(I6e,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 z6e(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 B6e(e){e.exit(this.containerState.type)}function V6e(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:H6e,tokenize:U6e};function H6e(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 U6e(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 W6e={tokenize:G6e};function G6e(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(X3e,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 K6e={resolveAll:z2()},q6e=R2(`string`),J6e=R2(`text`);function R2(e){return{resolveAll:z2(e===`text`?Y6e: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 Y6e(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 X6e=s({attentionMarkers:()=>i8e,contentInitial:()=>Q6e,disable:()=>a8e,document:()=>Z6e,flow:()=>e8e,flowInitial:()=>$6e,insideSpan:()=>r8e,string:()=>t8e,text:()=>n8e}),Z6e={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},Q6e={91:t6e},$6e={[-2]:T2,[-1]:T2,32:T2},e8e={35:s6e,42:F2,45:[L2,F2],60:d6e,61:L2,95:F2,96:w2,126:w2},t8e={38:S2,92:x2},n8e={[-5]:P2,[-4]:P2,[-3]:P2,33:k6e,38:S2,42:_2,60:[j3e,v6e],91:j6e,92:[a6e,x2],93:N2,95:_2,96:W3e},r8e={null:[_2,K6e]},i8e={null:[42,95]},a8e={null:[]};function o8e(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 c8e(p(e),t)}function p(e){return s8e(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 s8e(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 c8e(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 B0e(e,t={}){let n={title:t.title?.trim()||kQ(),exportedAt:t.exportedAt??null,truncated:!!t.truncated,messageCount:e.length,messages:e.map(e=>({role:e.role,createdAt:e.createdAt,text:e.text,attachments:a$(e.parts)}))};return JSON.stringify(n,null,2)+`
130
+ `}function V0e(e){return((e??``).trim()||`conversation`).toLowerCase().normalize(`NFD`).replace(/[̀-ͯ]/g,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,60)||`conversation`}function o$(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=o$(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function s$(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=o$(e))&&(r&&(r+=` `),r+=t);return r}var H0e=(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},U0e=(e,t)=>({classGroupId:e,validator:t}),c$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),l$=`-`,u$=[],W0e=`arbitrary..`,G0e=e=>{let t=q0e(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return K0e(e);let n=e.split(l$);return d$(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?H0e(i,t):t:i||u$}return n[e]||u$}}},d$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=d$(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(l$):e.slice(t).join(l$),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},K0e=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?W0e+r:void 0})(),q0e=e=>{let{theme:t,classGroups:n}=e;return J0e(n,t)},J0e=(e,t)=>{let n=c$();for(let r in e){let i=e[r];f$(i,n,r,t)}return n},f$=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Y0e(i,t,n,r)}},Y0e=(e,t,n,r)=>{if(typeof e==`string`){X0e(e,t,n);return}if(typeof e==`function`){Z0e(e,t,n,r);return}Q0e(e,t,n,r)},X0e=(e,t,n)=>{let r=e===``?t:p$(t,e);r.classGroupId=n},Z0e=(e,t,n,r)=>{if($0e(e)){f$(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(U0e(n,e))},Q0e=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];f$(o,p$(t,a),n,r)}},p$=(e,t)=>{let n=e,r=t.split(l$),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=c$(),n.nextPart.set(t,i)),n=i}return n},$0e=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,e2e=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)}}},m$=`!`,h$=`:`,t2e=[],g$=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),n2e=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===h$){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(m$)?(c=s.slice(0,-1),l=!0):s.startsWith(m$)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return g$(t,l,c,u)};if(t){let e=t+h$,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):g$(t2e,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},r2e=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}},i2e=e=>({cache:e2e(e.cacheSize),parseClassName:n2e(e),sortModifiers:r2e(e),postfixLookupClassGroupIds:a2e(e),...G0e(e)}),a2e=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},o2e=/\s+/,s2e=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(o2e),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?_+m$:_,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},c2e=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=_$(n))&&(i&&(i+=` `),i+=r);return i},_$=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=_$(e[r]))&&(n&&(n+=` `),n+=t);return n},l2e=(e,...t)=>{let n,r,i,a,o=o=>(n=i2e(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=s2e(e,n);return i(e,a),a};return a=o,(...e)=>a(c2e(...e))},u2e=[],v$=e=>{let t=t=>t[e]||u2e;return t.isThemeGetter=!0,t},y$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,b$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,d2e=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,f2e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,p2e=/\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$/,m2e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,h2e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g2e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,x$=e=>d2e.test(e),S$=e=>!!e&&!Number.isNaN(Number(e)),C$=e=>!!e&&Number.isInteger(Number(e)),w$=e=>e.endsWith(`%`)&&S$(e.slice(0,-1)),T$=e=>f2e.test(e),E$=()=>!0,_2e=e=>p2e.test(e)&&!m2e.test(e),D$=()=>!1,v2e=e=>h2e.test(e),y2e=e=>g2e.test(e),b2e=e=>!J(e)&&!Y(e),x2e=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)),S2e=e=>F$(e,z$,D$),J=e=>y$.test(e),O$=e=>F$(e,B$,_2e),k$=e=>F$(e,A2e,S$),C2e=e=>F$(e,H$,E$),w2e=e=>F$(e,V$,D$),A$=e=>F$(e,L$,D$),T2e=e=>F$(e,R$,y2e),j$=e=>F$(e,U$,v2e),Y=e=>b$.test(e),M$=e=>I$(e,B$),E2e=e=>I$(e,V$),N$=e=>I$(e,L$),D2e=e=>I$(e,z$),O2e=e=>I$(e,R$),P$=e=>I$(e,U$,!0),k2e=e=>I$(e,H$,!0),F$=(e,t,n)=>{let r=y$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},I$=(e,t,n=!1)=>{let r=b$.exec(e);return r?r[1]?t(r[1]):n:!1},L$=e=>e===`position`||e===`percentage`,R$=e=>e===`image`||e===`url`,z$=e=>e===`length`||e===`size`||e===`bg-size`,B$=e=>e===`length`,A2e=e=>e===`number`,V$=e=>e===`family-name`,H$=e=>e===`number`||e===`weight`,U$=e=>e===`shadow`,j2e=l2e(()=>{let e=v$(`color`),t=v$(`font`),n=v$(`text`),r=v$(`font-weight`),i=v$(`tracking`),a=v$(`leading`),o=v$(`breakpoint`),s=v$(`container`),c=v$(`spacing`),l=v$(`radius`),u=v$(`shadow`),d=v$(`inset-shadow`),f=v$(`text-shadow`),p=v$(`drop-shadow`),m=v$(`blur`),h=v$(`perspective`),g=v$(`aspect`),_=v$(`ease`),v=v$(`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=()=>[x$,`full`,`auto`,...w()],E=()=>[C$,`none`,`subgrid`,Y,J],D=()=>[`auto`,{span:[`full`,C$,Y,J]},C$,Y,J],O=()=>[C$,`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=()=>[x$,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[x$,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[x$,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,Y,J],ie=()=>[...b(),N$,A$,{position:[Y,J]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,D2e,S2e,{size:[Y,J]}],se=()=>[w$,M$,O$],ce=()=>[``,`none`,`full`,l,Y,J],le=()=>[``,S$,M$,O$],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=()=>[S$,w$,N$,A$],pe=()=>[``,`none`,m,Y,J],me=()=>[`none`,S$,Y,J],he=()=>[`none`,S$,Y,J],ge=()=>[S$,Y,J],_e=()=>[x$,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[T$],breakpoint:[T$],color:[E$],container:[T$],"drop-shadow":[T$],ease:[`in`,`out`,`in-out`],font:[b2e],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[T$],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[T$],shadow:[T$],spacing:[`px`,S$],text:[T$],"text-shadow":[T$],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,x$,J,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,J]}],"container-named":[x2e],columns:[{columns:[S$,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:[C$,`auto`,Y,J]}],basis:[{basis:[x$,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[S$,x$,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,S$,Y,J]}],shrink:[{shrink:[``,S$,Y,J]}],order:[{order:[C$,`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,M$,O$]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,k2e,C2e]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,w$,J]}],"font-family":[{font:[E2e,w2e,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":[S$,`none`,Y,k$]}],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:[S$,`from-font`,`auto`,Y,O$]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[S$,`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:[C$,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`]},C$,Y,J],radial:[``,Y,J],conic:[C$,Y,J]},O2e,T2e]}],"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":[S$,Y,J]}],"outline-w":[{outline:[``,S$,M$,O$]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,P$,j$]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,P$,j$]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:le()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[S$,O$]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,P$,j$]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[S$,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":[S$]}],"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":[S$]}],"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:[S$,Y,J]}],contrast:[{contrast:[S$,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,P$,j$]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,S$,Y,J]}],"hue-rotate":[{"hue-rotate":[S$,Y,J]}],invert:[{invert:[``,S$,Y,J]}],saturate:[{saturate:[S$,Y,J]}],sepia:[{sepia:[``,S$,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[S$,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[S$,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,S$,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[S$,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,S$,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[S$,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[S$,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,S$,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:[S$,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[S$,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:[C$,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:[S$,M$,O$,k$]}],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 W$(...e){return j2e(s$(e))}function G$(e){return(0,I.jsx)(nle,{"data-slot":`dropdown-menu`,...e})}function K$(e){return(0,I.jsx)(rle,{"data-slot":`dropdown-menu-trigger`,...e})}function q$({className:e,sideOffset:t=4,...n}){return(0,I.jsx)(ile,{children:(0,I.jsx)(ale,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:W$(`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 J$({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:W$(`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 Y$({className:e,inset:t,...n}){return(0,I.jsx)(ole,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:W$(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function X$({className:e,...t}){return(0,I.jsx)(dle,{"data-slot":`dropdown-menu-separator`,className:W$(`bg-border -mx-1 my-1 h-px`,e),...t})}function M2e(e){return(0,I.jsx)(cle,{"data-slot":`dropdown-menu-radio-group`,...e})}function Z$({className:e,children:t,...n}){return(0,I.jsxs)(lle,{"data-slot":`dropdown-menu-radio-item`,className:W$(`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)(See,{className:`size-2 fill-current`})})}),t]})}function Q$({...e}){return(0,I.jsx)(ST,{"data-slot":`popover`,...e})}function $$({...e}){return(0,I.jsx)(CT,{"data-slot":`popover-trigger`,...e})}function e1({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,I.jsx)(wT,{children:(0,I.jsx)(TT,{"data-slot":`popover-content`,align:t,sideOffset:n,className:W$(`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 t1=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,n1=s$,r1=(e,t)=>n=>{if(t?.variants==null)return n1(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=t1(t)||t1(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 n1(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)},i1=r1(`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?xy:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:W$(i1({variant:t,size:n,className:e})),...i})}function a1({className:e,type:t,...n}){return(0,I.jsx)(`input`,{type:t,"data-slot":`input`,className:W$(`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 o1({...e}){return(0,I.jsx)(Ux,{"data-slot":`alert-dialog`,...e})}function N2e({...e}){return(0,I.jsx)(Wx,{"data-slot":`alert-dialog-portal`,...e})}function P2e({className:e,...t}){return(0,I.jsx)(Gx,{"data-slot":`alert-dialog-overlay`,className:W$(`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 s1({className:e,...t}){return(0,I.jsxs)(N2e,{children:[(0,I.jsx)(P2e,{}),(0,I.jsx)(Kx,{"data-slot":`alert-dialog-content`,className:W$(`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 c1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:W$(`flex flex-col gap-1.5`,e),...t})}function l1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:W$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function u1({className:e,...t}){return(0,I.jsx)(Yx,{"data-slot":`alert-dialog-title`,className:W$(`text-base font-medium text-foreground`,e),...t})}function d1({className:e,...t}){return(0,I.jsx)(Xx,{"data-slot":`alert-dialog-description`,className:W$(`text-sm text-muted-foreground`,e),...t})}function f1({className:e,...t}){return(0,I.jsx)(qx,{className:W$(i1(),e),...t})}function p1({className:e,...t}){return(0,I.jsx)(Jx,{className:W$(i1({variant:`outline`}),e),...t})}function m1({...e}){return(0,I.jsx)(yx,{"data-slot":`dialog`,...e})}function F2e({...e}){return(0,I.jsx)(bx,{"data-slot":`dialog-portal`,...e})}function I2e({className:e,...t}){return(0,I.jsx)(xx,{"data-slot":`dialog-overlay`,className:W$(`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 h1({className:e,children:t,showCloseButton:n=!0,...r}){return(0,I.jsxs)(F2e,{children:[(0,I.jsx)(I2e,{}),(0,I.jsxs)(Sx,{"data-slot":`dialog-content`,className:W$(`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)(Tx,{"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)(Wm,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:qQ()})]})})]})]})}function g1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-header`,className:W$(`flex flex-col gap-1.5 pr-6`,e),...t})}function _1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`dialog-footer`,className:W$(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function v1({className:e,...t}){return(0,I.jsx)(Cx,{"data-slot":`dialog-title`,className:W$(`text-base font-medium text-foreground`,e),...t})}function y1({className:e,...t}){return(0,I.jsx)(wx,{"data-slot":`dialog-description`,className:W$(`text-sm text-muted-foreground`,e),...t})}var b1=N.createContext(null);function L2e({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)(b1.Provider,{value:c,children:[e,(0,I.jsx)(o1,{open:l,onOpenChange:e=>{e||s(!1)},children:l?(0,I.jsxs)(s1,{onOpenAutoFocus:d?m:void 0,...t.opts.description?{}:{"aria-describedby":void 0},children:[(0,I.jsxs)(c1,{children:[(0,I.jsx)(u1,{children:t.opts.title}),t.opts.description?(0,I.jsx)(d1,{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)(a1,{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)(l1,{children:[(0,I.jsx)(p1,{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)(m1,{open:u,onOpenChange:e=>{e||s(null)},children:u?(0,I.jsxs)(h1,{onOpenAutoFocus:m,...t.opts.description?{}:{"aria-describedby":void 0},children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:t.opts.title}),t.opts.description?(0,I.jsx)(y1,{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)(a1,{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)(_1,{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 x1(){let e=N.useContext(b1);if(!e)throw Error(`useConfirm/usePrompt must be used within <DialogsProvider>`);return e}function S1(){return x1().confirm}function C1(){return x1().prompt}var w1=N.createContext(null),R2e=6e3;function T1(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return String(e)}catch{return`Erreur inconnue`}}function z2e({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),R2e);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:T1(t)}),success:(e,t)=>o({variant:`success`,title:e,description:t})}),[o]);return(0,I.jsxs)(w1.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:W$(`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)(Wm,{"aria-hidden":!0})})]},e.id))})]})}function E1(){let e=N.useContext(w1);if(!e)throw Error(`useToast must be used within <ToastProvider>`);return e}function B2e(e){return e.kind===`tool`}function V2e(e){return e.kind===`media`}function H2e(e){return e.kind===`file`}function U2e(e){return e.kind===`reasoning`}var W2e=/---[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?=\.[^.]+$|$)/i;function G2e(e){return e.replace(W2e,``)}function K2e(e,t){let n=e.runId??`norun`;return`${e._id}:${n}:${t}`}function q2e(e,t,n){return{toolCallId:K2e(e,t),toolName:n.name,args:n.input??{},result:n.output,argsText:n.input===void 0?void 0:X2e(n.input),phase:typeof n.phase==`string`?n.phase:void 0}}function J2e(e){return e&&G2e(e)}function Y2e(e){return e.url?{type:`file`,mimeType:e.mimeType,data:e.url,filename:J2e(e.filename)}:null}function X2e(e){try{return typeof e==`string`?e:JSON.stringify(e,null,2)}catch{return String(e)}}function Z2e(e){let t=[],n=[],r=[];return e.parts.forEach((i,a)=>{U2e(i)?t.push({type:`reasoning`,text:i.text}):B2e(i)?n.push(q2e(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(V2e(e)||H2e(e)){let n=Y2e(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 Q2e(e){return typeof e==`string`&&e.toLowerCase().startsWith(`image/`)}var $2e=128*1024;function e4e(e){let t=e-$2e;return t<=0?0:Math.floor(t/4)*3}function t4e(){return`att_${Math.random().toString(36).slice(2)}_${Date.now()}`}function n4e(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 r4e(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??e4e(26214400);if(n&&!Q2e(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=pfe({size:e(r.size),max:e(a)});throw t?.(n),Error(n)}return{id:t4e(),type:i4e(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;kO.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&&kO.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{kO.clear(t.id)}},async remove(){}}}function i4e(e){return e.startsWith(`image/`)?`image`:`document`}function a4e({chatId:e}){let t=Zn(),n=E1(),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=(0,N.useMemo)(()=>r4e(t,e=>n.error(e),e),[t,n,e]),o=(0,N.useMemo)(()=>i??[],[i]),s=o.length>0?o[o.length-1].role:null,c=o.some(e=>e.status===`streaming`),[l,u]=(0,N.useState)(null);(0,N.useEffect)(()=>{u(null)},[e]),(0,N.useEffect)(()=>{s===`assistant`&&u(null)},[s,o]),(0,N.useEffect)(()=>{if(l===null)return;let e=window.setTimeout(()=>u(null),12e4);return()=>window.clearTimeout(e)},[l]);let d=l!==null||c,f=(0,N.useMemo)(()=>({messages:o,isRunning:d,convertMessage:Z2e,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=n4e(t.attachments).map(e=>({storageId:e.storageId,filename:e.filename,mimeType:e.mimeType}));u(Date.now());try{await r({chatId:e,text:n,clientMessageId:crypto.randomUUID(),attachments:i})}catch(e){throw u(null),e}},adapters:{attachments:a}}),[o,d,e,r,a]),p=(0,N.useMemo)(()=>({begin:()=>u(Date.now()),cancel:()=>u(null)}),[]),m=(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`)?pJ():gJ()),!1}},[e,r,n]);return{runtime:bre(f),turnGate:p,queueSend:m}}function D1(e,{key:t,value:n}){let r=e.getQuery(V.me.getMe,{host:bO});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:bO},{...r,ui:{...r.ui,effective:i,userOverrides:a}})}function o4e(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 s4e(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 c4e(e){return e?e.some(e=>e?.type===`text`&&typeof e.text==`string`&&e.text.trim().length>0):!1}var l4e={thinking:QRe,generating:tze,error:ize,aborted:uze};function u4e(e,t){let n=s4e(e,t);return n===null?null:{kind:n,label:l4e[n]()}}var d4e=c4e;function f4e(e){return e===`stream_orphaned`?sze():e}function p4e(){let e=r$(),t=my(e=>e.metadata?.custom?.status),n=my(e=>e.metadata?.custom?.runId),r=my(e=>e.metadata?.custom?.error),i=u4e(t,my(e=>d4e(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)(gm,{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:f4e(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?I0e(e):i.label})]}):null}var m4e=new Set([`complete`,`error`,`aborted`]),h4e=new Set([`completed`,`error`]);function g4e(e,t){if(e.length===0)return!1;if(t===`streaming`)return!0;if(t!==void 0&&m4e.has(t))return!1;let n=e[e.length-1];return n.phase!==void 0&&h4e.has(n.phase)?!1:n.result===void 0||n.result===null}var _4e=[`command`,`query`,`url`,`path`,`pattern`,`file`,`cmd`,`prompt`];function v4e(e,t){let n=``;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;for(let e of _4e){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 y4e(e,t){let n=e.length,r=n===1?Oq({count:n}):jq({count:n});return{count:n,running:g4e(e,t),label:r}}function O1({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)(dm,{size:13,"aria-hidden":!0}):(0,I.jsx)(vm,{size:13,"aria-hidden":!0})})}function b4e(e,t){let n=typeof e==`string`?e:void 0;return n===`error`?`error`:t||n===`completed`?`completed`:`running`}function k1(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function x4e({toolName:e,args:t,argsText:n,result:r,status:i}){let a=r!=null,o=b4e(i?.type,a),s=n??k1(t),c=v4e(t,n),l=o===`running`?wm:o===`error`?gm:bee;return(0,I.jsxs)(`details`,{className:`oc-tool oc-tool--${o}`,children:[(0,I.jsxs)(`summary`,{className:`oc-tool__header`,children:[(0,I.jsx)(l,{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)(pm,{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)(O1,{text:s})]})]}):null,a?(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:k1(r)}),(0,I.jsx)(O1,{text:k1(r)})]})]}):null]})]})}function S4e(){let e=my(e=>e.metadata?.custom?.toolParts),t=my(e=>e.metadata?.custom?.status),[n,r]=(0,N.useState)(!1);if(!e||e.length===0)return null;let i=n,a=y4e(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?Uq():Bq(),onClick:()=>r(!i),children:[(0,I.jsx)(Um,{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)(wm,{size:12,className:`oc-toolact__spin`,"aria-hidden":!0}),Pq()]}):(0,I.jsxs)(`span`,{className:`oc-toolact__state oc-toolact__state--done`,children:[(0,I.jsx)(dm,{size:12,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-sr-only`,children:Lq()})]}),(0,I.jsx)(pm,{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)(x4e,{toolName:e.toolName,args:e.args,argsText:e.argsText,result:e.result,status:e.phase?{type:e.phase}:void 0},e.toolCallId))}):null]})}function A1({className:e,...t}){return(0,I.jsx)(oS,{"data-slot":`checkbox`,className:W$(`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)(cS,{"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)(dm,{className:`size-3.5`})})})}function j1(e){let t={memory:0,documents:0};for(let n of e)n.group===`memory`?t.memory+=n.items.length:t.documents+=n.items.length;return t}function M1(e){let t=[];return e.memory>0&&t.push(e.memory===1?LW():BW({count:e.memory})),e.documents>0&&t.push(e.documents===1?UW():KW({count:e.documents})),t.join(` · `)}function N1(e){return e.file_name??e.id??e.type??iG()}function P1(e){let t=[];return e.type&&N1(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(tG({score:e.score.toFixed(2)})),t}function F1(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 I1(e,t){let n=t.trim().toLowerCase();return n===``?!0:[N1(e.item),e.item.text??``,...P1(e.item)].join(` `).toLowerCase().includes(n)}var L1=(0,N.createContext)(null),C4e=[];function w4e(){let e=my(e=>e.metadata?.custom?.provenanceParts??C4e),t=my(e=>e.metadata?.custom?.messageId),n=my(e=>e.metadata?.custom?.attachedDocCount??0),r=(0,N.useContext)(L1),i=j1(e);if(e.length===0||i.memory+i.documents===0)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":uG(),children:[(0,I.jsx)(xm,{size:13,className:`oc-sources-trigger__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-sources-trigger__label`,children:PW()}),(0,I.jsx)(`span`,{className:`oc-sources-trigger__counts`,children:M1(i)}),n>0?(0,I.jsxs)(`span`,{className:`oc-sources-trigger__attached`,title:jG({count:n}),children:[(0,I.jsx)(ym,{size:12,"aria-hidden":!0}),n]}):null,(0,I.jsx)(pm,{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=E1(),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)(new Set);(0,N.useEffect)(()=>{d(``),p(!1),h(!1),_(new Set)},[e]);let v=(0,N.useMemo)(()=>F1(r,`documents`).filter(e=>I1(e,u)),[r,u]),y=(0,N.useMemo)(()=>F1(r,`memory`).filter(e=>I1(e,u)),[r,u]),b=j1(r),x=e=>_(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),S=(e,t)=>_(n=>{let r=new Set(n);for(let n of e)t?r.add(n):r.delete(n);return r}),C=(0,N.useMemo)(()=>F1(r,`documents`).filter(e=>g.has(e.key)),[r,g]),w=i!=null&&C.length>0&&!l;async function T(){if(w)try{await o({sourceMessageId:e,items:C.map(e=>({entryKey:e.key,reference:N1(e.item)}))}),s.success(UG())}catch(e){let t=T1(e);t.includes(`fetch_in_flight`)?s.error(BG()):t.includes(`no_documentary_agent`)?s.error(LG()):s.error(KG(),e)}}let E=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:sG()}),(0,I.jsx)(`p`,{className:`oc-sources-panel__sub`,children:M1(b)})]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn`,onClick:t,"aria-label":uK(),title:uK(),children:(0,I.jsx)(Wm,{size:16,"aria-hidden":!0})})]}),(0,I.jsxs)(`div`,{className:`oc-sources-panel__search`,children:[(0,I.jsx)(Pm,{size:15,"aria-hidden":!0}),(0,I.jsx)(a1,{value:u,onChange:e=>d(e.target.value),placeholder:pG(),"aria-label":pG()})]}),(0,I.jsx)(`div`,{className:`oc-sources-panel__body`,children:E?(0,I.jsx)(`p`,{className:`oc-sources-panel__empty`,children:(0,I.jsx)(wm,{size:14,className:`oc-iconbtn__spin`,"aria-hidden":!0})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(z1,{icon:(0,I.jsx)(xm,{size:14,"aria-hidden":!0}),label:QW(),count:v.length,expanded:f,onToggle:()=>p(e=>!e),entries:v,selectable:!0,selected:g,onToggle1:x,onToggleAll:e=>S(v.map(e=>e.key),e),attachmentByKey:c}),(0,I.jsx)(z1,{icon:(0,I.jsx)(vee,{size:14,"aria-hidden":!0}),label:YW(),count:y.length,expanded:m,onToggle:()=>h(e=>!e),entries:y,selectable:!1,selected:g,onToggle1:x,onToggleAll:e=>S(y.map(e=>e.key),e),attachmentByKey:c}),v.length===0&&y.length===0?(0,I.jsx)(`p`,{className:`oc-sources-panel__empty`,children:gG()}):null]})}),C.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:SG({count:C.length})}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,disabled:!w,onClick:()=>void T(),children:[l?(0,I.jsx)(wm,{size:14,className:`oc-iconbtn__spin`,"aria-hidden":!0}):(0,I.jsx)(Ree,{size:14,"aria-hidden":!0}),TG()]})]}),(0,I.jsx)(`p`,{className:`oc-sources-panel__acthint`,children:i==null?LG():l?BG():OG()})]}):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)(fm,{size:14,"aria-hidden":!0}):(0,I.jsx)(pm,{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)(A1,{checked:d,onCheckedChange:e=>l(e===!0)}),(0,I.jsx)(`span`,{children:yG()})]}):null,a.map(e=>(0,I.jsx)(T4e,{entry:e,selectable:o,selected:s.has(e.key),onToggle:()=>c(e.key),attachment:u.get(e.key)},e.key))]}):null]})}function T4e({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=P1(u),f=typeof u.score==`number`?Math.max(0,Math.min(1,u.score)):null,p=e.group===`documents`;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)(A1,{checked:n,onCheckedChange:r})}):null,(0,I.jsxs)(`div`,{className:`oc-srccard__body`,children:[(0,I.jsx)(`div`,{className:`oc-srccard__title`,children:N1(u)}),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:tG({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?sK():iK()}):null]}):null,p?(0,I.jsx)(E4e,{attachment:i}):null]})]})}function E4e({attachment:e}){if(e?.status===`ready`&&e.url){let t=e.filename??QG();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:QG(),children:[(0,I.jsx)(ym,{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)(wm,{size:13,"aria-hidden":!0}),YG()]}):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)(Wm,{size:13,"aria-hidden":!0}),tK()]}):(0,I.jsxs)(`div`,{className:`oc-srccard__origin`,"aria-disabled":!0,children:[(0,I.jsx)(ym,{size:13,"aria-hidden":!0}),PG()]})}var D4e=`oc.sidebar.width`,B1=`oc.sidebar.collapsed`,V1=200,H1=520,O4e=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 k4e(){let{width:e,startResize:t}=G1({storageKey:D4e,defaultWidth:O4e,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)(yx,{"data-slot":`sheet`,...e})}function A4e({...e}){return(0,I.jsx)(bx,{"data-slot":`sheet-portal`,...e})}function j4e({className:e,...t}){return(0,I.jsx)(xx,{"data-slot":`sheet-overlay`,className:W$(`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)(A4e,{children:[(0,I.jsx)(j4e,{}),(0,I.jsxs)(Sx,{"data-slot":`sheet-content`,"data-side":n,className:W$(`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)(Tx,{"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)(Wm,{}),(0,I.jsx)(`span`,{className:`sr-only`,children:qQ()})]})})]})]})}function J1({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`sheet-header`,className:W$(`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:W$(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function X1({className:e,...t}){return(0,I.jsx)(Cx,{"data-slot":`sheet-title`,className:W$(`font-heading text-base font-medium text-foreground`,e),...t})}function Z1({className:e,...t}){return(0,I.jsx)(wx,{"data-slot":`sheet-description`,className:W$(`text-sm text-muted-foreground`,e),...t})}function M4e({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 N4e=(e,t)=>typeof e==`string`?e===t:JSON.stringify(e)===JSON.stringify(t),P4e=(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))&&N4e(e.children,t.children)},Q1=(e,t)=>P4e(e.node,t.node),$1=(0,N.createContext)(null),F4e=()=>(0,N.useContext)($1)!==null,I4e=(0,N.memo)(({children:e,...t})=>(0,I.jsx)($1.Provider,{value:t,children:e}),Q1),L4e=({node:e,...t})=>(0,I.jsx)(`pre`,{...t}),R4e=({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})}),z4e=()=>null,B4e=({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}),V4e=({node:e,components:{Pre:t,Code:n,SyntaxHighlighter:r,CodeHeader:i},componentsByLanguage:a={},children:o,...s})=>{let c=n0((0,N.useContext)($1)),l=My(e=>(0,I.jsx)(t,{...c(e)})),u=n0(s),d=My(e=>(0,I.jsx)(n,{...u(e)})),f=/language-(\w+)/.exec(s.className||``)?.[1]??``;return typeof o==`string`?(0,I.jsx)(B4e,{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})},H4e=(0,N.memo)(({node:e,components:t,componentsByLanguage:n,...r})=>F4e()?(0,I.jsx)(V4e,{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 U4e(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var W4e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G4e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,K4e={};function r0(e,t){return((t||K4e).jsx?G4e:W4e).test(e)}var q4e=/[ \t\n\f\r]/g;function J4e(e){return typeof e==`object`?e.type===`text`?i0(e.value):!1:i0(e)}function i0(e){return e.replace(q4e,``)===``}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}),Y4e=0,u0=g0(),d0=g0(),f0=g0(),Z=g0(),p0=g0(),m0=g0(),h0=g0();function g0(){return 2**++Y4e}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 X4e=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}),Z4e=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()}}),Q4e={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`},$4e=/[A-Z]/g,D0=/-[a-z]/g,e3e=/^data[-\w.:]+$/i;function t3e(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`&&e3e.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(D0,r3e);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!D0.test(e)){let n=e.replace($4e,n3e);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=v0}return new i(r,t)}function n3e(e){return`-`+e.toLowerCase()}function r3e(e){return e.charAt(1).toUpperCase()}var i3e=o0([x0,X4e,w0,T0,E0],`html`),O0=o0([x0,Z4e,w0,T0,E0],`svg`);function a3e(e){return e.join(` `).trim()}var o3e=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})),s3e=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(o3e());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}})),c3e=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))}})),l3e=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(s3e()),r=c3e();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 u3e(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 d3e=u(l3e(),1),L0={}.hasOwnProperty,f3e=new Map,p3e=/[A-Z]/g,m3e=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),h3e=new Set([`td`,`th`]);function g3e(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=w3e(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=C3e(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:i3e,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 _3e(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return v3e(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return b3e(e,t,n);if(t.type===`mdxjsEsm`)return y3e(e,t);if(t.type===`root`)return x3e(e,t,n);if(t.type===`text`)return S3e(e,t)}function _3e(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=T3e(e,t),s=V0(e,t);return m3e.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!J4e(e):!0})),z0(e,o,a,t),B0(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function v3e(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 y3e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);U0(e,t.position)}function b3e(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=E3e(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 x3e(e,t,n){let r={};return B0(r,V0(e,t)),e.create(t,e.Fragment,r,n)}function S3e(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 C3e(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 w3e(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 T3e(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&L0.call(t.properties,i)){let a=D3e(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&h3e.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 E3e(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:f3e;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 D3e(e,t,n){let r=t3e(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?U4e(n):a3e(n)),r.property===`style`){let t=typeof n==`object`?n:O3e(e,String(n));return e.stylePropertyNameCase===`css`&&(t=k3e(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Q4e[r.property]||r.property:r.attribute,n]}}function O3e(e,t){try{return(0,d3e.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 k3e(e){let t={},n;for(n in e)L0.call(e,n)&&(t[A3e(n)]=e[n]);return t}function A3e(e){let t=e.replace(p3e,j3e);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function j3e(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`]},M3e={};function G0(e,t){let n=t||M3e;return K0(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function K0(e,t,n){if(N3e(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 N3e(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;)P3e(t,e[n]);return t}function P3e(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];F3e(r[a],Array.isArray(e)?e:e?[e]:[])}}}function F3e(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]/),I3e=d2(/[#-'*+\--9=?A-Z^-~]/);function i2(e){return e!==null&&(e<32||e===127)}var a2=d2(/\d/),L3e=d2(/[\dA-Fa-f]/),R3e=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 z3e={tokenize:B3e};function B3e(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 V3e={tokenize:H3e},m2={tokenize:U3e};function H3e(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 U3e(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:W3e,tokenize:G3e};function W3e(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 G3e(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 K3e={name:`autolink`,tokenize:q3e};function q3e(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):I3e(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:J3e};function J3e(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:X3e},exit:Z3e,name:`blockQuote`,tokenize:Y3e};function Y3e(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 X3e(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 Z3e(e){e.exit(`blockQuote`)}var x2={name:`characterEscape`,tokenize:Q3e};function Q3e(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 R3e(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var S2={name:`characterReference`,tokenize:$3e};function $3e(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=L3e,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:t6e},w2={concrete:!0,name:`codeFenced`,tokenize:e6e};function e6e(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 t6e(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:r6e},n6e={partial:!0,tokenize:i6e};function r6e(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(n6e,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 i6e(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 a6e={name:`codeText`,previous:s6e,resolve:o6e,tokenize:c6e};function o6e(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 s6e(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function c6e(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 l6e=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 l6e(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,u6e(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 u6e(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 d6e={resolve:p6e,tokenize:m6e},f6e={partial:!0,tokenize:h6e};function p6e(e){return D2(e),e}function m6e(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(f6e,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 h6e(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 g6e={name:`definition`,tokenize:v6e},_6e={partial:!0,tokenize:y6e};function v6e(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(_6e,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 y6e(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 b6e={name:`hardBreakEscape`,tokenize:x6e};function x6e(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 S6e={name:`headingAtx`,resolve:C6e,tokenize:w6e};function C6e(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 w6e(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 T6e=`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`],E6e={concrete:!0,name:`htmlFlow`,resolveTo:k6e,tokenize:A6e},D6e={partial:!0,tokenize:M6e},O6e={partial:!0,tokenize:j6e};function k6e(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 A6e(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)):T6e.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(D6e,ae,ee)(t)):t===null||o2(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(O6e,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 j6e(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 M6e(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(y2,t,n)}}var N6e={name:`htmlText`,tokenize:P6e};function P6e(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:R6e,resolveTo:z6e,tokenize:B6e},F6e={tokenize:V6e},I6e={tokenize:H6e},L6e={tokenize:U6e};function R6e(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 z6e(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 B6e(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(F6e,u,o?u:d)(t):t===91?e.attempt(I6e,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(L6e,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function V6e(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 H6e(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 U6e(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 W6e={name:`labelStartImage`,resolveAll:N2.resolveAll,tokenize:G6e};function G6e(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 K6e={name:`labelStartLink`,resolveAll:N2.resolveAll,tokenize:q6e};function q6e(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:J6e};function J6e(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:Y6e};function Y6e(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:$6e},exit:t8e,name:`list`,tokenize:Q6e},X6e={partial:!0,tokenize:n8e},Z6e={partial:!0,tokenize:e8e};function Q6e(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(X6e,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 $6e(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(Z6e,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 e8e(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 t8e(e){e.exit(this.containerState.type)}function n8e(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:r8e,tokenize:i8e};function r8e(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 i8e(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 a8e={tokenize:o8e};function o8e(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(d6e,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 s8e={resolveAll:z2()},c8e=R2(`string`),l8e=R2(`text`);function R2(e){return{resolveAll:z2(e===`text`?u8e: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 u8e(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 d8e=s({attentionMarkers:()=>y8e,contentInitial:()=>p8e,disable:()=>b8e,document:()=>f8e,flow:()=>h8e,flowInitial:()=>m8e,insideSpan:()=>v8e,string:()=>g8e,text:()=>_8e}),f8e={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},p8e={91:g6e},m8e={[-2]:T2,[-1]:T2,32:T2},h8e={35:S6e,42:F2,45:[L2,F2],60:E6e,61:L2,95:F2,96:w2,126:w2},g8e={38:S2,92:x2},_8e={[-5]:P2,[-4]:P2,[-3]:P2,33:W6e,38:S2,42:_2,60:[K3e,N6e],91:K6e,92:[b6e,x2],93:N2,95:_2,96:a6e},v8e={null:[_2,s8e]},y8e={null:[42,95]},b8e={null:[]};function x8e(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 C8e(p(e),t)}function p(e){return S8e(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 S8e(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 C8e(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 l8e(e){let t={constructs:$0([X6e,...(e||{}).extensions||[]]),content:n(w3e),defined:[],document:n(E3e),flow:n(W6e),lazy:{},string:n(q6e),text:n(J6e)};return t;function n(e){return n;function n(n){return o8e(t,e,n)}}}function u8e(e){for(;!D2(e););return e}var B2=/[\0\t\n\r]/g;function d8e(){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 f8e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function p8e(e){return e.replace(f8e,m8e)}function m8e(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 h8e(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),g8e(n)(u8e(l8e(n).document().write(d8e()(e,t,!0))))}function g8e(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=p8e(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):_8e(e,r)}}function _8e(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 v8e(e){let t=this;t.parser=n;function n(n){return h8e(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function y8e(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 b8e(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
134
- `}]}function x8e(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 S8e(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C8e(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function w8e(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=f2(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 T8e(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 E8e(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function G2(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 D8e(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return G2(e,t);let i={src:f2(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 O8e(e,t){let n={src:f2(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 k8e(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 A8e(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return G2(e,t);let i={href:f2(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 j8e(e,t){let n={href:f2(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 M8e(e,t,n){let r=e.all(t),i=n?N8e(n):K2(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:`
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 w8e(e){let t={constructs:$0([d8e,...(e||{}).extensions||[]]),content:n(z3e),defined:[],document:n(V3e),flow:n(a8e),lazy:{},string:n(c8e),text:n(l8e)};return t;function n(e){return n;function n(n){return x8e(t,e,n)}}}function T8e(e){for(;!D2(e););return e}var B2=/[\0\t\n\r]/g;function E8e(){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 D8e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function O8e(e){return e.replace(D8e,k8e)}function k8e(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 A8e(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),j8e(n)(T8e(w8e(n).document().write(E8e()(e,t,!0))))}function j8e(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=O8e(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):M8e(e,r)}}function M8e(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 N8e(e){let t=this;t.parser=n;function n(n){return A8e(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function P8e(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 F8e(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
134
+ `}]}function I8e(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 L8e(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function R8e(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function z8e(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=f2(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 B8e(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 V8e(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function G2(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 H8e(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return G2(e,t);let i={src:f2(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 U8e(e,t){let n={src:f2(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 W8e(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 G8e(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return G2(e,t);let i={href:f2(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 K8e(e,t){let n={href:f2(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 q8e(e,t,n){let r=e.all(t),i=n?J8e(n):K2(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 N8e(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=K2(n[r])}return t}function K2(e){return e.spread??e.children.length>1}function P8e(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 F8e(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function I8e(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function L8e(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function R8e(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=A0(t.children[1]),o=k0(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 z8e(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 B8e(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var q2=9,J2=32;function V8e(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Y2(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Y2(t.slice(i),i>0,!1)),a.join(``)}function Y2(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===q2||t===J2;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===q2||t===J2;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function H8e(e,t){let n={type:`text`,value:V8e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function U8e(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var W8e={blockquote:y8e,break:b8e,code:x8e,delete:S8e,emphasis:C8e,footnoteReference:w8e,heading:T8e,html:E8e,imageReference:D8e,image:O8e,inlineCode:k8e,linkReference:A8e,link:j8e,listItem:M8e,list:P8e,paragraph:F8e,root:I8e,strong:L8e,table:R8e,tableCell:B8e,tableRow:z8e,text:H8e,thematicBreak:U8e,toml:X2,yaml:X2,definition:X2,footnoteDefinition:X2};function X2(){}var G8e=typeof self==`object`?self:globalThis,Z2=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new G8e[e](t)},K8e=(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(Z2(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(Z2(a,o),i)};return r},Q2=e=>K8e(new Map,e)(0),$2=``,{toString:q8e}={},{keys:J8e}=Object,e4=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=q8e.call(e).slice(8,-1);switch(n){case`Array`:return[1,$2];case`Object`:return[2,$2];case`Date`:return[3,$2];case`RegExp`:return[4,$2];case`Map`:return[5,$2];case`Set`:return[6,$2];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},t4=([e,t])=>e===0&&(t===`function`||t===`symbol`),Y8e=(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]=e4(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 J8e(r))(e||!t4(e4(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||!(t4(e4(n))||t4(e4(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!t4(e4(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},n4=(e,{json:t,lossy:n}={})=>{let r=[];return Y8e(!(t||n),!!t,new Map,r)(e),r},r4=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Q2(n4(e,t)):structuredClone(e):(e,t)=>Q2(n4(e,t));function X8e(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 Z8e(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Q8e(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||X8e,r=e.options.footnoteBackLabel||Z8e,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=f2(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:{...r4(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
137
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function J8e(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=K2(n[r])}return t}function K2(e){return e.spread??e.children.length>1}function Y8e(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 X8e(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Z8e(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Q8e(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $8e(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=A0(t.children[1]),o=k0(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 e5e(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 t5e(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var q2=9,J2=32;function n5e(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Y2(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Y2(t.slice(i),i>0,!1)),a.join(``)}function Y2(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===q2||t===J2;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===q2||t===J2;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function r5e(e,t){let n={type:`text`,value:n5e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function i5e(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var a5e={blockquote:P8e,break:F8e,code:I8e,delete:L8e,emphasis:R8e,footnoteReference:z8e,heading:B8e,html:V8e,imageReference:H8e,image:U8e,inlineCode:W8e,linkReference:G8e,link:K8e,listItem:q8e,list:Y8e,paragraph:X8e,root:Z8e,strong:Q8e,table:$8e,tableCell:t5e,tableRow:e5e,text:r5e,thematicBreak:i5e,toml:X2,yaml:X2,definition:X2,footnoteDefinition:X2};function X2(){}var o5e=typeof self==`object`?self:globalThis,Z2=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new o5e[e](t)},s5e=(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(Z2(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(Z2(a,o),i)};return r},Q2=e=>s5e(new Map,e)(0),$2=``,{toString:c5e}={},{keys:l5e}=Object,e4=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=c5e.call(e).slice(8,-1);switch(n){case`Array`:return[1,$2];case`Object`:return[2,$2];case`Date`:return[3,$2];case`RegExp`:return[4,$2];case`Map`:return[5,$2];case`Set`:return[6,$2];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},t4=([e,t])=>e===0&&(t===`function`||t===`symbol`),u5e=(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]=e4(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 l5e(r))(e||!t4(e4(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||!(t4(e4(n))||t4(e4(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!t4(e4(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},n4=(e,{json:t,lossy:n}={})=>{let r=[];return u5e(!(t||n),!!t,new Map,r)(e),r},r4=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Q2(n4(e,t)):structuredClone(e):(e,t)=>Q2(n4(e,t));function d5e(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 f5e(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function p5e(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||d5e,r=e.options.footnoteBackLabel||f5e,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=f2(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:{...r4(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 i4=(function(e){if(e==null)return n5e;if(typeof e==`function`)return a4(e);if(typeof e==`object`)return Array.isArray(e)?$8e(e):e5e(e);if(typeof e==`string`)return t5e(e);throw Error(`Expected function, string, or object as test`)});function $8e(e){let t=[],n=-1;for(;++n<e.length;)t[n]=i4(e[n]);return a4(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function e5e(e){let t=e;return a4(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function t5e(e){return a4(t);function t(t){return t&&t.type===e}}function a4(e){return t;function t(t,n,r){return!!(r5e(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function n5e(){return!0}function r5e(e){return typeof e==`object`&&!!e&&`type`in e}function i5e(e){return e}var o4=[];function s4(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=i4(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 (`+i5e(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=o4,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=a5e(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 a5e(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?o4:[e]}function c4(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),s4(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 l4={}.hasOwnProperty,o5e={};function s5e(e,t){let n=t||o5e,r=new Map,i=new Map,a={all:s,applyData:l5e,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...W8e,...n.handlers},one:o,options:n,patch:c5e,wrap:d5e};return c4(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(l4.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=r4(n);return r.children=a.all(e),r}return r4(e)}return(a.options.unknownHandler||u5e)(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=u4(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=u4(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function c5e(e,t){e.position&&(t.position=Y4e(e))}function l5e(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,r4(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function u5e(e,t){let n=t.data||{},r=`value`in t&&!(l4.call(n,`hProperties`)||l4.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 d5e(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
139
+ `}]}}var i4=(function(e){if(e==null)return _5e;if(typeof e==`function`)return a4(e);if(typeof e==`object`)return Array.isArray(e)?m5e(e):h5e(e);if(typeof e==`string`)return g5e(e);throw Error(`Expected function, string, or object as test`)});function m5e(e){let t=[],n=-1;for(;++n<e.length;)t[n]=i4(e[n]);return a4(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function h5e(e){let t=e;return a4(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function g5e(e){return a4(t);function t(t){return t&&t.type===e}}function a4(e){return t;function t(t,n,r){return!!(v5e(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function _5e(){return!0}function v5e(e){return typeof e==`object`&&!!e&&`type`in e}function y5e(e){return e}var o4=[];function s4(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=i4(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 (`+y5e(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=o4,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=b5e(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 b5e(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?o4:[e]}function c4(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),s4(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 l4={}.hasOwnProperty,x5e={};function S5e(e,t){let n=t||x5e,r=new Map,i=new Map,a={all:s,applyData:w5e,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...a5e,...n.handlers},one:o,options:n,patch:C5e,wrap:E5e};return c4(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(l4.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=r4(n);return r.children=a.all(e),r}return r4(e)}return(a.options.unknownHandler||T5e)(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=u4(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=u4(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function C5e(e,t){e.position&&(t.position=u3e(e))}function w5e(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,r4(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function T5e(e,t){let n=t.data||{},r=`value`in t&&!(l4.call(n,`hProperties`)||l4.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 E5e(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 u4(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function d4(e,t){let n=s5e(e,t),r=n.one(e,void 0),i=Q8e(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 f5e(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 p5e=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 m5e(){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?h5e(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 h5e(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:g5e,dirname:_5e,extname:v5e,join:y5e,sep:`/`};function g5e(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 _5e(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 v5e(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 y5e(...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?`.`:b5e(n)}function b5e(e){h4(e);let t=e.codePointAt(0)===47,n=x5e(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function x5e(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 S5e={cwd:C5e};function C5e(){return`/`}function g4(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function w5e(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 T5e(e)}function T5e(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`||E5e(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:S5e.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=w5e(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 E5e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var D5e=(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(p5e(),1),O5e={}.hasOwnProperty,k5e=new class e extends D5e{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=m5e()}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):O5e.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);j5e(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 A5e(e)?e:new v4(e)}function A5e(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function j5e(e){return typeof e==`string`||M5e(e)}function M5e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var k4=[],A4={allowDangerousHtml:!0},N5e=/^(https?|ircs?|mailto|xmpp)$/i,P5e=[{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 F5e(e){let t=I5e(e),n=L5e(e);return R5e(t.runSync(t.parse(n),n),e)}function I5e(e){let t=e.rehypePlugins||k4,n=e.remarkPlugins||k4,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...A4}:A4;return k5e().use(v8e).use(n).use(f5e,r).use(t)}function L5e(e){let t=e.children||``,n=new v4;return typeof t==`string`?n.value=t:``+t,n}function R5e(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||z5e;for(let e of P5e)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return c4(e,l),t3e(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 z5e(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||N5e.test(e.slice(0,t))?e:``}var{useSmooth:B5e,useSmoothStatus:V5e,withSmoothContextProvider:H5e}=Qde,U5e=({components:e,componentsByLanguage:t,smooth:n=!0,preprocess:r,...i})=>{let a=WD(),{text:o}=B5e((0,N.useMemo)(()=>r?{...a,text:r(a.text)}:a,[a,r]),n),{pre:s=S4e,code:c=C4e,SyntaxHighlighter:l=e0,CodeHeader:u=w4e}=e??{},d=(0,N.useMemo)(()=>({Pre:s,Code:c,SyntaxHighlighter:l,CodeHeader:u}),[s,c,l,u]),f=My(e=>(0,I.jsx)(D4e,{components:d,componentsByLanguage:t,...e}));return(0,I.jsx)(F5e,{components:(0,N.useMemo)(()=>{let{pre:t,code:n,SyntaxHighlighter:r,CodeHeader:i,...a}=e??{};return{...a,pre:x4e,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":V5e().type,...t,className:(0,t0.default)(e,t?.className),ref:i,children:(0,I.jsx)(U5e,{...r})}));j4.displayName=`MarkdownTextPrimitive`;var W5e=H5e(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 G5e(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function K5e(e,t,n){let r=i4((n||{}).ignore||[]),i=q5e(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 q5e(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([J5e(e[0]),Y5e(e[1])])}return t}function J5e(e){return typeof e==`string`?new RegExp(G5e(e),`g`):e}function Y5e(e){return typeof e==`function`?e:function(){return e}}var N4=`phrasing`,P4=[`autolink`,`link`,`image`,`label`];function X5e(){return{transforms:[r7e],enter:{literalAutolink:Q5e,literalAutolinkEmail:F4,literalAutolinkHttp:F4,literalAutolinkWww:F4},exit:{literalAutolink:n7e,literalAutolinkEmail:t7e,literalAutolinkHttp:$5e,literalAutolinkWww:e7e}}}function Z5e(){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 Q5e(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function F4(e){this.config.enter.autolinkProtocol.call(this,e)}function $5e(e){this.config.exit.autolinkProtocol.call(this,e)}function e7e(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 t7e(e){this.config.exit.autolinkEmail.call(this,e)}function n7e(e){this.exit(e)}function r7e(e){K5e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,i7e],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,a7e]],{ignore:[`link`,`linkReference`]})}function i7e(e,t,n,r,i){let a=``;if(!I4(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!o7e(n)))return!1;let o=s7e(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 a7e(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 o7e(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 s7e(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=g7e;function c7e(){this.buffer()}function l7e(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function u7e(){this.buffer()}function d7e(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function f7e(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 p7e(e){this.exit(e)}function m7e(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 h7e(e){this.exit(e)}function g7e(){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 _7e(){return{enter:{gfmFootnoteCallString:c7e,gfmFootnoteCall:l7e,gfmFootnoteDefinitionLabelString:u7e,gfmFootnoteDefinition:d7e},exit:{gfmFootnoteCallString:f7e,gfmFootnoteCall:p7e,gfmFootnoteDefinitionLabelString:m7e,gfmFootnoteDefinition:h7e}}}function v7e(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?R4:y7e))),s(),o}}function y7e(e,t,n){return t===0?e:R4(e,t,n)}function R4(e,t,n){return(n?``:` `)+e}var b7e=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];z4.peek=T7e;function x7e(){return{canContainEols:[`delete`],enter:{strikethrough:C7e},exit:{strikethrough:w7e}}}function S7e(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:b7e}],handlers:{delete:z4}}}function C7e(e){this.enter({type:`delete`,children:[]},e)}function w7e(e){this.exit(e)}function z4(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 T7e(){return`~`}function E7e(e){return e.length}function D7e(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||E7e,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=O7e(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]=B4(r[d]);else{let e=B4(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 O7e(e){return e==null?``:String(e)}function B4(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 k7e(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()),A7e);return i(),o}function A7e(e,t,n){return`>`+(n?``:` `)+e}function j7e(e,t){return V4(e,t.inConstruct,!0)&&!V4(e,t.notInConstruct,!1)}function V4(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 H4(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
146
- `&&j7e(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
147
- `}function M7e(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 N7e(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 P7e(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function F7e(e,t,n,r){let i=P7e(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(N7e(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,I7e);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(M7e(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:`
142
+ `}),n}function u4(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function d4(e,t){let n=S5e(e,t),r=n.one(e,void 0),i=p5e(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 D5e(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 O5e=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 k5e(){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?A5e(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 A5e(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:j5e,dirname:M5e,extname:N5e,join:P5e,sep:`/`};function j5e(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 M5e(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 N5e(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 P5e(...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?`.`:F5e(n)}function F5e(e){h4(e);let t=e.codePointAt(0)===47,n=I5e(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function I5e(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 L5e={cwd:R5e};function R5e(){return`/`}function g4(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function z5e(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 B5e(e)}function B5e(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`||V5e(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:L5e.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=z5e(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 V5e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var H5e=(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(O5e(),1),U5e={}.hasOwnProperty,W5e=new class e extends H5e{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=k5e()}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):U5e.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);K5e(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 G5e(e)?e:new v4(e)}function G5e(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function K5e(e){return typeof e==`string`||q5e(e)}function q5e(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var k4=[],A4={allowDangerousHtml:!0},J5e=/^(https?|ircs?|mailto|xmpp)$/i,Y5e=[{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 X5e(e){let t=Z5e(e),n=Q5e(e);return $5e(t.runSync(t.parse(n),n),e)}function Z5e(e){let t=e.rehypePlugins||k4,n=e.remarkPlugins||k4,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...A4}:A4;return W5e().use(N8e).use(n).use(D5e,r).use(t)}function Q5e(e){let t=e.children||``,n=new v4;return typeof t==`string`?n.value=t:``+t,n}function $5e(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||e7e;for(let e of Y5e)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return c4(e,l),g3e(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 e7e(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||J5e.test(e.slice(0,t))?e:``}var{useSmooth:t7e,useSmoothStatus:n7e,withSmoothContextProvider:r7e}=Qde,i7e=({components:e,componentsByLanguage:t,smooth:n=!0,preprocess:r,...i})=>{let a=WD(),{text:o}=t7e((0,N.useMemo)(()=>r?{...a,text:r(a.text)}:a,[a,r]),n),{pre:s=L4e,code:c=R4e,SyntaxHighlighter:l=e0,CodeHeader:u=z4e}=e??{},d=(0,N.useMemo)(()=>({Pre:s,Code:c,SyntaxHighlighter:l,CodeHeader:u}),[s,c,l,u]),f=My(e=>(0,I.jsx)(H4e,{components:d,componentsByLanguage:t,...e}));return(0,I.jsx)(X5e,{components:(0,N.useMemo)(()=>{let{pre:t,code:n,SyntaxHighlighter:r,CodeHeader:i,...a}=e??{};return{...a,pre:I4e,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":n7e().type,...t,className:(0,t0.default)(e,t?.className),ref:i,children:(0,I.jsx)(i7e,{...r})}));j4.displayName=`MarkdownTextPrimitive`;var a7e=r7e(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 o7e(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function s7e(e,t,n){let r=i4((n||{}).ignore||[]),i=c7e(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 c7e(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([l7e(e[0]),u7e(e[1])])}return t}function l7e(e){return typeof e==`string`?new RegExp(o7e(e),`g`):e}function u7e(e){return typeof e==`function`?e:function(){return e}}var N4=`phrasing`,P4=[`autolink`,`link`,`image`,`label`];function d7e(){return{transforms:[v7e],enter:{literalAutolink:p7e,literalAutolinkEmail:F4,literalAutolinkHttp:F4,literalAutolinkWww:F4},exit:{literalAutolink:_7e,literalAutolinkEmail:g7e,literalAutolinkHttp:m7e,literalAutolinkWww:h7e}}}function f7e(){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 p7e(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function F4(e){this.config.enter.autolinkProtocol.call(this,e)}function m7e(e){this.config.exit.autolinkProtocol.call(this,e)}function h7e(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 g7e(e){this.config.exit.autolinkEmail.call(this,e)}function _7e(e){this.exit(e)}function v7e(e){s7e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,y7e],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,b7e]],{ignore:[`link`,`linkReference`]})}function y7e(e,t,n,r,i){let a=``;if(!I4(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!x7e(n)))return!1;let o=S7e(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 b7e(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 x7e(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 S7e(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=j7e;function C7e(){this.buffer()}function w7e(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function T7e(){this.buffer()}function E7e(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function D7e(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 O7e(e){this.exit(e)}function k7e(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 A7e(e){this.exit(e)}function j7e(){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 M7e(){return{enter:{gfmFootnoteCallString:C7e,gfmFootnoteCall:w7e,gfmFootnoteDefinitionLabelString:T7e,gfmFootnoteDefinition:E7e},exit:{gfmFootnoteCallString:D7e,gfmFootnoteCall:O7e,gfmFootnoteDefinitionLabelString:k7e,gfmFootnoteDefinition:A7e}}}function N7e(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?R4:P7e))),s(),o}}function P7e(e,t,n){return t===0?e:R4(e,t,n)}function R4(e,t,n){return(n?``:` `)+e}var F7e=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];z4.peek=B7e;function I7e(){return{canContainEols:[`delete`],enter:{strikethrough:R7e},exit:{strikethrough:z7e}}}function L7e(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:F7e}],handlers:{delete:z4}}}function R7e(e){this.enter({type:`delete`,children:[]},e)}function z7e(e){this.exit(e)}function z4(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 B7e(){return`~`}function V7e(e){return e.length}function H7e(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||V7e,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=U7e(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]=B4(r[d]);else{let e=B4(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 U7e(e){return e==null?``:String(e)}function B4(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 W7e(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()),G7e);return i(),o}function G7e(e,t,n){return`>`+(n?``:` `)+e}function K7e(e,t){return V4(e,t.inConstruct,!0)&&!V4(e,t.notInConstruct,!1)}function V4(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 H4(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
146
+ `&&K7e(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
147
+ `}function q7e(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 J7e(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 Y7e(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function X7e(e,t,n,r){let i=Y7e(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(J7e(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Z7e);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(q7e(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 I7e(e,t,n){return(n?``:` `)+e}function U4(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function L7e(e,t,n,r){let i=U4(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 R7e(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function W4(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function G4(e,t,n){let r=h2(e),i=h2(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}}K4.peek=z7e;function K4(e,t,n,r){let i=R7e(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=G4(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=W4(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=G4(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+W4(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function z7e(e,t,n){return n.options.emphasis||`*`}function B7e(e,t){let n=!1;return c4(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)&&G0(e)&&(t.options.setext||n))}function V7e(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(B7e(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
150
+ `)),u+=s.move(c),l(),u}function Z7e(e,t,n){return(n?``:` `)+e}function U4(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Q7e(e,t,n,r){let i=U4(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 $7e(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function W4(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function G4(e,t,n){let r=h2(e),i=h2(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}}K4.peek=e9e;function K4(e,t,n,r){let i=$7e(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=G4(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=W4(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=G4(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+W4(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function e9e(e,t,n){return n.options.emphasis||`*`}function t9e(e,t){let n=!1;return c4(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)&&G0(e)&&(t.options.setext||n))}function n9e(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(t9e(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=W4(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}q4.peek=H7e;function q4(e){return e.value||``}function H7e(){return`<`}J4.peek=U7e;function J4(e,t,n,r){let i=U4(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 U7e(){return`!`}Y4.peek=W7e;function Y4(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 W7e(){return`!`}X4.peek=G7e;function X4(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 G7e(){return"`"}function Z4(e,t){let n=G0(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))}Q4.peek=K7e;function Q4(e,t,n,r){let i=U4(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Z4(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 K7e(e,t,n){return Z4(e,n)?`<`:`[`}$4.peek=q7e;function $4(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 q7e(){return`[`}function e3(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 J7e(e){let t=e3(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 Y7e(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function t3(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 X7e(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Y7e(n):e3(n),s=e.ordered?o===`.`?`)`:`.`:J7e(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),t3(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 Z7e(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 Q7e(e,t,n,r){let i=Z7e(n),a=n.bulletCurrent||e3(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 $7e(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var e9e=i4([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function t9e(e,t,n,r){return(e.children.some(function(e){return e9e(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function n9e(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}n3.peek=r9e;function n3(e,t,n,r){let i=n9e(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=G4(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=W4(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=G4(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+W4(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function r9e(e,t,n){return n.options.strong||`*`}function i9e(e,t,n,r){return n.safe(e.value,r)}function a9e(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 o9e(e,t,n){let r=(t3(n)+(n.options.ruleSpaces?` `:``)).repeat(a9e(n));return n.options.ruleSpaces?r.slice(0,-1):r}var r3={blockquote:k7e,break:H4,code:F7e,definition:L7e,emphasis:K4,hardBreak:H4,heading:V7e,html:q4,image:J4,imageReference:Y4,inlineCode:X4,link:Q4,linkReference:$4,list:X7e,listItem:Q7e,paragraph:$7e,root:t9e,strong:n3,text:i9e,thematicBreak:o9e};function s9e(){return{enter:{table:c9e,tableData:a3,tableHeader:a3,tableRow:u9e},exit:{codeText:d9e,table:l9e,tableData:i3,tableHeader:i3,tableRow:i3}}}function c9e(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 l9e(e){this.exit(e),this.data.inTable=void 0}function u9e(e){this.enter({type:`tableRow`,children:[]},e)}function i3(e){this.exit(e)}function a3(e){this.enter({type:`tableCell`,children:[]},e)}function d9e(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,f9e));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function f9e(e,t){return t===`|`?t:e}function p9e(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
156
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=W4(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}q4.peek=r9e;function q4(e){return e.value||``}function r9e(){return`<`}J4.peek=i9e;function J4(e,t,n,r){let i=U4(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 i9e(){return`!`}Y4.peek=a9e;function Y4(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 a9e(){return`!`}X4.peek=o9e;function X4(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 o9e(){return"`"}function Z4(e,t){let n=G0(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))}Q4.peek=s9e;function Q4(e,t,n,r){let i=U4(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Z4(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 s9e(e,t,n){return Z4(e,n)?`<`:`[`}$4.peek=c9e;function $4(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 c9e(){return`[`}function e3(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 l9e(e){let t=e3(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 u9e(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function t3(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 d9e(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?u9e(n):e3(n),s=e.ordered?o===`.`?`)`:`.`:l9e(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),t3(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 f9e(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 p9e(e,t,n,r){let i=f9e(n),a=n.bulletCurrent||e3(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 m9e(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var h9e=i4([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function g9e(e,t,n,r){return(e.children.some(function(e){return h9e(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function _9e(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}n3.peek=v9e;function n3(e,t,n,r){let i=_9e(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=G4(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=W4(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=G4(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+W4(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function v9e(e,t,n){return n.options.strong||`*`}function y9e(e,t,n,r){return n.safe(e.value,r)}function b9e(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 x9e(e,t,n){let r=(t3(n)+(n.options.ruleSpaces?` `:``)).repeat(b9e(n));return n.options.ruleSpaces?r.slice(0,-1):r}var r3={blockquote:W7e,break:H4,code:X7e,definition:Q7e,emphasis:K4,hardBreak:H4,heading:n9e,html:q4,image:J4,imageReference:Y4,inlineCode:X4,link:Q4,linkReference:$4,list:d9e,listItem:p9e,paragraph:m9e,root:g9e,strong:n3,text:y9e,thematicBreak:x9e};function S9e(){return{enter:{table:C9e,tableData:a3,tableHeader:a3,tableRow:T9e},exit:{codeText:E9e,table:w9e,tableData:i3,tableHeader:i3,tableRow:i3}}}function C9e(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 w9e(e){this.exit(e),this.data.inTable=void 0}function T9e(e){this.enter({type:`tableRow`,children:[]},e)}function i3(e){this.exit(e)}function a3(e){this.enter({type:`tableCell`,children:[]},e)}function E9e(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,D9e));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function D9e(e,t){return t===`|`?t:e}function O9e(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 D7e(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 m9e(){return{exit:{taskListCheckValueChecked:o3,taskListCheckValueUnchecked:o3,paragraph:g9e}}}function h9e(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:_9e}}}function o3(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function g9e(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 _9e(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 v9e(){return[X5e(),_7e(),x7e(),s9e(),m9e()]}function y9e(e){return{extensions:[Z5e(),v7e(e),S7e(),p9e(e),h9e()]}}var b9e={tokenize:E9e,partial:!0},s3={tokenize:D9e,partial:!0},c3={tokenize:O9e,partial:!0},l3={tokenize:k9e,partial:!0},x9e={tokenize:A9e,partial:!0},u3={name:`wwwAutolink`,tokenize:w9e,previous:h3},d3={name:`protocolAutolink`,tokenize:T9e,previous:g3},f3={name:`emailAutolink`,tokenize:C9e,previous:_3},p3={};function S9e(){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 C9e(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(x9e,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 w9e(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(b9e,e.attempt(s3,e.attempt(c3,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function T9e(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 E9e(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 D9e(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 O9e(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 k9e(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 A9e(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 j9e={tokenize:z9e,partial:!0};function M9e(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:I9e,continuation:{tokenize:L9e},exit:R9e}},text:{91:{name:`gfmFootnoteCall`,tokenize:F9e},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:N9e,resolveTo:P9e}}}}function N9e(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 P9e(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 F9e(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 I9e(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 L9e(e,t,n){return e.check(y2,t,e.attempt(j9e,t,n))}function R9e(e){e.exit(`gfmFootnoteDefinition`)}function z9e(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 B9e(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 V9e=class{constructor(){this.map=[]}add(e,t,n){H9e(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 H9e(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 U9e(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 W9e(){return{flow:{null:{name:`table`,tokenize:G9e,resolveAll:K9e}}}}function G9e(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 K9e(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 V9e;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=U9e(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 q9e={name:`tasklistCheck`,tokenize:Y9e};function J9e(){return{text:{91:q9e}}}function Y9e(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:X9e},t,n)(r):n(r)}}function X9e(e,t,n){return p2(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Z9e(e){return $0([S9e(),M9e(),B9e(e),W9e(),J9e()])}var Q9e={};function $9e(e){let t=this,n=e||Q9e,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Z9e(n)),a.push(v9e()),o.push(y9e(n))}function eet(e){return typeof e==`string`&&/^(https?:|mailto:)/i.test(e.trim())}function tet({href:e,children:t,...n}){return eet(e)?(0,I.jsx)(`a`,{...n,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,I.jsx)(`span`,{...n,children:t})}var net=(0,N.memo)(function(){return(0,I.jsx)(W5e,{remarkPlugins:[$9e],className:`oc-md`,components:{a:tet}})});function C3(e){return(0,I.jsx)(NT,{"data-slot":`select`,...e})}function w3(e){return(0,I.jsx)(LT,{"data-slot":`select-value`,...e})}function T3({className:e,size:t=`default`,children:n,...r}){return(0,I.jsxs)(FT,{"data-slot":`select-trigger`,"data-size":t,className:W$(`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)(RT,{asChild:!0,children:(0,I.jsx)(fm,{className:`size-4 opacity-50`})})]})}function E3({className:e,children:t,position:n=`popper`,...r}){return(0,I.jsx)(BT,{children:(0,I.jsxs)(HT,{"data-slot":`select-content`,className:W$(`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)(lE,{className:`flex cursor-default items-center justify-center py-1`,children:(0,I.jsx)(mm,{className:`size-4`})}),(0,I.jsx)(QT,{className:W$(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,I.jsx)(dE,{className:`flex cursor-default items-center justify-center py-1`,children:(0,I.jsx)(fm,{className:`size-4`})})]})})}function Q({className:e,children:t,...n}){return(0,I.jsxs)(rE,{"data-slot":`select-item`,className:W$(`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)(sE,{children:(0,I.jsx)(dm,{className:`size-4`})})}),(0,I.jsx)(aE,{children:t})]})}var D3=1e3;function ret(){return[{id:`incorrect`,label:pEe()},{id:`incoherence`,label:gEe()},{id:`altered_words`,label:yEe()},{id:`formatting`,label:SEe()},{id:`latency`,label:TEe()},{id:`api_error`,label:OEe()},{id:`other`,label:mQ()}]}function iet(){return[{id:`altered_words`,label:NEe()},{id:`formatting`,label:IEe()},{id:`other`,label:mQ()}]}function aet(e){return e===`user`?iet():ret()}var oet=[{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 set(){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 oet)try{document.querySelector(n)&&t.push(e)}catch{}return{plugins:e,extensionsDetected:t}}var O3=N.createContext(null);function cet(){let e=N.useContext(O3);if(!e)throw Error(`useFeedback must be used within <FeedbackProvider>`);return e}function uet({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`,...set()}})).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)(m1,{open:n!==null,onOpenChange:p,children:n?(0,I.jsxs)(h1,{className:`sm:max-w-md`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:zEe()}),(0,I.jsx)(y1,{children:h?HEe():g?GEe():JEe()})]}),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:ZEe()}):(0,I.jsx)(`p`,{className:`oc-feedback__fidelity is-warn`,children:eDe()}):(0,I.jsx)(`p`,{className:`oc-feedback__fidelity`,children:rDe()})}):(0,I.jsxs)(`div`,{className:`oc-feedback__form`,children:[(0,I.jsx)(`label`,{className:`oc-feedback__label`,children:oDe()}),(0,I.jsxs)(C3,{value:i,onValueChange:a,children:[(0,I.jsx)(T3,{children:(0,I.jsx)(w3,{placeholder:lDe()})}),(0,I.jsx)(E3,{children:aet(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:fDe()}),(0,I.jsx)(`textarea`,{id:`oc-feedback-comment`,className:`oc-feedback__textarea`,placeholder:hDe(),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)(_1,{children:h?(0,I.jsx)(X,{onClick:()=>p(!1),children:vDe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(X,{variant:`outline`,onClick:()=>p(!1),children:xDe()}),(0,I.jsx)(X,{onClick:()=>void m(),disabled:!i||c,children:c?wDe():DDe()})]})})]}):null})]})}function det(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=cet(),t=my(e=>e.metadata?.custom?.messageId),n=my(e=>e.metadata?.custom?.chatId),r=my(e=>e.role),i=my(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,...det(a.currentTarget,i)})}return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn${o?` is-on`:``}`,title:o?ADe():NDe(),"aria-label":IDe(),onClick:s,children:(0,I.jsx)(Dee,{size:15,"aria-hidden":!0})})}function A3(e,t){return e!=null&&e[t]!==void 0}var fet=[`inherit`,`fast`,`standard`];function pet(e){return e==null||e.fastMode===void 0?`inherit`:e.fastMode?`fast`:`standard`}function met(e){return e===`inherit`?xXe():e===`fast`?ZQ():QQ()}function het(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 get={off:`Off`,minimal:`Min`,low:`Low`,medium:`Med`,high:`High`,xhigh:`XHigh`};function _et(e,t){return get[e]??t}function N3(e,t){return e==null||!t||t<=0?null:Math.round(e/t*100)}function vet(e,t){let n=N3(e,t);return n===null?null:QXe({pct:n,used:j3(e),total:j3(t)})}function yet(e){return iZe({level:e??`full`})}function bet(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?pZe({cost:e.toFixed(2),tokens:j3(t)}):n?gZe({cost:e.toFixed(2)}):r?yZe({tokens:j3(t)}):null}function xet(e){let t=e.filter(e=>typeof e==`string`&&e.length>0);return t.length>0?t.join(` · `):null}var Cet=new Set([`knobThinkingLevel`,`knobModel`,`knobFastMode`,`knobUnset`,`agentFiles`,`sessionCompact`,`configDefaults`]),wet=new Set([`knobThinkingLevel`,`knobModel`]);function P3(e,t){return Cet.has(t)?e==null?wet.has(t):e[t]===!0:!1}function Tet(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 Eet(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)(wm,{size:13,className:`oc-spanel__spin`,"aria-label":YQ()}):t?c?(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__reset`,title:JQ(),"aria-label":JQ(),onClick:n,children:(0,I.jsx)(Nm,{size:12,"aria-hidden":!0})}):null:(0,I.jsx)(`span`,{className:`oc-spanel__badge`,children:rXe()})]}),(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:[uXe(),(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__retry`,onClick:a,children:XQ()})]}):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 Det({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}=Eet(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=pet(n),f=Tet(o,{hasModels:u.length>0,hasLevels:l.length>0});return(0,I.jsxs)(I.Fragment,{children:[f.model?(0,I.jsx)(L3,{label:fU(),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)(Det,{options:u,value:t.model??null,onChange:e=>void r(`model`,e),disabled:s,ariaLabel:fU()})}):null,f.thinking?(0,I.jsx)(L3,{label:hXe(),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:_et(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:vXe(),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:fet.map(e=>({id:e,label:met(e)})),value:d,onChange:e=>void r(`fastMode`,het(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)(wm,{className:`oc-spanel__spin`,"aria-hidden":!0}):null,e]}),t===`done`?(0,I.jsx)(`p`,{className:`oc-spanel__action-note`,role:`status`,children:KZe()}):null,t===`error`?(0,I.jsxs)(`p`,{className:`oc-spanel__error`,role:`alert`,children:[YZe(),(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__retry`,onClick:i,children:XQ()})]}):null]})}function Oet({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=S1(),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:TZe(),description:OZe(),confirmLabel:jZe(),cancelLabel:lW()})&&await h()}async function v(){await c({title:LZe(),description:BZe(),confirmLabel:UZe(),cancelLabel:lW(),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=vet(a?.totalTokens,a?.contextTokens),S=bet(a?.estimatedCostUsd,a?.totalTokens),C=i?.agent??null,w=xet([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:jXe()}),(0,I.jsx)(Z1,{children:PXe()})]}),(0,I.jsx)(`div`,{className:`oc-spanel__body`,children:r===void 0?(0,I.jsx)(`p`,{className:`oc-spanel__loading`,children:GO()}):(0,I.jsxs)(I.Fragment,{children:[a?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{className:`oc-spanel__cat`,children:LXe()}),(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:BXe()}),x!==null&&y!==null?(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:YXe()}),(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:tZe()}),(0,I.jsx)(`span`,{className:`oc-spanel__value`,children:yet(a?.verboseLevel)}),(0,I.jsx)(`p`,{className:`oc-spanel__help`,children:sZe()})]}),S===null?null:(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:uZe()}),(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:UXe()}),(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:KXe()}),s(`sessionCompact`)?(0,I.jsx)(B3,{label:SZe(),state:d,onClick:()=>void _(),onRetry:()=>void h()}):null,(0,I.jsx)(B3,{label:PZe(),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=r$();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)(jO,{className:`oc-avatar__mark`}):t.initials})}function q3({chatId:e,focusMessageId:t}){let{runtime:n,turnGate:r,queueSend:i}=W2e({chatId:e}),a=P(V.me.getMe,{host:bO}),o=a?.ui?.effective??V3,s=o.showTools,c=CO(a?.resolvedThemeMode),l=a?.resolvedChartBrand,u=P(V.agents.getChatAgent,e?{chatId:e}:`skip`),d=u?.multiAgent?u.agent:null,f=(0,N.useMemo)(()=>{let e=l?.label??`Atrium`;return{label:e,logoUrl:AO(l,c),isDefault:l?.isDefault??!0,initials:ife(e),agentName:d?.displayName??d?.agentId??null,agentEmoji:d?.emoji??null}},[l,c,d]),p=F(V.me.setUiPref).withOptimisticUpdate(D1),m=P(V.messages.getSessionMeta,e?{chatId:e}:`skip`),h=e!==null&&m===null,g=W1(),{width:_,startResize:v}=G1({storageKey:`oc.sources.width`,defaultWidth:380,min:300,max:680,edge:`right`}),[y,b]=(0,N.useState)(null);(0,N.useEffect)(()=>{b(null)},[e]);let x=(0,N.useMemo)(()=>({activeMessageId:y,openFor:e=>b(e),close:()=>b(null)}),[y]),S=y!==null;return(0,I.jsx)(vie,{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)(n$.Provider,{value:f,children:(0,I.jsxs)(L1.Provider,{value:x,children:[(0,I.jsxs)(`div`,{className:`oc-chat`,children:[(0,I.jsx)(`div`,{className:`oc-chat__convo`,children:e?h?(0,I.jsx)(ket,{}):(0,I.jsx)(jet,{chatId:e,showTools:s,onToggleTools:()=>void p({key:`showTools`,value:!s}),focusMessageId:t??null}):(0,I.jsx)(`div`,{className:`oc-empty`,children:wH()})}),S&&!g?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-sources-resizer`,onPointerDown:v,role:`separator`,"aria-orientation":`vertical`,"aria-label":fK()}),(0,I.jsx)(`aside`,{className:`oc-sources-col`,style:{width:_,flex:`0 0 ${_}px`},children:(0,I.jsx)(R1,{messageId:y,onClose:x.close})})]}):null]}),S&&g?(0,I.jsx)(K1,{open:!0,onOpenChange:e=>{e||x.close()},children:(0,I.jsx)(q1,{side:`right`,className:`oc-sources-panel-sheet`,children:(0,I.jsx)(R1,{messageId:y,onClose:x.close})})}):null]})})})})})})}function ket(){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)(Pm,{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)(Mm,{size:16,"aria-hidden":!0}),NH()]})]})}function Aet(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 jet({chatId:e,showTools:t,onToggleTools:n,focusMessageId:r}){let i=P(V.bridgeHealth.getBridgeAvailability,{chatId:e}),a=i&&!i.available?i:null;return Aet(e,r),(0,I.jsxs)(yO.Root,{className:`oc-thread`,children:[(0,I.jsx)(Fet,{chatId:e}),(0,I.jsx)(Net,{chatId:e}),(0,I.jsxs)(yO.Viewport,{className:`oc-thread__viewport`,children:[(0,I.jsx)(yO.Empty,{children:(0,I.jsx)(Pet,{})}),(0,I.jsx)(yO.Messages,{components:{UserMessage:Het,AssistantMessage:Uet,SystemMessage:Wet}})]}),(0,I.jsx)(yO.If,{empty:!1,children:(0,I.jsxs)(yO.ScrollToBottom,{className:`oc-scrolldown`,children:[(0,I.jsx)(Bet,{}),(0,I.jsx)(`span`,{children:IH()})]})}),a?(0,I.jsx)(Met,{}):null,(0,I.jsx)(Jet,{showTools:t,onToggleTools:n,unavailable:a!==null})]})}function Met(){return(0,I.jsxs)(`div`,{className:`oc-chat-banner oc-chat-banner--error`,role:`status`,children:[(0,I.jsx)(gm,{size:16,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:zH()})]})}function Net({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===HH()?`${HH()} `:HH()))}},[t]),(0,I.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,className:`oc-sr-only`,children:n})}function Pet(){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:GH()})]})}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:AU({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 Fet({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:ZH({name:a.displayName??a.agentId})+(a.inheritedDefault?eU():``)+(a.state===`deleted`?rU():a.state===`stale`?oU():``),children:[a.emoji?(0,I.jsx)(`span`,{className:`oc-chip__emoji`,"aria-hidden":!0,children:a.emoji}):(0,I.jsx)(um,{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:lU({instance:a.instanceName}),children:[(0,I.jsx)(Fm,{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?hU({provider:r.modelProvider}):fU(),children:[(0,I.jsx)(Ret,{}),(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?vU():xU(),children:[(0,I.jsx)(zet,{}),(0,I.jsxs)(`span`,{className:`oc-chip__label`,children:[wU(),`\xA0: `,M3(r.thinkingLevel)]}),m?(0,I.jsx)(`span`,{className:`oc-chip__hint`,children:DU()}):null]}):null,o.showTools&&r?(0,I.jsx)(J3,{sm:r,detail:!s}):null,(0,I.jsx)(Iet,{chatId:e,title:t?.title??null,compact:s,ghost:l}),r?(0,I.jsx)(Let,{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()},[[zU(),ZU(),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||JH()}),(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)(Oet,{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 Iet({chatId:e,title:t,compact:n=!1,ghost:r=!1}){let i=Zn();async function a(n){let r=await i.query(V.messages.listByChat,{chatId:e}),a=r.map(e=>({role:e.role,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}))})),o=r.length>=200,s={title:t??void 0,truncated:o,exportedAt:Date.now()},c=E0e(t);n===`md`?Y3(w0e(a,s),`${c}.md`,`text/markdown`):Y3(T0e(a,s),`${c}.json`,`application/json`)}let o=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ym,{size:13,"aria-hidden":!0}),n?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-chip__label`,children:zU()}),(0,I.jsx)(fm,{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)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-chip oc-chip--btn`,title:IU(),children:o})}),(0,I.jsxs)(q$,{align:`end`,className:`w-44`,children:[(0,I.jsx)(Y$,{children:zU()}),(0,I.jsx)(J$,{onClick:()=>void a(`md`),children:HU()}),(0,I.jsx)(J$,{onClick:()=>void a(`json`),children:GU()})]})]})}function Let({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)(Lm,{size:13,"aria-hidden":!0}),i?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-chip__label`,children:ZU()}),(0,I.jsx)(fm,{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)(Q$,{open:o,onOpenChange:s,children:[(0,I.jsx)($$,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-chip oc-chip--btn`,title:JU(),children:c})}),(0,I.jsxs)(e1,{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:NU()}),(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)(Lm,{size:13,"aria-hidden":!0}),OXe(),(0,I.jsx)(pm,{size:13,"aria-hidden":!0})]})]})]})}function Ret(){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 zet(){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 Bet(){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:_4e},Vet={...$3,Text:net};function e6({kind:e}){let t=my(e=>e.metadata?.custom?.messageId),n=F(V.messages.deleteMessage).withOptimisticUpdate(G2e),r=S1(),i=E1(),a=(0,N.useContext)(W3),[o,s]=(0,N.useState)(!1);if(!t)return null;async function c(){if(await r(e===`assistant`?{title:eW(),description:rW(),confirmLabel:oW(),cancelLabel:lW(),destructive:!0}:{title:fW(),description:hW(),confirmLabel:vW(),cancelLabel:lW(),destructive:!0})){s(!0),e===`assistant`&&a?.begin();try{await n({messageId:t})}catch(t){e===`assistant`&&a?.cancel(),i.error(AW(),t)}finally{s(!1)}}}return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn oc-iconbtn--danger`,title:e===`assistant`?xW():wW(),"aria-label":DW(),"aria-busy":o,disabled:o,onClick:()=>void c(),children:o?(0,I.jsx)(wm,{size:15,className:`oc-iconbtn__spin`,"aria-hidden":!0}):(0,I.jsx)(zm,{size:15,"aria-hidden":!0})})}function t6(){let e=my(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?vK({count:r}):hK({count:r})}),(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn`,title:xK(),"aria-label":xK(),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:wK()})]})}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?DK():AK(),"aria-label":NK(),children:(0,I.jsx)(wee,{size:15,"aria-hidden":!0})})}function Het(){let[e,t]=(0,N.useState)(!1),n=U3(),r=my(e=>e.id.startsWith(`optimistic-`)),i=my(e=>e.id);return(0,I.jsx)(cO.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)(cO.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}),zK()]}):(0,I.jsxs)(Ry.Root,{className:`oc-msg__actions oc-msg__actions--user`,hideWhenRunning:!0,autohide:`not-last`,children:[n.copyUser?(0,I.jsxs)(Ry.Copy,{className:`oc-iconbtn`,title:IK(),children:[(0,I.jsx)(cO.If,{copied:!0,children:(0,I.jsx)(Q3,{})}),(0,I.jsx)(cO.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 Uet(){let[e,t]=(0,N.useState)(!1),n=U3(),r=r$(),i=my(e=>e.id);return(0,I.jsxs)(cO.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,b0e(r)]}),(0,I.jsxs)(`div`,{className:`oc-msg__body`,children:[n.showTools?(0,I.jsxs)(`div`,{className:`oc-msg__meta`,children:[(0,I.jsx)(s4e,{}),(0,I.jsx)(l4e,{})]}):null,e?(0,I.jsx)(t6,{}):(0,I.jsx)(cO.Parts,{components:Vet}),(0,I.jsx)(Q2e,{})]}),(0,I.jsxs)(Ry.Root,{className:`oc-msg__actions`,hideWhenRunning:!0,autohide:`not-last`,children:[n.copyAssistant?(0,I.jsxs)(Ry.Copy,{className:`oc-iconbtn`,title:JK(),children:[(0,I.jsx)(cO.If,{copied:!0,children:(0,I.jsx)(Q3,{})}),(0,I.jsx)(cO.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 Wet(){let e=my(e=>e.id);return(0,I.jsx)(cO.Root,{className:`oc-msg oc-msg--system`,"data-message-id":e,children:(0,I.jsx)(`div`,{className:`oc-msg__body`,children:(0,I.jsx)(cO.Parts,{components:$3})})})}function Get(){let e=fy(e=>e.status?.type),t=fy(e=>e.type),n=e===`incomplete`;return(0,I.jsxs)(QE.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)(gm,{size:14}):t===`image`?(0,I.jsx)(kee,{size:14}):(0,I.jsx)(Nee,{size:14})}),(0,I.jsx)(`span`,{className:`oc-attach__name`,children:(0,I.jsx)(QE.Name,{})}),n?(0,I.jsx)(`span`,{className:`oc-attach__state`,children:oq()}):null,(0,I.jsx)(QE.Remove,{className:`oc-attach__remove`,"aria-label":hq(),children:(0,I.jsx)(Wm,{size:13,"aria-hidden":!0})})]})}function Ket(){let e=(0,N.useSyncExternalStore)(kO.subscribe,kO.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)(wm,{className:`oc-upload__spin`,size:14,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:e.count>1?fq({count:e.count,percent:e.percent}):lq({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 qet(){let e=(0,N.useContext)(G3),t=py(),n=Cie(e=>e.text).trim().length>0;return(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__send`,disabled:!n||e===null,"aria-label":oJ(),title:n?lJ():rJ(),onClick:()=>{if(e===null)return;let n=t.getState().text;n.trim()!==``&&e(n).then(e=>{e&&t.setText(``)})},children:(0,I.jsx)(cm,{size:18,"aria-hidden":!0})})}function Jet({showTools:e,onToggleTools:t,unavailable:n=!1}){let r=U3().voiceInput,i=Eie(e=>e.isRunning),a=(0,N.useContext)(G3),o=py();return(0,I.jsxs)(UD.Root,{className:`oc-composer${n?` oc-composer--disabled`:``}`,children:[(0,I.jsx)(UD.Attachments,{components:{Attachment:Get}}),(0,I.jsx)(Ket,{}),(0,I.jsx)(UD.Input,{className:`oc-composer__input`,placeholder:n?ZK():eq(),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)(UD.AddAttachment,{className:`oc-composer__icon`,"aria-label":rq(),disabled:i||n,title:i?rJ():void 0,children:(0,I.jsx)(Mm,{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?vq():xq(),children:[(0,I.jsx)(Lm,{size:15,"aria-hidden":!0}),wq()]})]}),(0,I.jsxs)(`div`,{className:`oc-composer__group`,children:[r?(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__icon`,title:Gq(),"aria-label":Jq(),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":Zq(),children:(0,I.jsx)(cm,{size:18,"aria-hidden":!0})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(yO.If,{running:!1,children:(0,I.jsx)(UD.Send,{className:`oc-composer__send`,"aria-label":eJ(),children:(0,I.jsx)(cm,{size:18,"aria-hidden":!0})})}),(0,I.jsx)(yO.If,{running:!0,children:(0,I.jsx)(qet,{})})]})]})]})]})}function Yet(){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 Xet(){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 Zet(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 Qet(e){if(!e)return!1;let{TouchEvent:t}=o6(e.target);return t&&e instanceof t}function C6(e){if(Qet(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 Zet(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 $et(e){return e.matches(T6)?e:e.querySelector(T6)}var ett={display:`none`};function ttt(e){let{id:t,value:n}=e;return N.createElement(`div`,{id:t,style:ett},n)}function ntt(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 rtt(){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 itt(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 att(){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 ott={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 H7e(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 k9e(){return{exit:{taskListCheckValueChecked:o3,taskListCheckValueUnchecked:o3,paragraph:j9e}}}function A9e(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:M9e}}}function o3(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function j9e(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 M9e(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 N9e(){return[d7e(),M7e(),I7e(),S9e(),k9e()]}function P9e(e){return{extensions:[f7e(),N7e(e),L7e(),O9e(e),A9e()]}}var F9e={tokenize:V9e,partial:!0},s3={tokenize:H9e,partial:!0},c3={tokenize:U9e,partial:!0},l3={tokenize:W9e,partial:!0},I9e={tokenize:G9e,partial:!0},u3={name:`wwwAutolink`,tokenize:z9e,previous:h3},d3={name:`protocolAutolink`,tokenize:B9e,previous:g3},f3={name:`emailAutolink`,tokenize:R9e,previous:_3},p3={};function L9e(){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 R9e(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(I9e,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 z9e(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(F9e,e.attempt(s3,e.attempt(c3,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function B9e(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 V9e(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 H9e(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 U9e(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 W9e(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 G9e(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 K9e={tokenize:eet,partial:!0};function q9e(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Z9e,continuation:{tokenize:Q9e},exit:$9e}},text:{91:{name:`gfmFootnoteCall`,tokenize:X9e},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:J9e,resolveTo:Y9e}}}}function J9e(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 Y9e(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 X9e(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 Z9e(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 Q9e(e,t,n){return e.check(y2,t,e.attempt(K9e,t,n))}function $9e(e){e.exit(`gfmFootnoteDefinition`)}function eet(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 tet(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 net=class{constructor(){this.map=[]}add(e,t,n){ret(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 ret(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 iet(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 aet(){return{flow:{null:{name:`table`,tokenize:oet,resolveAll:set}}}}function oet(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 set(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 net;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=iet(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 cet={name:`tasklistCheck`,tokenize:det};function uet(){return{text:{91:cet}}}function det(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:fet},t,n)(r):n(r)}}function fet(e,t,n){return p2(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function pet(e){return $0([L9e(),q9e(),tet(e),aet(),uet()])}var met={};function het(e){let t=this,n=e||met,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(pet(n)),a.push(N9e()),o.push(P9e(n))}function get(e){return typeof e==`string`&&/^(https?:|mailto:)/i.test(e.trim())}function _et({href:e,children:t,...n}){return get(e)?(0,I.jsx)(`a`,{...n,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,I.jsx)(`span`,{...n,children:t})}var vet=(0,N.memo)(function(){return(0,I.jsx)(a7e,{remarkPlugins:[het],className:`oc-md`,components:{a:_et}})});function C3(e){return(0,I.jsx)(NT,{"data-slot":`select`,...e})}function w3(e){return(0,I.jsx)(LT,{"data-slot":`select-value`,...e})}function T3({className:e,size:t=`default`,children:n,...r}){return(0,I.jsxs)(FT,{"data-slot":`select-trigger`,"data-size":t,className:W$(`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)(RT,{asChild:!0,children:(0,I.jsx)(fm,{className:`size-4 opacity-50`})})]})}function E3({className:e,children:t,position:n=`popper`,...r}){return(0,I.jsx)(BT,{children:(0,I.jsxs)(HT,{"data-slot":`select-content`,className:W$(`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)(lE,{className:`flex cursor-default items-center justify-center py-1`,children:(0,I.jsx)(mm,{className:`size-4`})}),(0,I.jsx)(QT,{className:W$(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,I.jsx)(dE,{className:`flex cursor-default items-center justify-center py-1`,children:(0,I.jsx)(fm,{className:`size-4`})})]})})}function Q({className:e,children:t,...n}){return(0,I.jsxs)(rE,{"data-slot":`select-item`,className:W$(`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)(sE,{children:(0,I.jsx)(dm,{className:`size-4`})})}),(0,I.jsx)(aE,{children:t})]})}var D3=1e3;function yet(){return[{id:`incorrect`,label:OEe()},{id:`incoherence`,label:jEe()},{id:`altered_words`,label:PEe()},{id:`formatting`,label:LEe()},{id:`latency`,label:BEe()},{id:`api_error`,label:UEe()},{id:`other`,label:mQ()}]}function bet(){return[{id:`altered_words`,label:JEe()},{id:`formatting`,label:ZEe()},{id:`other`,label:mQ()}]}function xet(e){return e===`user`?bet():yet()}var Cet=[{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 wet(){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 Cet)try{document.querySelector(n)&&t.push(e)}catch{}return{plugins:e,extensionsDetected:t}}var O3=N.createContext(null);function Tet(){let e=N.useContext(O3);if(!e)throw Error(`useFeedback must be used within <FeedbackProvider>`);return e}function Eet({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`,...wet()}})).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)(m1,{open:n!==null,onOpenChange:p,children:n?(0,I.jsxs)(h1,{className:`sm:max-w-md`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:eDe()}),(0,I.jsx)(y1,{children:h?rDe():g?oDe():lDe()})]}),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:fDe()}):(0,I.jsx)(`p`,{className:`oc-feedback__fidelity is-warn`,children:hDe()}):(0,I.jsx)(`p`,{className:`oc-feedback__fidelity`,children:vDe()})}):(0,I.jsxs)(`div`,{className:`oc-feedback__form`,children:[(0,I.jsx)(`label`,{className:`oc-feedback__label`,children:xDe()}),(0,I.jsxs)(C3,{value:i,onValueChange:a,children:[(0,I.jsx)(T3,{children:(0,I.jsx)(w3,{placeholder:wDe()})}),(0,I.jsx)(E3,{children:xet(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:DDe()}),(0,I.jsx)(`textarea`,{id:`oc-feedback-comment`,className:`oc-feedback__textarea`,placeholder:ADe(),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)(_1,{children:h?(0,I.jsx)(X,{onClick:()=>p(!1),children:NDe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(X,{variant:`outline`,onClick:()=>p(!1),children:IDe()}),(0,I.jsx)(X,{onClick:()=>void m(),disabled:!i||c,children:c?zDe():HDe()})]})})]}):null})]})}function Det(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=Tet(),t=my(e=>e.metadata?.custom?.messageId),n=my(e=>e.metadata?.custom?.chatId),r=my(e=>e.role),i=my(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,...Det(a.currentTarget,i)})}return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn${o?` is-on`:``}`,title:o?GDe():JDe(),"aria-label":ZDe(),onClick:s,children:(0,I.jsx)(Dee,{size:15,"aria-hidden":!0})})}function A3(e,t){return e!=null&&e[t]!==void 0}var Oet=[`inherit`,`fast`,`standard`];function ket(e){return e==null||e.fastMode===void 0?`inherit`:e.fastMode?`fast`:`standard`}function Aet(e){return e===`inherit`?IXe():e===`fast`?ZQ():QQ()}function jet(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 Met={off:`Off`,minimal:`Min`,low:`Low`,medium:`Med`,high:`High`,xhigh:`XHigh`};function Net(e,t){return Met[e]??t}function N3(e,t){return e==null||!t||t<=0?null:Math.round(e/t*100)}function Pet(e,t){let n=N3(e,t);return n===null?null:pZe({pct:n,used:j3(e),total:j3(t)})}function Fet(e){return yZe({level:e??`full`})}function Iet(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?OZe({cost:e.toFixed(2),tokens:j3(t)}):n?jZe({cost:e.toFixed(2)}):r?PZe({tokens:j3(t)}):null}function Let(e){let t=e.filter(e=>typeof e==`string`&&e.length>0);return t.length>0?t.join(` · `):null}var Ret=new Set([`knobThinkingLevel`,`knobModel`,`knobFastMode`,`knobUnset`,`agentFiles`,`sessionCompact`,`configDefaults`]),zet=new Set([`knobThinkingLevel`,`knobModel`]);function P3(e,t){return Ret.has(t)?e==null?zet.has(t):e[t]===!0:!1}function Bet(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 Vet(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)(wm,{size:13,className:`oc-spanel__spin`,"aria-label":YQ()}):t?c?(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__reset`,title:JQ(),"aria-label":JQ(),onClick:n,children:(0,I.jsx)(Nm,{size:12,"aria-hidden":!0})}):null:(0,I.jsx)(`span`,{className:`oc-spanel__badge`,children:vXe()})]}),(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:[TXe(),(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__retry`,onClick:a,children:XQ()})]}):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 Het({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}=Vet(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=ket(n),f=Bet(o,{hasModels:u.length>0,hasLevels:l.length>0});return(0,I.jsxs)(I.Fragment,{children:[f.model?(0,I.jsx)(L3,{label:pU(),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)(Het,{options:u,value:t.model??null,onChange:e=>void r(`model`,e),disabled:s,ariaLabel:pU()})}):null,f.thinking?(0,I.jsx)(L3,{label:AXe(),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:Net(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:NXe(),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:Oet.map(e=>({id:e,label:Aet(e)})),value:d,onChange:e=>void r(`fastMode`,jet(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)(wm,{className:`oc-spanel__spin`,"aria-hidden":!0}):null,e]}),t===`done`?(0,I.jsx)(`p`,{className:`oc-spanel__action-note`,role:`status`,children:sQe()}):null,t===`error`?(0,I.jsxs)(`p`,{className:`oc-spanel__error`,role:`alert`,children:[uQe(),(0,I.jsx)(`button`,{type:`button`,className:`oc-spanel__retry`,onClick:i,children:XQ()})]}):null]})}function Uet({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=S1(),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:BZe(),description:UZe(),confirmLabel:KZe(),cancelLabel:uW()})&&await h()}async function v(){await c({title:QZe(),description:tQe(),confirmLabel:iQe(),cancelLabel:uW(),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=Pet(a?.totalTokens,a?.contextTokens),S=Iet(a?.estimatedCostUsd,a?.totalTokens),C=i?.agent??null,w=Let([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:KXe()}),(0,I.jsx)(Z1,{children:YXe()})]}),(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:QXe()}),(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:tZe()}),x!==null&&y!==null?(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:uZe()}),(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:gZe()}),(0,I.jsx)(`span`,{className:`oc-spanel__value`,children:Fet(a?.verboseLevel)}),(0,I.jsx)(`p`,{className:`oc-spanel__help`,children:SZe()})]}),S===null?null:(0,I.jsxs)(`div`,{className:`oc-spanel__static`,children:[(0,I.jsx)(`span`,{className:`oc-spanel__label`,children:TZe()}),(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:iZe()}),(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:sZe()}),s(`sessionCompact`)?(0,I.jsx)(B3,{label:LZe(),state:d,onClick:()=>void _(),onRetry:()=>void h()}):null,(0,I.jsx)(B3,{label:YZe(),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=r$();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)(jO,{className:`oc-avatar__mark`}):t.initials})}function q3({chatId:e,focusMessageId:t}){let{runtime:n,turnGate:r,queueSend:i}=a4e({chatId:e}),a=P(V.me.getMe,{host:bO}),o=a?.ui?.effective??V3,s=o.showTools,c=CO(a?.resolvedThemeMode),l=a?.resolvedChartBrand,u=P(V.agents.getChatAgent,e?{chatId:e}:`skip`),d=u?.multiAgent?u.agent:null,f=(0,N.useMemo)(()=>{let e=l?.label??`Atrium`;return{label:e,logoUrl:AO(l,c),isDefault:l?.isDefault??!0,initials:ife(e),agentName:d?.displayName??d?.agentId??null,agentEmoji:d?.emoji??null}},[l,c,d]),p=F(V.me.setUiPref).withOptimisticUpdate(D1),m=P(V.messages.getSessionMeta,e?{chatId:e}:`skip`),h=e!==null&&m===null,g=W1(),{width:_,startResize:v}=G1({storageKey:`oc.sources.width`,defaultWidth:380,min:300,max:680,edge:`right`}),[y,b]=(0,N.useState)(null);(0,N.useEffect)(()=>{b(null)},[e]);let x=(0,N.useMemo)(()=>({activeMessageId:y,openFor:e=>b(e),close:()=>b(null)}),[y]),S=y!==null;return(0,I.jsx)(vie,{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)(n$.Provider,{value:f,children:(0,I.jsxs)(L1.Provider,{value:x,children:[(0,I.jsxs)(`div`,{className:`oc-chat`,children:[(0,I.jsx)(`div`,{className:`oc-chat__convo`,children:e?h?(0,I.jsx)(Wet,{}):(0,I.jsx)(Ket,{chatId:e,showTools:s,onToggleTools:()=>void p({key:`showTools`,value:!s}),focusMessageId:t??null}):(0,I.jsx)(`div`,{className:`oc-empty`,children:TH()})}),S&&!g?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-sources-resizer`,onPointerDown:v,role:`separator`,"aria-orientation":`vertical`,"aria-label":pK()}),(0,I.jsx)(`aside`,{className:`oc-sources-col`,style:{width:_,flex:`0 0 ${_}px`},children:(0,I.jsx)(R1,{messageId:y,onClose:x.close})})]}):null]}),S&&g?(0,I.jsx)(K1,{open:!0,onOpenChange:e=>{e||x.close()},children:(0,I.jsx)(q1,{side:`right`,className:`oc-sources-panel-sheet`,children:(0,I.jsx)(R1,{messageId:y,onClose:x.close})})}):null]})})})})})})}function Wet(){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)(Pm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-notfound__title`,children:OH()}),(0,I.jsx)(`p`,{className:`oc-notfound__body`,children:jH()}),(0,I.jsxs)(`button`,{type:`button`,className:`oc-notfound__cta`,onClick:()=>void e({to:`/`}),children:[(0,I.jsx)(Mm,{size:16,"aria-hidden":!0}),PH()]})]})}function Get(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 Ket({chatId:e,showTools:t,onToggleTools:n,focusMessageId:r}){let i=P(V.bridgeHealth.getBridgeAvailability,{chatId:e}),a=i&&!i.available?i:null;return Get(e,r),(0,I.jsxs)(yO.Root,{className:`oc-thread`,children:[(0,I.jsx)(Xet,{chatId:e}),(0,I.jsx)(Jet,{chatId:e}),(0,I.jsxs)(yO.Viewport,{className:`oc-thread__viewport`,children:[(0,I.jsx)(yO.Empty,{children:(0,I.jsx)(Yet,{})}),(0,I.jsx)(yO.Messages,{components:{UserMessage:rtt,AssistantMessage:itt,SystemMessage:att}})]}),(0,I.jsx)(yO.If,{empty:!1,children:(0,I.jsxs)(yO.ScrollToBottom,{className:`oc-scrolldown`,children:[(0,I.jsx)(ttt,{}),(0,I.jsx)(`span`,{children:LH()})]})}),a?(0,I.jsx)(qet,{}):null,(0,I.jsx)(ltt,{showTools:t,onToggleTools:n,unavailable:a!==null})]})}function qet(){return(0,I.jsxs)(`div`,{className:`oc-chat-banner oc-chat-banner--error`,role:`status`,children:[(0,I.jsx)(gm,{size:16,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:BH()})]})}function Jet({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===UH()?`${UH()} `:UH()))}},[t]),(0,I.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,className:`oc-sr-only`,children:n})}function Yet(){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:KH()})]})}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:jU({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 Xet({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:QH({name:a.displayName??a.agentId})+(a.inheritedDefault?tU():``)+(a.state===`deleted`?iU():a.state===`stale`?sU():``),children:[a.emoji?(0,I.jsx)(`span`,{className:`oc-chip__emoji`,"aria-hidden":!0,children:a.emoji}):(0,I.jsx)(um,{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:uU({instance:a.instanceName}),children:[(0,I.jsx)(Fm,{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?gU({provider:r.modelProvider}):pU(),children:[(0,I.jsx)($et,{}),(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?yU():SU(),children:[(0,I.jsx)(ett,{}),(0,I.jsxs)(`span`,{className:`oc-chip__label`,children:[TU(),`\xA0: `,M3(r.thinkingLevel)]}),m?(0,I.jsx)(`span`,{className:`oc-chip__hint`,children:OU()}):null]}):null,o.showTools&&r?(0,I.jsx)(J3,{sm:r,detail:!s}):null,(0,I.jsx)(Zet,{chatId:e,title:t?.title??null,compact:s,ghost:l}),r?(0,I.jsx)(Qet,{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()},[[BU(),QU(),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||YH()}),(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)(Uet,{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 Zet({chatId:e,title:t,compact:n=!1,ghost:r=!1}){let i=Zn();async function a(n){let r=await i.query(V.messages.listByChat,{chatId:e}),a=r.map(e=>({role:e.role,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}))})),o=r.length>=200,s={title:t??void 0,truncated:o,exportedAt:Date.now()},c=V0e(t);n===`md`?Y3(z0e(a,s),`${c}.md`,`text/markdown`):Y3(B0e(a,s),`${c}.json`,`application/json`)}let o=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ym,{size:13,"aria-hidden":!0}),n?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-chip__label`,children:BU()}),(0,I.jsx)(fm,{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)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-chip oc-chip--btn`,title:LU(),children:o})}),(0,I.jsxs)(q$,{align:`end`,className:`w-44`,children:[(0,I.jsx)(Y$,{children:BU()}),(0,I.jsx)(J$,{onClick:()=>void a(`md`),children:UU()}),(0,I.jsx)(J$,{onClick:()=>void a(`json`),children:KU()})]})]})}function Qet({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)(Lm,{size:13,"aria-hidden":!0}),i?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-chip__label`,children:QU()}),(0,I.jsx)(fm,{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)(Q$,{open:o,onOpenChange:s,children:[(0,I.jsx)($$,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-chip oc-chip--btn`,title:YU(),children:c})}),(0,I.jsxs)(e1,{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:PU()}),(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)(Lm,{size:13,"aria-hidden":!0}),UXe(),(0,I.jsx)(pm,{size:13,"aria-hidden":!0})]})]})]})}function $et(){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 ett(){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 ttt(){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:M4e},ntt={...$3,Text:vet};function e6({kind:e}){let t=my(e=>e.metadata?.custom?.messageId),n=F(V.messages.deleteMessage).withOptimisticUpdate(o4e),r=S1(),i=E1(),a=(0,N.useContext)(W3),[o,s]=(0,N.useState)(!1);if(!t)return null;async function c(){if(await r(e===`assistant`?{title:tW(),description:iW(),confirmLabel:sW(),cancelLabel:uW(),destructive:!0}:{title:pW(),description:gW(),confirmLabel:yW(),cancelLabel:uW(),destructive:!0})){s(!0),e===`assistant`&&a?.begin();try{await n({messageId:t})}catch(t){e===`assistant`&&a?.cancel(),i.error(jW(),t)}finally{s(!1)}}}return(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn oc-iconbtn--danger`,title:e===`assistant`?SW():TW(),"aria-label":OW(),"aria-busy":o,disabled:o,onClick:()=>void c(),children:o?(0,I.jsx)(wm,{size:15,className:`oc-iconbtn__spin`,"aria-hidden":!0}):(0,I.jsx)(zm,{size:15,"aria-hidden":!0})})}function t6(){let e=my(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?yK({count:r}):gK({count:r})}),(0,I.jsx)(`button`,{type:`button`,className:`oc-iconbtn`,title:SK(),"aria-label":SK(),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:TK()})]})}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?OK():jK(),"aria-label":PK(),children:(0,I.jsx)(wee,{size:15,"aria-hidden":!0})})}function rtt(){let[e,t]=(0,N.useState)(!1),n=U3(),r=my(e=>e.id.startsWith(`optimistic-`)),i=my(e=>e.id);return(0,I.jsx)(cO.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)(cO.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}),BK()]}):(0,I.jsxs)(Ry.Root,{className:`oc-msg__actions oc-msg__actions--user`,hideWhenRunning:!0,autohide:`not-last`,children:[n.copyUser?(0,I.jsxs)(Ry.Copy,{className:`oc-iconbtn`,title:LK(),children:[(0,I.jsx)(cO.If,{copied:!0,children:(0,I.jsx)(Q3,{})}),(0,I.jsx)(cO.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 itt(){let[e,t]=(0,N.useState)(!1),n=U3(),r=r$(),i=my(e=>e.id);return(0,I.jsxs)(cO.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,F0e(r)]}),(0,I.jsxs)(`div`,{className:`oc-msg__body`,children:[n.showTools?(0,I.jsxs)(`div`,{className:`oc-msg__meta`,children:[(0,I.jsx)(S4e,{}),(0,I.jsx)(w4e,{})]}):null,e?(0,I.jsx)(t6,{}):(0,I.jsx)(cO.Parts,{components:ntt}),(0,I.jsx)(p4e,{})]}),(0,I.jsxs)(Ry.Root,{className:`oc-msg__actions`,hideWhenRunning:!0,autohide:`not-last`,children:[n.copyAssistant?(0,I.jsxs)(Ry.Copy,{className:`oc-iconbtn`,title:YK(),children:[(0,I.jsx)(cO.If,{copied:!0,children:(0,I.jsx)(Q3,{})}),(0,I.jsx)(cO.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 att(){let e=my(e=>e.id);return(0,I.jsx)(cO.Root,{className:`oc-msg oc-msg--system`,"data-message-id":e,children:(0,I.jsx)(`div`,{className:`oc-msg__body`,children:(0,I.jsx)(cO.Parts,{components:$3})})})}function ott(){let e=fy(e=>e.status?.type),t=fy(e=>e.type),n=e===`incomplete`;return(0,I.jsxs)(QE.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)(gm,{size:14}):t===`image`?(0,I.jsx)(kee,{size:14}):(0,I.jsx)(Nee,{size:14})}),(0,I.jsx)(`span`,{className:`oc-attach__name`,children:(0,I.jsx)(QE.Name,{})}),n?(0,I.jsx)(`span`,{className:`oc-attach__state`,children:sq()}):null,(0,I.jsx)(QE.Remove,{className:`oc-attach__remove`,"aria-label":gq(),children:(0,I.jsx)(Wm,{size:13,"aria-hidden":!0})})]})}function stt(){let e=(0,N.useSyncExternalStore)(kO.subscribe,kO.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)(wm,{className:`oc-upload__spin`,size:14,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:e.count>1?pq({count:e.count,percent:e.percent}):uq({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 ctt(){let e=(0,N.useContext)(G3),t=py(),n=Cie(e=>e.text).trim().length>0;return(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__send`,disabled:!n||e===null,"aria-label":sJ(),title:n?uJ():iJ(),onClick:()=>{if(e===null)return;let n=t.getState().text;n.trim()!==``&&e(n).then(e=>{e&&t.setText(``)})},children:(0,I.jsx)(cm,{size:18,"aria-hidden":!0})})}function ltt({showTools:e,onToggleTools:t,unavailable:n=!1}){let r=U3().voiceInput,i=Eie(e=>e.isRunning),a=(0,N.useContext)(G3),o=py();return(0,I.jsxs)(UD.Root,{className:`oc-composer${n?` oc-composer--disabled`:``}`,children:[(0,I.jsx)(UD.Attachments,{components:{Attachment:ott}}),(0,I.jsx)(stt,{}),(0,I.jsx)(UD.Input,{className:`oc-composer__input`,placeholder:n?QK():tq(),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)(UD.AddAttachment,{className:`oc-composer__icon`,"aria-label":iq(),disabled:i||n,title:i?iJ():void 0,children:(0,I.jsx)(Mm,{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?yq():Sq(),children:[(0,I.jsx)(Lm,{size:15,"aria-hidden":!0}),Tq()]})]}),(0,I.jsxs)(`div`,{className:`oc-composer__group`,children:[r?(0,I.jsx)(`button`,{type:`button`,className:`oc-composer__icon`,title:Kq(),"aria-label":Yq(),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":Qq(),children:(0,I.jsx)(cm,{size:18,"aria-hidden":!0})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(yO.If,{running:!1,children:(0,I.jsx)(UD.Send,{className:`oc-composer__send`,"aria-label":tJ(),children:(0,I.jsx)(cm,{size:18,"aria-hidden":!0})})}),(0,I.jsx)(yO.If,{running:!0,children:(0,I.jsx)(ctt,{})})]})]})]})]})}function utt(){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 dtt(){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 ftt(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 ptt(e){if(!e)return!1;let{TouchEvent:t}=o6(e.target);return t&&e instanceof t}function C6(e){if(ptt(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 ftt(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 mtt(e){return e.matches(T6)?e:e.querySelector(T6)}var htt={display:`none`};function gtt(e){let{id:t,value:n}=e;return N.createElement(`div`,{id:t,style:htt},n)}function _tt(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 vtt(){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 ytt(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 btt(){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 xtt={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
- `},stt={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 ctt(e){let{announcements:t=stt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=ott}=e,{announce:a,announcement:o}=rtt(),s=v6(`DndLiveRegion`),[c,l]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{l(!0)},[]),itt((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(ttt,{id:r,value:i.draggable}),N.createElement(ntt,{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 ltt(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 utt(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 dtt=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 ftt(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 ptt=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=ftt(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(utt)};function mtt(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 htt(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 gtt=htt(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 _tt(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 vtt={ignoreTransform:!1};function B6(e,t){t===void 0&&(t=vtt);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=o6(e).getComputedStyle(e);t&&(n=_tt(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 ytt(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function btt(e,t){return t===void 0&&(t=o6(e).getComputedStyle(e)),t.position===`fixed`}function xtt(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&&xtt(i,a)&&n.push(i),btt(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 Stt={x:.2,y:.2};function Ctt(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=Stt);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 wtt(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 Ttt(e){return e.reduce((e,t)=>e+G6(t),0)}function Ett(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 Dtt=[[`x`,[`left`,`right`],Ttt],[`y`,[`top`,`bottom`],Ett]],$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 Dtt)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 Ott(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 ktt(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]},Att=(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=Att,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=wtt(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=Ott(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,ktt,{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()}},jtt={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,jtt,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 Mtt={move:{name:`mousemove`},end:{name:`mouseup`}},d8;(function(e){e[e.RightClick=2]=`RightClick`})(d8||={});var Ntt=class extends l8{constructor(e){super(e,Mtt,u6(e.event.target))}};Ntt.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`}},Ptt=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(){}}};Ptt.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 Ftt(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=Ltt({delta:d,disabled:!a}),[m,h]=Xet(),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}=Ctt(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 Itt={x:{[J6.Backward]:!1,[J6.Forward]:!1},y:{[J6.Backward]:!1,[J6.Forward]:!1}};function Ltt(e){let{delta:t,disabled:n}=e,r=g6(t);return m6(e=>{if(n||!r||!e)return Itt;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 Rtt(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 ztt(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 Btt(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 Vtt(e,t){return v8(e,t)}function Htt(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 Utt(e){return new $6(B6(e),e)}function b8(e,t,n){t===void 0&&(t=Utt);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=Htt({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 Wtt(e){return R6(e,v8(e))}var x8=[];function Gtt(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 Ktt(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 qtt(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 Jtt(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?ytt(e):null,[e])}var w8=[];function Ytt(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 Xtt(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 Ztt=[{sensor:u8,options:{}},{sensor:o8,options:{}}],Qtt={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}},$tt={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)($tt);function ent(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new D8}}}function tnt(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 nnt(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=$et(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 rnt(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 int(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=Ztt,collisionDetection:o=ptt,measuring:s,modifiers:c,...l}=e,[u,d]=(0,N.useReducer)(tnt,void 0,ent),[f,p]=att(),[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??Qtt,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=rnt(s),{droppableRects:j,measureDroppableContainers:ne,measuringScheduled:re}=Btt(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),M=Rtt(v,_),ie=(0,N.useMemo)(()=>D?C6(D):null,[D]),ae=Ie(),oe=Vtt(M,A.draggable.measure);int({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=Xtt({measure:A.dragOverlay.measure}),fe=de.nodeRef.current??M,pe=g?de.rect??se:null,me=!!(de.nodeRef.current&&de.rect),he=Wtt(me?null:se),ge=C8(fe?o6(fe):null),_e=Gtt(g?ue??M:null),ve=Ytt(_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=Ktt(_e),Se=S8(xe),Ce=S8(xe,[se]),we=b6(ye,Se),Te=pe?gtt(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=mtt(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=ztt(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]));qtt(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]),Ftt({...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(nnt,{disabled:n?.restoreFocus===!1})),N.createElement(ctt,{...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}}}),ant=(0,N.createContext)(null),F8=`button`,ont=`Draggable`;function snt(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=v6(ont),{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:ant),[v,y]=h6(),[b,x]=h6(),S=Jtt(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 cnt=`Droppable`,lnt={timeout:25};function L8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=v6(cnt),{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}={...lnt,...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 unt(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 dnt={x:0,y:0,scaleX:1,scaleY:1};function fnt(e){let{children:t}=e;return N.createElement(k8.Provider,{value:O8},N.createElement(M8.Provider,{value:dnt},t))}var pnt={position:`fixed`,touchAction:`none`},mnt=e=>S6(e)?`transform 250ms ease`:void 0,hnt=(0,N.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=mnt}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...pnt,width:s.width,height:s.height,top:s.top,left:s.left,transform:w6.Transform.toString(d),transformOrigin:i&&r?ltt(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return N.createElement(n,{className:o,style:f,ref:t},a)}),gnt={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 _nt(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:vnt(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 vnt(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...gnt,...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 ynt(e){return(0,N.useMemo)(()=>{if(e!=null)return R8++,R8},[e])}var bnt=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=ynt(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=_nt({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return N.createElement(fnt,null,N.createElement(unt,{animation:E},d&&C?N.createElement(hnt,{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))}),xnt=e=>{let{transform:t}=e;return{...t,y:0}};function Snt(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 Cnt=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e,i=r[0];return!t||!i?n:Snt(n,t,i)},wnt=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 Tnt(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 Ent(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 Dnt(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var V8={scaleX:1,scaleY:1},Ont=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=knt(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 knt(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},Ant=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=jnt(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 jnt(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=!Ent(p,_.current),y=g!==-1&&h===-1||v,b=Dnt(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:Tnt(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 Mnt=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return z8(n,r,i).indexOf(t)},Nnt=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},Pnt={duration:200,easing:`ease`},q8=`transform`,Fnt=w6.Transition.toString({property:q8,duration:0,easing:`linear`}),Int={roleDescription:`sortable`};function Lnt(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=Nnt,attributes:n,disabled:r,data:i,getNewIndex:a=Mnt,id:o,strategy:s,resizeObserverConfig:c,transition:l=Pnt}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,N.useContext)(G8),y=Rnt(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}=snt({id:o,data:x,attributes:{...Int,...n},disabled:y.draggable}),ie=Yet(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=Lnt({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 Fnt;if(!(se&&!S6(O)||!l)&&(ae||pe))return w6.Transition.toString({...l,property:q8})}}function Rnt(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 znt=[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(znt.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=Bnt(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 Bnt(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)(wm,{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 Vnt(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`,Hnt=e=>`project:${e}`,c5=`oc.noproject.collapsed`;function Unt({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:bO})?.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=C1(),_=_Le(),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)(Mm,{}),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)(Mm,{}),(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)(Sm,{})})]})}),(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)(Mm,{}),(0,I.jsx)(`span`,{className:`oc-newchat__label`,children:_})]}),(0,I.jsx)(X,{variant:`outline`,size:`icon`,tabIndex:-1,children:(0,I.jsx)(Sm,{})})]})}),(0,I.jsx)(X,{className:`oc-newproject`,variant:`outline`,size:`icon`,"aria-label":TQ(),title:TQ(),onClick:async()=>{let e=await g({title:TQ(),label:SLe(),placeholder:TLe(),confirmLabel:OLe()});e&&await f({name:e})},children:(0,I.jsx)(Sm,{})})]}),(0,I.jsxs)(P8,{sensors:A,collisionDetection:L6,modifiers:[wnt,Cnt],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:jLe(),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:Hnt(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:PLe()}):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:LLe(),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)(bnt,{children:ae?(0,I.jsxs)(`div`,{className:`oc-chatitem oc-chatitem--overlay`,children:[(0,I.jsx)(Cm,{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||EQ()})]}):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=S1(),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)(pm,{className:`size-3.5`}):(0,I.jsx)(fm,{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":DQ(),onClick:async t=>{t.stopPropagation();let r=u??0;await l({title:WLe({name:e}),description:r>0?qLe({count:r}):XLe(),confirmWord:OQ(),confirmLabel:DQ(),destructive:!0})&&await c({projectId:n})},children:(0,I.jsx)(zm,{className:`size-3.5`})}):null]}),(0,I.jsx)(K8,{items:r.map(e=>e._id),strategy:Ant,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:bO})?.ui?.effective?.showChatAge??!0,g=S1(),[_,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":tRe(),...a,...o,children:(0,I.jsx)(Cm,{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||EQ()}),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:ORe({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:Vnt(e.updatedAt,Date.now())}):null,(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon-xs`,"aria-label":iRe(),className:`opacity-0 group-hover/row:opacity-100 group-focus-within/row:opacity-100 aria-expanded:opacity-100`,children:(0,I.jsx)(bm,{})})}),(0,I.jsxs)(q$,{align:`end`,className:`w-48`,children:[(0,I.jsxs)(J$,{onSelect:()=>{b(e.title??``),v(!0)},children:[(0,I.jsx)(Pee,{}),` `,sRe()]}),(0,I.jsxs)(J$,{onSelect:()=>void p({chatId:e._id,pinned:!e.pinned}),children:[e.pinned?(0,I.jsx)(Iee,{}):(0,I.jsx)(Fee,{}),e.pinned?uRe():pRe()]}),(0,I.jsx)(Y$,{children:gRe()}),(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":yRe(),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)(X$,{}),(0,I.jsxs)(J$,{variant:`destructive`,onSelect:()=>{requestAnimationFrame(async()=>{await g({title:SRe(),description:TRe(),confirmLabel:OQ(),destructive:!0})&&await f({chatId:e._id})})},children:[(0,I.jsx)(zm,{}),` `,OQ()]})]})]})]}),(0,I.jsx)(Q8,{open:_,onOpenChange:v,title:jRe(),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:PRe()}),(0,I.jsx)(a1,{value:y,onChange:e=>b(e.target.value),autoFocus:!0})]})})})]})}var Wnt=r1(`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?xy:`span`,{"data-slot":`badge`,"data-variant":t,className:W$(Wnt({variant:t}),e),...r})}function Gnt(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 Knt(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 qnt({open:e,onOpenChange:t,agents:n,onPick:r}){let[i,a]=(0,N.useState)(``),o=(0,N.useMemo)(()=>Gnt(Knt(n??[],i)),[n,i]);return(0,I.jsx)(m1,{open:e,onOpenChange:t,children:(0,I.jsxs)(h1,{className:`oc-agentpicker`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:zBe()}),(0,I.jsx)(y1,{children:HBe()})]}),n===void 0?(0,I.jsx)(`p`,{className:`oc-agentpicker__hint`,children:GBe()}):n.length===0?(0,I.jsx)(`p`,{className:`oc-agentpicker__hint`,children:JBe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(a1,{autoFocus:!0,value:i,onChange:e=>a(e.target.value),placeholder:ZBe(),className:`oc-agentpicker__search`,"aria-label":eVe()}),(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)(Fm,{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`?rVe():void 0,children:[(0,I.jsx)(um,{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)(Rm,{size:13,"aria-label":oVe(),className:`oc-agentpicker__default`}):null]},`${e.instanceName}/${e.agentId}`))]},e.instanceName))})]})]})})}function Jnt(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)(qnt,{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:kIe(),children:[(0,I.jsx)(Um,{size:13}),`DEV`]}),(0,I.jsx)(m1,{open:t,onOpenChange:n,children:(0,I.jsxs)(h1,{children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:MIe()}),(0,I.jsx)(y1,{children:FIe()})]}),(0,I.jsxs)(`div`,{className:`oc-devsw__me`,children:[(0,I.jsxs)(`span`,{className:`oc-devsw__melabel`,children:[RIe({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`?VIe():e===`user`?WIe():qIe()},e))})]}),d?(0,I.jsxs)(`div`,{className:`oc-devsw__imp`,children:[XIe(),` `,(0,I.jsx)(`strong`,{children:i.targetLabel}),`.`,(0,I.jsx)(X,{type:`button`,size:`xs`,variant:`outline`,onClick:()=>void c(),children:$Ie()})]}):null,(0,I.jsx)(`div`,{className:`oc-devsw__list`,children:f.length===0?(0,I.jsx)(`p`,{className:`oc-devsw__empty`,children:nLe()}):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`?cLe():dLe():aLe(),onClick:()=>{s({profileId:e.profileId}),n(!1)},children:mLe()})]},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:bO});if(!n)return;let r=t===null?n.defaultThemeMode??`system`:t;e.setQuery(V.me.getMe,{host:bO},{...n,themeMode:t,resolvedThemeMode:r})}),a=t??`default`;return(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsxs)(X,{variant:`ghost`,size:`sm`,className:`gap-1.5`,children:[e,(0,I.jsx)(fm,{className:`opacity-60`})]})}),(0,I.jsx)(q$,{align:`end`,className:`w-52`,children:n?(0,I.jsxs)(J$,{onClick:()=>void r(),children:[(0,I.jsx)(Tm,{}),` `,lk()]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Y$,{children:JO()}),(0,I.jsxs)(_2e,{value:a,onValueChange:e=>void i({mode:e==="default"?null:e}),children:[(0,I.jsxs)(Z$,{value:`light`,children:[(0,I.jsx)(Bee,{}),` `,ZO()]}),(0,I.jsxs)(Z$,{value:`dark`,children:[(0,I.jsx)(Am,{}),` `,ek()]}),(0,I.jsxs)(Z$,{value:`system`,children:[(0,I.jsx)(km,{}),` `,rk()]}),(0,I.jsx)(Z$,{value:`default`,children:ok()})]}),(0,I.jsx)(X$,{}),(0,I.jsxs)(J$,{onClick:()=>void r(),children:[(0,I.jsx)(Tm,{}),` `,lk()]})]})})]})}var Ynt={altered_words:()=>xWe(),incorrect:()=>wWe(),incoherence:()=>DWe(),formatting:()=>AWe(),latency:()=>NWe(),api_error:()=>IWe(),other:()=>zWe()},Xnt=e=>Ynt[e]?.()??e,Znt={anomaly_open:Bm,anomaly_resolved:_m,feedback_reply:Em};function Qnt(e){return e.kind===`feedback_reply`?{title:hWe(),body:vWe()}:{title:e.title,body:e.body}}function $nt(){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)(G$,{open:l,onOpenChange:u,children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-bell`,"aria-label":e>0?hUe({count:e}):vUe(),children:[(0,I.jsx)(lm,{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)(q$,{align:`end`,className:`oc-notif`,children:[(0,I.jsxs)(`div`,{className:`oc-notif__head`,children:[(0,I.jsx)(`span`,{children:xUe()}),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:wUe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__act`,onClick:()=>void o({}),children:DUe()})]}):null]}),t===void 0?(0,I.jsx)(`div`,{className:`oc-notif__empty`,children:GO()}):t.length===0?(0,I.jsx)(`div`,{className:`oc-notif__empty`,children:AUe()}):(0,I.jsx)(`div`,{className:`oc-notif__list`,children:t.map(e=>{let t=Znt[e.kind]??lm,{title:n,body:i}=Qnt(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:AQ(),"aria-label":AQ(),onClick:t=>{t.stopPropagation(),r({notificationId:e._id})},children:(0,I.jsx)(dm,{size:13})}):null,(0,I.jsx)(`button`,{type:`button`,title:jQ(),"aria-label":jQ(),onClick:t=>{t.stopPropagation(),a({notificationId:e._id})},children:(0,I.jsx)(Wm,{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:LUe()}),(0,I.jsx)(`div`,{className:`oc-notif__list`,children:n.map(e=>(0,I.jsx)(ert,{it:e,onClose:t=>s({feedbackId:e._id,reason:t}),onNavigate:()=>u(!1)},e._id))})]}):null]})]})}function ert({it:e,onClose:t,onNavigate:n}){let r=E1(),[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(MQ(),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:Xnt(e.category)}),(0,I.jsx)(`span`,{className:`oc-notif__status${e.answered?` is-answered`:``}`,children:e.answered?BUe():UUe()})]}),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`?KUe():YUe()}),(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)(fm,{size:13,"aria-hidden":!0}):(0,I.jsx)(pm,{size:13,"aria-hidden":!0}),tWe()]}),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:QUe()}),o?null:(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__link oc-notif__link--muted`,onClick:()=>s(!0),children:MQ()})]}),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:oWe()}),(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:lWe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__close-cancel`,onClick:()=>{s(!1),l(``)},children:fWe()})]})]}):null]})}var h5={mod:!0,key:`k`},g5={mod:!0,shift:!0,key:`o`};function trt(e){return/mac/i.test(e)}function nrt(){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=trt(nrt())),_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,rrt=180;function irt(){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),rrt);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":Jze(),children:[(0,I.jsx)(Pm,{className:`oc-search-trigger__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-search-trigger__label`,children:Zze()}),(0,I.jsx)(`kbd`,{className:`oc-search-trigger__kbd`,children:d})]}),(0,I.jsx)(m1,{open:r,onOpenChange:i,children:(0,I.jsxs)(h1,{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)(v1,{className:`sr-only`,children:eBe()}),(0,I.jsxs)(`div`,{className:`oc-search-palette__head`,children:[(0,I.jsx)(Pm,{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:rBe(),className:`oc-search-palette__field`,autoComplete:`off`,spellCheck:!1,"aria-label":oBe()})]}),(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:lBe({count:x5})}):h?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:fBe()}):m.length===0?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:hBe({term:f})}):m.map((e,t)=>(0,I.jsxs)(`button`,{type:`button`,"data-index":t,role:`option`,"aria-selected":t===l,className:W$(`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)(Oee,{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||vBe()}),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`?xBe():wBe()})]},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:`↓`}),` `,DBe()]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↵`}),` `,ABe()]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:NBe()}),` `,IBe()]})]})]})})]})}var S5=[`conversational`,`documentary`];new Set(S5);function art({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=P(V.admin.listInstances,n?{}:`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;return(0,I.jsx)(m1,{open:n,onOpenChange:r,children:(0,I.jsxs)(h1,{className:`oc-access`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:gje({user:t})}),(0,I.jsx)(y1,{children:yje()})]}),(0,I.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Sje()}):i.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Tje()}):i.map(t=>(0,I.jsx)(ort,{profileId:e,instanceName:t.name,kind:t.kind??`openclaw`,assigned:o,defaultKey:s?`${s.instanceName}/${s.agentId}`:null},t._id))})]})})}function ort({profileId:e,instanceName:t,kind:n,assigned:r,defaultKey:i}){let a=P(V.agents.listAgentsForInstance,{instanceName:t}),o=F(V.agents.assignAgent),s=F(V.agents.removeAgent),c=F(V.agents.setDefaultAgent),l=E1();if(!e)return null;let u=(a?.agents??[]).filter(e=>e.source===`discovered`),d=a?.discovery&&!a.discovery.lastPollOk;async function f(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(Oje(),e)}}async function p(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(jje(),e)}}return(0,I.jsxs)(`div`,{className:`oc-access__group`,children:[(0,I.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,I.jsx)(Fm,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:t}),(0,I.jsx)($,{variant:`outline`,className:`oc-access__kind`,children:n}),d?(0,I.jsx)($,{variant:`outline`,className:`oc-access__stale`,children:Pje()}):null]}),a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Lje()}):u.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:d?Uje():Bje()}):u.map(e=>{let n=`${t}/${e.agentId}`,a=r.has(n),o=i===n,s=e.presentInLastOk===!1;return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(A1,{checked:a,disabled:s&&!a,onCheckedChange:()=>void f(e.agentId,a),"aria-label":Kje({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:Yje()}):null,a?o?(0,I.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":_Q(),title:_Q(),children:(0,I.jsx)(Rm,{size:14,fill:`currentColor`})}):(0,I.jsx)(X,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":vQ(),title:vQ(),onClick:()=>void p(e.agentId),children:(0,I.jsx)(Rm,{size:14})}):null]},e.agentId)})]})}function srt(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 crt(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=srt(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:W$(`w-full caption-bottom text-sm`,e),...t})})}function w5({className:e,...t}){return(0,I.jsx)(`thead`,{"data-slot":`table-header`,className:W$(`[&_tr]:border-b`,e),...t})}function T5({className:e,...t}){return(0,I.jsx)(`tbody`,{"data-slot":`table-body`,className:W$(`[&_tr:last-child]:border-0`,e),...t})}function E5({className:e,...t}){return(0,I.jsx)(`tr`,{"data-slot":`table-row`,className:W$(`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:W$(`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:W$(`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=hVe(),bulkActions:o,emptyHint:s=vVe(),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?crt(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)(zm,{}):null,e.label,` (`,u.size,`)`]},e.label)):null,i?(0,I.jsxs)(X,{size:`sm`,onClick:i,children:[(0,I.jsx)(Mm,{}),` `,a]}):null]})]}),t===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:xVe()}):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)(A1,{"aria-label":wVe(),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":NVe({column:e.header}),children:[e.header,n?f.dir===`asc`?(0,I.jsx)(mm,{className:`oc-dt__sort-icon`,"aria-hidden":!0}):(0,I.jsx)(fm,{className:`oc-dt__sort-icon`,"aria-hidden":!0}):(0,I.jsx)(hm,{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)(A1,{"aria-label":DVe(),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)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":AVe(),className:`opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 aria-expanded:opacity-100`,children:(0,I.jsx)(bm,{})})}),(0,I.jsx)(q$,{align:`end`,children:t.map((t,n)=>(0,I.jsxs)(`div`,{children:[t.variant===`destructive`&&n>0?(0,I.jsx)(X$,{}):null,(0,I.jsx)(J$,{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({delayDuration:e=0,...t}){return(0,I.jsx)(vue,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function j5({...e}){return(0,I.jsx)(yue,{"data-slot":`tooltip`,...e})}function M5({...e}){return(0,I.jsx)(bue,{"data-slot":`tooltip-trigger`,...e})}function N5({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:W$(`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 P5={AGENT_NOT_FOUND:()=>({label:IVe(),hint:zVe()}),AUTH_TOKEN_MISMATCH:()=>({label:HVe(),hint:GVe()}),DEVICE_SIGNING_FAILED:()=>({label:JVe(),hint:ZVe()}),SESSION_SCOPE_DENIED:()=>({label:eHe(),hint:rHe()}),GATEWAY_TIMEOUT:()=>({label:oHe(),hint:lHe()}),GATEWAY_DISCONNECTED:()=>({label:fHe(),hint:hHe()}),ATTACHMENT_TOO_LARGE:()=>({label:wHe(),hint:DHe()}),ATTACHMENT_REJECTED:()=>({label:AHe(),hint:NHe()}),BRIDGE_UNREACHABLE:()=>({label:vHe(),hint:xHe()}),INVALID_REQUEST:()=>({label:IHe(),hint:zHe()}),NOT_CONFIGURED:()=>({label:HHe(),hint:GHe()}),UNROUTED:()=>({label:JHe(),hint:ZHe()}),UPSTREAM_ERROR:()=>({label:eUe(),hint:rUe()}),UNKNOWN:()=>({label:oUe(),hint:lUe()})};function F5(e){return e?P5[e]?.()??{label:e,hint:fUe()}:P5.UNKNOWN()}var lrt=[`gateway-http`,`shared-fs`,`off`],urt=[`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 I5={mediaMode:`gateway-http`,inboundMediaMode:`inline`,rehydration:!0,mediaMaxMb:1024,inboundAgentMount:`/home/node/.openclaw/media/inbound`,outboundAgentMount:`/home/node/.openclaw/media/outbound`};function drt(e){return{mediaMode:e.mediaMode??I5.mediaMode,inboundMediaMode:e.inboundMediaMode??I5.inboundMediaMode,rehydration:e.rehydration??I5.rehydration,mediaMaxMb:e.mediaMaxMb??I5.mediaMaxMb,inboundAgentMount:e.inboundAgentMount??I5.inboundAgentMount,outboundAgentMount:e.outboundAgentMount??I5.outboundAgentMount}}function frt(e,t){let n={},r=r=>{(e[r]!==I5[r]||t[r]!==void 0)&&(n[r]=e[r])};return r(`mediaMode`),r(`inboundMediaMode`),r(`rehydration`),r(`mediaMaxMb`),r(`inboundAgentMount`),r(`outboundAgentMount`),n}var L5=e=>typeof e==`string`?e:null;function R5(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function z5(e,t){let n=R5(e),r=R5(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 prt(e,t){if(e===null||t===null)return!1;let n=z5(t,e.min);return n!==null&&n>=0}function B5(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=L5(e.min),n=L5(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 mrt(e,t,n){if(e===null)return`unknown`;let{range:r}=B5(n,t);return prt(r,e)?r!==null&&(z5(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function V5(e){return e===`supported`?i0e():e===`beyond`?s0e():u0e()}function H5(e){return e??t$()}function U5(e){return e===null?y0e():g0e({version:e})}function hrt(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}function W5(e){return e.filter(e=>e.state===`error`)}function grt(e){return e.reachable&&W5(e.targets).length===0}function _rt(e){return e.state===`error`&&e.lastErrorCode!==null}function vrt(e){return!!e.lastDownstreamRejectCode}function G5(e){return e.kind??`openclaw`}function yrt(e){return[...e].sort((e,t)=>e===`openclaw`?-1:t===`openclaw`?1:e.localeCompare(t))}function brt(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,G5(e));let i=e=>(e.instanceName?r.get(e.instanceName):void 0)??`openclaw`,a=new Set;for(let e of n)a.add(G5(e));for(let e of t)a.add(e.provider);for(let t of e)a.add(i(t));return yrt(a).map(r=>({key:r,connections:e.filter(e=>i(e)===r),compatTargets:t.filter(e=>e.provider===r),instances:n.filter(e=>G5(e)===r)}))}function xrt(e){return e===`openclaw`?`OpenClaw`:e===`hermes`?`Hermes`:e.charAt(0).toUpperCase()+e.slice(1)}var K5={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function q5(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=K5[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function J5(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:q5(e.from,t)??t-K5.h,to:q5(e.to,t)??t}}var Y5=[{label:aFe(),from:`now-5m`},{label:cFe(),from:`now-15m`},{label:dFe(),from:`now-30m`},{label:mFe(),from:`now-1h`},{label:_Fe(),from:`now-3h`},{label:bFe(),from:`now-6h`},{label:CFe(),from:`now-12h`},{label:EFe(),from:`now-24h`},{label:kFe(),from:`now-2d`},{label:MFe(),from:`now-7d`},{label:FFe(),from:`now-30d`},{label:RFe(),from:`now-90d`}];function X5(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function Srt(e){if(e.kind===`relative`){let t=Y5.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${X5(e.from)} → ${X5(e.to)}`}function Z5(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 Q5(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function Crt(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}function $5(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}=J5(e);return e.kind===`absolute`?{from:t,to:n}:{from:e7(t),to:e7(n)}},[e,t])}function e7(e){return Math.floor(e/6e4)*6e4}function t7({value:e,onChange:t}){let[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(``),o=J5(e),[s,c]=(0,N.useState)(()=>Z5(o.from)),[l,u]=(0,N.useState)(()=>Z5(o.to));function d(t){if(t){let t=J5(e);c(Z5(t.from)),u(Z5(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=Q5(s),n=Q5(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===``?Y5:Y5.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=Q5(s)!==null&&Q5(l)!==null;return(0,I.jsxs)(ST,{open:n,onOpenChange:d,children:[(0,I.jsx)(CT,{asChild:!0,children:(0,I.jsxs)(X,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,I.jsx)(Cee,{}),Srt(e)]})}),(0,I.jsx)(wT,{children:(0,I.jsx)(TT,{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)(a1,{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)(a1,{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)(Pm,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,I.jsx)(a1,{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 wrt=250;function n7({q:e,onQChange:t,searchPlaceholder:n=lVe(),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),wrt)}(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)(Pm,{className:`oc-filterbar__search-icon`,"aria-hidden":!0}),(0,I.jsx)(a1,{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)(t7,{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)(Nm,{}),fVe()]})]})}var r7=`__all__`,i7={q:``,state:r7,instance:r7,version:r7},a7={connected:0,error:1,idle:2};function Trt(e){return e.q.trim()!==``||e.state!==`__all__`||e.instance!==`__all__`||e.version!==`__all__`}function Ert(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 o7(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function s7(e,t){return e===`version`?t.gatewayVersion===null:e===`lastOk`?t.lastOkAt===null:!1}function Drt(e,t,n){switch(e){case`state`:return(a7[t.state]??99)-(a7[n.state]??99);case`instance`:return o7(t.instanceLabel??t.instanceName??``,n.instanceLabel??n.instanceName??``);case`host`:return o7(t.gatewayHost,n.gatewayHost);case`version`:{let e=t.gatewayVersion,r=n.gatewayVersion;return z5(e,r)??o7(e,r)}case`lastOk`:return t.lastOkAt-n.lastOkAt;default:return o7(t.targetLabel,n.targetLabel)}}function Ort(e,t){if(!t)return e;let n=t.dir===`asc`?1:-1;return[...e].sort((e,r)=>{let i=s7(t.key,e),a=s7(t.key,r);return i&&a?0:i?1:a?-1:n*Drt(t.key,e,r)})}function krt(e){let t=new Set;for(let n of e)t.add(n.state);return[...t].sort((e,t)=>(a7[e]??99)-(a7[t]??99))}function Art(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)=>o7(e.label,t.label))}function jrt(e){let t=new Set;for(let n of e)n.gatewayVersion!==null&&t.add(n.gatewayVersion);return[...t].sort((e,t)=>z5(e,t)??o7(e,t))}function Mrt({connections:e,displayByInstance:t}){let[n,r]=(0,N.useState)(i7),[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)(()=>krt(o),[o]),c=(0,N.useMemo)(()=>Art(o),[o]),l=(0,N.useMemo)(()=>jrt(o),[o]),u=(0,N.useMemo)(()=>Ort(Ert(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:oPe()}):(0,I.jsxs)(`div`,{className:`oc-conn`,children:[(0,I.jsxs)(n7,{q:n.q,onQChange:e=>r(t=>({...t,q:e})),searchPlaceholder:hPe(),onReset:()=>r(i7),canReset:Trt(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:bPe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:r7,children:xQ()}),s.map(e=>(0,I.jsx)(Q,{value:e,children:Prt(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:CPe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:r7,children:xQ()}),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:EPe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:r7,children:xQ()}),l.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),u.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:kPe()}):(0,I.jsxs)(C5,{className:`oc-conn__table`,children:[(0,I.jsx)(w5,{children:(0,I.jsxs)(E5,{children:[(0,I.jsx)(c7,{label:MPe(),sortKey:`target`,sort:i,onSort:d}),(0,I.jsx)(c7,{label:FPe(),sortKey:`state`,sort:i,onSort:d}),(0,I.jsx)(c7,{label:RPe(),sortKey:`instance`,sort:i,onSort:d}),(0,I.jsx)(c7,{label:VPe(),sortKey:`host`,sort:i,onSort:d}),(0,I.jsx)(c7,{label:WPe(),sortKey:`version`,sort:i,onSort:d}),(0,I.jsx)(D5,{children:qPe()}),(0,I.jsx)(c7,{label:XPe(),sortKey:`lastOk`,sort:i,onSort:d})]})}),(0,I.jsx)(T5,{children:u.map(e=>(0,I.jsx)(Nrt,{r:e},e._id))})]})]})}function c7({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)(mm,{size:13,"aria-hidden":!0}):(0,I.jsx)(fm,{size:13,"aria-hidden":!0}):(0,I.jsx)(hm,{size:13,"aria-hidden":!0,className:`oc-conn__sort-idle`})]})})}function Nrt({r:e}){let t=_rt(e)?F5(e.lastErrorCode):null,n=vrt(e)?F5(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)(Frt,{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:lPe({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:[fPe({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 Prt(e){return e===`connected`?SQ():e===`error`?CQ():wQ()}function Frt({state:e}){return e===`connected`?(0,I.jsx)($,{variant:`secondary`,children:SQ()}):e===`error`?(0,I.jsx)($,{variant:`destructive`,children:CQ()}):(0,I.jsx)($,{variant:`outline`,children:wQ()})}function Irt(){return P(V.bridgeHealth.getBridgeHealth,{})}function Lrt(){let e=Irt(),t=P(V.compat.getBridgeCompat,{}),n=P(V.me.getMe,{host:bO})?.role===`admin`,r=P(V.admin.listInstances,n?{}:`skip`),i=ss(),a=()=>void i({to:`/settings/anomalies`,search:{status:`open`}}),o=brt(e?e.targets:[],t?t.targets:[],r??[]),s=t?.compat??null,c=t===void 0?`loading`:t===null?`nodata`:`ready`,l=s!==null&&hrt(s,`hermes`)&&!o.some(e=>e.key===`hermes`);return(0,I.jsxs)(`div`,{className:`oc-bridge`,children:[(0,I.jsx)(Rrt,{health:e,compat:t,onSeeAnomalies:a}),(0,I.jsx)(`p`,{className:`oc-admin__hint oc-bridge__caption`,children:jNe()}),o.map(e=>(0,I.jsx)(zrt,{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:p0e()}):null]})}function Rrt({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:H5(t.bridgeVersion)}),` · `,k1e(),` `,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:t.protocolVersion===null?t$():String(t.protocolVersion)})]}):null;if(e===void 0)return(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:bQ()});if(e===null)return(0,I.jsx)(`div`,{className:`oc-bridge-card oc-bridge-card--idle`,children:INe()});let i=W5(e.targets),a=!e.reachable,o=grt(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)(_m,{size:22}):a?(0,I.jsx)(Vee,{size:22}):(0,I.jsx)(Bm,{size:22})}),(0,I.jsxs)(`div`,{className:`oc-bridge-card__body`,children:[(0,I.jsx)(`div`,{className:`oc-bridge-card__title`,children:o?zNe():a?HNe():GNe({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}),` `,JNe({time:c})]}),l?(0,I.jsx)(`span`,{children:ZNe({time:l})}):null,r]}),a?(0,I.jsx)(`p`,{className:`oc-bridge-card__hint`,children:F5(e.lastError===`not_configured`?`NOT_CONFIGURED`:`BRIDGE_UNREACHABLE`).hint}):null]}),(0,I.jsx)(`button`,{type:`button`,className:`oc-bridgebar__drill`,onClick:n,children:ePe()})]})}function zrt({providerKey:e,connections:t,instances:n,manifest:r,compatStatus:i,compatReachable:a}){let o=r?B5(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:mrt(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)(Fm,{size:15,"aria-hidden":!0,className:`oc-bridge-provider__icon`}),(0,I.jsx)(`span`,{className:`oc-bridge-provider__name`,children:xrt(e)}),d?(0,I.jsx)($,{variant:d===`beyond`?`destructive`:`secondary`,children:V5(d)}):null]}),(0,I.jsx)(`h4`,{className:`oc-bridge-provider__sub`,children:C1e()}),(0,I.jsx)(Brt,{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)(fm,{size:13,"aria-hidden":!0}):(0,I.jsx)(pm,{size:13,"aria-hidden":!0}),rPe({count:t.length})]}),f?(0,I.jsx)(Mrt,{connections:t,displayByInstance:s}):null,g?(0,I.jsx)(l7,{instance:g,onClose:()=>h(null)},g._id):null]})}function Brt({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:bQ()}):t===`nodata`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:E1e()}):(0,I.jsxs)(`div`,{className:`oc-compat`,children:[n?null:(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:P1e()}),r===null?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:L1e()}):(0,I.jsxs)(`div`,{className:`oc-compat__support`,children:[(0,I.jsx)(`span`,{className:`oc-compat__label`,children:B1e()}),e&&e.range!==null?(0,I.jsx)(`span`,{children:U1e({min:e.range.min,max:e.range.maxValidated})}):(0,I.jsx)(`span`,{children:t$()}),e?(0,I.jsx)(Urt,{versions:e.validatedVersions}):null]}),i.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:t0e()}):(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:H5(e.version)}),(0,I.jsx)($,{variant:e.state===`supported`?`secondary`:e.state===`beyond`?`destructive`:`outline`,children:V5(e.state)}),a(e.instanceName)?(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,className:`oc-compat__target-menu`,"aria-label":yQ(),children:(0,I.jsx)(bm,{size:16,"aria-hidden":!0})})}),(0,I.jsx)(q$,{align:`end`,children:(0,I.jsx)(J$,{onSelect:()=>o(e.instanceName),children:yQ()})})]}):null]},e.instanceName))})]})}function l7({instance:e,onClose:t}){return(0,I.jsx)(m1,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(h1,{className:`oc-bridge-config-dialog`,onOpenAutoFocus:e=>e.preventDefault(),children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:nMe({instance:e.displayName??e.name})}),(0,I.jsx)(y1,{children:sMe()})]}),(0,I.jsx)(Hrt,{instance:e,onClose:t})]})})}function Vrt({text:e}){return(0,I.jsx)(A5,{delayDuration:150,children:(0,I.jsxs)(j5,{children:[(0,I.jsx)(M5,{asChild:!0,children:(0,I.jsx)(`button`,{type:`button`,className:`oc-field__help`,"aria-label":e,onClick:e=>e.preventDefault(),children:(0,I.jsx)(xee,{"aria-hidden":!0})})}),(0,I.jsx)(N5,{className:`max-w-xs text-pretty`,children:e})]})})}function u7({label:e,help:t}){return(0,I.jsxs)(`span`,{className:`oc-field__label`,children:[e,(0,I.jsx)(Vrt,{text:t})]})}function d7({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)(_m,{"aria-hidden":!0}):(0,I.jsx)(Bm,{"aria-hidden":!0}),(0,I.jsxs)(`span`,{children:[e,` — `,t.ok?yNe():t.detail]})]}):(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--skip`,children:[e,` — `,SNe()]}):null}function Hrt({instance:e,onClose:t}){let n=F(V.admin.upsertInstanceConfig),r=$n(V.bridge.validateMediaPaths),i=E1(),[a,o]=(0,N.useState)(()=>drt(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(sNe(),e)}finally{u(!1)}}async function _(){c(!0);try{let r=e.config??{};await n({instanceId:e._id,config:frt(a,r)}),t()}catch(e){i.error(OMe(),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)(u7,{label:pMe(),help:jMe()}),(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:lrt.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(u7,{label:gMe(),help:PMe()}),(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:urt.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(u7,{label:yMe(),help:LMe()}),(0,I.jsx)(a1,{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)(u7,{label:UMe(),help:KMe()}),(0,I.jsx)(a1,{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)(u7,{label:YMe(),help:QMe()}),(0,I.jsx)(a1,{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)(A1,{checked:a.rehydration,onCheckedChange:e=>o({...a,rehydration:e===!0})}),(0,I.jsx)(u7,{label:SMe(),help:BMe()})]}),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)(Bm,{"aria-hidden":!0}),ONe({reason:d.reason??`?`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(d7,{label:pNe(),result:d.inbound}),(0,I.jsx)(d7,{label:gNe(),result:d.outbound}),(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:uNe()})]}):(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--err`,children:[(0,I.jsx)(Bm,{"aria-hidden":!0}),TNe()]})}),(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)(wm,{className:`size-4 animate-spin`,"aria-hidden":!0}):null,l?iNe():tNe()]}),(0,I.jsx)(X,{size:`sm`,onClick:()=>void _(),disabled:s,children:TMe()})]})]})})}function Urt({versions:e}){if(e.length===0)return null;let t=[...e].reverse();return(0,I.jsxs)(Q$,{children:[(0,I.jsx)($$,{asChild:!0,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-compat__versions-btn`,children:[e.length===1?K1e():Y1e({count:e.length}),(0,I.jsx)(fm,{size:13,"aria-hidden":!0})]})}),(0,I.jsxs)(e1,{className:`oc-compat__versions-pop`,align:`start`,children:[(0,I.jsx)(`p`,{className:`oc-compat__versions-title`,children:Q1e()}),(0,I.jsx)(`div`,{className:`oc-compat__versions-list`,children:t.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e},e))})]})]})}var Wrt=[{value:`eq`,label:`=`},{value:`neq`,label:`≠`},{value:`contains`,label:QRe()},{value:`gt`,label:`>`},{value:`gte`,label:`≥`},{value:`lt`,label:`<`},{value:`lte`,label:`≤`}],f7=1;function Grt(){return{id:f7++,field:``,op:`eq`,value:``}}function Krt(e){return e.map(e=>({id:f7++,field:e.field,op:e.op,value:String(e.value)}))}function p7({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?Krt(r.current):[]);function l(e){n(e.filter(e=>e.field!==``&&e.value!==``).map(e=>({field:e.field,op:e.op,value:Crt(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,Grt()])}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)(fm,{className:`oc-advfilter__chevron`+(a?` is-open`:``),"aria-hidden":!0}),tze(),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:ize()}):(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:sze()})}),(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:Wrt.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label},e.value))})]}),(0,I.jsx)(a1,{className:`oc-advfilter__value`,value:t.value,onChange:e=>u(t.id,{value:e.target.value}),placeholder:uze()}),(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":pze(),onClick:()=>f(t.id),children:(0,I.jsx)(Wm,{})})]},t.id))}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,className:`oc-advfilter__add`,onClick:d,children:[(0,I.jsx)(Mm,{}),gze()]})]}):null]})}var qrt=[`eq`,`neq`,`contains`,`gt`,`gte`,`lt`,`lte`],m7=[50,100,200,500],h7=`now-30d`,Jrt=`now-24h`;function g7(e,t,n=h7,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 _7(e){return e.kind===`absolute`?{from:String(e.from),to:String(e.to)}:{from:e.from,to:e.to}}function v7(e){if(e.length!==0)return JSON.stringify(e)}function y7(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`||!qrt.includes(i)||typeof a!=`string`&&typeof a!=`number`&&typeof a!=`boolean`||n.push({field:r,op:i,value:a})}return n}var b7=sp().optional(),x7=sp().optional(),S7=sp().optional(),C7=sp().optional().catch(void 0),Yrt=Rp({q:b7,kind:sp().default(`all`).catch(`all`),limit:pee().pipe(Bp([Kp(m7[0]),Kp(m7[1]),Kp(m7[2]),Kp(m7[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:C7,from:x7,to:x7,adv:S7}),Xrt=Rp({q:b7,action:C7,impersonated:Wp([`yes`,`no`]).optional().catch(void 0),resource:C7,from:x7,to:x7,adv:S7}),Zrt=Rp({q:b7,status:Wp([`open`,`acknowledged`,`resolved`,`all`]).default(`open`).catch(`open`),severity:Wp([`info`,`warn`,`critical`]).optional().catch(void 0),kind:C7,from:x7,to:x7}),Qrt=Rp({from:x7,to:x7}),$rt=Rp({q:b7,status:Wp([`active`,`disabled`]).optional().catch(void 0)}),eit=Rp({q:b7,role:C7});Rp({q:b7,mode:Wp([`per-user`,`shared`]).optional().catch(void 0)});var tit={kind:`relative`,from:h7,to:`now`},w7=`__all__`,T7=[`users`,`groups`,`instances`,`bridge`,`serviceAccounts`,`roles`,`access`,`traces`,`kpi`,`anomalies`,`files`,`agentFiles`,`preferences`,`integrations`,`theme`,`chatDefaults`,`audit`,`feedbacks`],E7=[`groups`,`access`,`roles`,`integrations`,`instances`,`bridge`,`theme`,`feedbacks`,`files`,`agentFiles`,`preferences`,`chatDefaults`],D7={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`},O7={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`},k7=[`traces`,`kpi`,`anomalies`,`bridge`,`agentFiles`,`groups`];function A7(e){let t=new Set(e);return T7.filter(e=>t.has(O7[e]))}function j7(e){return`/settings/${e}`}function M7(e){let t=e.split(`/`)[2];return T7.includes(t)?t:void 0}var nit={uiprefs:`preferences`};function rit({granted:e,onToggle:t}){let n=new Set(e),r=k7.filter(e=>n.has(O7[e])).length;return(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?wme():Dme({count:r})})}),(0,I.jsxs)(q$,{align:`start`,className:`w-52`,children:[(0,I.jsx)(Y$,{children:Ame()}),k7.map(e=>{let r=O7[e];return(0,I.jsxs)(J$,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,I.jsx)(A1,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,I.jsx)(`span`,{children:D7[e]??e})]},e)})]})]})}function iit(){let e=os({from:`/settings/users`}),t=ss({from:`/settings/users`}),n=e.q??``,r=e.role??w7,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),a=e=>void t({search:t=>({...t,role:e===w7?void 0:e})}),o=P(V.admin.listUsers,{filter:{q:n||void 0,role:r===w7?void 0:r}}),s=P(V.me.getMe,{host:bO}),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=S1(),m=C1(),h=E1(),[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!==w7;function b(){t({search:{},replace:!0})}async function x(e){try{await c(e)}catch(e){h.error(Nme(),e)}}async function S(e){try{await l(e)}catch(e){h.error(Ime(),e)}}async function C(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await p({title:rhe(),description:ohe({user:t}),confirmWord:lhe(),confirmLabel:fhe(),destructive:!0}))try{await d({profileId:e._id}),h.success(vhe({user:t}))}catch(e){h.error(hhe(),e)}}async function w(e){let t=e.email||e.name||e.userId.slice(0,8),n=await m({title:whe(),label:Dhe({user:t}),placeholder:Ahe(),defaultValue:e.name??``,confirmLabel:ZZ()});if(n!==null)try{await f({profileId:e._id,name:n}),h.success(Nhe())}catch(e){h.error(Ihe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(n7,{q:n,onQChange:i,searchPlaceholder:zme(),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:w7,children:Hme()}),v.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})}),(0,I.jsx)(k5,{title:Gme(),rows:o,emptyHint:Jme(),rowActions:e=>{let t=[{label:xhe(),onSelect:()=>void w(e)}];return e.userId!==s?.userId&&t.push({label:Zme(),onSelect:()=>void u({profileId:e._id})},{label:ehe(),variant:`destructive`,onSelect:()=>void C(e)}),t},columns:[{header:zhe(),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:Hhe(),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:Ghe(),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:Jhe()}):(0,I.jsx)(rit,{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:JZ(),cell:e=>(0,I.jsx)(X,{variant:`outline`,size:`sm`,className:`h-8 font-normal`,onClick:()=>_({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)}),children:YZ()})}]}),(0,I.jsx)(art,{profileId:g?.profileId??null,userLabel:g?.label??``,open:g!==null,onOpenChange:e=>{e||_(null)}})]})}var N7={name:``,gatewayUrl:``,bridgeUrl:``,displayName:``,kind:`openclaw`,gatewayVersion:``,gatewayHttpUrl:``},ait={openclaw:[`token`,`deviceIdentity`],hermes:[`apiKey`]};function oit(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 sit(){let e=P(V.admin.listInstances,{}),t=P(V.agents.listAllInstanceAgents,{}),n=F(V.admin.upsertInstance),r=F(V.admin.deleteInstance),i=E1(),[a,o]=(0,N.useState)(!1),[s,c]=(0,N.useState)(N7),[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(N7),g(null),o(!1)}catch(e){i.error(tge(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[ige(),(0,I.jsx)(`strong`,{children:sge()}),uge()]}),(0,I.jsx)(k5,{title:pge(),rows:e,addLabel:gge(),onAdd:()=>{g(null),c(N7),o(!0)},emptyHint:yge(),columns:[{header:Sge(),cell:e=>e.name,sort:e=>e.name},{header:Tge(),cell:e=>(0,I.jsx)($,{variant:`outline`,children:e.kind??`openclaw`}),sort:e=>e.kind??`openclaw`},{header:Oge(),cell:e=>e.gatewayUrl,sort:e=>e.gatewayUrl},{header:jge(),cell:e=>e.displayName??`—`,sort:e=>e.displayName??null},{header:JZ(),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)?oQ():void 0,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]},e.agentId))})}}],rowActions:e=>[{label:Hge(),onSelect:()=>{g(e._id),c(oit(e)),o(!0)}},{label:YZ(),onSelect:()=>u(e.name)},{label:M_e(),onSelect:()=>m(e)},{label:Pge(),onSelect:()=>f(e)},{label:XZ(),variant:`destructive`,onSelect:()=>void r({instanceId:e._id})}],bulkActions:[{label:XZ(),variant:`destructive`,onSelect:e=>e.forEach(e=>void r({instanceId:e}))}]}),(0,I.jsx)(Q8,{open:a,onOpenChange:o,title:h?Gge():zge(),description:Zge(),canSubmit:!!(s.name&&s.gatewayUrl),onSubmit:_,submitLabel:ZZ(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(I7,{label:n_e(),children:[(0,I.jsx)(a1,{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:Jge()}):null]}),(0,I.jsx)(I7,{label:a_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)(I7,{label:c_e(),children:(0,I.jsx)(a1,{value:s.gatewayUrl,onChange:e=>c({...s,gatewayUrl:e.target.value})})}),(0,I.jsx)(I7,{label:d_e(),children:(0,I.jsx)(a1,{value:s.bridgeUrl,placeholder:m_e(),onChange:e=>c({...s,bridgeUrl:e.target.value})})}),(0,I.jsx)(I7,{label:__e(),children:(0,I.jsx)(a1,{value:s.displayName,onChange:e=>c({...s,displayName:e.target.value})})}),(0,I.jsx)(I7,{label:b_e(),children:(0,I.jsx)(a1,{value:s.gatewayVersion,placeholder:C_e(),onChange:e=>c({...s,gatewayVersion:e.target.value})})}),(0,I.jsx)(I7,{label:E_e(),children:(0,I.jsx)(a1,{value:s.gatewayHttpUrl,placeholder:k_e(),onChange:e=>c({...s,gatewayHttpUrl:e.target.value})})})]})}),(0,I.jsx)(hit,{instanceName:l,open:l!==null,onOpenChange:e=>{e||u(null)}}),d?(0,I.jsx)(l7,{instance:d,onClose:()=>f(null)},d._id):null,p?(0,I.jsx)(cit,{instance:p,onClose:()=>m(null)},p._id):null]})}function cit({instance:e,onClose:t}){let n=P(V.instanceSecrets.listInstanceSecretStatus,{}),r=ait[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)(m1,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(h1,{onOpenAutoFocus:e=>e.preventDefault(),children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:F_e({instance:e.displayName??e.name})}),(0,I.jsx)(y1,{children:R_e()})]}),(0,I.jsx)(`div`,{className:`oc-form`,children:r.map(t=>(0,I.jsx)(dit,{instanceId:e._id,field:t,updatedAt:i[t]??null},t))}),(0,I.jsx)(`div`,{className:`oc-bridgesecret`,children:(0,I.jsx)(uit,{instance:e})}),(0,I.jsx)(lit,{instance:e})]})})}function lit({instance:e}){let t=$n(V.instanceSync.forceInstanceSync),n=E1(),[r,i]=(0,N.useState)(!1);async function a(){if(!r){i(!0);try{let r=await t({instanceId:e._id});r.status===`synced`?n.success(Bve()):r.status===`no_agents`?n.success(Gve()):n.error(nQ())}catch(e){n.error(nQ(),e)}finally{i(!1)}}}return(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Jve()}),(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?Lve():Pve()})})]})}function uit({instance:e}){let t=P(V.bridgeAuth.listBridgeAuthStatus,{}),n=$n(V.bridgeAuth.mintBridgeSecret),r=F(V.bridgeAuth.revokeBridgeSecret),i=E1(),[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(rQ(),e)}finally{o(!1)}}}async function m(){if(!a){o(!0);try{await r({instanceId:e._id}),c(null),i.success(fye())}catch(e){i.error(rQ(),e)}finally{o(!1)}}}async function h(){if(s)try{await navigator.clipboard.writeText(s),u(!0)}catch{}}return(0,I.jsxs)(I7,{label:Zve(),children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:eye()}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)($,{variant:f?`outline`:`secondary`,children:f?`${QZ()} · ${d.prefix}…${d.lastFour}`:$Z()}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(X,{size:`sm`,onClick:()=>void p(),disabled:a,children:f?oye():rye()}),f?(0,I.jsx)(X,{size:`sm`,variant:`destructive`,onClick:()=>void m(),disabled:a,children:lye()}):null]})]}),s?(0,I.jsxs)(`div`,{className:`oc-bridgesecret__reveal`,children:[(0,I.jsx)(`p`,{className:`oc-sa__minted-warning`,children:_ye()}),(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:iQ()})]}):null]})}function dit({instanceId:e,field:t,updatedAt:n}){let r=$n(V.instanceSecrets.setInstanceSecret),i=F(V.instanceSecrets.clearInstanceSecret),a=$n(V.deviceIdentity.generateDeviceIdentity),o=E1(),[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`?V_e():t===`deviceIdentity`?W_e():q_e();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(fve())}catch(e){o.error(eQ(),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(eQ(),e)}finally{u(!1)}}}async function b(){if(!l){u(!0);try{f(await a({instanceId:e})),m(!1),o.success(tQ())}catch(e){o.error(jve(),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)(I7,{label:_,children:[g?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Cve()}):null,(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)($,{variant:h?`outline`:`secondary`,children:h?QZ():$Z()}),(0,I.jsx)(a1,{type:`password`,autoComplete:`off`,className:`flex-1 min-w-32`,value:s,placeholder:h?rve():eve(),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:ove()}),g?(0,I.jsx)(X,{size:`sm`,variant:`outline`,onClick:()=>void b(),disabled:l,children:bve()}):null,h?(0,I.jsx)(X,{size:`sm`,variant:`destructive`,onClick:()=>void y(),disabled:l,children:lve()}):null]})]}),d?(0,I.jsxs)(`div`,{className:`oc-bridgesecret__reveal`,children:[(0,I.jsx)(`p`,{className:`text-sm font-medium`,children:tQ()}),(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Ove()}),(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:iQ()})]}):null]})}var fit={conversational:Hye,documentary:Jye},pit={conversational:Gye,documentary:Zye},P7=e=>(fit[e]??(()=>e))(),F7=e=>(pit[e]??(()=>``))();function mit({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:Aye()}),t.map(e=>(0,I.jsx)($,{variant:`secondary`,className:`oc-agenttype__chip`,title:F7(e),children:P7(e)},e)),(0,I.jsxs)(Q$,{children:[(0,I.jsx)($$,{asChild:!0,children:(0,I.jsx)(X,{type:`button`,variant:`outline`,size:`sm`,className:`h-7`,children:Nye()})}),(0,I.jsxs)(e1,{align:`start`,className:`oc-agenttypes-pop`,children:[(0,I.jsx)(`p`,{className:`oc-agenttypes-pop__title`,children:Iye()}),(0,I.jsx)(`p`,{className:`oc-agenttypes-pop__hint`,children:zye()}),(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)(A1,{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:P7(r)}),(0,I.jsx)(`span`,{className:`oc-agenttypes-pop__desc`,children:F7(r)})]})]},r)})})]})]})]})}function hit({instanceName:e,open:t,onOpenChange:n}){let r=P(V.agents.listAgentsForInstance,t&&e?{instanceName:e}:`skip`),i=F(V.agents.setAgentEnabled),a=F(V.agents.setInstanceDefaultAgent),o=F(V.agents.setAgentTypes),s=F(V.agents.removeInstanceAgent),c=S1(),l=E1();async function u(t,n){if(e)try{await i({instanceName:e,agentId:t,enabled:n})}catch(e){l.error(aQ(),e)}}async function d(t){if(e)try{await a({instanceName:e,agentId:t})}catch(e){l.error(aQ(),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(aQ(),e)}}async function p(t,n){if(e&&await c({title:obe({name:n}),description:lbe(),confirmLabel:fbe(),destructive:!0}))try{await s({instanceName:e,agentId:t}),l.success(hbe())}catch(e){l.error(aQ(),e)}}return(0,I.jsx)(m1,{open:t,onOpenChange:n,children:(0,I.jsxs)(h1,{className:`oc-access`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:Sye({name:e??``})}),(0,I.jsx)(y1,{children:Tye()})]}),r===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:vbe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-access__poll`,children:r.discovery===null?xbe():r.discovery.lastPollOk?wbe():Dbe({error:r.discovery.error??`?`})}),r.agents.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Abe()}):(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)(A1,{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:Fbe()}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,className:`h-7 text-destructive`,onClick:()=>void p(e.agentId,i),children:rbe()})]}):n?(0,I.jsx)($,{variant:`default`,children:oQ()}):(0,I.jsx)(X,{size:`sm`,variant:`outline`,className:`h-7`,disabled:!e.enabled,onClick:()=>void d(e.agentId),children:ebe()})]}),e.enabled?(0,I.jsx)(mit,{agentId:e.agentId,types:a,onToggle:t=>void f(e.agentId,t,a)}):null]},e.agentId)})})]})]})})}function I7({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 git=[{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 _it(){let e=os({from:`/settings/audit`}),t=ss({from:`/settings/audit`}),n=e.q??``,r=e.action??w7,i=e.impersonated??w7,a=e.resource??w7,o=g7(e.from,e.to),s=(0,N.useMemo)(()=>y7(e.adv),[e.adv]),{from:c,to:l}=$5(o),u=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),d=e=>void t({search:t=>({...t,action:e===w7?void 0:e})}),f=e=>void t({search:t=>({...t,impersonated:e===w7?void 0:e})}),p=e=>void t({search:t=>({...t,resource:e===w7?void 0:e})}),m=e=>void t({search:t=>({...t,..._7(e)})}),h=e=>void t({search:t=>({...t,adv:v7(e)}),replace:!0}),g=P(V.admin.listAudit,{filter:{q:n||void 0,from:c,to:l,action:r===w7?void 0:r,resource:a===w7?void 0:a,impersonated:i===w7?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!==w7||i!==w7||a!==w7||s.length>0||o.kind!==`relative`||o.from!==tit.from;function b(){t({search:{},replace:!0})}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[Rbe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:Vbe()})]}),(0,I.jsxs)(n7,{q:n,onQChange:u,searchPlaceholder:Wbe(),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:sQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:w7,children:Ybe()}),_.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:w7,children:Qbe()}),(0,I.jsx)(Q,{value:`yes`,children:txe()}),(0,I.jsx)(Q,{value:`no`,children:ixe()})]})]}),(0,I.jsxs)(C3,{value:a,onValueChange:p,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{placeholder:cQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:w7,children:lxe()}),v.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),(0,I.jsx)(p7,{fields:git,seed:s,onChange:h}),(0,I.jsx)(k5,{title:fxe(),rows:g,emptyHint:hxe(),columns:[{header:vxe(),cell:e=>new Date(e.at).toLocaleString(`fr-FR`),sort:e=>e.at},{header:sQ(),cell:e=>e.action,sort:e=>e.action},{header:xxe(),cell:e=>e.realLabel,sort:e=>e.realLabel},{header:wxe(),cell:e=>e.targetLabel??`—`,sort:e=>e.targetLabel??null},{header:cQ(),cell:e=>e.resource?e.resource+(e.resourceId?` · ${e.resourceId.slice(0,8)}`:``):`—`,sort:e=>e.resource??null}]})]})}var vit={pending:sCe,user:uCe,admin:pCe,observer:gCe,agent:yCe};function L7(e){if(e.builtin){let t=vit[e.key];if(t)return t()}return e.description}var R7=[{value:`never`,label:()=>rH(),days:null},{value:`30`,label:()=>oH(),days:30},{value:`90`,label:()=>lH(),days:90}],yit=720*60*60*1e3,z7=`__all__`,B7={name:``,roleKey:``,description:``};function bit(){let e=os({from:`/settings/serviceAccounts`}),t=ss({from:`/settings/serviceAccounts`}),n=e.q??``,r=e.status??z7,[i,a]=(0,N.useState)(z7),o=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),s=e=>void t({search:t=>({...t,status:e===z7?void 0:e})}),c=P(V.apiKeys.listServiceAccounts,{filter:{q:n||void 0,role:i===z7?void 0:i,disabled:r===z7?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=S1(),_=E1(),v=n!==``||i!==z7||r!==z7;function y(){a(z7),t({search:{},replace:!0})}let[b,x]=(0,N.useState)(!1),[S,C]=(0,N.useState)(B7),[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(B7),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=R7.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)(n7,{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:z7,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:z7,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(B7),T(null),x(!0)},emptyHint:HR(),isExpanded:e=>E.has(e._id),renderExpanded:e=>(0,I.jsx)(xit,{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)(fm,{}):(0,I.jsx)(pm,{})})},{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:R7.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)(a1,{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?L7(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)(a1,{value:S.description,onChange:e=>C({...S,description:e.target.value})})]})]})}),(0,I.jsx)(Sit,{minted:re,onClose:()=>M(null)})]})}function xit({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:Cit(t.createdAt)}),(0,I.jsx)(`td`,{className:wit(t.lastUsedAt)?`oc-sa__stale`:``,children:Tit(t.lastUsedAt)}),(0,I.jsx)(`td`,{children:Eit(t.expiresAt)}),(0,I.jsx)(`td`,{children:Dit(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 Sit({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)(m1,{open:e!==null,onOpenChange:e=>{e||(r(!1),t())},children:e?(0,I.jsxs)(h1,{className:`max-w-lg`,showCloseButton:!1,onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:IV()}),(0,I.jsx)(y1,{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)(dm,{}):(0,I.jsx)(vm,{}),n?JV():ZV()]})]}),(0,I.jsx)(_1,{children:(0,I.jsx)(X,{onClick:()=>{r(!1),t()},children:eH()})})]}):null})}function Cit(e){return new Date(e).toLocaleString(`fr-FR`)}function wit(e){return e===null?!1:Date.now()-e>yit}function Tit(e){return e===null?fH():new Date(e).toLocaleString(`fr-FR`)}function Eit(e){return e===null?`—`:new Date(e).toLocaleDateString(`fr-FR`)}function Dit(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 V7=[{group:()=>Dxe(),keys:[{key:`traces.read`,label:()=>lQ()},{key:`traces.read.content`,label:()=>Wxe(),phi:!0},{key:`traces.write`,label:()=>uQ()}]},{group:()=>Axe(),keys:[{key:`kpi.read`,label:()=>lQ()},{key:`kpi.write`,label:()=>uQ()}]},{group:()=>Nxe(),keys:[{key:`openclaw.query`,label:()=>Yxe()},{key:`anomalies.read`,label:()=>Qxe()},{key:`anomalies.report`,label:()=>tSe()}]},{group:()=>Ixe(),keys:[{key:`chats.read`,label:()=>lQ()},{key:`selfheal`,label:()=>sSe()}]},{group:()=>zxe(),keys:[{key:`admin.manage`,label:()=>iSe()}]}],Oit=V7.flatMap(e=>e.keys.map(e=>e.key));function H7(e){return e.includes(`*`)}var U7={key:``,name:``,description:``};function kit(){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=S1(),a=E1(),[o,s]=(0,N.useState)(!1),[c,l]=(0,N.useState)(U7),[u,d]=(0,N.useState)(new Set);(0,N.useEffect)(()=>{n({}).catch(e=>{a.error(pSe(),e)})},[n,a]);let f=e??[];async function p(e,t){if(H7(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:gSe({name:e.name}),description:ySe(),confirmLabel:SSe()}))){d(t=>new Set(t).add(e._id));try{await r({roleId:e._id,permissions:n})}catch(e){a.error(TSe(),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(U7),s(!1)}catch(e){a.error(OSe(),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:[jSe(),` `,(0,I.jsx)(`code`,{children:`admin`}),` `,PSe(),` `,(0,I.jsx)(`code`,{children:`traces.read.content`}),` `,LSe()]}),(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:BSe()}),(0,I.jsx)(`div`,{className:`oc-dt__bar-actions`,children:(0,I.jsx)(X,{size:`sm`,onClick:()=>{l(U7),s(!0)},children:USe()})})]}),h?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:KSe()}):g?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:YSe()}):(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:QSe()}),V7.map(e=>(0,I.jsx)(`th`,{className:`oc-matrix__group`,colSpan:e.keys.length,children:e.group()},e.group()))]}),(0,I.jsx)(`tr`,{children:V7.flatMap(e=>e.keys.map(e=>(0,I.jsxs)(`th`,{className:`oc-matrix__perm`,title:e.phi?uSe({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=H7(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)(Aee,{}),` `,tCe()]}):(0,I.jsx)($,{variant:`secondary`,children:iCe()})]}),L7(e)?(0,I.jsx)(`p`,{className:`oc-matrix__roledesc`,children:L7(e)}):null]}),Oit.map(r=>(0,I.jsx)(`td`,{className:`oc-matrix__cell`,children:(0,I.jsx)(A1,{checked:t||e.permissions.includes(r),disabled:t||n,"aria-label":`${e.key} · ${r}`,title:t?SCe():n?TCe():r,onCheckedChange:()=>void p(e,r)})},r))]},e.key)})})]})})]}),(0,I.jsx)(Q8,{open:o,onOpenChange:s,title:OCe(),description:jCe(),canSubmit:!!(c.key&&c.name),onSubmit:m,submitLabel:PCe(),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:LCe()}),(0,I.jsx)(a1,{value:c.key,placeholder:BCe(),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:UCe()}),(0,I.jsx)(a1,{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:KCe()}),(0,I.jsx)(a1,{value:c.description,onChange:e=>l({...c,description:e.target.value})})]})]})})]})}function Ait(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 jit(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 Mit(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 Nit(e){switch(e){case`admin`:return nJe();case`user`:return aJe();case`pending`:return cJe();default:return e}}function W7(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 G7(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 Pit({className:e,orientation:t=`horizontal`,...n}){return(0,I.jsx)(Qle,{"data-slot":`tabs`,"data-orientation":t,className:W$(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Fit=r1(`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 Iit({className:e,variant:t=`default`,...n}){return(0,I.jsx)($le,{"data-slot":`tabs-list`,"data-variant":t,className:W$(Fit({variant:t}),e),...n})}function K7({className:e,...t}){return(0,I.jsx)(eue,{"data-slot":`tabs-trigger`,className:W$(`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 q7({className:e,...t}){return(0,I.jsx)(tue,{"data-slot":`tabs-content`,className:W$(`flex-1 text-sm outline-none`,e),...t})}var J7={name:``,description:``};function Y7({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 Lit(){let e=P(V.groups.listGroups,{}),t=P(V.me.getMe,{host:bO})?.role===`admin`,n=F(V.groups.createGroup),r=F(V.groups.updateGroup),i=F(V.groups.deleteGroup),a=S1(),o=E1(),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(null),[d,f]=(0,N.useState)(J7),[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(J7),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(J7),u(null),c(!1)}catch(e){o.error(xYe(),e)}}async function x(e){if(await a({title:hqe({name:e.name}),description:vqe(),confirmWord:e.name,confirmLabel:xqe(),cancelLabel:ZKe(),destructive:!0}))try{await i({groupId:e._id})}catch(e){o.error(wYe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:hKe()}),(0,I.jsx)(n7,{q:h,onQChange:g,onReset:()=>g(``),canReset:h!==``,searchPlaceholder:IKe()}),(0,I.jsx)(k5,{title:fKe(),rows:_,addLabel:vKe(),onAdd:t?v:void 0,emptyHint:xKe(),columns:[{header:wKe(),cell:e=>e.name,sort:e=>e.name},{header:DKe(),cell:e=>(0,I.jsx)(Y7,{icon:(0,I.jsx)(Hm,{size:12,"aria-hidden":!0}),total:e.memberCount,items:e.members.map(e=>({label:e.label,marker:e.manager?(0,I.jsx)(Im,{size:11,"aria-hidden":!0}):null,highlight:e.manager}))}),sort:e=>e.memberCount},{header:AKe(),cell:e=>(0,I.jsx)(Y7,{icon:(0,I.jsx)(Fm,{size:12,"aria-hidden":!0}),total:e.agentCount,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount},{header:NKe(),cell:e=>(0,I.jsx)(Y7,{icon:(0,I.jsx)(jm,{size:12,"aria-hidden":!0}),total:e.chartCount,items:e.charts.map(e=>({label:e.name,marker:e.isDefault?(0,I.jsx)(Rm,{size:11,fill:`currentColor`,"aria-hidden":!0}):null,highlight:e.isDefault}))}),sort:e=>e.chartCount}],rowActions:e=>[{label:zKe(),onSelect:()=>m({groupId:e._id,name:e.name})},...t?[{label:HKe(),onSelect:()=>y(e)},{label:GKe(),variant:`destructive`,onSelect:()=>void x(e)}]:[]]}),(0,I.jsx)(Q8,{open:s,onOpenChange:c,title:l?rqe():eqe(),description:oqe(),canSubmit:!!d.name.trim(),onSubmit:b,submitLabel:JKe(),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:lqe()}),(0,I.jsx)(a1,{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:fqe()}),(0,I.jsx)(a1,{value:d.description,onChange:e=>f({...d,description:e.target.value})})]})]})}),(0,I.jsx)(Rit,{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)(yee,{size:14,"aria-hidden":!0}),qqe()]}),(0,I.jsxs)(`span`,{className:`oc-access__pageinfo`,"aria-label":$qe({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:[Xqe(),(0,I.jsx)(pm,{size:14,"aria-hidden":!0})]})]})}function Rit({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=E1(),[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?Ait(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(GQ(),e)}}async function ee(t,n){if(e)try{await u({groupId:e,userId:t,manager:!n})}catch(e){d.error(gYe(),e)}}let te=W7(D,e=>C.has(e.userId)),k=D.filter(e=>C.has(e.userId)).length,A=G7(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(GQ(),e)}}return(0,I.jsx)(m1,{open:n,onOpenChange:r,children:(0,I.jsxs)(h1,{className:`oc-access`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:wqe({name:t})}),(0,I.jsx)(y1,{children:Dqe()})]}),(0,I.jsxs)(Pit,{value:g,onValueChange:_,className:`oc-access__tabs`,children:[(0,I.jsxs)(Iit,{className:`w-full`,children:[(0,I.jsxs)(K7,{value:`members`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Hm,{size:13,"aria-hidden":!0}),Aqe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:C.size}):null]}),(0,I.jsxs)(K7,{value:`agents`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Fm,{size:13,"aria-hidden":!0}),Iqe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:E.size}):null]}),(0,I.jsxs)(K7,{value:`charts`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(jm,{size:13,"aria-hidden":!0}),HJe(),i?(0,I.jsx)($,{variant:`secondary`,className:`oc-access__tabcount`,children:i.chartCount}):null]})]}),(0,I.jsx)(q7,{value:`members`,children:o===void 0||i===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:LQ()}):o.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:SJe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(a1,{value:f,onChange:e=>p(e.target.value),placeholder:Nqe(),className:`oc-access__search`}),D.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Hqe()}):(0,I.jsxs)(I.Fragment,{children:[D.length>1?(0,I.jsxs)(`div`,{className:`oc-access__row oc-access__selectall`,children:[(0,I.jsx)(A1,{checked:te===`all`?!0:te===`some`?`indeterminate`:!1,onCheckedChange:()=>void j(),"aria-label":IQ()}),(0,I.jsx)(`span`,{className:`oc-access__label`,children:IQ()}),(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=Mit(e),r=w.has(e.userId);return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(A1,{checked:t,onCheckedChange:()=>void O(e.userId,t),"aria-label":dJe({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:Nit(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?UQ():HQ(),title:r?UQ():HQ(),onClick:()=>void ee(e.userId,r),children:(0,I.jsx)(Im,{size:15,"aria-hidden":!0})}):t&&r?(0,I.jsx)(`span`,{className:`oc-access__mgr oc-access__mgr--on`,role:`img`,"aria-label":VQ(),title:VQ(),children:(0,I.jsx)(Im,{size:15,"aria-hidden":!0})}):null})]},e._id)})}),(0,I.jsx)(Z7,{page:A.page,pageCount:A.pageCount,onPage:y})]})]})}),(0,I.jsx)(q7,{value:`agents`,children:a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:LQ()}):a.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:TJe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(a1,{value:m,onChange:e=>h(e.target.value),placeholder:zqe(),className:`oc-access__search`}),(0,I.jsx)(`div`,{className:`oc-access__list`,children:a.map(t=>(0,I.jsx)(zit,{groupId:e,instanceName:t.name,kind:t.kind??`openclaw`,assigned:E,query:m},`${e}-${t._id}`))})]})}),(0,I.jsx)(q7,{value:`charts`,children:(0,I.jsx)(Bit,{groupId:e})})]})]})})}function zit({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=E1(),[u,d]=(0,N.useState)(1);if((0,N.useEffect)(()=>{d(1)},[i]),!e)return null;let f=jit(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=W7(m,e=>r.has(`${t}/${e.agentId}`)),g=G7(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(KQ(),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(KQ(),e)}}return(0,I.jsxs)(`div`,{className:`oc-access__group`,children:[(0,I.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,I.jsx)(Fm,{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:PJe()}):null]}),a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:yJe()}):f.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:p?jJe():OJe()}):(0,I.jsxs)(I.Fragment,{children:[m.length>1?(0,I.jsxs)(`div`,{className:`oc-access__row oc-access__selectall`,children:[(0,I.jsx)(A1,{checked:h===`all`?!0:h===`some`?`indeterminate`:!1,onCheckedChange:()=>void v(),"aria-label":IQ()}),(0,I.jsx)(`span`,{className:`oc-access__label`,children:IQ()})]}):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)(A1,{checked:i,disabled:a&&!i,onCheckedChange:()=>void _(e.agentId,i),"aria-label":mJe({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":RQ(),title:RQ(),children:(0,I.jsx)(Rm,{size:14,fill:`currentColor`})}):null,a?(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:LJe()}):null]},e.agentId)}),(0,I.jsx)(Z7,{page:g.page,pageCount:g.pageCount,onPage:d})]})]})}function Bit({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=E1();if(!e)return null;if(t===void 0)return(0,I.jsx)(`p`,{className:`oc-access__hint`,children:LQ()});let{pool:c,addable:l,canManagePool:u}=t;if(c.length===0&&!u)return(0,I.jsx)(`p`,{className:`oc-access__hint`,children:GJe()});async function d(t,i){try{i?await r({groupId:e,chartKey:t}):await n({groupId:e,chartKey:t})}catch(e){s.error(WQ(),e)}}async function f(t){try{await i({groupId:e,chartKey:t})}catch(e){s.error(WQ(),e)}}async function p(t){try{await a({groupId:e,chartKey:t})}catch(e){s.error(WQ(),e)}}async function m(t){try{await o({groupId:e,chartKey:t})}catch(e){s.error(WQ(),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)(A1,{checked:e.selected,onCheckedChange:()=>void d(e.chartKey,e.selected),"aria-label":nYe({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":BQ(),title:BQ(),children:(0,I.jsx)(Rm,{size:14,fill:`currentColor`})}):(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>void f(e.chartKey),children:sYe()}):null,u?(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":zQ({name:e.name}),title:zQ({name:e.name}),onClick:()=>void m(e.chartKey),children:(0,I.jsx)(Wm,{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:ZJe()})}),(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:JJe()}):null:null]})}var Vit=[50,100,200,500],Q7=`all`,$7=`__all__`,Hit=[`2xx`,`4xx`,`5xx`],Uit=[`user`,`service`,`system`],Wit=[`inbound`,`outbound`,`internal`],Git={kind:`relative`,from:`now-30d`,to:`now`},Kit=[{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 qit(){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=g7(e.from,e.to),u=(0,N.useMemo)(()=>y7(e.adv),[e.adv]),{from:d,to:f}=$5(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,..._7(e)})}),T=e=>void t({search:t=>({...t,adv:v7(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!==Git.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:[zDe(),(0,I.jsx)(`strong`,{children:HDe()}),GDe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:JDe()})]}),(0,I.jsxs)(n7,{q:c,onQChange:y,searchPlaceholder:ZDe(),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:eOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:rOe()}),Hit.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:oOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:lOe()}),Uit.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:fOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:hOe()}),Wit.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:vOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:xOe()}),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:wOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:Q7,children:DOe()}),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:Vit.map(e=>(0,I.jsx)(Q,{value:String(e),children:AOe({count:e})},e))})]})]}),(0,I.jsx)(p7,{fields:Kit,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:NOe(),children:[(0,I.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[IOe(),(0,I.jsx)(`code`,{children:e9(p)})]}),(0,I.jsx)(Wm,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`sr-only`,children:zOe()})]})}):null,(0,I.jsx)(k5,{title:HOe(),rows:A,emptyHint:p?GOe():JOe(),columns:[{header:ZOe(),sort:e=>e.at,cell:e=>(0,I.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:eke(),sort:e=>e.kind,cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.kind})},{header:rke(),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":oke(),children:`✓`})}},{header:lke(),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:fke(),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:hke(),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:vke(),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:xke(),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 ${Jit(e.status)}`,children:e.status})},{header:wke(),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:Dke(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,I.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:Ake(),onClick:()=>m(e.correlationId),children:e9(e.correlationId)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Nke(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>g(e),children:Ike()}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,I.jsx)(Yit,{row:h,onClose:()=>g(null)})]})}function Jit(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 Yit({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)(m1,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,I.jsxs)(h1,{className:`max-w-lg`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsxs)(v1,{className:`oc-traces__meta-title`,children:[zke(),` `,(0,I.jsx)(`code`,{children:e.kind}),(0,I.jsx)($,{variant:`outline`,children:Hke()})]}),(0,I.jsx)(y1,{children:Gke()})]}),(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:W$(`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:W$(`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:W$(`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:W$(`text-sm text-muted-foreground`,e),...t})}function o9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-content`,className:W$(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function Xit({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-footer`,className:W$(`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:VFe(),unit:`/h`,group:`API`,isError:!1},{metric:`api.errors`,label:WFe(),unit:`/h`,group:`API`,isError:!0},{metric:`api.latency.avg_ms`,label:qFe(),unit:`ms`,group:`API`,isError:!1},{metric:`openclaw.ingest`,label:XFe(),unit:`/h`,group:`OpenClaw`,isError:!1},{metric:`chat.send`,label:$Fe(),unit:`/h`,group:`Chat`,isError:!1},{metric:`assistant.stream.errors`,label:nIe(),unit:`/h`,group:`Assistant`,isError:!0}],c9=s9.length,Zit=[`API`,`OpenClaw`,`Chat`,`Assistant`],Qit=1e3,$it=36e5;function eat(e,t){let n=Math.max(1,Math.ceil((t-e)/$it)),r=Math.min(n*c9,Qit);return{rowLimit:r,buckets:Math.max(1,Math.floor(r/c9))}}function tat(){let e=os({from:`/settings/kpi`}),t=ss({from:`/settings/kpi`}),n=g7(e.from,e.to,Jrt,`now`),r=e=>void t({search:t=>({...t,..._7(e)})}),{from:i,to:a}=$5(n),{rowLimit:o,buckets:s}=eat(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:[aIe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:cIe()})]}),(0,I.jsx)(nat,{value:n,onChange:r})]});return c===void 0?(0,I.jsxs)(I.Fragment,{children:[u,(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:dIe()})]}):c.length===0?(0,I.jsxs)(I.Fragment,{children:[u,(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:mIe()})]}):(0,I.jsxs)(I.Fragment,{children:[u,Zit.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)(rat,{config:e,series:l.get(e.metric)??[]},e.metric))})]},e):null})]})}function nat({value:e,onChange:t}){return(0,I.jsx)(`div`,{className:`oc-kpi__toolbar`,children:(0,I.jsx)(t7,{value:e,onChange:t})})}function rat({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)(aat,{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:_Ie({value:f9(n.bucket)})}):(0,I.jsx)(`span`,{className:`oc-kpi__muted`,children:bIe()}),(0,I.jsx)(`span`,{className:`oc-kpi__muted`,children:CIe({count:t.length})})]})]})]})}var l9=240,u9=48,iat=1;function aat({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-iat,1);return(0,I.jsx)(`svg`,{className:`oc-kpi__chart`,viewBox:`0 0 ${l9} ${u9}`,preserveAspectRatio:`none`,role:`img`,"aria-label":EIe({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__`,oat=[{value:`open`},{value:`acknowledged`},{value:`resolved`}];function sat(e){return e===`open`?YCe():e===`acknowledged`?QCe():twe()}var cat=[`info`,`warn`,`critical`],lat=[`detector`,`agent`],uat={kind:`relative`,from:`now-30d`,to:`now`},dat=200,m9=`all`;function fat(){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=g7(e.from,e.to),{from:l,to:u}=$5(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,..._7(e)})}),g=S1(),_=E1(),v=F(V.anomalies.resolveAnomaly),y=(P(V.me.getMe,{host:bO})?.permissions??[]).includes(`admin.manage`),b=P(V.anomalies.listAnomalies,{limit:dat,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!==uat.from;function C(){s(p9),t({search:{status:`open`},replace:!0})}async function w(e){if(await g({title:iwe(),description:(0,I.jsxs)(I.Fragment,{children:[swe(),` `,(0,I.jsx)(`span`,{className:`font-mono`,children:e.kind}),` `,uwe(),` `,(0,I.jsx)(`strong`,{children:pwe()}),`.`,` `,gwe()]}),confirmLabel:ywe()}))try{await v({anomalyId:e._id,status:`resolved`}),_.success(Swe(),e.kind)}catch(e){_.error(Twe(),e)}}async function T(e){try{await v({anomalyId:e._id,status:`acknowledged`}),_.success(Owe(),e.kind)}catch(e){_.error(jwe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[Pwe(),` `,(0,I.jsx)(`strong`,{children:Lwe()}),` `,Bwe(),` `,(0,I.jsx)(`strong`,{children:Uwe()}),` `,Kwe(),` `,(0,I.jsx)(`strong`,{children:Ywe()}),` `,Qwe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:tTe()})]}),(0,I.jsxs)(n7,{q:n,onQChange:d,searchPlaceholder:iTe(),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:sTe()}),oat.map(e=>(0,I.jsx)(Q,{value:e.value,children:sat(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:dQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:p9,children:fTe()}),cat.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:fQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:p9,children:_Te()}),lat.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:pQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:p9,children:STe()}),x.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),(0,I.jsx)(k5,{title:TTe(),rows:b,emptyHint:r===`open`?OTe():jTe(),rowActions:e=>y&&e.status===`open`?[{label:PTe(),onSelect:()=>void w(e)},{label:LTe(),onSelect:()=>void T(e)}]:[],columns:[{header:BTe(),cell:e=>(0,I.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)}),sort:e=>e.at},{header:pQ(),cell:e=>(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.kind}),sort:e=>e.kind},{header:dQ(),cell:e=>(0,I.jsx)(hat,{severity:e.severity}),sort:e=>e.severity===`critical`?2:+(e.severity===`warn`)},{header:UTe(),cell:e=>(0,I.jsx)(gat,{status:e.status}),sort:e=>e.status===`resolved`?2:+(e.status===`acknowledged`)},{header:fQ(),cell:e=>(0,I.jsx)($,{variant:`outline`,children:e.source}),sort:e=>e.source},{header:KTe(),cell:e=>(0,I.jsx)(`span`,{className:`oc-anomaly__msg`,children:e.message}),sort:e=>e.message},{header:YTe(),cell:e=>(0,I.jsx)(mat,{row:e}),sort:e=>e.evidence??null},{header:QTe(),cell:e=>e.correlationId?(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:_at(e.correlationId)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}),sort:e=>e.correlationId}]})]})}function pat(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 mat({row:e}){let t=ss(),n=pat(e);if(!n.dominantCode)return(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`});let r=F5(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:[`↗ `,tEe()]}):null]})}function hat({severity:e}){return(0,I.jsx)(`span`,{className:`oc-anomaly__sev oc-anomaly__sev--${e}`,children:e})}function gat({status:e}){return e===`open`?(0,I.jsx)($,{variant:`destructive`,children:iEe()}):e===`acknowledged`?(0,I.jsx)($,{variant:`secondary`,children:sEe()}):(0,I.jsx)($,{variant:`outline`,children:uEe()})}function _at(e){return e.length>8?e.slice(0,8):e}function vat(){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:vJ()});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:[xJ(),` `,(0,I.jsx)(`strong`,{children:wJ()}),` `,DJ()]}),(0,I.jsxs)(h9,{title:`Langfuse`,status:e.langfuse.configured?e.langfuse.enabled?(0,I.jsx)($,{variant:`secondary`,children:AJ()}):(0,I.jsx)($,{variant:`outline`,children:NJ()}):(0,I.jsx)($,{variant:`outline`,children:IJ()}),note:HJ(),children:[(0,I.jsx)(g9,{label:JJ(),children:(0,I.jsx)(a1,{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:oY(),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:AJ()}):(0,I.jsx)($,{variant:`outline`,children:NJ()}):(0,I.jsx)($,{variant:`outline`,children:IJ()}),note:GJ(),children:[(0,I.jsx)(g9,{label:ZJ(),children:(0,I.jsx)(a1,{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:eY(),children:(0,I.jsx)(a1,{value:i.opik.workspace??``,placeholder:e.opik.effectiveWorkspace||rY(),onChange:e=>a(`opik`,`workspace`,e.target.value),onBlur:()=>o(`opik`,{workspace:i.opik.workspace??``})})}),(0,I.jsx)(_9,{label:oY(),checked:i.opik.enabled??!0,onChange:e=>{a(`opik`,`enabled`,e),o(`opik`,{enabled:e})}})]}),(0,I.jsxs)(h9,{title:lY(),status:(0,I.jsx)($,{variant:`outline`,children:zJ()}),note:fY(),children:[(0,I.jsx)(g9,{label:hY(),children:(0,I.jsx)(v9,{value:i.tts.auto??`off`,options:[[`off`,vY()],[`always`,xY()],[`inbound`,wY()],[`tagged`,DY()]],onChange:e=>{a(`tts`,`auto`,e),o(`tts`,{auto:e})}})}),(0,I.jsx)(g9,{label:AY(),children:(0,I.jsx)(v9,{value:i.tts.provider??`openai`,options:[[`openai`,`OpenAI`],[`elevenlabs`,`ElevenLabs`],[`microsoft`,NY()],[`azure`,`Azure Speech`],[`google`,`Google Gemini`]],onChange:e=>{a(`tts`,`provider`,e),o(`tts`,{provider:e})}})}),(0,I.jsx)(g9,{label:IY(),children:(0,I.jsx)(a1,{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:zY(),children:(0,I.jsx)(a1,{value:i.tts.voice??``,placeholder:HY(),onChange:e=>a(`tts`,`voice`,e.target.value),onBlur:()=>o(`tts`,{voice:i.tts.voice??``})})})]}),(0,I.jsxs)(h9,{title:GY(),status:(0,I.jsx)($,{variant:`outline`,children:zJ()}),note:e.secrets.openai?JY():ZY(),children:[(0,I.jsx)(_9,{label:eX(),checked:i.talk.enabled??!1,onChange:e=>{a(`talk`,`enabled`,e),o(`talk`,{enabled:e})}}),(0,I.jsx)(g9,{label:rX(),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:oX(),children:(0,I.jsx)(a1,{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:zY(),children:(0,I.jsx)(a1,{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:lX(),children:(0,I.jsx)(v9,{value:i.talk.transport??`webrtc`,options:[[`webrtc`,fX()],[`provider-websocket`,`Provider WebSocket`],[`gateway-relay`,`Gateway relay`]],onChange:e=>{a(`talk`,`transport`,e),o(`talk`,{transport:e})}})}),(0,I.jsx)(g9,{label:hX(),children:(0,I.jsx)(a1,{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:vX(),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:xX()}),(0,I.jsx)($,{variant:`outline`,children:wX()})]}),(0,I.jsxs)(`p`,{className:`oc-uipa__note`,children:[DX(),(0,I.jsx)(`code`,{children:` voicewake.get/set`}),`.`]})]}),(0,I.jsx)(k5,{title:AX(),rows:e.cursors.map(e=>({...e,_id:e.vendor})),emptyHint:NX(),columns:[{header:IX(),cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.vendor}),sort:e=>e.vendor},{header:zX(),cell:e=>e.lastAt>0?new Date(e.lastAt).toLocaleString(`fr-FR`):`—`,sort:e=>e.lastAt>0?e.lastAt:null},{header:HX(),cell:e=>String(e.failureCount),sort:e=>e.failureCount},{header:GX(),cell:e=>e.lastErrorStatus??`—`,sort:e=>e.lastErrorStatus??null},{header:JX(),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)(A1,{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 yat={altered_words:()=>ZX(),incorrect:()=>eZ(),incoherence:()=>rZ(),formatting:()=>oZ(),latency:()=>lZ(),api_error:()=>fZ(),other:()=>hZ()},y9=e=>yat[e]?.()??e;function b9({matches:e,sourceWasOpen:t}){return t?e===!0?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-ok`,children:xZ()}):e===!1?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-warn`,children:wZ()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:`—`}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:vZ()})}function bat({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?` · ${DZ()}`:``,n.openclawModel?` · ${n.openclawModel}`:``,n.openclawRuntime?` (${n.openclawRuntime})`:``]})]}),e.comment?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:AZ()}),(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:rme()}),(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:NZ()}),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`?IZ():zZ()}),(0,I.jsx)(`span`,{className:`oc-notif__msg-text`,children:e.text})]},t))}):(0,I.jsx)(`p`,{className:`oc-fbadmin__meta`,children:HZ()}),(0,I.jsx)(`textarea`,{className:`oc-feedback__textarea`,placeholder:GZ(),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?gfe():yfe()})})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Sfe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.messageText||qZ()})]}),n.clientInfo?.sourceWasOpen&&n.displayedText!==void 0?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Dfe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.displayedText||qZ()})]}):null,n.promptText?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Afe()}),(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:Nfe({count:n.contextCount??d.length,truncated:n.contextTruncated?Ife():``})}),(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:zfe()}),(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:Hfe()}),(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:Gfe()}),(0,I.jsxs)(`p`,{className:`oc-fbadmin__env`,children:[[n.clientInfo?.language,n.clientInfo?.timezone,n.clientInfo?.theme?Jfe({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:[Zfe(),` `,n.clientInfo.plugins.join(`, `),(0,I.jsxs)(`span`,{className:`oc-fbadmin__note`,children:[` `,epe()]})]}):null,n.clientInfo?.userAgent?(0,I.jsx)(`span`,{className:`oc-fbadmin__ua`,children:n.clientInfo.userAgent}):null]})]})]})}function xat(){let e=P(V.feedback.listForAdmin,{}),t=F(V.feedback.readSnapshot),n=F(V.feedback.deleteFeedback),r=S1(),[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:hme(),description:vme(),confirmLabel:xme(),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:[rpe(),` `,(0,I.jsx)(`strong`,{children:ope()}),` `,lpe()]}),(0,I.jsx)(k5,{title:fpe(),rows:e,emptyHint:hpe(),isExpanded:e=>i===e._id&&!!o[e._id],renderExpanded:e=>o[e._id]?(0,I.jsx)(bat,{data:o[e._id],closeReason:e.userCloseReason}):null,columns:[{header:vpe(),cell:e=>new Date(e.at).toLocaleString(`fr-FR`),sort:e=>e.at},{header:xpe(),cell:e=>y9(e.category),sort:e=>y9(e.category)},{header:wpe(),cell:e=>e.messageRole===`user`?Dpe():Ape(),sort:e=>e.messageRole},{header:Npe(),cell:e=>(e.reporterEmail||e.reporterName||`—`)+(e.impersonated&&e.realOperatorEmail?` ${Ipe({operator:e.realOperatorEmail})}`:``),sort:e=>e.reporterEmail||e.reporterName||null},{header:zpe(),cell:e=>(0,I.jsx)(b9,{matches:e.displayedMatchesStored,sourceWasOpen:e.sourceWasOpen}),sort:e=>e.displayedMatchesStored===!1?0:e.displayedMatchesStored===!0?1:2},{header:Hpe(),cell:e=>e.hasComment?`✎`:`—`,sort:e=>+!!e.hasComment},{header:Gpe(),cell:e=>e.userClosedAt==null?e.answered?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-ok`,children:Jpe()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:Zpe()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-closed`,children:eme()}),sort:e=>e.userClosedAt==null?+!!e.answered:2}],rowActions:e=>[{label:i===e._id?ome():lme(),onSelect:()=>void c(e)},{label:fme(),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 Sat(){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=E1();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:GO()});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)(Nm,{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)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":Dj(),children:(0,I.jsx)(bm,{size:16})})}),(0,I.jsxs)(q$,{align:`end`,children:[e.url?(0,I.jsx)(J$,{asChild:!0,children:(0,I.jsxs)(`a`,{href:e.url,download:e.filename,target:`_blank`,rel:`noopener noreferrer`,children:[(0,I.jsx)(ym,{size:14}),xj()]})}):(0,I.jsxs)(J$,{disabled:!0,children:[(0,I.jsx)(ym,{size:14}),Gj()]}),(0,I.jsxs)(J$,{variant:`destructive`,onSelect:()=>l({id:e._id,filename:e.filename}),children:[(0,I.jsx)(zm,{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)(o1,{open:c!==null,onOpenChange:e=>!e&&l(null),children:(0,I.jsxs)(s1,{children:[(0,I.jsxs)(c1,{children:[(0,I.jsx)(u1,{children:zj()}),(0,I.jsx)(d1,{children:Hj()})]}),(0,I.jsxs)(l1,{children:[(0,I.jsx)(p1,{children:lW()}),(0,I.jsx)(f1,{onClick:()=>void p(),children:Aj()})]})]})})]})}var C9=2e4,w9=6e4;function Cat(e){return typeof e!=`number`||e<=0?0:Math.round(e/C9*100)}function wat(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 Tat(e,t){let n=new Map;for(let t of e.split(`
162
+ `},Stt={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 Ctt(e){let{announcements:t=Stt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=xtt}=e,{announce:a,announcement:o}=vtt(),s=v6(`DndLiveRegion`),[c,l]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{l(!0)},[]),ytt((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(gtt,{id:r,value:i.draggable}),N.createElement(_tt,{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 wtt(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 Ttt(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 Ett=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 Dtt(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 Ott=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=Dtt(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Ttt)};function ktt(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 Att(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 jtt=Att(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 Mtt(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 Ntt={ignoreTransform:!1};function B6(e,t){t===void 0&&(t=Ntt);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=o6(e).getComputedStyle(e);t&&(n=Mtt(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 Ptt(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Ftt(e,t){return t===void 0&&(t=o6(e).getComputedStyle(e)),t.position===`fixed`}function Itt(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&&Itt(i,a)&&n.push(i),Ftt(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 Ltt={x:.2,y:.2};function Rtt(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=Ltt);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 ztt(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 Btt(e){return e.reduce((e,t)=>e+G6(t),0)}function Vtt(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 Htt=[[`x`,[`left`,`right`],Btt],[`y`,[`top`,`bottom`],Vtt]],$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 Htt)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 Utt(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 Wtt(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]},Gtt=(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=Gtt,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=ztt(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=Utt(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,Wtt,{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()}},Ktt={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,Ktt,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 qtt={move:{name:`mousemove`},end:{name:`mouseup`}},d8;(function(e){e[e.RightClick=2]=`RightClick`})(d8||={});var Jtt=class extends l8{constructor(e){super(e,qtt,u6(e.event.target))}};Jtt.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`}},Ytt=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(){}}};Ytt.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 Xtt(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=Qtt({delta:d,disabled:!a}),[m,h]=dtt(),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}=Rtt(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 Ztt={x:{[J6.Backward]:!1,[J6.Forward]:!1},y:{[J6.Backward]:!1,[J6.Forward]:!1}};function Qtt(e){let{delta:t,disabled:n}=e,r=g6(t);return m6(e=>{if(n||!r||!e)return Ztt;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 $tt(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 ent(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 tnt(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 nnt(e,t){return v8(e,t)}function rnt(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 int(e){return new $6(B6(e),e)}function b8(e,t,n){t===void 0&&(t=int);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=rnt({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 ant(e){return R6(e,v8(e))}var x8=[];function ont(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 snt(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 cnt(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 lnt(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?Ptt(e):null,[e])}var w8=[];function unt(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 dnt(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 fnt=[{sensor:u8,options:{}},{sensor:o8,options:{}}],pnt={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}},mnt={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)(mnt);function hnt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new D8}}}function gnt(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 _nt(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=mtt(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 vnt(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 ynt(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=fnt,collisionDetection:o=Ott,measuring:s,modifiers:c,...l}=e,[u,d]=(0,N.useReducer)(gnt,void 0,hnt),[f,p]=btt(),[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??pnt,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=vnt(s),{droppableRects:j,measureDroppableContainers:ne,measuringScheduled:re}=tnt(k,{dragging:g,dependencies:[y.x,y.y],config:A.droppable}),M=$tt(v,_),ie=(0,N.useMemo)(()=>D?C6(D):null,[D]),ae=Ie(),oe=nnt(M,A.draggable.measure);ynt({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=dnt({measure:A.dragOverlay.measure}),fe=de.nodeRef.current??M,pe=g?de.rect??se:null,me=!!(de.nodeRef.current&&de.rect),he=ant(me?null:se),ge=C8(fe?o6(fe):null),_e=ont(g?ue??M:null),ve=unt(_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=snt(_e),Se=S8(xe),Ce=S8(xe,[se]),we=b6(ye,Se),Te=pe?jtt(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=ktt(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=ent(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]));cnt(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]),Xtt({...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(_nt,{disabled:n?.restoreFocus===!1})),N.createElement(Ctt,{...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}}}),bnt=(0,N.createContext)(null),F8=`button`,xnt=`Draggable`;function Snt(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=v6(xnt),{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:bnt),[v,y]=h6(),[b,x]=h6(),S=lnt(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 Cnt=`Droppable`,wnt={timeout:25};function L8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=v6(Cnt),{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}={...wnt,...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 Tnt(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 Ent={x:0,y:0,scaleX:1,scaleY:1};function Dnt(e){let{children:t}=e;return N.createElement(k8.Provider,{value:O8},N.createElement(M8.Provider,{value:Ent},t))}var Ont={position:`fixed`,touchAction:`none`},knt=e=>S6(e)?`transform 250ms ease`:void 0,Ant=(0,N.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=knt}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...Ont,width:s.width,height:s.height,top:s.top,left:s.left,transform:w6.Transform.toString(d),transformOrigin:i&&r?wtt(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return N.createElement(n,{className:o,style:f,ref:t},a)}),jnt={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 Mnt(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:Nnt(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 Nnt(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...jnt,...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 Pnt(e){return(0,N.useMemo)(()=>{if(e!=null)return R8++,R8},[e])}var Fnt=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=Pnt(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=Mnt({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return N.createElement(Dnt,null,N.createElement(Tnt,{animation:E},d&&C?N.createElement(Ant,{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))}),Int=e=>{let{transform:t}=e;return{...t,y:0}};function Lnt(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 Rnt=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e,i=r[0];return!t||!i?n:Lnt(n,t,i)},znt=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 Bnt(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 Vnt(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 Hnt(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var V8={scaleX:1,scaleY:1},Unt=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=Wnt(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 Wnt(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},Gnt=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=Knt(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 Knt(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=!Vnt(p,_.current),y=g!==-1&&h===-1||v,b=Hnt(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:Bnt(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 qnt=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return z8(n,r,i).indexOf(t)},Jnt=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},Ynt={duration:200,easing:`ease`},q8=`transform`,Xnt=w6.Transition.toString({property:q8,duration:0,easing:`linear`}),Znt={roleDescription:`sortable`};function Qnt(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=Jnt,attributes:n,disabled:r,data:i,getNewIndex:a=qnt,id:o,strategy:s,resizeObserverConfig:c,transition:l=Ynt}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,N.useContext)(G8),y=$nt(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}=Snt({id:o,data:x,attributes:{...Znt,...n},disabled:y.draggable}),ie=utt(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=Qnt({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 Xnt;if(!(se&&!S6(O)||!l)&&(ae||pe))return w6.Transition.toString({...l,property:q8})}}function $nt(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 ert=[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(ert.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=trt(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 trt(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)(wm,{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 nrt(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`,rrt=e=>`project:${e}`,c5=`oc.noproject.collapsed`;function irt({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:bO})?.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=C1(),_=MLe(),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)(Mm,{}),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)(Mm,{}),(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)(Sm,{})})]})}),(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)(Mm,{}),(0,I.jsx)(`span`,{className:`oc-newchat__label`,children:_})]}),(0,I.jsx)(X,{variant:`outline`,size:`icon`,tabIndex:-1,children:(0,I.jsx)(Sm,{})})]})}),(0,I.jsx)(X,{className:`oc-newproject`,variant:`outline`,size:`icon`,"aria-label":TQ(),title:TQ(),onClick:async()=>{let e=await g({title:TQ(),label:LLe(),placeholder:BLe(),confirmLabel:ULe()});e&&await f({name:e})},children:(0,I.jsx)(Sm,{})})]}),(0,I.jsxs)(P8,{sensors:A,collisionDetection:L6,modifiers:[znt,Rnt],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:KLe(),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:rrt(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:YLe()}):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:QLe(),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)(Fnt,{children:ae?(0,I.jsxs)(`div`,{className:`oc-chatitem oc-chatitem--overlay`,children:[(0,I.jsx)(Cm,{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||EQ()})]}):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=S1(),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)(pm,{className:`size-3.5`}):(0,I.jsx)(fm,{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":DQ(),onClick:async t=>{t.stopPropagation();let r=u??0;await l({title:aRe({name:e}),description:r>0?cRe({count:r}):dRe(),confirmWord:OQ(),confirmLabel:DQ(),destructive:!0})&&await c({projectId:n})},children:(0,I.jsx)(zm,{className:`size-3.5`})}):null]}),(0,I.jsx)(K8,{items:r.map(e=>e._id),strategy:Gnt,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:bO})?.ui?.effective?.showChatAge??!0,g=S1(),[_,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":gRe(),...a,...o,children:(0,I.jsx)(Cm,{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||EQ()}),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:URe({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:nrt(e.updatedAt,Date.now())}):null,(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon-xs`,"aria-label":yRe(),className:`opacity-0 group-hover/row:opacity-100 group-focus-within/row:opacity-100 aria-expanded:opacity-100`,children:(0,I.jsx)(bm,{})})}),(0,I.jsxs)(q$,{align:`end`,className:`w-48`,children:[(0,I.jsxs)(J$,{onSelect:()=>{b(e.title??``),v(!0)},children:[(0,I.jsx)(Pee,{}),` `,SRe()]}),(0,I.jsxs)(J$,{onSelect:()=>void p({chatId:e._id,pinned:!e.pinned}),children:[e.pinned?(0,I.jsx)(Iee,{}):(0,I.jsx)(Fee,{}),e.pinned?TRe():ORe()]}),(0,I.jsx)(Y$,{children:jRe()}),(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":PRe(),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)(X$,{}),(0,I.jsxs)(J$,{variant:`destructive`,onSelect:()=>{requestAnimationFrame(async()=>{await g({title:LRe(),description:BRe(),confirmLabel:OQ(),destructive:!0})&&await f({chatId:e._id})})},children:[(0,I.jsx)(zm,{}),` `,OQ()]})]})]})]}),(0,I.jsx)(Q8,{open:_,onOpenChange:v,title:KRe(),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:YRe()}),(0,I.jsx)(a1,{value:y,onChange:e=>b(e.target.value),autoFocus:!0})]})})})]})}var art=r1(`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?xy:`span`,{"data-slot":`badge`,"data-variant":t,className:W$(art({variant:t}),e),...r})}function ort(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 srt(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 crt({open:e,onOpenChange:t,agents:n,onPick:r}){let[i,a]=(0,N.useState)(``),o=(0,N.useMemo)(()=>ort(srt(n??[],i)),[n,i]);return(0,I.jsx)(m1,{open:e,onOpenChange:t,children:(0,I.jsxs)(h1,{className:`oc-agentpicker`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:eVe()}),(0,I.jsx)(y1,{children:rVe()})]}),n===void 0?(0,I.jsx)(`p`,{className:`oc-agentpicker__hint`,children:oVe()}):n.length===0?(0,I.jsx)(`p`,{className:`oc-agentpicker__hint`,children:lVe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(a1,{autoFocus:!0,value:i,onChange:e=>a(e.target.value),placeholder:fVe(),className:`oc-agentpicker__search`,"aria-label":hVe()}),(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)(Fm,{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`?vVe():void 0,children:[(0,I.jsx)(um,{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)(Rm,{size:13,"aria-label":xVe(),className:`oc-agentpicker__default`}):null]},`${e.instanceName}/${e.agentId}`))]},e.instanceName))})]})]})})}function lrt(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)(crt,{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:WIe(),children:[(0,I.jsx)(Um,{size:13}),`DEV`]}),(0,I.jsx)(m1,{open:t,onOpenChange:n,children:(0,I.jsxs)(h1,{children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:qIe()}),(0,I.jsx)(y1,{children:XIe()})]}),(0,I.jsxs)(`div`,{className:`oc-devsw__me`,children:[(0,I.jsxs)(`span`,{className:`oc-devsw__melabel`,children:[$Ie({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`?nLe():e===`user`?aLe():cLe()},e))})]}),d?(0,I.jsxs)(`div`,{className:`oc-devsw__imp`,children:[dLe(),` `,(0,I.jsx)(`strong`,{children:i.targetLabel}),`.`,(0,I.jsx)(X,{type:`button`,size:`xs`,variant:`outline`,onClick:()=>void c(),children:mLe()})]}):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: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`?CLe():ELe():bLe(),onClick:()=>{s({profileId:e.profileId}),n(!1)},children:kLe()})]},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:bO});if(!n)return;let r=t===null?n.defaultThemeMode??`system`:t;e.setQuery(V.me.getMe,{host:bO},{...n,themeMode:t,resolvedThemeMode:r})}),a=t??`default`;return(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsxs)(X,{variant:`ghost`,size:`sm`,className:`gap-1.5`,children:[e,(0,I.jsx)(fm,{className:`opacity-60`})]})}),(0,I.jsx)(q$,{align:`end`,className:`w-52`,children:n?(0,I.jsxs)(J$,{onClick:()=>void r(),children:[(0,I.jsx)(Tm,{}),` `,uk()]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Y$,{children:YO()}),(0,I.jsxs)(M2e,{value:a,onValueChange:e=>void i({mode:e==="default"?null:e}),children:[(0,I.jsxs)(Z$,{value:`light`,children:[(0,I.jsx)(Bee,{}),` `,QO()]}),(0,I.jsxs)(Z$,{value:`dark`,children:[(0,I.jsx)(Am,{}),` `,tk()]}),(0,I.jsxs)(Z$,{value:`system`,children:[(0,I.jsx)(km,{}),` `,ik()]}),(0,I.jsx)(Z$,{value:`default`,children:sk()})]}),(0,I.jsx)(X$,{}),(0,I.jsxs)(J$,{onClick:()=>void r(),children:[(0,I.jsx)(Tm,{}),` `,uk()]})]})})]})}var urt={altered_words:()=>IWe(),incorrect:()=>zWe(),incoherence:()=>HWe(),formatting:()=>GWe(),latency:()=>JWe(),api_error:()=>ZWe(),other:()=>eGe()},h5=e=>urt[e]?.()??e,drt={anomaly_open:Bm,anomaly_resolved:_m,feedback_reply:Em};function frt(e){return e.kind===`feedback_reply`?{title:AWe(),body:NWe()}:{title:e.title,body:e.body}}function prt(){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)(G$,{open:l,onOpenChange:u,children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-bell`,"aria-label":e>0?AUe({count:e}):NUe(),children:[(0,I.jsx)(lm,{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)(q$,{align:`end`,className:`oc-notif`,children:[(0,I.jsxs)(`div`,{className:`oc-notif__head`,children:[(0,I.jsx)(`span`,{children:IUe()}),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:zUe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__act`,onClick:()=>void o({}),children:HUe()})]}):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:GUe()}):(0,I.jsx)(`div`,{className:`oc-notif__list`,children:t.map(e=>{let t=drt[e.kind]??lm,{title:n,body:i}=frt(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:AQ(),"aria-label":AQ(),onClick:t=>{t.stopPropagation(),r({notificationId:e._id})},children:(0,I.jsx)(dm,{size:13})}):null,(0,I.jsx)(`button`,{type:`button`,title:jQ(),"aria-label":jQ(),onClick:t=>{t.stopPropagation(),a({notificationId:e._id})},children:(0,I.jsx)(Wm,{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:QUe()}),(0,I.jsx)(`div`,{className:`oc-notif__list`,children:n.map(e=>(0,I.jsx)(mrt,{it:e,onClose:t=>s({feedbackId:e._id,reason:t}),onNavigate:()=>u(!1)},e._id))})]}):null]})]})}function mrt({it:e,onClose:t,onNavigate:n}){let r=E1(),[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(MQ(),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:h5(e.category)}),(0,I.jsx)(`span`,{className:`oc-notif__status${e.answered?` is-answered`:``}`,children:e.answered?tWe():iWe()})]}),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`?sWe():uWe()}),(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)(fm,{size:13,"aria-hidden":!0}):(0,I.jsx)(pm,{size:13,"aria-hidden":!0}),gWe()]}),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:pWe()}),o?null:(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__link oc-notif__link--muted`,onClick:()=>s(!0),children:MQ()})]}),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:xWe()}),(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:wWe()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-notif__close-cancel`,onClick:()=>{s(!1),l(``)},children:DWe()})]})]}):null]})}var g5={mod:!0,key:`k`},_5={mod:!0,shift:!0,key:`o`};function hrt(e){return/mac/i.test(e)}function grt(){if(typeof navigator>`u`)return``;let e=navigator;return e.userAgentData?.platform||e.platform||e.userAgent||``}var v5=null;function y5(){return v5===null&&(v5=hrt(grt())),v5}function b5(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 x5(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 S5=2,_rt=180;function vrt(){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)(()=>b5(g5,y5()),[]);(0,N.useEffect)(()=>{let e=setTimeout(()=>c(a),_rt);return()=>clearTimeout(e)},[a]);let f=s.trim(),p=P(V.search.searchConversations,f.length>=S5?{query:f}:`skip`),m=p??[],h=f.length>=S5&&p===void 0;(0,N.useEffect)(()=>{let e=e=>{x5(e,g5)&&(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":lBe(),children:[(0,I.jsx)(Pm,{className:`oc-search-trigger__icon`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`oc-search-trigger__label`,children:fBe()}),(0,I.jsx)(`kbd`,{className:`oc-search-trigger__kbd`,children:d})]}),(0,I.jsx)(m1,{open:r,onOpenChange:i,children:(0,I.jsxs)(h1,{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)(v1,{className:`sr-only`,children:hBe()}),(0,I.jsxs)(`div`,{className:`oc-search-palette__head`,children:[(0,I.jsx)(Pm,{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:vBe(),className:`oc-search-palette__field`,autoComplete:`off`,spellCheck:!1,"aria-label":xBe()})]}),(0,I.jsx)(`div`,{className:`oc-search-palette__results`,ref:n,role:`listbox`,children:f.length<S5?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:wBe({count:S5})}):h?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:DBe()}):m.length===0?(0,I.jsx)(`div`,{className:`oc-search-palette__hint`,children:ABe({term:f})}):m.map((e,t)=>(0,I.jsxs)(`button`,{type:`button`,"data-index":t,role:`option`,"aria-selected":t===l,className:W$(`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)(Oee,{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||NBe()}),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`?IBe():zBe()})]},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:`↓`}),` `,HBe()]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:`↵`}),` `,GBe()]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`kbd`,{children:JBe()}),` `,ZBe()]})]})]})})]})}var C5=[`conversational`,`documentary`];new Set(C5);function yrt({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=P(V.admin.listInstances,n?{}:`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;return(0,I.jsx)(m1,{open:n,onOpenChange:r,children:(0,I.jsxs)(h1,{className:`oc-access`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:jje({user:t})}),(0,I.jsx)(y1,{children:Pje()})]}),(0,I.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Lje()}):i.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Bje()}):i.map(t=>(0,I.jsx)(brt,{profileId:e,instanceName:t.name,kind:t.kind??`openclaw`,assigned:o,defaultKey:s?`${s.instanceName}/${s.agentId}`:null},t._id))})]})})}function brt({profileId:e,instanceName:t,kind:n,assigned:r,defaultKey:i}){let a=P(V.agents.listAgentsForInstance,{instanceName:t}),o=F(V.agents.assignAgent),s=F(V.agents.removeAgent),c=F(V.agents.setDefaultAgent),l=E1();if(!e)return null;let u=(a?.agents??[]).filter(e=>e.source===`discovered`),d=a?.discovery&&!a.discovery.lastPollOk;async function f(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(Uje(),e)}}async function p(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(Kje(),e)}}return(0,I.jsxs)(`div`,{className:`oc-access__group`,children:[(0,I.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,I.jsx)(Fm,{size:13,"aria-hidden":!0}),(0,I.jsx)(`span`,{children:t}),(0,I.jsx)($,{variant:`outline`,className:`oc-access__kind`,children:n}),d?(0,I.jsx)($,{variant:`outline`,className:`oc-access__stale`,children:Yje()}):null]}),a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Qje()}):u.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:d?iMe():tMe()}):u.map(e=>{let n=`${t}/${e.agentId}`,a=r.has(n),o=i===n,s=e.presentInLastOk===!1;return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(A1,{checked:a,disabled:s&&!a,onCheckedChange:()=>void f(e.agentId,a),"aria-label":sMe({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,a?o?(0,I.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":_Q(),title:_Q(),children:(0,I.jsx)(Rm,{size:14,fill:`currentColor`})}):(0,I.jsx)(X,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":vQ(),title:vQ(),onClick:()=>void p(e.agentId),children:(0,I.jsx)(Rm,{size:14})}):null]},e.agentId)})]})}function xrt(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 Srt(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=xrt(i,a);return n===`asc`?c:-c})}function w5({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:W$(`w-full caption-bottom text-sm`,e),...t})})}function T5({className:e,...t}){return(0,I.jsx)(`thead`,{"data-slot":`table-header`,className:W$(`[&_tr]:border-b`,e),...t})}function E5({className:e,...t}){return(0,I.jsx)(`tbody`,{"data-slot":`table-body`,className:W$(`[&_tr:last-child]:border-0`,e),...t})}function D5({className:e,...t}){return(0,I.jsx)(`tr`,{"data-slot":`table-row`,className:W$(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function O5({className:e,...t}){return(0,I.jsx)(`th`,{"data-slot":`table-head`,className:W$(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function k5({className:e,...t}){return(0,I.jsx)(`td`,{"data-slot":`table-cell`,className:W$(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}function A5({title:e,rows:t,columns:n,rowActions:r,onAdd:i,addLabel:a=AVe(),bulkActions:o,emptyHint:s=NVe(),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?Srt(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)(zm,{}):null,e.label,` (`,u.size,`)`]},e.label)):null,i?(0,I.jsxs)(X,{size:`sm`,onClick:i,children:[(0,I.jsx)(Mm,{}),` `,a]}):null]})]}),t===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:IVe()}):m.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:s}):(0,I.jsxs)(w5,{children:[(0,I.jsx)(T5,{children:(0,I.jsxs)(D5,{children:[o?(0,I.jsx)(O5,{className:`w-8`,children:(0,I.jsx)(A1,{"aria-label":zVe(),checked:y?!0:b?`indeterminate`:!1,onCheckedChange:x})}):null,n.map((e,t)=>{let n=f?.index===t;return e.sort?(0,I.jsx)(O5,{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":JVe({column:e.header}),children:[e.header,n?f.dir===`asc`?(0,I.jsx)(mm,{className:`oc-dt__sort-icon`,"aria-hidden":!0}):(0,I.jsx)(fm,{className:`oc-dt__sort-icon`,"aria-hidden":!0}):(0,I.jsx)(hm,{className:`oc-dt__sort-icon oc-dt__sort-icon--idle`,"aria-hidden":!0})]})},e.header):(0,I.jsx)(O5,{className:e.className,children:e.header},e.header)}),r?(0,I.jsx)(O5,{className:`w-8`}):null]})}),(0,I.jsx)(E5,{children:g.map(e=>{let t=r?.(e)??[],i=c?.(e)??!1;return(0,I.jsxs)(N.Fragment,{children:[(0,I.jsxs)(D5,{className:`group/row`,children:[o?(0,I.jsx)(k5,{children:(0,I.jsx)(A1,{"aria-label":HVe(),checked:u.has(e._id),onCheckedChange:()=>S(e._id)})}):null,n.map(t=>(0,I.jsx)(k5,{className:t.className,children:t.cell(e)},t.header)),r?(0,I.jsx)(k5,{children:t.length>0?(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":GVe(),className:`opacity-0 transition-opacity group-hover/row:opacity-100 group-focus-within/row:opacity-100 aria-expanded:opacity-100`,children:(0,I.jsx)(bm,{})})}),(0,I.jsx)(q$,{align:`end`,children:t.map((t,n)=>(0,I.jsxs)(`div`,{children:[t.variant===`destructive`&&n>0?(0,I.jsx)(X$,{}):null,(0,I.jsx)(J$,{variant:t.variant,onSelect:()=>t.onSelect(e),children:t.label})]},t.label))})]}):null}):null]}),i&&l?(0,I.jsx)(D5,{className:`oc-dt__expansion`,children:(0,I.jsx)(k5,{colSpan:v,className:`oc-dt__expansion-cell`,children:l(e)})}):null]},e._id)})})]})]})}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:W$(`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:ZVe(),hint:eHe()}),AUTH_TOKEN_MISMATCH:()=>({label:rHe(),hint:oHe()}),DEVICE_SIGNING_FAILED:()=>({label:lHe(),hint:fHe()}),SESSION_SCOPE_DENIED:()=>({label:hHe(),hint:vHe()}),GATEWAY_TIMEOUT:()=>({label:xHe(),hint:wHe()}),GATEWAY_DISCONNECTED:()=>({label:DHe(),hint:AHe()}),ATTACHMENT_TOO_LARGE:()=>({label:zHe(),hint:HHe()}),ATTACHMENT_REJECTED:()=>({label:GHe(),hint:JHe()}),BRIDGE_UNREACHABLE:()=>({label:NHe(),hint:IHe()}),INVALID_REQUEST:()=>({label:ZHe(),hint:eUe()}),NOT_CONFIGURED:()=>({label:rUe(),hint:oUe()}),UNROUTED:()=>({label:lUe(),hint:fUe()}),UPSTREAM_ERROR:()=>({label:hUe(),hint:vUe()}),UNKNOWN:()=>({label:xUe(),hint:wUe()})};function I5(e){return e?F5[e]?.()??{label:e,hint:DUe()}:F5.UNKNOWN()}var Crt=[`gateway-http`,`shared-fs`,`off`],wrt=[`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 Trt(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 Ert(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 Drt(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 Ort(e,t,n){if(e===null)return`unknown`;let{range:r}=V5(n,t);return Drt(r,e)?r!==null&&(B5(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function H5(e){return e===`supported`?y0e():e===`beyond`?S0e():T0e()}function U5(e){return e??t$()}function W5(e){return e===null?P0e():j0e({version:e})}function krt(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 Art(e){return e.reachable&&G5(e.targets).length===0}function jrt(e){return e.state===`error`&&e.lastErrorCode!==null}function Mrt(e){return!!e.lastDownstreamRejectCode}function K5(e){return e.kind??`openclaw`}function Nrt(e){return[...e].sort((e,t)=>e===`openclaw`?-1:t===`openclaw`?1:e.localeCompare(t))}function Prt(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 Nrt(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 Frt(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:bFe(),from:`now-5m`},{label:CFe(),from:`now-15m`},{label:EFe(),from:`now-30m`},{label:kFe(),from:`now-1h`},{label:MFe(),from:`now-3h`},{label:FFe(),from:`now-6h`},{label:RFe(),from:`now-12h`},{label:VFe(),from:`now-24h`},{label:WFe(),from:`now-2d`},{label:qFe(),from:`now-7d`},{label:XFe(),from:`now-30d`},{label:$Fe(),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 Irt(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 Lrt(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)(ST,{open:n,onOpenChange:d,children:[(0,I.jsx)(CT,{asChild:!0,children:(0,I.jsxs)(X,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,I.jsx)(Cee,{}),Irt(e)]})}),(0,I.jsx)(wT,{children:(0,I.jsx)(TT,{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)(a1,{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)(a1,{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)(Pm,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,I.jsx)(a1,{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 Rrt=250;function r7({q:e,onQChange:t,searchPlaceholder:n=wVe(),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),Rrt)}(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)(Pm,{className:`oc-filterbar__search-icon`,"aria-hidden":!0}),(0,I.jsx)(a1,{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)(Nm,{}),DVe()]})]})}var i7=`__all__`,a7={q:``,state:i7,instance:i7,version:i7},o7={connected:0,error:1,idle:2};function zrt(e){return e.q.trim()!==``||e.state!==`__all__`||e.instance!==`__all__`||e.version!==`__all__`}function Brt(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 Vrt(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 Hrt(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*Vrt(t.key,e,r)})}function Urt(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 Wrt(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 Grt(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 Krt({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)(()=>Urt(o),[o]),c=(0,N.useMemo)(()=>Wrt(o),[o]),l=(0,N.useMemo)(()=>Grt(o),[o]),u=(0,N.useMemo)(()=>Hrt(Brt(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:xPe()}):(0,I.jsxs)(`div`,{className:`oc-conn`,children:[(0,I.jsxs)(r7,{q:n.q,onQChange:e=>r(t=>({...t,q:e})),searchPlaceholder:APe(),onReset:()=>r(a7),canReset:zrt(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:FPe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:i7,children:xQ()}),s.map(e=>(0,I.jsx)(Q,{value:e,children:Jrt(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:RPe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:i7,children:xQ()}),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:VPe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:i7,children:xQ()}),l.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),u.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:WPe()}):(0,I.jsxs)(w5,{className:`oc-conn__table`,children:[(0,I.jsx)(T5,{children:(0,I.jsxs)(D5,{children:[(0,I.jsx)(l7,{label:qPe(),sortKey:`target`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:XPe(),sortKey:`state`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:$Pe(),sortKey:`instance`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:nFe(),sortKey:`host`,sort:i,onSort:d}),(0,I.jsx)(l7,{label:aFe(),sortKey:`version`,sort:i,onSort:d}),(0,I.jsx)(O5,{children:cFe()}),(0,I.jsx)(l7,{label:dFe(),sortKey:`lastOk`,sort:i,onSort:d})]})}),(0,I.jsx)(E5,{children:u.map(e=>(0,I.jsx)(qrt,{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)(O5,{"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)(mm,{size:13,"aria-hidden":!0}):(0,I.jsx)(fm,{size:13,"aria-hidden":!0}):(0,I.jsx)(hm,{size:13,"aria-hidden":!0,className:`oc-conn__sort-idle`})]})})}function qrt({r:e}){let t=jrt(e)?I5(e.lastErrorCode):null,n=Mrt(e)?I5(e.lastDownstreamRejectCode):null;return(0,I.jsxs)(N.Fragment,{children:[(0,I.jsxs)(D5,{className:`oc-conn__row oc-conn__row--${e.state}`,children:[(0,I.jsx)(k5,{children:(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.targetLabel})}),(0,I.jsx)(k5,{children:(0,I.jsx)(Yrt,{state:e.state})}),(0,I.jsx)(k5,{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)(k5,{children:(0,I.jsx)(`span`,{className:`oc-bridge-target__host`,children:e.gatewayHost})}),(0,I.jsx)(k5,{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)(k5,{children:(0,I.jsx)(`span`,{className:`oc-conn__stats`,children:wPe({ok:e.okCount,errors:e.errorCount,attempts:e.attempts})})}),(0,I.jsx)(k5,{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)(D5,{className:`oc-conn__detail-row`,children:(0,I.jsxs)(k5,{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:[DPe({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 Jrt(e){return e===`connected`?SQ():e===`error`?CQ():wQ()}function Yrt({state:e}){return e===`connected`?(0,I.jsx)($,{variant:`secondary`,children:SQ()}):e===`error`?(0,I.jsx)($,{variant:`destructive`,children:CQ()}):(0,I.jsx)($,{variant:`outline`,children:wQ()})}function Xrt(){return P(V.bridgeHealth.getBridgeHealth,{})}function Zrt(){let e=Xrt(),t=P(V.compat.getBridgeCompat,{}),n=P(V.me.getMe,{host:bO})?.role===`admin`,r=P(V.admin.listInstances,n?{}:`skip`),i=ss(),a=()=>void i({to:`/settings/anomalies`,search:{status:`open`}}),o=Prt(e?e.targets:[],t?t.targets:[],r??[]),s=t?.compat??null,c=t===void 0?`loading`:t===null?`nodata`:`ready`,l=s!==null&&krt(s,`hermes`)&&!o.some(e=>e.key===`hermes`);return(0,I.jsxs)(`div`,{className:`oc-bridge`,children:[(0,I.jsx)(Qrt,{health:e,compat:t,onSeeAnomalies:a}),(0,I.jsx)(`p`,{className:`oc-admin__hint oc-bridge__caption`,children:KNe()}),o.map(e=>(0,I.jsx)($rt,{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:O0e()}):null]})}function Qrt({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)}),` · `,W1e(),` `,(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:t.protocolVersion===null?t$():String(t.protocolVersion)})]}):null;if(e===void 0)return(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:bQ()});if(e===null)return(0,I.jsx)(`div`,{className:`oc-bridge-card oc-bridge-card--idle`,children:ZNe()});let i=G5(e.targets),a=!e.reachable,o=Art(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)(_m,{size:22}):a?(0,I.jsx)(Vee,{size:22}):(0,I.jsx)(Bm,{size:22})}),(0,I.jsxs)(`div`,{className:`oc-bridge-card__body`,children:[(0,I.jsx)(`div`,{className:`oc-bridge-card__title`,children:o?ePe():a?rPe():oPe({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}),` `,lPe({time:c})]}),l?(0,I.jsx)(`span`,{children:fPe({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:hPe()})]})}function $rt({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:Ort(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)(Fm,{size:15,"aria-hidden":!0,className:`oc-bridge-provider__icon`}),(0,I.jsx)(`span`,{className:`oc-bridge-provider__name`,children:Frt(e)}),d?(0,I.jsx)($,{variant:d===`beyond`?`destructive`:`secondary`,children:H5(d)}):null]}),(0,I.jsx)(`h4`,{className:`oc-bridge-provider__sub`,children:R1e()}),(0,I.jsx)(eit,{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)(fm,{size:13,"aria-hidden":!0}):(0,I.jsx)(pm,{size:13,"aria-hidden":!0}),vPe({count:t.length})]}),f?(0,I.jsx)(Krt,{connections:t,displayByInstance:s}):null,g?(0,I.jsx)(u7,{instance:g,onClose:()=>h(null)},g._id):null]})}function eit({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:bQ()}):t===`nodata`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:V1e()}):(0,I.jsxs)(`div`,{className:`oc-compat`,children:[n?null:(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Y1e()}),r===null?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Q1e()}):(0,I.jsxs)(`div`,{className:`oc-compat__support`,children:[(0,I.jsx)(`span`,{className:`oc-compat__label`,children:t0e()}),e&&e.range!==null?(0,I.jsx)(`span`,{children:i0e({min:e.range.min,max:e.range.maxValidated})}):(0,I.jsx)(`span`,{children:t$()}),e?(0,I.jsx)(rit,{versions:e.validatedVersions}):null]}),i.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:g0e()}):(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)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,className:`oc-compat__target-menu`,"aria-label":yQ(),children:(0,I.jsx)(bm,{size:16,"aria-hidden":!0})})}),(0,I.jsx)(q$,{align:`end`,children:(0,I.jsx)(J$,{onSelect:()=>o(e.instanceName),children:yQ()})})]}):null]},e.instanceName))})]})}function u7({instance:e,onClose:t}){return(0,I.jsx)(m1,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(h1,{className:`oc-bridge-config-dialog`,onOpenAutoFocus:e=>e.preventDefault(),children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:_Me({instance:e.displayName??e.name})}),(0,I.jsx)(y1,{children:SMe()})]}),(0,I.jsx)(nit,{instance:e,onClose:t})]})})}function tit({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)(xee,{"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)(tit,{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)(_m,{"aria-hidden":!0}):(0,I.jsx)(Bm,{"aria-hidden":!0}),(0,I.jsxs)(`span`,{children:[e,` — `,t.ok?PNe():t.detail]})]}):(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--skip`,children:[e,` — `,LNe()]}):null}function nit({instance:e,onClose:t}){let n=F(V.admin.upsertInstanceConfig),r=$n(V.bridge.validateMediaPaths),i=E1(),[a,o]=(0,N.useState)(()=>Trt(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(SNe(),e)}finally{u(!1)}}async function _(){c(!0);try{let r=e.config??{};await n({instanceId:e._id,config:Ert(a,r)}),t()}catch(e){i.error(UMe(),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:OMe(),help:KMe()}),(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:Crt.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:jMe(),help:YMe()}),(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:wrt.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`label`,{className:`oc-field`,children:[(0,I.jsx)(d7,{label:PMe(),help:QMe()}),(0,I.jsx)(a1,{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:iNe(),help:sNe()}),(0,I.jsx)(a1,{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:uNe(),help:pNe()}),(0,I.jsx)(a1,{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)(A1,{checked:a.rehydration,onCheckedChange:e=>o({...a,rehydration:e===!0})}),(0,I.jsx)(d7,{label:LMe(),help:tNe()})]}),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)(Bm,{"aria-hidden":!0}),UNe({reason:d.reason??`?`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f7,{label:ONe(),result:d.inbound}),(0,I.jsx)(f7,{label:jNe(),result:d.outbound}),(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:TNe()})]}):(0,I.jsxs)(`p`,{className:`oc-bridge-config__check-row oc-bridge-config__check-row--err`,children:[(0,I.jsx)(Bm,{"aria-hidden":!0}),BNe()]})}),(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)(wm,{className:`size-4 animate-spin`,"aria-hidden":!0}):null,l?yNe():gNe()]}),(0,I.jsx)(X,{size:`sm`,onClick:()=>void _(),disabled:s,children:BMe()})]})]})})}function rit({versions:e}){if(e.length===0)return null;let t=[...e].reverse();return(0,I.jsxs)(Q$,{children:[(0,I.jsx)($$,{asChild:!0,children:(0,I.jsxs)(`button`,{type:`button`,className:`oc-compat__versions-btn`,children:[e.length===1?s0e():u0e({count:e.length}),(0,I.jsx)(fm,{size:13,"aria-hidden":!0})]})}),(0,I.jsxs)(e1,{className:`oc-compat__versions-pop`,align:`start`,children:[(0,I.jsx)(`p`,{className:`oc-compat__versions-title`,children:p0e()}),(0,I.jsx)(`div`,{className:`oc-compat__versions-list`,children:t.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e},e))})]})]})}var iit=[{value:`eq`,label:`=`},{value:`neq`,label:`≠`},{value:`contains`,label:pze()},{value:`gt`,label:`>`},{value:`gte`,label:`≥`},{value:`lt`,label:`<`},{value:`lte`,label:`≤`}],p7=1;function ait(){return{id:p7++,field:``,op:`eq`,value:``}}function oit(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?oit(r.current):[]);function l(e){n(e.filter(e=>e.field!==``&&e.value!==``).map(e=>({field:e.field,op:e.op,value:Lrt(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,ait()])}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)(fm,{className:`oc-advfilter__chevron`+(a?` is-open`:``),"aria-hidden":!0}),gze(),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:yze()}):(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:Sze()})}),(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:iit.map(e=>(0,I.jsx)(Q,{value:e.value,children:e.label},e.value))})]}),(0,I.jsx)(a1,{className:`oc-advfilter__value`,value:t.value,onChange:e=>u(t.id,{value:e.target.value}),placeholder:Tze()}),(0,I.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":Oze(),onClick:()=>f(t.id),children:(0,I.jsx)(Wm,{})})]},t.id))}),(0,I.jsxs)(X,{variant:`outline`,size:`sm`,className:`oc-advfilter__add`,onClick:d,children:[(0,I.jsx)(Mm,{}),jze()]})]}):null]})}var sit=[`eq`,`neq`,`contains`,`gt`,`gte`,`lt`,`lte`],h7=[50,100,200,500],g7=`now-30d`,cit=`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`||!sit.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),lit=Rp({q:x7,kind:sp().default(`all`).catch(`all`),limit:pee().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}),uit=Rp({q:x7,action:w7,impersonated:Wp([`yes`,`no`]).optional().catch(void 0),resource:w7,from:S7,to:S7,adv:C7}),dit=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}),fit=Rp({from:S7,to:S7}),pit=Rp({q:x7,status:Wp([`active`,`disabled`]).optional().catch(void 0)}),mit=Rp({q:x7,role:w7});Rp({q:x7,mode:Wp([`per-user`,`shared`]).optional().catch(void 0)});var hit={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 git={uiprefs:`preferences`};function _it({granted:e,onToggle:t}){let n=new Set(e),r=A7.filter(e=>n.has(k7[e])).length;return(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?Cme():Eme({count:r})})}),(0,I.jsxs)(q$,{align:`start`,className:`w-52`,children:[(0,I.jsx)(Y$,{children:kme()}),A7.map(e=>{let r=k7[e];return(0,I.jsxs)(J$,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,I.jsx)(A1,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,I.jsx)(`span`,{children:O7[e]??e})]},e)})]})]})}function vit(){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}}),s=P(V.me.getMe,{host:bO}),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=S1(),m=C1(),h=E1(),[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(Mme(),e)}}async function S(e){try{await l(e)}catch(e){h.error(Fme(),e)}}async function C(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await p({title:nhe(),description:ahe({user:t}),confirmWord:che(),confirmLabel:dhe(),destructive:!0}))try{await d({profileId:e._id}),h.success(_he({user:t}))}catch(e){h.error(mhe(),e)}}async function w(e){let t=e.email||e.name||e.userId.slice(0,8),n=await m({title:Che(),label:Ehe({user:t}),placeholder:khe(),defaultValue:e.name??``,confirmLabel:QZ()});if(n!==null)try{await f({profileId:e._id,name:n}),h.success(Mhe())}catch(e){h.error(Fhe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(r7,{q:n,onQChange:i,searchPlaceholder:Rme(),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:Vme()}),v.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})}),(0,I.jsx)(A5,{title:Wme(),rows:o,emptyHint:qme(),rowActions:e=>{let t=[{label:bhe(),onSelect:()=>void w(e)}];return e.userId!==s?.userId&&t.push({label:Xme(),onSelect:()=>void u({profileId:e._id})},{label:$me(),variant:`destructive`,onSelect:()=>void C(e)}),t},columns:[{header:Rhe(),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:Vhe(),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:Whe(),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:qhe()}):(0,I.jsx)(_it,{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:YZ(),cell:e=>(0,I.jsx)(X,{variant:`outline`,size:`sm`,className:`h-8 font-normal`,onClick:()=>_({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)}),children:XZ()})}]}),(0,I.jsx)(yrt,{profileId:g?.profileId??null,userLabel:g?.label??``,open:g!==null,onOpenChange:e=>{e||_(null)}})]})}var P7={name:``,gatewayUrl:``,bridgeUrl:``,displayName:``,kind:`openclaw`,gatewayVersion:``,gatewayHttpUrl:``},yit={openclaw:[`token`,`deviceIdentity`],hermes:[`apiKey`]};function bit(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 xit(){let e=P(V.admin.listInstances,{}),t=P(V.agents.listAllInstanceAgents,{}),n=F(V.admin.upsertInstance),r=F(V.admin.deleteInstance),i=E1(),[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(ege(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[rge(),(0,I.jsx)(`strong`,{children:oge()}),lge()]}),(0,I.jsx)(A5,{title:fge(),rows:e,addLabel:hge(),onAdd:()=>{g(null),c(P7),o(!0)},emptyHint:vge(),columns:[{header:xge(),cell:e=>e.name,sort:e=>e.name},{header:wge(),cell:e=>(0,I.jsx)($,{variant:`outline`,children:e.kind??`openclaw`}),sort:e=>e.kind??`openclaw`},{header:Dge(),cell:e=>e.gatewayUrl,sort:e=>e.gatewayUrl},{header:Age(),cell:e=>e.displayName??`—`,sort:e=>e.displayName??null},{header:YZ(),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)?oQ():void 0,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]},e.agentId))})}}],rowActions:e=>[{label:Vge(),onSelect:()=>{g(e._id),c(bit(e)),o(!0)}},{label:XZ(),onSelect:()=>u(e.name)},{label:j_e(),onSelect:()=>m(e)},{label:Nge(),onSelect:()=>f(e)},{label:ZZ(),variant:`destructive`,onSelect:()=>void r({instanceId:e._id})}],bulkActions:[{label:ZZ(),variant:`destructive`,onSelect:e=>e.forEach(e=>void r({instanceId:e}))}]}),(0,I.jsx)(Q8,{open:a,onOpenChange:o,title:h?Wge():Rge(),description:Xge(),canSubmit:!!(s.name&&s.gatewayUrl),onSubmit:_,submitLabel:QZ(),children:(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsxs)(L7,{label:t_e(),children:[(0,I.jsx)(a1,{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:qge()}):null]}),(0,I.jsx)(L7,{label:i_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:s_e(),children:(0,I.jsx)(a1,{value:s.gatewayUrl,onChange:e=>c({...s,gatewayUrl:e.target.value})})}),(0,I.jsx)(L7,{label:u_e(),children:(0,I.jsx)(a1,{value:s.bridgeUrl,placeholder:p_e(),onChange:e=>c({...s,bridgeUrl:e.target.value})})}),(0,I.jsx)(L7,{label:g_e(),children:(0,I.jsx)(a1,{value:s.displayName,onChange:e=>c({...s,displayName:e.target.value})})}),(0,I.jsx)(L7,{label:y_e(),children:(0,I.jsx)(a1,{value:s.gatewayVersion,placeholder:S_e(),onChange:e=>c({...s,gatewayVersion:e.target.value})})}),(0,I.jsx)(L7,{label:T_e(),children:(0,I.jsx)(a1,{value:s.gatewayHttpUrl,placeholder:O_e(),onChange:e=>c({...s,gatewayHttpUrl:e.target.value})})})]})}),(0,I.jsx)(kit,{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)(Sit,{instance:p,onClose:()=>m(null)},p._id):null]})}function Sit({instance:e,onClose:t}){let n=P(V.instanceSecrets.listInstanceSecretStatus,{}),r=yit[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)(m1,{open:!0,onOpenChange:e=>!e&&t(),children:(0,I.jsxs)(h1,{onOpenAutoFocus:e=>e.preventDefault(),children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:P_e({instance:e.displayName??e.name})}),(0,I.jsx)(y1,{children:L_e()})]}),(0,I.jsx)(`div`,{className:`oc-form`,children:r.map(t=>(0,I.jsx)(Tit,{instanceId:e._id,field:t,updatedAt:i[t]??null},t))}),(0,I.jsx)(`div`,{className:`oc-bridgesecret`,children:(0,I.jsx)(wit,{instance:e})}),(0,I.jsx)(Cit,{instance:e})]})})}function Cit({instance:e}){let t=$n(V.instanceSync.forceInstanceSync),n=E1(),[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(zve());break;case`no_agents`:n.success(Gve());break;case`no_bridge_url`:n.error(Jve());break;case`deploy_misconfigured`:n.error(Zve());break;case`unauthorized`:n.error(rye());break;case`not_served`:n.error(oye());break;default:n.error(eye());break}}catch(e){n.error(Hve(),e)}finally{i(!1)}}}return(0,I.jsxs)(`div`,{className:`oc-form`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:lye()}),(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?Ive():Nve()})})]})}function wit({instance:e}){let t=P(V.bridgeAuth.listBridgeAuthStatus,{}),n=$n(V.bridgeAuth.mintBridgeSecret),r=F(V.bridgeAuth.revokeBridgeSecret),i=E1(),[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(rQ(),e)}finally{o(!1)}}}async function m(){if(!a){o(!0);try{await r({instanceId:e._id}),c(null),i.success(Dye())}catch(e){i.error(rQ(),e)}finally{o(!1)}}}async function h(){if(s)try{await navigator.clipboard.writeText(s),u(!0)}catch{}}return(0,I.jsxs)(L7,{label:fye(),children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:hye()}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)($,{variant:f?`outline`:`secondary`,children:f?`${$Z()} · ${d.prefix}…${d.lastFour}`:eQ()}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(X,{size:`sm`,onClick:()=>void p(),disabled:a,children:f?xye():vye()}),f?(0,I.jsx)(X,{size:`sm`,variant:`destructive`,onClick:()=>void m(),disabled:a,children:wye()}):null]})]}),s?(0,I.jsxs)(`div`,{className:`oc-bridgesecret__reveal`,children:[(0,I.jsx)(`p`,{className:`oc-sa__minted-warning`,children:Mye()}),(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?YV():QV()})]}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,onClick:()=>{c(null),u(!1)},children:iQ()})]}):null]})}function Tit({instanceId:e,field:t,updatedAt:n}){let r=$n(V.instanceSecrets.setInstanceSecret),i=F(V.instanceSecrets.clearInstanceSecret),a=$n(V.deviceIdentity.generateDeviceIdentity),o=E1(),[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`?B_e():t===`deviceIdentity`?U_e():K_e();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(dve())}catch(e){o.error(tQ(),e)}finally{u(!1)}}}async function y(){if(!l){u(!0);try{await i({instanceId:e,field:t}),f(null),m(!1),o.success(gve())}catch(e){o.error(tQ(),e)}finally{u(!1)}}}async function b(){if(!l){u(!0);try{f(await a({instanceId:e})),m(!1),o.success(nQ())}catch(e){o.error(Ave(),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:Sve()}):null,(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsx)($,{variant:h?`outline`:`secondary`,children:h?$Z():eQ()}),(0,I.jsx)(a1,{type:`password`,autoComplete:`off`,className:`flex-1 min-w-32`,value:s,placeholder:h?nve():$_e(),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:ave()}),g?(0,I.jsx)(X,{size:`sm`,variant:`outline`,onClick:()=>void b(),disabled:l,children:yve()}):null,h?(0,I.jsx)(X,{size:`sm`,variant:`destructive`,onClick:()=>void y(),disabled:l,children:cve()}):null]})]}),d?(0,I.jsxs)(`div`,{className:`oc-bridgesecret__reveal`,children:[(0,I.jsx)(`p`,{className:`text-sm font-medium`,children:nQ()}),(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:Dve()}),(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?YV():QV()})]}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,onClick:()=>{f(null),m(!1)},children:iQ()})]}):null]})}var Eit={conversational:rbe,documentary:lbe},Dit={conversational:obe,documentary:fbe},F7=e=>(Eit[e]??(()=>e))(),I7=e=>(Dit[e]??(()=>``))();function Oit({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:Gye()}),t.map(e=>(0,I.jsx)($,{variant:`secondary`,className:`oc-agenttype__chip`,title:I7(e),children:F7(e)},e)),(0,I.jsxs)(Q$,{children:[(0,I.jsx)($$,{asChild:!0,children:(0,I.jsx)(X,{type:`button`,variant:`outline`,size:`sm`,className:`h-7`,children:Jye()})}),(0,I.jsxs)(e1,{align:`start`,className:`oc-agenttypes-pop`,children:[(0,I.jsx)(`p`,{className:`oc-agenttypes-pop__title`,children:Zye()}),(0,I.jsx)(`p`,{className:`oc-agenttypes-pop__hint`,children:ebe()}),(0,I.jsx)(`div`,{className:`oc-agenttypes-pop__list`,children:C5.map(r=>{let i=`agtype-${e}-${r}`;return(0,I.jsxs)(`div`,{className:`oc-agenttypes-pop__item`,children:[(0,I.jsx)(A1,{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 kit({instanceName:e,open:t,onOpenChange:n}){let r=P(V.agents.listAgentsForInstance,t&&e?{instanceName:e}:`skip`),i=F(V.agents.setAgentEnabled),a=F(V.agents.setInstanceDefaultAgent),o=F(V.agents.setAgentTypes),s=F(V.agents.removeInstanceAgent),c=S1(),l=E1();async function u(t,n){if(e)try{await i({instanceName:e,agentId:t,enabled:n})}catch(e){l.error(aQ(),e)}}async function d(t){if(e)try{await a({instanceName:e,agentId:t})}catch(e){l.error(aQ(),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(aQ(),e)}}async function p(t,n){if(e&&await c({title:xbe({name:n}),description:wbe(),confirmLabel:Dbe(),destructive:!0}))try{await s({instanceName:e,agentId:t}),l.success(Abe())}catch(e){l.error(aQ(),e)}}return(0,I.jsx)(m1,{open:t,onOpenChange:n,children:(0,I.jsxs)(h1,{className:`oc-access`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:Lye({name:e??``})}),(0,I.jsx)(y1,{children:Bye()})]}),r===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Nbe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-access__poll`,children:r.discovery===null?Ibe():r.discovery.lastPollOk?zbe():Hbe({error:r.discovery.error??`?`})}),r.agents.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:Gbe()}):(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)(A1,{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:Xbe()}),(0,I.jsx)(X,{size:`sm`,variant:`ghost`,className:`h-7 text-destructive`,onClick:()=>void p(e.agentId,i),children:vbe()})]}):n?(0,I.jsx)($,{variant:`default`,children:oQ()}):(0,I.jsx)(X,{size:`sm`,variant:`outline`,className:`h-7`,disabled:!e.enabled,onClick:()=>void d(e.agentId),children:hbe()})]}),e.enabled?(0,I.jsx)(Oit,{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 Ait=[{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 jit(){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!==hit.from;function b(){t({search:{},replace:!0})}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[$be(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:nxe()})]}),(0,I.jsxs)(r7,{q:n,onQChange:u,searchPlaceholder:axe(),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:sQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:T7,children:uxe()}),_.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:pxe()}),(0,I.jsx)(Q,{value:`yes`,children:gxe()}),(0,I.jsx)(Q,{value:`no`,children:yxe()})]})]}),(0,I.jsxs)(C3,{value:a,onValueChange:p,children:[(0,I.jsx)(T3,{size:`sm`,className:`w-40`,children:(0,I.jsx)(w3,{placeholder:cQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:T7,children:wxe()}),v.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),(0,I.jsx)(m7,{fields:Ait,seed:s,onChange:h}),(0,I.jsx)(A5,{title:Dxe(),rows:g,emptyHint:Axe(),columns:[{header:Nxe(),cell:e=>new Date(e.at).toLocaleString(`fr-FR`),sort:e=>e.at},{header:sQ(),cell:e=>e.action,sort:e=>e.action},{header:Ixe(),cell:e=>e.realLabel,sort:e=>e.realLabel},{header:zxe(),cell:e=>e.targetLabel??`—`,sort:e=>e.targetLabel??null},{header:cQ(),cell:e=>e.resource?e.resource+(e.resourceId?` · ${e.resourceId.slice(0,8)}`:``):`—`,sort:e=>e.resource??null}]})]})}var Mit={pending:SCe,user:TCe,admin:OCe,observer:jCe,agent:PCe};function R7(e){if(e.builtin){let t=Mit[e.key];if(t)return t()}return e.description}var z7=[{value:`never`,label:()=>iH(),days:null},{value:`30`,label:()=>sH(),days:30},{value:`90`,label:()=>uH(),days:90}],Nit=720*60*60*1e3,B7=`__all__`,V7={name:``,roleKey:``,description:``};function Pit(){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=S1(),_=E1(),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(gB())):await d({name:S.name,roleKey:S.roleKey,description:S.description||void 0}),C(V7),T(null),x(!1)}catch(e){_.error(w?pB():uB(),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(yB(),e)}finally{te.current=!1,ee(null)}}async function le(e){if(await g({title:SB(),description:(0,I.jsxs)(I.Fragment,{children:[TB(),` `,(0,I.jsx)(`span`,{className:`font-mono`,children:e.name}),` `,OB(),` `,(0,I.jsx)(`strong`,{children:jB()}),` `,PB()]}),confirmWord:e.name,confirmLabel:LB(),destructive:!0}))try{await p({serviceAccountId:e._id}),_.success(BB(),e.name)}catch(e){_.error(UB(),e)}}async function ue(e){if(await g({title:KB(),description:(0,I.jsxs)(I.Fragment,{children:[YB(),` `,(0,I.jsxs)(`span`,{className:`font-mono`,children:[e.prefix,`…`,e.lastFour]}),` `,QB()]}),confirmLabel:tV(),destructive:!0})&&!k.has(e._id)){A(t=>new Set(t).add(e._id));try{await h({keyId:e._id})}catch(e){_.error(iV(),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:gR()}),(0,I.jsxs)(r7,{q:n,onQChange:o,searchPlaceholder:yR(),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:SR()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:B7,children:TR()}),(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:OR()}),(0,I.jsx)(Q,{value:`active`,children:jR()}),(0,I.jsx)(Q,{value:`disabled`,children:PR()})]})]})]}),(0,I.jsx)(A5,{title:LR(),rows:c,addLabel:BR(),onAdd:()=>{C(V7),T(null),x(!0)},emptyHint:UR(),isExpanded:e=>E.has(e._id),renderExpanded:e=>(0,I.jsx)(Fit,{account:e,keys:ie.get(e._id)??[],onRevoke:ue,revoking:k}),rowActions:e=>[{label:tz(),onSelect:()=>se(e)},{label:KR(),onSelect:()=>void ce(e)},{label:E.has(e._id)?YR():QR(),onSelect:()=>ae(e._id)},{label:iz(),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)?sz():uz(),onClick:()=>ae(e._id),children:E.has(e._id)?(0,I.jsx)(fm,{}):(0,I.jsx)(pm,{})})},{header:pz(),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:gz(),sort:e=>e.roleKey,cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.roleKey})},{header:yz(),sort:e=>+!!e.disabled,cell:e=>e.disabled?(0,I.jsx)($,{variant:`destructive`,children:PR()}):(0,I.jsx)($,{variant:`outline`,children:jR()})},{header:Sz(),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:Tz(),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?Oz():jz({count:t})})}}]}),(0,I.jsx)(Q8,{open:b,onOpenChange:e=>{x(e),e||T(null)},title:w?Pz():Uz(),description:w?Lz():Kz(),canSubmit:!!(S.name&&S.roleKey),onSubmit:oe,submitLabel:w?Bz():Yz(),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:Qz()}),(0,I.jsx)(a1,{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:tB()}),(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:iB()})}),(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:sB()}),(0,I.jsx)(a1,{value:S.description,onChange:e=>C({...S,description:e.target.value})})]})]})}),(0,I.jsx)(Iit,{minted:re,onClose:()=>M(null)})]})}function Fit({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:[sV(),` `,(0,I.jsx)(`span`,{className:`font-medium`,children:e.name})]}),t.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:uV()}):(0,I.jsxs)(`table`,{className:`oc-sa__keytable`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{children:pV()}),(0,I.jsx)(`th`,{children:gV()}),(0,I.jsx)(`th`,{children:yV()}),(0,I.jsx)(`th`,{children:SV()}),(0,I.jsx)(`th`,{children:TV()}),(0,I.jsx)(`th`,{children:OV()}),(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:Lit(t.createdAt)}),(0,I.jsx)(`td`,{className:Rit(t.lastUsedAt)?`oc-sa__stale`:``,children:zit(t.lastUsedAt)}),(0,I.jsx)(`td`,{children:Bit(t.expiresAt)}),(0,I.jsx)(`td`,{children:Vit(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)?jV():PV()})})]},t._id))})]})]})}function Iit({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)(m1,{open:e!==null,onOpenChange:e=>{e||(r(!1),t())},children:e?(0,I.jsxs)(h1,{className:`max-w-lg`,showCloseButton:!1,onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:LV()}),(0,I.jsx)(y1,{children:BV({name:e.accountName})})]}),(0,I.jsx)(`div`,{className:`oc-sa__minted-warning`,children:UV()}),(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":KV(),children:[n?(0,I.jsx)(dm,{}):(0,I.jsx)(vm,{}),n?YV():QV()]})]}),(0,I.jsx)(_1,{children:(0,I.jsx)(X,{onClick:()=>{r(!1),t()},children:tH()})})]}):null})}function Lit(e){return new Date(e).toLocaleString(`fr-FR`)}function Rit(e){return e===null?!1:Date.now()-e>Nit}function zit(e){return e===null?pH():new Date(e).toLocaleString(`fr-FR`)}function Bit(e){return e===null?`—`:new Date(e).toLocaleDateString(`fr-FR`)}function Vit(e){return e.disabled?(0,I.jsx)($,{variant:`destructive`,children:gH()}):e.expiresAt!==null&&e.expiresAt<Date.now()?(0,I.jsx)($,{variant:`outline`,children:yH()}):(0,I.jsx)($,{variant:`outline`,children:SH()})}var H7=[{group:()=>Hxe(),keys:[{key:`traces.read`,label:()=>lQ()},{key:`traces.read.content`,label:()=>aSe(),phi:!0},{key:`traces.write`,label:()=>uQ()}]},{group:()=>Gxe(),keys:[{key:`kpi.read`,label:()=>lQ()},{key:`kpi.write`,label:()=>uQ()}]},{group:()=>Jxe(),keys:[{key:`openclaw.query`,label:()=>uSe()},{key:`anomalies.read`,label:()=>pSe()},{key:`anomalies.report`,label:()=>gSe()}]},{group:()=>Zxe(),keys:[{key:`chats.read`,label:()=>lQ()},{key:`selfheal`,label:()=>SSe()}]},{group:()=>eSe(),keys:[{key:`admin.manage`,label:()=>ySe()}]}],Hit=H7.flatMap(e=>e.keys.map(e=>e.key));function U7(e){return e.includes(`*`)}var W7={key:``,name:``,description:``};function Uit(){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=S1(),a=E1(),[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(OSe(),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:jSe({name:e.name}),description:PSe(),confirmLabel:LSe()}))){d(t=>new Set(t).add(e._id));try{await r({roleId:e._id,permissions:n})}catch(e){a.error(BSe(),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(USe(),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:[KSe(),` `,(0,I.jsx)(`code`,{children:`admin`}),` `,YSe(),` `,(0,I.jsx)(`code`,{children:`traces.read.content`}),` `,QSe()]}),(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:tCe()}),(0,I.jsx)(`div`,{className:`oc-dt__bar-actions`,children:(0,I.jsx)(X,{size:`sm`,onClick:()=>{l(W7),s(!0)},children:iCe()})})]}),h?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:sCe()}):g?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:uCe()}):(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:pCe()}),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?TSe({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)(Aee,{}),` `,gCe()]}):(0,I.jsx)($,{variant:`secondary`,children:yCe()})]}),R7(e)?(0,I.jsx)(`p`,{className:`oc-matrix__roledesc`,children:R7(e)}):null]}),Hit.map(r=>(0,I.jsx)(`td`,{className:`oc-matrix__cell`,children:(0,I.jsx)(A1,{checked:t||e.permissions.includes(r),disabled:t||n,"aria-label":`${e.key} · ${r}`,title:t?LCe():n?BCe():r,onCheckedChange:()=>void p(e,r)})},r))]},e.key)})})]})})]}),(0,I.jsx)(Q8,{open:o,onOpenChange:s,title:UCe(),description:KCe(),canSubmit:!!(c.key&&c.name),onSubmit:m,submitLabel:YCe(),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:QCe()}),(0,I.jsx)(a1,{value:c.key,placeholder:twe(),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:iwe()}),(0,I.jsx)(a1,{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:swe()}),(0,I.jsx)(a1,{value:c.description,onChange:e=>l({...c,description:e.target.value})})]})]})})]})}function Wit(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 Git(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 Kit(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 qit(e){switch(e){case`admin`:return _Je();case`user`:return bJe();case`pending`:return CJe();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 Jit({className:e,orientation:t=`horizontal`,...n}){return(0,I.jsx)(Qle,{"data-slot":`tabs`,"data-orientation":t,className:W$(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Yit=r1(`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 Xit({className:e,variant:t=`default`,...n}){return(0,I.jsx)($le,{"data-slot":`tabs-list`,"data-variant":t,className:W$(Yit({variant:t}),e),...n})}function q7({className:e,...t}){return(0,I.jsx)(eue,{"data-slot":`tabs-trigger`,className:W$(`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:W$(`flex-1 text-sm outline-none`,e),...t})}var Y7={name:``,description:``};function X7({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 Zit(){let e=P(V.groups.listGroups,{}),t=P(V.me.getMe,{host:bO})?.role===`admin`,n=F(V.groups.createGroup),r=F(V.groups.updateGroup),i=F(V.groups.deleteGroup),a=S1(),o=E1(),[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(IYe(),e)}}async function x(e){if(await a({title:Aqe({name:e.name}),description:Nqe(),confirmWord:e.name,confirmLabel:Iqe(),cancelLabel:fqe(),destructive:!0}))try{await i({groupId:e._id})}catch(e){o.error(zYe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:AKe()}),(0,I.jsx)(r7,{q:h,onQChange:g,onReset:()=>g(``),canReset:h!==``,searchPlaceholder:ZKe()}),(0,I.jsx)(A5,{title:DKe(),rows:_,addLabel:NKe(),onAdd:t?v:void 0,emptyHint:IKe(),columns:[{header:zKe(),cell:e=>e.name,sort:e=>e.name},{header:HKe(),cell:e=>(0,I.jsx)(X7,{icon:(0,I.jsx)(Hm,{size:12,"aria-hidden":!0}),total:e.memberCount,items:e.members.map(e=>({label:e.label,marker:e.manager?(0,I.jsx)(Im,{size:11,"aria-hidden":!0}):null,highlight:e.manager}))}),sort:e=>e.memberCount},{header:GKe(),cell:e=>(0,I.jsx)(X7,{icon:(0,I.jsx)(Fm,{size:12,"aria-hidden":!0}),total:e.agentCount,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount},{header:JKe(),cell:e=>(0,I.jsx)(X7,{icon:(0,I.jsx)(jm,{size:12,"aria-hidden":!0}),total:e.chartCount,items:e.charts.map(e=>({label:e.name,marker:e.isDefault?(0,I.jsx)(Rm,{size:11,fill:`currentColor`,"aria-hidden":!0}):null,highlight:e.isDefault}))}),sort:e=>e.chartCount}],rowActions:e=>[{label:eqe(),onSelect:()=>m({groupId:e._id,name:e.name})},...t?[{label:rqe(),onSelect:()=>y(e)},{label:oqe(),variant:`destructive`,onSelect:()=>void x(e)}]:[]]}),(0,I.jsx)(Q8,{open:s,onOpenChange:c,title:l?vqe():hqe(),description:xqe(),canSubmit:!!d.name.trim(),onSubmit:b,submitLabel:lqe(),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:wqe()}),(0,I.jsx)(a1,{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:Dqe()}),(0,I.jsx)(a1,{value:d.description,onChange:e=>f({...d,description:e.target.value})})]})]})}),(0,I.jsx)(Qit,{groupId:p?.groupId??null,groupName:p?.name??``,open:p!==null,onOpenChange:e=>{e||m(null)}})]})}var Z7=8;function Q7({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)(yee,{size:14,"aria-hidden":!0}),cJe()]}),(0,I.jsxs)(`span`,{className:`oc-access__pageinfo`,"aria-label":mJe({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:[dJe(),(0,I.jsx)(pm,{size:14,"aria-hidden":!0})]})]})}function Qit({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=E1(),[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?Wit(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(GQ(),e)}}async function ee(t,n){if(e)try{await u({groupId:e,userId:t,manager:!n})}catch(e){d.error(jYe(),e)}}let te=G7(D,e=>C.has(e.userId)),k=D.filter(e=>C.has(e.userId)).length,A=K7(D,v,Z7);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(GQ(),e)}}return(0,I.jsx)(m1,{open:n,onOpenChange:r,children:(0,I.jsxs)(h1,{className:`oc-access`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:zqe({name:t})}),(0,I.jsx)(y1,{children:Hqe()})]}),(0,I.jsxs)(Jit,{value:g,onValueChange:_,className:`oc-access__tabs`,children:[(0,I.jsxs)(Xit,{className:`w-full`,children:[(0,I.jsxs)(q7,{value:`members`,className:`flex-1 gap-1.5`,children:[(0,I.jsx)(Hm,{size:13,"aria-hidden":!0}),Gqe(),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)(Fm,{size:13,"aria-hidden":!0}),Zqe(),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)(jm,{size:13,"aria-hidden":!0}),rYe(),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:LQ()}):o.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:LJe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(a1,{value:f,onChange:e=>p(e.target.value),placeholder:Jqe(),className:`oc-access__search`}),D.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:rJe()}):(0,I.jsxs)(I.Fragment,{children:[D.length>1?(0,I.jsxs)(`div`,{className:`oc-access__row oc-access__selectall`,children:[(0,I.jsx)(A1,{checked:te===`all`?!0:te===`some`?`indeterminate`:!1,onCheckedChange:()=>void j(),"aria-label":IQ()}),(0,I.jsx)(`span`,{className:`oc-access__label`,children:IQ()}),(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=Kit(e),r=w.has(e.userId);return(0,I.jsxs)(`div`,{className:`oc-access__row`,children:[(0,I.jsx)(A1,{checked:t,onCheckedChange:()=>void O(e.userId,t),"aria-label":EJe({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:qit(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?UQ():HQ(),title:r?UQ():HQ(),onClick:()=>void ee(e.userId,r),children:(0,I.jsx)(Im,{size:15,"aria-hidden":!0})}):t&&r?(0,I.jsx)(`span`,{className:`oc-access__mgr oc-access__mgr--on`,role:`img`,"aria-label":VQ(),title:VQ(),children:(0,I.jsx)(Im,{size:15,"aria-hidden":!0})}):null})]},e._id)})}),(0,I.jsx)(Q7,{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:LQ()}):a.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:BJe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(a1,{value:m,onChange:e=>h(e.target.value),placeholder:eJe(),className:`oc-access__search`}),(0,I.jsx)(`div`,{className:`oc-access__list`,children:a.map(t=>(0,I.jsx)($it,{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)(eat,{groupId:e})})]})]})})}function $it({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=E1(),[u,d]=(0,N.useState)(1);if((0,N.useEffect)(()=>{d(1)},[i]),!e)return null;let f=Git(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,Z7);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(KQ(),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(KQ(),e)}}return(0,I.jsxs)(`div`,{className:`oc-access__group`,children:[(0,I.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,I.jsx)(Fm,{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:YJe()}):null]}),a===void 0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:PJe()}):f.length===0?(0,I.jsx)(`p`,{className:`oc-access__hint`,children:p?KJe():UJe()}):(0,I.jsxs)(I.Fragment,{children:[m.length>1?(0,I.jsxs)(`div`,{className:`oc-access__row oc-access__selectall`,children:[(0,I.jsx)(A1,{checked:h===`all`?!0:h===`some`?`indeterminate`:!1,onCheckedChange:()=>void v(),"aria-label":IQ()}),(0,I.jsx)(`span`,{className:`oc-access__label`,children:IQ()})]}):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)(A1,{checked:i,disabled:a&&!i,onCheckedChange:()=>void _(e.agentId,i),"aria-label":kJe({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":RQ(),title:RQ(),children:(0,I.jsx)(Rm,{size:14,fill:`currentColor`})}):null,a?(0,I.jsx)($,{variant:`outline`,className:`oc-access__gone`,children:QJe()}):null]},e.agentId)}),(0,I.jsx)(Q7,{page:g.page,pageCount:g.pageCount,onPage:d})]})]})}function eat({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=E1();if(!e)return null;if(t===void 0)return(0,I.jsx)(`p`,{className:`oc-access__hint`,children:LQ()});let{pool:c,addable:l,canManagePool:u}=t;if(c.length===0&&!u)return(0,I.jsx)(`p`,{className:`oc-access__hint`,children:oYe()});async function d(t,i){try{i?await r({groupId:e,chartKey:t}):await n({groupId:e,chartKey:t})}catch(e){s.error(WQ(),e)}}async function f(t){try{await i({groupId:e,chartKey:t})}catch(e){s.error(WQ(),e)}}async function p(t){try{await a({groupId:e,chartKey:t})}catch(e){s.error(WQ(),e)}}async function m(t){try{await o({groupId:e,chartKey:t})}catch(e){s.error(WQ(),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)(A1,{checked:e.selected,onCheckedChange:()=>void d(e.chartKey,e.selected),"aria-label":_Ye({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":BQ(),title:BQ(),children:(0,I.jsx)(Rm,{size:14,fill:`currentColor`})}):(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>void f(e.chartKey),children:SYe()}):null,u?(0,I.jsx)(X,{type:`button`,variant:`ghost`,size:`sm`,"aria-label":zQ({name:e.name}),title:zQ({name:e.name}),onClick:()=>void m(e.chartKey),children:(0,I.jsx)(Wm,{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:fYe()})}),(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:lYe()}):null:null]})}var tat=[50,100,200,500],$7=`all`,e9=`__all__`,nat=[`2xx`,`4xx`,`5xx`],rat=[`user`,`service`,`system`],iat=[`inbound`,`outbound`,`internal`],aat={kind:`relative`,from:`now-30d`,to:`now`},oat=[{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 sat(){let e=os({from:`/settings/traces`}),t=ss({from:`/settings/traces`}),n=e.limit,r=e.kind,i=e.statusClass??e9,a=e.principalType??e9,o=e.direction??e9,s=e.roleKey??e9,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===e9?void 0:e})}),x=e=>void t({search:t=>({...t,principalType:e===e9?void 0:e})}),S=e=>void t({search:t=>({...t,direction:e===e9?void 0:e})}),C=e=>void t({search:t=>({...t,roleKey:e===e9?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===$7?void 0:r,filter:{q:c||void 0,from:d,to:f,statusClass:i===e9?void 0:i,principalType:a===e9?void 0:a,direction:o===e9?void 0:o,roleKey:s===e9?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!==e9||a!==e9||o!==e9||s!==e9||u.length>0||l.kind!==`relative`||l.from!==aat.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:[eOe(),(0,I.jsx)(`strong`,{children:rOe()}),oOe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:lOe()})]}),(0,I.jsxs)(r7,{q:c,onQChange:y,searchPlaceholder:fOe(),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:hOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:e9,children:vOe()}),nat.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:xOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:e9,children:wOe()}),rat.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:DOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:e9,children:AOe()}),iat.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:NOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:e9,children:IOe()}),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:zOe()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:$7,children:HOe()}),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:tat.map(e=>(0,I.jsx)(Q,{value:String(e),children:GOe({count:e})},e))})]})]}),(0,I.jsx)(m7,{fields:oat,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:JOe(),children:[(0,I.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ZOe(),(0,I.jsx)(`code`,{children:t9(p)})]}),(0,I.jsx)(Wm,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,I.jsx)(`span`,{className:`sr-only`,children:eke()})]})}):null,(0,I.jsx)(A5,{title:rke(),rows:A,emptyHint:p?oke():lke(),columns:[{header:fke(),sort:e=>e.at,cell:e=>(0,I.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:hke(),sort:e=>e.kind,cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.kind})},{header:vke(),sort:e=>n9(e)??null,cell:e=>{let t=n9(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":xke(),children:`✓`})}},{header:wke(),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:Dke(),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:t9(e.principalId)}):null]})},{header:Ake(),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:Nke(),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:Ike(),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 ${cat(e.status)}`,children:e.status})},{header:zke(),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:Hke(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,I.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:Gke(),onClick:()=>m(e.correlationId),children:t9(e.correlationId)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Jke(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>g(e),children:Zke()}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,I.jsx)(lat,{row:h,onClose:()=>g(null)})]})}function cat(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 t9(e){return e.length>8?e.slice(0,8):e}function n9(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 lat({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)(m1,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,I.jsxs)(h1,{className:`max-w-lg`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsxs)(v1,{className:`oc-traces__meta-title`,children:[eAe(),` `,(0,I.jsx)(`code`,{children:e.kind}),(0,I.jsx)($,{variant:`outline`,children:rAe()})]}),(0,I.jsx)(y1,{children:oAe()})]}),(0,I.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}function r9({className:e,size:t=`default`,...n}){return(0,I.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:W$(`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 i9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-header`,className:W$(`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 a9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-title`,className:W$(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function o9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-description`,className:W$(`text-sm text-muted-foreground`,e),...t})}function s9({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-content`,className:W$(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function uat({className:e,...t}){return(0,I.jsx)(`div`,{"data-slot":`card-footer`,className:W$(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}var c9=[{metric:`api.calls`,label:nIe(),unit:`/h`,group:`API`,isError:!1},{metric:`api.errors`,label:aIe(),unit:`/h`,group:`API`,isError:!0},{metric:`api.latency.avg_ms`,label:cIe(),unit:`ms`,group:`API`,isError:!1},{metric:`openclaw.ingest`,label:dIe(),unit:`/h`,group:`OpenClaw`,isError:!1},{metric:`chat.send`,label:mIe(),unit:`/h`,group:`Chat`,isError:!1},{metric:`assistant.stream.errors`,label:_Ie(),unit:`/h`,group:`Assistant`,isError:!0}],l9=c9.length,dat=[`API`,`OpenClaw`,`Chat`,`Assistant`],fat=1e3,pat=36e5;function mat(e,t){let n=Math.max(1,Math.ceil((t-e)/pat)),r=Math.min(n*l9,fat);return{rowLimit:r,buckets:Math.max(1,Math.floor(r/l9))}}function hat(){let e=os({from:`/settings/kpi`}),t=ss({from:`/settings/kpi`}),n=_7(e.from,e.to,cit,`now`),r=e=>void t({search:t=>({...t,...v7(e)})}),{from:i,to:a}=e7(n),{rowLimit:o,buckets:s}=mat(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:[bIe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:CIe()})]}),(0,I.jsx)(gat,{value:n,onChange:r})]});return c===void 0?(0,I.jsxs)(I.Fragment,{children:[u,(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:EIe()})]}):c.length===0?(0,I.jsxs)(I.Fragment,{children:[u,(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:kIe()})]}):(0,I.jsxs)(I.Fragment,{children:[u,dat.map(e=>{let t=c9.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)(_at,{config:e,series:l.get(e.metric)??[]},e.metric))})]},e):null})]})}function gat({value:e,onChange:t}){return(0,I.jsx)(`div`,{className:`oc-kpi__toolbar`,children:(0,I.jsx)(n7,{value:e,onChange:t})})}function _at({config:e,series:t}){let n=t.length>0?t[t.length-1]:null,r=n?n.value:0;return(0,I.jsxs)(r9,{size:`sm`,className:`oc-kpi__card`,children:[(0,I.jsxs)(i9,{children:[(0,I.jsx)(a9,{className:`oc-kpi__card-title`,children:e.label}),(0,I.jsx)(o9,{className:`oc-kpi__card-metric`,children:(0,I.jsx)(`code`,{children:e.metric})})]}),(0,I.jsxs)(s9,{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:f9(r)}),(0,I.jsx)(`span`,{className:`oc-kpi__unit`,children:e.unit})]}),(0,I.jsx)(yat,{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:MIe({value:p9(n.bucket)})}):(0,I.jsx)(`span`,{className:`oc-kpi__muted`,children:FIe()}),(0,I.jsx)(`span`,{className:`oc-kpi__muted`,children:RIe({count:t.length})})]})]})]})}var u9=240,d9=48,vat=1;function yat({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=u9/e.length,a=Math.max(i-vat,1);return(0,I.jsx)(`svg`,{className:`oc-kpi__chart`,viewBox:`0 0 ${u9} ${d9}`,preserveAspectRatio:`none`,role:`img`,"aria-label":VIe({max:f9(r),unit:n}),children:e.map((e,o)=>{let s=r>0?e.value/r*(d9-1):0,c=o*i,l=d9-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:[p9(e.bucket),` · `,f9(e.value),` `,n]})},e.bucket)})})}function f9(e){return Number.isFinite(e)?Math.abs(e)>=1e3?(e/1e3).toFixed(e%1e3==0?0:1)+`k`:String(e):`0`}function p9(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 m9=`__all__`,bat=[{value:`open`},{value:`acknowledged`},{value:`resolved`}];function xat(e){return e===`open`?uwe():e===`acknowledged`?pwe():gwe()}var Sat=[`info`,`warn`,`critical`],Cat=[`detector`,`agent`],wat={kind:`relative`,from:`now-30d`,to:`now`},Tat=200,h9=`all`;function Eat(){let e=os({from:`/settings/anomalies`}),t=ss({from:`/settings/anomalies`}),n=e.q??``,r=e.status===h9?m9:e.status,i=e.severity??m9,a=e.kind??m9,[o,s]=(0,N.useState)(m9),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===m9?h9:e})}),p=e=>void t({search:t=>({...t,severity:e===m9?void 0:e})}),m=e=>void t({search:t=>({...t,kind:e===m9?void 0:e})}),h=e=>void t({search:t=>({...t,...v7(e)})}),g=S1(),_=E1(),v=F(V.anomalies.resolveAnomaly),y=(P(V.me.getMe,{host:bO})?.permissions??[]).includes(`admin.manage`),b=P(V.anomalies.listAnomalies,{limit:Tat,filter:{q:n||void 0,from:l,to:u,anomalyStatus:r===m9?void 0:r,severity:i===m9?void 0:i,source:o===m9?void 0:o,kind:a===m9?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!==m9||o!==m9||a!==m9||c.kind!==`relative`||c.from!==wat.from;function C(){s(m9),t({search:{status:`open`},replace:!0})}async function w(e){if(await g({title:ywe(),description:(0,I.jsxs)(I.Fragment,{children:[Swe(),` `,(0,I.jsx)(`span`,{className:`font-mono`,children:e.kind}),` `,Twe(),` `,(0,I.jsx)(`strong`,{children:Owe()}),`.`,` `,jwe()]}),confirmLabel:Pwe()}))try{await v({anomalyId:e._id,status:`resolved`}),_.success(Lwe(),e.kind)}catch(e){_.error(Bwe(),e)}}async function T(e){try{await v({anomalyId:e._id,status:`acknowledged`}),_.success(Uwe(),e.kind)}catch(e){_.error(Kwe(),e)}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`oc-admin__hint`,children:[Ywe(),` `,(0,I.jsx)(`strong`,{children:Qwe()}),` `,tTe(),` `,(0,I.jsx)(`strong`,{children:iTe()}),` `,sTe(),` `,(0,I.jsx)(`strong`,{children:uTe()}),` `,pTe(),` `,(0,I.jsx)(`span`,{className:`oc-filter__window`,children:gTe()})]}),(0,I.jsxs)(r7,{q:n,onQChange:d,searchPlaceholder:yTe(),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:m9,children:STe()}),bat.map(e=>(0,I.jsx)(Q,{value:e.value,children:xat(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:dQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:m9,children:DTe()}),Sat.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:fQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:m9,children:MTe()}),Cat.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:pQ()})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:m9,children:LTe()}),x.map(e=>(0,I.jsx)(Q,{value:e,children:e},e))]})]})]}),(0,I.jsx)(A5,{title:BTe(),rows:b,emptyHint:r===`open`?UTe():KTe(),rowActions:e=>y&&e.status===`open`?[{label:YTe(),onSelect:()=>void w(e)},{label:QTe(),onSelect:()=>void T(e)}]:[],columns:[{header:tEe(),cell:e=>(0,I.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)}),sort:e=>e.at},{header:pQ(),cell:e=>(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:e.kind}),sort:e=>e.kind},{header:dQ(),cell:e=>(0,I.jsx)(kat,{severity:e.severity}),sort:e=>e.severity===`critical`?2:+(e.severity===`warn`)},{header:iEe(),cell:e=>(0,I.jsx)(Aat,{status:e.status}),sort:e=>e.status===`resolved`?2:+(e.status===`acknowledged`)},{header:fQ(),cell:e=>(0,I.jsx)($,{variant:`outline`,children:e.source}),sort:e=>e.source},{header:sEe(),cell:e=>(0,I.jsx)(`span`,{className:`oc-anomaly__msg`,children:e.message}),sort:e=>e.message},{header:uEe(),cell:e=>(0,I.jsx)(Oat,{row:e}),sort:e=>e.evidence??null},{header:pEe(),cell:e=>e.correlationId?(0,I.jsx)(`code`,{className:`oc-traces__mono`,children:jat(e.correlationId)}):(0,I.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}),sort:e=>e.correlationId}]})]})}function Dat(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 Oat({row:e}){let t=ss(),n=Dat(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:[`↗ `,gEe()]}):null]})}function kat({severity:e}){return(0,I.jsx)(`span`,{className:`oc-anomaly__sev oc-anomaly__sev--${e}`,children:e})}function Aat({status:e}){return e===`open`?(0,I.jsx)($,{variant:`destructive`,children:yEe()}):e===`acknowledged`?(0,I.jsx)($,{variant:`secondary`,children:SEe()}):(0,I.jsx)($,{variant:`outline`,children:TEe()})}function jat(e){return e.length>8?e.slice(0,8):e}function Mat(){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:yJ()});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:[SJ(),` `,(0,I.jsx)(`strong`,{children:TJ()}),` `,OJ()]}),(0,I.jsxs)(g9,{title:`Langfuse`,status:e.langfuse.configured?e.langfuse.enabled?(0,I.jsx)($,{variant:`secondary`,children:jJ()}):(0,I.jsx)($,{variant:`outline`,children:PJ()}):(0,I.jsx)($,{variant:`outline`,children:LJ()}),note:UJ(),children:[(0,I.jsx)(_9,{label:YJ(),children:(0,I.jsx)(a1,{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)(v9,{label:sY(),checked:i.langfuse.enabled??!0,onChange:e=>{a(`langfuse`,`enabled`,e),o(`langfuse`,{enabled:e})}})]}),(0,I.jsxs)(g9,{title:`Opik`,status:e.opik.configured?e.opik.enabled?(0,I.jsx)($,{variant:`secondary`,children:jJ()}):(0,I.jsx)($,{variant:`outline`,children:PJ()}):(0,I.jsx)($,{variant:`outline`,children:LJ()}),note:KJ(),children:[(0,I.jsx)(_9,{label:QJ(),children:(0,I.jsx)(a1,{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)(_9,{label:tY(),children:(0,I.jsx)(a1,{value:i.opik.workspace??``,placeholder:e.opik.effectiveWorkspace||iY(),onChange:e=>a(`opik`,`workspace`,e.target.value),onBlur:()=>o(`opik`,{workspace:i.opik.workspace??``})})}),(0,I.jsx)(v9,{label:sY(),checked:i.opik.enabled??!0,onChange:e=>{a(`opik`,`enabled`,e),o(`opik`,{enabled:e})}})]}),(0,I.jsxs)(g9,{title:uY(),status:(0,I.jsx)($,{variant:`outline`,children:BJ()}),note:pY(),children:[(0,I.jsx)(_9,{label:gY(),children:(0,I.jsx)(y9,{value:i.tts.auto??`off`,options:[[`off`,yY()],[`always`,SY()],[`inbound`,TY()],[`tagged`,OY()]],onChange:e=>{a(`tts`,`auto`,e),o(`tts`,{auto:e})}})}),(0,I.jsx)(_9,{label:jY(),children:(0,I.jsx)(y9,{value:i.tts.provider??`openai`,options:[[`openai`,`OpenAI`],[`elevenlabs`,`ElevenLabs`],[`microsoft`,PY()],[`azure`,`Azure Speech`],[`google`,`Google Gemini`]],onChange:e=>{a(`tts`,`provider`,e),o(`tts`,{provider:e})}})}),(0,I.jsx)(_9,{label:LY(),children:(0,I.jsx)(a1,{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)(_9,{label:BY(),children:(0,I.jsx)(a1,{value:i.tts.voice??``,placeholder:UY(),onChange:e=>a(`tts`,`voice`,e.target.value),onBlur:()=>o(`tts`,{voice:i.tts.voice??``})})})]}),(0,I.jsxs)(g9,{title:KY(),status:(0,I.jsx)($,{variant:`outline`,children:BJ()}),note:e.secrets.openai?YY():QY(),children:[(0,I.jsx)(v9,{label:tX(),checked:i.talk.enabled??!1,onChange:e=>{a(`talk`,`enabled`,e),o(`talk`,{enabled:e})}}),(0,I.jsx)(_9,{label:iX(),children:(0,I.jsx)(y9,{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)(_9,{label:sX(),children:(0,I.jsx)(a1,{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)(_9,{label:BY(),children:(0,I.jsx)(a1,{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)(_9,{label:uX(),children:(0,I.jsx)(y9,{value:i.talk.transport??`webrtc`,options:[[`webrtc`,pX()],[`provider-websocket`,`Provider WebSocket`],[`gateway-relay`,`Gateway relay`]],onChange:e=>{a(`talk`,`transport`,e),o(`talk`,{transport:e})}})}),(0,I.jsx)(_9,{label:gX(),children:(0,I.jsx)(a1,{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)(v9,{label:yX(),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:SX()}),(0,I.jsx)($,{variant:`outline`,children:TX()})]}),(0,I.jsxs)(`p`,{className:`oc-uipa__note`,children:[OX(),(0,I.jsx)(`code`,{children:` voicewake.get/set`}),`.`]})]}),(0,I.jsx)(A5,{title:jX(),rows:e.cursors.map(e=>({...e,_id:e.vendor})),emptyHint:PX(),columns:[{header:LX(),cell:e=>(0,I.jsx)($,{variant:`secondary`,children:e.vendor}),sort:e=>e.vendor},{header:BX(),cell:e=>e.lastAt>0?new Date(e.lastAt).toLocaleString(`fr-FR`):`—`,sort:e=>e.lastAt>0?e.lastAt:null},{header:UX(),cell:e=>String(e.failureCount),sort:e=>e.failureCount},{header:KX(),cell:e=>e.lastErrorStatus??`—`,sort:e=>e.lastErrorStatus??null},{header:YX(),cell:e=>e.lastError??`—`,sort:e=>e.lastError??null}]})]})}function g9({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 _9({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 v9({label:e,checked:t,onChange:n}){return(0,I.jsxs)(`label`,{className:`oc-int__toggle`,children:[(0,I.jsx)(A1,{checked:t,onCheckedChange:e=>n(e===!0)}),(0,I.jsx)(`span`,{children:e})]})}function y9({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 Nat={altered_words:()=>QX(),incorrect:()=>tZ(),incoherence:()=>iZ(),formatting:()=>sZ(),latency:()=>uZ(),api_error:()=>pZ(),other:()=>gZ()},b9=e=>Nat[e]?.()??e;function x9({matches:e,sourceWasOpen:t}){return t?e===!0?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-ok`,children:SZ()}):e===!1?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-warn`,children:TZ()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:`—`}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:yZ()})}function Pat({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)(x9,{matches:n.displayedMatchesStored,sourceWasOpen:n.clientInfo?.sourceWasOpen??!1}),(0,I.jsxs)(`span`,{className:`oc-fbadmin__meta`,children:[b9(e.category),` · `,n.messageRole,n.isRegeneration?` · ${OZ()}`:``,n.openclawModel?` · ${n.openclawModel}`:``,n.openclawRuntime?` (${n.openclawRuntime})`:``]})]}),e.comment?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:jZ()}),(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:nme()}),(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:PZ()}),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`?LZ():BZ()}),(0,I.jsx)(`span`,{className:`oc-notif__msg-text`,children:e.text})]},t))}):(0,I.jsx)(`p`,{className:`oc-fbadmin__meta`,children:UZ()}),(0,I.jsx)(`textarea`,{className:`oc-feedback__textarea`,placeholder:KZ(),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?hfe():vfe()})})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:xfe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.messageText||JZ()})]}),n.clientInfo?.sourceWasOpen&&n.displayedText!==void 0?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:Efe()}),(0,I.jsx)(`pre`,{className:`oc-msg__source-pre`,children:n.displayedText||JZ()})]}):null,n.promptText?(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h4`,{className:`oc-fbadmin__h`,children:kfe()}),(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:Mfe({count:n.contextCount??d.length,truncated:n.contextTruncated?Ffe():``})}),(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:Rfe()}),(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:Vfe()}),(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:Wfe()}),(0,I.jsxs)(`p`,{className:`oc-fbadmin__env`,children:[[n.clientInfo?.language,n.clientInfo?.timezone,n.clientInfo?.theme?qfe({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:[Xfe(),` `,n.clientInfo.plugins.join(`, `),(0,I.jsxs)(`span`,{className:`oc-fbadmin__note`,children:[` `,$fe()]})]}):null,n.clientInfo?.userAgent?(0,I.jsx)(`span`,{className:`oc-fbadmin__ua`,children:n.clientInfo.userAgent}):null]})]})]})}function Fat(){let e=P(V.feedback.listForAdmin,{}),t=F(V.feedback.readSnapshot),n=F(V.feedback.deleteFeedback),r=S1(),[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:mme(),description:_me(),confirmLabel:bme(),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:[npe(),` `,(0,I.jsx)(`strong`,{children:ape()}),` `,cpe()]}),(0,I.jsx)(A5,{title:dpe(),rows:e,emptyHint:mpe(),isExpanded:e=>i===e._id&&!!o[e._id],renderExpanded:e=>o[e._id]?(0,I.jsx)(Pat,{data:o[e._id],closeReason:e.userCloseReason}):null,columns:[{header:_pe(),cell:e=>new Date(e.at).toLocaleString(`fr-FR`),sort:e=>e.at},{header:bpe(),cell:e=>b9(e.category),sort:e=>b9(e.category)},{header:Cpe(),cell:e=>e.messageRole===`user`?Epe():kpe(),sort:e=>e.messageRole},{header:Mpe(),cell:e=>(e.reporterEmail||e.reporterName||`—`)+(e.impersonated&&e.realOperatorEmail?` ${Fpe({operator:e.realOperatorEmail})}`:``),sort:e=>e.reporterEmail||e.reporterName||null},{header:Rpe(),cell:e=>(0,I.jsx)(x9,{matches:e.displayedMatchesStored,sourceWasOpen:e.sourceWasOpen}),sort:e=>e.displayedMatchesStored===!1?0:e.displayedMatchesStored===!0?1:2},{header:Vpe(),cell:e=>e.hasComment?`✎`:`—`,sort:e=>+!!e.hasComment},{header:Wpe(),cell:e=>e.userClosedAt==null?e.answered?(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-ok`,children:qpe()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill`,children:Xpe()}):(0,I.jsx)(`span`,{className:`oc-fbadmin__pill is-closed`,children:$pe()}),sort:e=>e.userClosedAt==null?+!!e.answered:2}],rowActions:e=>[{label:i===e._id?ame():cme(),onSelect:()=>void c(e)},{label:dme(),onSelect:()=>void l(e),variant:`destructive`}]})]})}var S9=`all`;function C9(e){switch(e){case`image`:return LA();case`audio`:return BA();case`video`:return UA();case`pdf`:return KA();case`document`:return YA();case`archive`:return QA();default:return tj()}}function Iat(){let[e,t]=(0,N.useState)(S9),[n,r]=(0,N.useState)(S9),[i,a]=(0,N.useState)(S9),[o,s]=(0,N.useState)(S9),[c,l]=(0,N.useState)(null),u=F(V.files.softDelete),d=E1();function f(){t(S9),r(S9),a(S9),s(S9)}async function p(){let e=c;if(l(null),e)try{await u({fileId:e.id}),d.success(Pj())}catch(e){d.error(Lj(),e)}}let m=P(V.files.listMine,{direction:e===S9?void 0:e,chatId:n===S9?void 0:n,instanceName:i===S9?void 0:i,category:o===S9?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!==S9||n!==S9||i!==S9||o!==S9;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:iA()}),(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":sA(),children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:S9,children:uA()}),(0,I.jsx)(Q,{value:`inbound`,children:pA()}),(0,I.jsx)(Q,{value:`outbound`,children:gA()})]})]}),(0,I.jsxs)(C3,{value:n,onValueChange:r,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":yA(),children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:S9,children:SA()}),_.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":TA(),children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:S9,children:OA()}),_.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":jA(),children:(0,I.jsx)(w3,{})}),(0,I.jsxs)(E3,{children:[(0,I.jsx)(Q,{value:S9,children:PA()}),_.categories.map(e=>(0,I.jsx)(Q,{value:e,children:C9(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)(Nm,{size:14,"aria-hidden":!0}),Tj()]}):null]}),g.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:b?Qj():Yj()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(w5,{children:[(0,I.jsx)(T5,{children:(0,I.jsxs)(D5,{children:[(0,I.jsx)(O5,{children:ij()}),(0,I.jsx)(O5,{children:sj()}),(0,I.jsx)(O5,{children:uj()}),(0,I.jsx)(O5,{children:pj()}),(0,I.jsx)(O5,{children:gj()}),(0,I.jsx)(O5,{className:`text-right`,children:yj()})]})}),(0,I.jsx)(E5,{children:g.map(e=>(0,I.jsxs)(D5,{children:[(0,I.jsx)(k5,{className:`font-medium`,style:{maxWidth:280,overflow:`hidden`,textOverflow:`ellipsis`},title:e.filename,children:e.filename}),(0,I.jsx)(k5,{title:e.mimeType,children:C9(e.category)}),(0,I.jsx)(k5,{children:(0,I.jsx)($,{variant:`secondary`,children:e.direction===`inbound`?pA():gA()})}),(0,I.jsx)(k5,{style:{maxWidth:220,overflow:`hidden`,textOverflow:`ellipsis`},title:e.chatTitle,children:e.chatTitle}),(0,I.jsx)(k5,{className:`whitespace-nowrap text-muted-foreground`,children:h.format(e.createdAt)}),(0,I.jsx)(k5,{className:`text-right`,children:(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":Oj(),children:(0,I.jsx)(bm,{size:16})})}),(0,I.jsxs)(q$,{align:`end`,children:[e.url?(0,I.jsx)(J$,{asChild:!0,children:(0,I.jsxs)(`a`,{href:e.url,download:e.filename,target:`_blank`,rel:`noopener noreferrer`,children:[(0,I.jsx)(ym,{size:14}),Sj()]})}):(0,I.jsxs)(J$,{disabled:!0,children:[(0,I.jsx)(ym,{size:14}),Kj()]}),(0,I.jsxs)(J$,{variant:`destructive`,onSelect:()=>l({id:e._id,filename:e.filename}),children:[(0,I.jsx)(zm,{size:14}),jj()]})]})]})})]},e._id))})]}),v?(0,I.jsx)(`p`,{className:`oc-admin__hint`,style:{marginTop:8},children:tM({cap:y})}):null]}),(0,I.jsx)(o1,{open:c!==null,onOpenChange:e=>!e&&l(null),children:(0,I.jsxs)(s1,{children:[(0,I.jsxs)(c1,{children:[(0,I.jsx)(u1,{children:Bj()}),(0,I.jsx)(d1,{children:Uj()})]}),(0,I.jsxs)(l1,{children:[(0,I.jsx)(p1,{children:uW()}),(0,I.jsx)(f1,{onClick:()=>void p(),children:jj()})]})]})})]})}var w9=2e4,T9=6e4;function Lat(e){return typeof e!=`number`||e<=0?0:Math.round(e/w9*100)}function Rat(e){return e<=0?0:Math.round(e/T9*100)}function E9(e,t){let n=(typeof e==`number`&&e>0?e:0)/1e3;return new Intl.NumberFormat(t,{minimumFractionDigits:1,maximumFractionDigits:1}).format(n)}function D9(e){return e.reduce((e,t)=>e+(typeof t.size==`number`&&t.size>0?t.size:0),0)}var O9=3;function zat(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 Eat(e){return e instanceof Error?e.message.includes(`conflict:`):String(e).includes(`conflict:`)}var O9=e=>`${e.instanceName}::${e.agentId}`;function Dat(){let e=P(V.me.getMe,{host:bO}),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:GO()}):(0,I.jsxs)(`div`,{className:`oc-afiles`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:tQe()}),(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":$Q(),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":oQe(),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:lQe()})]}),d===null?null:v===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:GO()}):v!==null&&v.blocked?(0,I.jsxs)(`p`,{className:`oc-compat__blocked`,role:`status`,children:[(0,I.jsx)(Bm,{size:14,"aria-hidden":!0}),` `,U5(v.gatewayVersion)]}):p.status===`loading`||p.status===`idle`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:GO()}):p.status===`error`?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[hQe(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void b(),children:XQ()})]}):p.files.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:fQe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-afiles__list`,children:p.files.map(e=>{let n=Cat(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:vQe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-afiles__size`,children:xQe({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:wQe({pct:w.format(n)})}),r?(0,I.jsx)(Bm,{size:14,className:`oc-afiles__warn`,"aria-label":DQe()}):(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?NQe():IQe()})]},e.name)})}),(0,I.jsx)(`p`,{className:`oc-afiles__budget`,children:AQe({used:T9(E9(p.files),C),total:T9(w9,C),pct:w.format(wat(E9(p.files)))})})]}),x&&d?(0,I.jsx)(Oat,{instanceName:d.instanceName,agentId:d.agentId,name:x.name,isAdmin:t,onClose:()=>S(null),onSaved:()=>void b()}):null]})}function Oat({instanceName:e,agentId:t,name:n,isAdmin:r,onClose:i,onSaved:a}){let o=$n(V.agentFiles.getAgentFile),s=$n(V.agentFiles.setAgentFile),c=E1(),[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(n$e({name:n})),a(),await C(!1)}catch(e){Eat(e)?b(!0):S(!0)}finally{v(!1)}}}let T=l!==null&&p!==l.content,E=(0,N.useMemo)(()=>l===null?null:Tat(l.content,p),[l,p]),D=p.length>C9,O=q(),ee=(0,N.useMemo)(()=>new Intl.NumberFormat(O),[O]);return(0,I.jsx)(m1,{open:!0,onOpenChange:e=>!e&&i(),children:(0,I.jsxs)(h1,{className:`oc-afiles__editor`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:e$({name:n})}),(0,I.jsxs)(y1,{children:[VQe({agent:t,instance:e}),r?null:(0,I.jsxs)(I.Fragment,{children:[` · `,WQe()]})]})]}),d?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[c$e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void C(!1),children:XQ()})]}):l===null?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:GO()}):(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":e$({name:n})}),(0,I.jsx)(`p`,{className:`oc-afiles__hint`,children:qQe()}),y?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[d$e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void C(!0),children:m$e()})]}):null,x?(0,I.jsx)(`p`,{className:`oc-afiles__error`,role:`alert`,children:a$e()}):null,(0,I.jsxs)(`div`,{className:`oc-afiles__editor-foot`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__count${D?` is-over`:``}`,children:XQe({count:ee.format(p.length),max:ee.format(C9)})}),r?(0,I.jsx)(X,{size:`sm`,disabled:!T||_||y,onClick:()=>g(!0),children:_?YQ():$Qe()}):null]})]}),(0,I.jsx)(o1,{open:h,onOpenChange:g,children:(0,I.jsxs)(s1,{children:[(0,I.jsxs)(c1,{children:[(0,I.jsx)(u1,{children:_$e({name:n})}),(0,I.jsx)(d1,{children:b$e({agent:t})})]}),E?(0,I.jsxs)(`div`,{className:`oc-afiles__diff`,children:[(0,I.jsx)(`p`,{className:`oc-afiles__diff-counts`,children:C$e({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:E$e()}),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:k$e()}),E.sampleRemoved.map((e,t)=>(0,I.jsx)(`code`,{className:`oc-afiles__diff-line is-del`,children:e||` `},t))]}):null]}):null,(0,I.jsxs)(l1,{children:[(0,I.jsx)(p1,{children:lW()}),(0,I.jsx)(f1,{onClick:()=>void w(),children:M$e()})]})]})})]})})}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 kat(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 Aat=[`showSource`,`showReport`,`copyAssistant`,`copyUser`,`showDelete`,`showTools`,`voiceInput`,`showChatAge`,`showChatProvider`],jat={voiceInput:`voiceInput`};function Mat(e){return Aat.includes(e)}function M9(e){return e===`admin`}function Nat(e){return e===!0?`on`:e===!1?`off`:`inherit`}function Pat(e){return e===`on`?!0:e===`off`?!1:null}function Fat(e){return Mat(e)?jat[e]:void 0}var Iat={voiceInput:()=>eR()};function Lat({prefKey:e,ui:t}){let n=F(V.admin.setUiPrefDefault),r=F(V.admin.setFeatureEnabled),i=Fat(e),a=i?Iat[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:Nat(t.defaults[e]),onValueChange:t=>void n({key:e,value:Pat(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)(A1,{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 Rat(){let[e,t]=(0,N.useState)(``),[n,r]=(0,N.useState)(!1),i=P(V.me.getMe,{host:bO}),a=i?.ui,o=M9(i?.role)&&n,s=F(V.me.setUiPref).withOptimisticUpdate(D1),c=(0,N.useMemo)(()=>a?kat(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)(A1,{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)(a1,{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)(A1,{checked:c,disabled:i,onCheckedChange:t=>void s({key:e,value:t===!0}),"aria-label":n})]}),o?(0,I.jsx)(Lat,{prefKey:e,ui:a}):null]},e)})]},e.id))})]}):(0,I.jsx)(`div`,{className:`oc-prefs__empty`,children:GO()})}function zat(){let e=P(V.me.getMe,{host:bO}),t=F(V.me.setLocale),n=F(V.me.setMyName),r=E1(),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)(a1,{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:ZZ()})]}),(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)(Rat,{})]})]})}var Bat=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`];function Vat(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 Hat(){let e=$n(V.agentFiles.getChatDefaults),t=$n(V.agentFiles.setChatDefaults),n=E1(),[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=Vat(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(a1e()),await x()}catch(e){n.error(c1e(),e)}finally{u(!1)}}let D=(0,N.useMemo)(()=>Bat.map(e=>({id:e,label:M3(e)})),[]),O=(0,N.useMemo)(()=>[{id:`fast`,label:ZQ()},{id:`standard`,label:QQ()}],[]);return(0,I.jsxs)(`div`,{className:`oc-cdefaults`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:R$e()}),m&&f?(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:$Q()}),(0,I.jsxs)(C3,{value:f,onValueChange:e=>p(e),disabled:l,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":$Q(),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:uMe()}):_===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:GO()}):_.blocked?(0,I.jsxs)(`p`,{className:`oc-compat__blocked`,role:`status`,children:[(0,I.jsx)(Bm,{size:14,"aria-hidden":!0}),` `,U5(_.gatewayVersion)]}):r.status===`loading`?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:GO()}):r.status===`error`?(0,I.jsxs)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:[$$e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void x(),children:XQ()})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:V$e()}),(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:W$e()})]}),(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:q$e()}),(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:X$e()})]}),(0,I.jsx)(`div`,{className:`oc-cdefaults__actions`,children:(0,I.jsx)(X,{size:`sm`,disabled:!T||l,onClick:()=>c(!0),children:l?YQ():n1e()})}),(0,I.jsx)(`p`,{className:`oc-cdefaults__note`,children:d1e()})]}),(0,I.jsx)(o1,{open:s,onOpenChange:c,children:(0,I.jsxs)(s1,{children:[(0,I.jsxs)(c1,{children:[(0,I.jsx)(u1,{children:m1e()}),(0,I.jsx)(d1,{children:_1e()})]}),(0,I.jsxs)(l1,{children:[(0,I.jsx)(p1,{children:lW()}),(0,I.jsx)(f1,{onClick:()=>void E(),children:b1e()})]})]})})]})}function Uat(e){return e===`user`?tKe():FQ({group:e.group})}function Wat(e){return e===`common`?oKe():e===`owner`?lKe():FQ({group:e.group})}function Gat(e){return e.name||e.email||e.userId.slice(0,8)}function Kat(){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:DGe()}),(0,I.jsxs)(C3,{value:t,onValueChange:n,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":NQ(),children:(0,I.jsx)(w3,{placeholder:NQ()})}),(0,I.jsx)(E3,{children:(e??[]).map(e=>(0,I.jsx)(Q,{value:e.userId,children:Gat(e)},e._id))})]}),t===``?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:MGe()}):r===void 0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:GO()}):(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:FGe()}),(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:RGe()}),r.groups.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:PQ()}):(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:VGe()}),r.agents.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:PQ()}):(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:QGe()}):null,(0,I.jsx)($,{variant:`outline`,children:Uat(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:WGe()}),r.charts.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:PQ()}):(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:Wat(e.via)})]},e.key))})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:qGe()}),r.permissions.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:PQ()}):(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:()=>UYe(),tabs:[`preferences`,`theme`,`files`]},{id:`agents`,label:()=>KYe(),tabs:[`instances`,`agentFiles`,`chatDefaults`,`bridge`]},{id:`access`,label:()=>YYe(),tabs:[`users`,`groups`,`access`,`roles`,`serviceAccounts`]},{id:`observability`,label:()=>QYe(),tabs:[`traces`,`kpi`,`anomalies`,`audit`,`feedbacks`,`integrations`]}],qat=new Map(N9.flatMap(e=>e.tabs.map(t=>[t,e.id])));function P9(e){let t=qat.get(e);if(!t)throw Error(`Settings tab "${e}" belongs to no group`);return t}function Jat(e,t){return e.find(e=>P9(e)===t)}N9.flatMap(e=>[...e.tabs]);function Yat(){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?`${Sze()}${e.checkedAt?Tze({time:new Date(e.checkedAt).toLocaleTimeString(`fr-FR`)}):``}`:Oze({reason:e.reason??`?`}):yze();return(0,I.jsx)(A5,{delayDuration:150,children:(0,I.jsxs)(j5,{children:[(0,I.jsx)(M5,{asChild:!0,children:(0,I.jsx)(`span`,{className:`oc-bridge-dot oc-bridge-dot--${t}`,role:`img`,"aria-label":n})}),(0,I.jsx)(N5,{children:n})]})})}var Xat={users:()=>HWe(),groups:()=>xGe(),instances:()=>GWe(),bridge:()=>JWe(),serviceAccounts:()=>ZWe(),roles:()=>eGe(),traces:()=>rGe(),kpi:()=>oGe(),anomalies:()=>lGe(),files:()=>eA(),agentFiles:()=>QZe(),preferences:()=>fk(),chatDefaults:()=>F$e(),access:()=>wGe(),integrations:()=>fGe(),theme:()=>rM(),audit:()=>hGe(),feedbacks:()=>vGe()};function F9(e){let t=new Set(T7),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 T7)n.has(e)||r.push(e);return r}function Zat(e,t){let n=new Set(t),r=[...t];return e.map(e=>n.has(e)?r.shift():e)}function Qat({tab:e,active:t}){let n=Xat[e]?.()??D7[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)(Yat,{}):null]});return E7.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 $at({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":jYe(),...n,...r,children:(0,I.jsx)(Cm,{size:14,"aria-hidden":!0})}),(0,I.jsx)(Qat,{tab:e,active:t})]})}function eot(){let e=P(V.me.getMe,{host:bO}),t=F(V.me.setSettingsTabOrder),n=M7(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(A7(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=Zat(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:dtt,modifiers:[xnt],onDragEnd:d,children:(0,I.jsx)(K8,{items:c,strategy:Ont,children:c.map(e=>(0,I.jsx)($at,{tab:e,active:e===n},e))})})})}function tot(){let e=P(V.me.getMe,{host:bO}),t=ss(),n=M7(Gs({select:e=>e.pathname})),r=n===void 0?void 0:P9(n),i=(0,N.useMemo)(()=>new Set(A7(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=Jat(a,e.id);n&&t({to:j7(n)})}return(0,I.jsxs)(`nav`,{className:`oc-settings-nav`,"aria-label":PYe(),children:[(0,I.jsx)(xs,{to:`/`,className:`oc-settings-nav__back`,children:LYe()}),(0,I.jsx)(`div`,{className:`oc-settings-nav__title`,children:BYe()}),(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 not=12*1024*1024,rot=480,iot=160,aot=.92;async function oot(e,t={}){if(!e.type.startsWith(`image/`))throw Error(rF());if(e.size>not)throw Error(oF());let{source:n,width:r,height:i,cleanup:a}=await sot(e);try{let a=e.type===`image/svg+xml`,o=Math.min(rot/r,iot/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());if(u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,u.drawImage(n,0,0,s,c),t.invert){let e=u.getImageData(0,0,s,c),t=e.data;for(let e=0;e<t.length;e+=4)t[e]=255-t[e],t[e+1]=255-t[e+1],t[e+2]=255-t[e+2];u.putImageData(e,0,0)}let d=await L9(l,`image/webp`,aot)??await L9(l,`image/png`);if(!d)throw Error(hF());return d}finally{a()}}async function sot(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`},cot=[{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 lot(e){return e===`light`?ZO():e===`dark`?ek():rk()}var uot=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function dot({tokens:e,mode:t}){let n=e.colors[t];return(0,I.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:uot.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:W$(`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)(dm,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,I.jsx)(dot,{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 fot({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 pot(){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)(a1,{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)(Vm,{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 mot({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=!1){if(e.chartId!==void 0){o(null),i(!0);try{let i=await(await oot(r,{invert: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(),!0)}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)(Vm,{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:bO}),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)(Wm,{className:`size-3`})})]},e))}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(a1,{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 hot({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)(a1,{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)(mot,{chart:e}),(0,I.jsx)(H9,{chart:e})]})}function got(){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)(hot,{chart:e},e.key))})]})}function _ot({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)(Wm,{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 vot({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 yot({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()}),SO.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)(_ot,{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)(vot,{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:lot(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 bot(){let e=P(V.me.getMe,{host:bO}),t=CO(e?.resolvedThemeMode);return(0,I.jsxs)(`div`,{className:`oc-appearance`,children:[(0,I.jsx)(fot,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,I.jsx)(pot,{}),(0,I.jsx)(got,{}),e?.role===`admin`?(0,I.jsx)(yot,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function xot(){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)(bot,{}),(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)(bm,{})}),(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)(a1,{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)(A1,{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)(n7,{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)(p7,{fields:cot,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)(t7,{value:u,onChange:d})]})]})}),(0,I.jsx)(B9,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,I.jsxs)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,I.jsx)(bm,{})})}),(0,I.jsxs)(q$,{align:`start`,children:[(0,I.jsx)(Y$,{children:`Actions`}),(0,I.jsx)(X$,{}),(0,I.jsx)(J$,{children:`Edit`}),(0,I.jsx)(J$,{children:`Duplicate`}),(0,I.jsx)(X$,{}),(0,I.jsx)(J$,{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)(Xit,{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)(A1,{"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)(A1,{"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)(dm,{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)(bm,{})})})]},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 Sot(e){(0,N.useEffect)(()=>{if(!e)return;document.documentElement.lang=e;let t;try{t=q()}catch{t=void 0}t!==e&&BO(e)},[e])}function Cot(){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(mr,{children:(0,I.jsx)(`div`,{className:`oc-boot`,children:hQ()})}),(0,I.jsx)(pr,{children:(0,I.jsx)(Tot,{})}),(0,I.jsx)(fr,{children:(0,I.jsx)(w2e,{children:(0,I.jsx)(Eot,{})})})]})}function wot(){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 Tot(){let{signIn:e}=Ir();G9(void 0);let t=P(V.charts.brandForHost,{host:bO}),n=efe(bO),r=t??n??null,i=CO(void 0);wO(r?.tokens??null,i),(0,N.useEffect)(()=>{t&&tfe(bO,t)},[t]);let a=r?.brand,o=a&&!a.isDefault?AO(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(Xke())}}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:$ke()}),(0,I.jsx)(`p`,{className:`oc-signin__subtitle`,children:nAe()}),(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)(wot,{}),(0,I.jsx)(`span`,{children:aAe()})]}):null}),l?(0,I.jsx)(`p`,{className:`oc-signin__error`,children:l}):null,f?(0,I.jsx)(`p`,{className:`oc-signin__error`,children:cAe()}):null,c?.anonymous?(0,I.jsx)(`button`,{type:`button`,className:`oc-signin__dev`,onClick:()=>void e(`anonymous`),children:dAe()}):null]})]})}function Eot(){let e=P(V.me.getMe,{host:bO}),t=F(V.me.bootstrap),n=ss();(0,N.useEffect)(()=>{e&&!e.hasProfile&&t()},[e,t]),G9(e?.resolvedThemeMode);let r=CO(e?.resolvedThemeMode);wO(e?.resolvedChartTokens,r),Sot(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:hQ()});let a=e.name||e.email||mAe();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:_Ae()}),(0,I.jsx)(`p`,{className:`oc-pending__body`,children:bAe()})]})]}):(0,I.jsx)(Oot,{canOpenSettings:A7(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)(Eee,{className:`size-4 shrink-0`}),(0,I.jsxs)(`span`,{className:`oc-imp__text`,children:[CAe(),` `,(0,I.jsx)(`strong`,{children:e.targetLabel}),EAe(),(0,I.jsx)(`strong`,{children:e.realLabel}),kAe()]}),(0,I.jsx)(X,{size:`sm`,variant:`outline`,className:`oc-imp__exit`,onClick:()=>void t(),children:MAe()})]})}function q9({brand:e,resolvedThemeMode:t}){let n=CO(t),r=e?.label??`Atrium`,i=e?.isDefault??!0,a=AO(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)(jO,{className:`oc-brand__logo`}):null,(0,I.jsx)(`span`,{className:`oc-brand__label`,children:r})]})}function Dot({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?FAe():RAe(),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)(irt,{})}),(0,I.jsxs)(`div`,{className:`oc-topbar__actions`,children:[(0,I.jsx)($nt,{}),(0,I.jsx)(m5,{label:e,mode:t})]})]})}function Oot({canOpenSettings:e,userLabel:t,themeMode:n,resolvedThemeMode:r,brand:i}){let{width:a,collapsed:o,toggleCollapsed:s,collapse:c,startResize:l,isMobile:u}=m4e(),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:_}=Jnt(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)(Dot,{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)(tot,{}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Unt,{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:VAe()})}):null]}),(0,I.jsx)(`div`,{className:`oc-sidebar-resizer`,onPointerDown:l,role:`separator`,"aria-orientation":`vertical`,"aria-label":WAe()})]}),(0,I.jsx)(`main`,{className:`oc-main`,children:(0,I.jsx)(Fs,{})})]})]})}function kot(){let e=P(V.me.getMe,{host:bO}),t=ss(),n=Gs({select:e=>e.pathname}),r=(0,N.useMemo)(()=>e?A7(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:hQ()});if(i)return null;let a=M7(n),o=a!==void 0&&!r.includes(a);return(0,I.jsxs)(`div`,{className:`oc-admin`,children:[(0,I.jsx)(eot,{}),(0,I.jsx)(`div`,{className:`oc-admin__body`,children:o?(0,I.jsx)(Aot,{}):(0,I.jsx)(Fs,{})})]})}function Aot(){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)(Bm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:qAe()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:XAe()})]})}function jot(){let e=P(V.me.getMe,{host:bO}),t=ss();return(0,N.useEffect)(()=>{if(e===void 0)return;let n=A7(e.permissions??[]);t({to:n.length>0?j7(n[0]):`/`,replace:!0})},[e,t]),(0,I.jsx)(`div`,{className:`oc-admin__hint`,style:{padding:16},children:hQ()})}function Mot(){let{tab:e}=as({from:`/settings/$tab`});switch(e){case`groups`:return(0,I.jsx)(Lit,{});case`integrations`:return(0,I.jsx)(vat,{});case`instances`:return(0,I.jsx)(sit,{});case`bridge`:return(0,I.jsx)(Lrt,{});case`theme`:return(0,I.jsx)(xot,{});case`feedbacks`:return(0,I.jsx)(xat,{});case`files`:return(0,I.jsx)(Sat,{});case`agentFiles`:return(0,I.jsx)(Dat,{});case`preferences`:return(0,I.jsx)(zat,{});case`chatDefaults`:return(0,I.jsx)(Hat,{});case`access`:return(0,I.jsx)(Kat,{});default:return(0,I.jsx)(kit,{})}}function J9(){let{chatId:e}=as({from:`/chat/$chatId`}),{m:t}=os({from:`/chat/$chatId`});return(0,I.jsx)(q3,{chatId:e,focusMessageId:t??null})}function Not(){return(0,I.jsx)(q3,{chatId:null})}var Y9=Es({component:Cot}),Pot=ws({getParentRoute:()=>Y9,path:`/`,component:Not}),Fot=ws({getParentRoute:()=>Y9,path:`chat/$chatId`,component:J9,validateSearch:e=>({m:typeof e.m==`string`?e.m:void 0})}),X9=ws({getParentRoute:()=>Y9,path:`settings`,component:kot}),Iot=ws({getParentRoute:()=>X9,path:`/`,component:jot}),Lot=ws({getParentRoute:()=>X9,path:`traces`,validateSearch:Yrt,component:qit}),Rot=ws({getParentRoute:()=>X9,path:`audit`,validateSearch:Xrt,component:_it}),zot=ws({getParentRoute:()=>X9,path:`anomalies`,validateSearch:Zrt,component:fat}),Bot=ws({getParentRoute:()=>X9,path:`kpi`,validateSearch:Qrt,component:tat}),Vot=ws({getParentRoute:()=>X9,path:`serviceAccounts`,validateSearch:$rt,component:bit}),Hot=ws({getParentRoute:()=>X9,path:`users`,validateSearch:eit,component:iit}),Uot=ws({getParentRoute:()=>X9,path:`uiprefs`,beforeLoad:()=>{throw ia({to:`/settings/$tab`,params:{tab:nit.uiprefs},replace:!0})}}),Wot=ws({getParentRoute:()=>X9,path:`$tab`,parseParams:e=>({tab:Wp([...E7]).catch(`roles`).parse(e.tab)}),component:Mot});function Got({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)(Bm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:$Ae()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:nje()}),(0,I.jsxs)(`div`,{className:`oc-route-error__actions`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta`,onClick:()=>e(),children:aje()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta oc-route-error__cta--ghost`,onClick:()=>void t({to:`/`}),children:gQ()})]})]})}function Kot(){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)(Tee,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:uje()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:pje()}),(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:gQ()})})]})}var Z9=Vs({routeTree:Y9.addChildren([Pot,Fot,X9.addChildren([Iot,Lot,Rot,zot,Bot,Vot,Hot,Uot,Wot])]),defaultPreload:`intent`,defaultErrorComponent:Got,defaultNotFoundComponent:Kot});async function qot(){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 Jot=()=>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…`})})),qot().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)(S2e,{children:[(0,I.jsx)(uet,{children:(0,I.jsx)(Ws,{router:Z9})}),(0,I.jsx)(N.Suspense,{fallback:null,children:(0,I.jsx)(Jot,{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<O9&&a.push(e)):t>0&&(i+=t,o.length<O9&&o.push(e));return{added:r,removed:i,sampleAdded:a,sampleRemoved:o}}function Bat(e){return e instanceof Error?e.message.includes(`conflict:`):String(e).includes(`conflict:`)}var k9=e=>`${e.instanceName}::${e.agentId}`;function Vat(){let e=P(V.me.getMe,{host:bO}),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=>k9(e)===l))&&u(k9(c[0]))},[c,l]);let d=c?.find(e=>k9(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:gQe()}),(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":$Q(),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":xQe(),children:(0,I.jsx)(w3,{})}),(0,I.jsx)(E3,{children:c.map(e=>(0,I.jsx)(Q,{value:k9(e),children:e.label},k9(e)))})]}):(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:wQe()})]}),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)(Bm,{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:[AQe(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void b(),children:XQ()})]}):p.files.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:DQe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`oc-afiles__list`,children:p.files.map(e=>{let n=Lat(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:NQe()}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`oc-afiles__size`,children:IQe({size:E9(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:zQe({pct:w.format(n)})}),r?(0,I.jsx)(Bm,{size:14,className:`oc-afiles__warn`,"aria-label":HQe()}):(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?JQe():ZQe()})]},e.name)})}),(0,I.jsx)(`p`,{className:`oc-afiles__budget`,children:GQe({used:E9(D9(p.files),C),total:E9(T9,C),pct:w.format(Rat(D9(p.files)))})})]}),x&&d?(0,I.jsx)(Hat,{instanceName:d.instanceName,agentId:d.agentId,name:x.name,isAdmin:t,onClose:()=>S(null),onSaved:()=>void b()}):null]})}function Hat({instanceName:e,agentId:t,name:n,isAdmin:r,onClose:i,onSaved:a}){let o=$n(V.agentFiles.getAgentFile),s=$n(V.agentFiles.setAgentFile),c=E1(),[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(_$e({name:n})),a(),await C(!1)}catch(e){Bat(e)?b(!0):S(!0)}finally{v(!1)}}}let T=l!==null&&p!==l.content,E=(0,N.useMemo)(()=>l===null?null:zat(l.content,p),[l,p]),D=p.length>w9,O=q(),ee=(0,N.useMemo)(()=>new Intl.NumberFormat(O),[O]);return(0,I.jsx)(m1,{open:!0,onOpenChange:e=>!e&&i(),children:(0,I.jsxs)(h1,{className:`oc-afiles__editor`,children:[(0,I.jsxs)(g1,{children:[(0,I.jsx)(v1,{children:e$({name:n})}),(0,I.jsxs)(y1,{children:[n$e({agent:t,instance:e}),r?null:(0,I.jsxs)(I.Fragment,{children:[` · `,a$e()]})]})]}),d?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[C$e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void C(!1),children:XQ()})]}):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":e$({name:n})}),(0,I.jsx)(`p`,{className:`oc-afiles__hint`,children:c$e()}),y?(0,I.jsxs)(`p`,{className:`oc-afiles__error`,role:`alert`,children:[E$e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void C(!0),children:k$e()})]}):null,x?(0,I.jsx)(`p`,{className:`oc-afiles__error`,role:`alert`,children:b$e()}):null,(0,I.jsxs)(`div`,{className:`oc-afiles__editor-foot`,children:[(0,I.jsx)(`span`,{className:`oc-afiles__count${D?` is-over`:``}`,children:d$e({count:ee.format(p.length),max:ee.format(w9)})}),r?(0,I.jsx)(X,{size:`sm`,disabled:!T||_||y,onClick:()=>g(!0),children:_?YQ():m$e()}):null]})]}),(0,I.jsx)(o1,{open:h,onOpenChange:g,children:(0,I.jsxs)(s1,{children:[(0,I.jsxs)(c1,{children:[(0,I.jsx)(u1,{children:M$e({name:n})}),(0,I.jsx)(d1,{children:F$e({agent:t})})]}),E?(0,I.jsxs)(`div`,{className:`oc-afiles__diff`,children:[(0,I.jsx)(`p`,{className:`oc-afiles__diff-counts`,children:R$e({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:V$e()}),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:W$e()}),E.sampleRemoved.map((e,t)=>(0,I.jsx)(`code`,{className:`oc-afiles__diff-line is-del`,children:e||` `},t))]}):null]}):null,(0,I.jsxs)(l1,{children:[(0,I.jsx)(p1,{children:uW()}),(0,I.jsx)(f1,{onClick:()=>void w(),children:q$e()})]})]})})]})})}var A9=[{id:`messages`,label:()=>SI()},{id:`composer`,label:()=>TI()},{id:`sidebar`,label:()=>OI()},{id:`other`,label:()=>jI()}],j9={showSource:{category:`messages`,label:()=>PI(),help:()=>LI()},showReport:{category:`messages`,label:()=>BI(),help:()=>UI()},copyAssistant:{category:`messages`,label:()=>KI()},copyUser:{category:`messages`,label:()=>YI()},showDelete:{category:`messages`,label:()=>QI()},showTools:{category:`messages`,label:()=>tL(),help:()=>iL()},voiceInput:{category:`composer`,label:()=>sL(),help:()=>uL()},showChatAge:{category:`sidebar`,label:()=>pL(),help:()=>gL()},showChatProvider:{category:`sidebar`,label:()=>yL(),help:()=>SL()}};function M9(e){return e.toLowerCase().normalize(`NFD`).replace(/\p{Diacritic}/gu,``)}function Uat(e,t){let n=M9(t.trim()),r=new Map(A9.map(e=>[e.id,e.label()])),i=new Map(A9.map(e=>[e.id,[]]));for(let t of e){let e=j9[t],a=e?.category??`other`;n&&!M9(`${e?e.label():t} ${e?.help?e.help():``} ${t} ${r.get(a)??``}`).includes(n)||i.get(a).push(t)}return A9.map(e=>({id:e.id,label:r.get(e.id),keys:i.get(e.id)})).filter(e=>e.keys.length>0)}var Wat=[`showSource`,`showReport`,`copyAssistant`,`copyUser`,`showDelete`,`showTools`,`voiceInput`,`showChatAge`,`showChatProvider`],Gat={voiceInput:`voiceInput`};function Kat(e){return Wat.includes(e)}function N9(e){return e===`admin`}function qat(e){return e===!0?`on`:e===!1?`off`:`inherit`}function Jat(e){return e===`on`?!0:e===`off`?!1:null}function Yat(e){return Kat(e)?Gat[e]:void 0}var Xat={voiceInput:()=>tR()};function Zat({prefKey:e,ui:t}){let n=F(V.admin.setUiPrefDefault),r=F(V.admin.setFeatureEnabled),i=Yat(e),a=i?Xat[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:UL()}),(0,I.jsxs)(C3,{value:qat(t.defaults[e]),onValueChange:t=>void n({key:e,value:Jat(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:sR()}),(0,I.jsx)(Q,{value:`off`,children:uR()}),(0,I.jsx)(Q,{value:`inherit`,children:pR()})]})]}),i?(0,I.jsxs)(`span`,{className:`oc-prefs__gov-gate`,children:[(0,I.jsx)(A1,{checked:t.featuresEnabled[i]===!0,onCheckedChange:e=>void r({key:i,enabled:e===!0}),"aria-label":KL()}),KL()]}):null]}),a?(0,I.jsx)(`span`,{className:`oc-prefs__gov-help`,children:a}):null]})}function Qat(){let[e,t]=(0,N.useState)(``),[n,r]=(0,N.useState)(!1),i=P(V.me.getMe,{host:bO}),a=i?.ui,o=N9(i?.role)&&n,s=F(V.me.setUiPref).withOptimisticUpdate(D1),c=(0,N.useMemo)(()=>a?Uat(Object.keys(a.effective),e):[],[a,e]);return a?(0,I.jsxs)(`div`,{className:`oc-prefs-panel`,children:[N9(i?.role)?(0,I.jsxs)(`label`,{className:`oc-prefs__gov-toggle`,children:[(0,I.jsx)(A1,{checked:n,onCheckedChange:e=>r(e===!0),"aria-label":BL()}),BL()]}):null,o?(0,I.jsxs)(`div`,{className:`oc-prefs__gov-head`,children:[(0,I.jsx)(`p`,{children:YL()}),(0,I.jsx)(`p`,{children:QL()}),(0,I.jsx)(`p`,{children:iR()})]}):null,(0,I.jsx)(a1,{value:e,onChange:e=>t(e.target.value),placeholder:TL(),"aria-label":TL(),className:`mb-2`}),c.length===0?(0,I.jsx)(`div`,{className:`oc-prefs__empty`,children:OL()}):(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=j9[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:jL()}):l?null:(0,I.jsx)(`span`,{className:`oc-prefs__def`,children:PL()})]}),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:LL()}):null,(0,I.jsx)(A1,{checked:c,disabled:i,onCheckedChange:t=>void s({key:e,value:t===!0}),"aria-label":n})]}),o?(0,I.jsx)(Zat,{prefKey:e,ui:a}):null]},e)})]},e.id))})]}):(0,I.jsx)(`div`,{className:`oc-prefs__empty`,children:KO()})}function $at(){let e=P(V.me.getMe,{host:bO}),t=F(V.me.setLocale),n=F(V.me.setMyName),r=E1(),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(Ok())}catch(e){r.error(jk(),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:gk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:yk()})]}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(a1,{className:`max-w-xs`,value:c,maxLength:120,placeholder:Sk(),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:Tk()})]}),(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:Pk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:Lk()})]}),(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`?Yk():e===`en`?Qk():sk()},e))}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:Bk()})]}),(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:Uk()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:Kk()})]}),(0,I.jsx)(Qat,{})]})]})}var eot=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`];function tot(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 not(){let e=$n(V.agentFiles.getChatDefaults),t=$n(V.agentFiles.setChatDefaults),n=E1(),[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=tot(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(b1e()),await x()}catch(e){n.error(C1e(),e)}finally{u(!1)}}let D=(0,N.useMemo)(()=>eot.map(e=>({id:e,label:M3(e)})),[]),O=(0,N.useMemo)(()=>[{id:`fast`,label:ZQ()},{id:`standard`,label:QQ()}],[]);return(0,I.jsxs)(`div`,{className:`oc-cdefaults`,children:[(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:$$e()}),m&&f?(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:$Q()}),(0,I.jsxs)(C3,{value:f,onValueChange:e=>p(e),disabled:l,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":$Q(),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:TMe()}):_===`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)(Bm,{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:[m1e(),` `,(0,I.jsx)(X,{variant:`outline`,size:`sm`,onClick:()=>void x(),children:XQ()})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:n1e()}),(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:a1e()})]}),(0,I.jsxs)(`div`,{className:`oc-cdefaults__row`,children:[(0,I.jsx)(`span`,{className:`oc-cdefaults__label`,children:c1e()}),(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:d1e()})]}),(0,I.jsx)(`div`,{className:`oc-cdefaults__actions`,children:(0,I.jsx)(X,{size:`sm`,disabled:!T||l,onClick:()=>c(!0),children:l?YQ():_1e()})}),(0,I.jsx)(`p`,{className:`oc-cdefaults__note`,children:E1e()})]}),(0,I.jsx)(o1,{open:s,onOpenChange:c,children:(0,I.jsxs)(s1,{children:[(0,I.jsxs)(c1,{children:[(0,I.jsx)(u1,{children:k1e()}),(0,I.jsx)(d1,{children:M1e()})]}),(0,I.jsxs)(l1,{children:[(0,I.jsx)(p1,{children:uW()}),(0,I.jsx)(f1,{onClick:()=>void E(),children:F1e()})]})]})})]})}function rot(e){return e===`user`?gKe():FQ({group:e.group})}function iot(e){return e===`common`?xKe():e===`owner`?wKe():FQ({group:e.group})}function aot(e){return e.name||e.email||e.userId.slice(0,8)}function oot(){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:HGe()}),(0,I.jsxs)(C3,{value:t,onValueChange:n,children:[(0,I.jsx)(T3,{size:`sm`,"aria-label":NQ(),children:(0,I.jsx)(w3,{placeholder:NQ()})}),(0,I.jsx)(E3,{children:(e??[]).map(e=>(0,I.jsx)(Q,{value:e.userId,children:aot(e)},e._id))})]}),t===``?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:qGe()}):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:XGe()}),(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:$Ge()}),r.groups.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:PQ()}):(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:nKe()}),r.agents.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:PQ()}):(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:pKe()}):null,(0,I.jsx)($,{variant:`outline`,children:rot(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:aKe()}),r.charts.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:PQ()}):(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:iot(e.via)})]},e.key))})]}),(0,I.jsxs)(`section`,{className:`oc-introspect__section`,children:[(0,I.jsx)(`h3`,{className:`oc-introspect__title`,children:cKe()}),r.permissions.length===0?(0,I.jsx)(`p`,{className:`oc-admin__hint`,children:PQ()}):(0,I.jsx)(`div`,{className:`oc-introspect__chips`,children:r.permissions.map(e=>(0,I.jsx)($,{variant:`secondary`,children:e},e))})]})]})]})}var P9=[{id:`personal`,label:()=>iXe(),tabs:[`preferences`,`theme`,`files`]},{id:`agents`,label:()=>sXe(),tabs:[`instances`,`agentFiles`,`chatDefaults`,`bridge`]},{id:`access`,label:()=>uXe(),tabs:[`users`,`groups`,`access`,`roles`,`serviceAccounts`]},{id:`observability`,label:()=>pXe(),tabs:[`traces`,`kpi`,`anomalies`,`audit`,`feedbacks`,`integrations`]}],sot=new Map(P9.flatMap(e=>e.tabs.map(t=>[t,e.id])));function F9(e){let t=sot.get(e);if(!t)throw Error(`Settings tab "${e}" belongs to no group`);return t}function cot(e,t){return e.find(e=>F9(e)===t)}P9.flatMap(e=>[...e.tabs]);function lot(){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?`${Lze()}${e.checkedAt?Bze({time:new Date(e.checkedAt).toLocaleTimeString(`fr-FR`)}):``}`:Uze({reason:e.reason??`?`}):Pze();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 uot={users:()=>rGe(),groups:()=>IGe(),instances:()=>oGe(),bridge:()=>lGe(),serviceAccounts:()=>fGe(),roles:()=>hGe(),traces:()=>vGe(),kpi:()=>xGe(),anomalies:()=>wGe(),files:()=>tA(),agentFiles:()=>pQe(),preferences:()=>pk(),chatDefaults:()=>X$e(),access:()=>zGe(),integrations:()=>DGe(),theme:()=>iM(),audit:()=>AGe(),feedbacks:()=>NGe()};function I9(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 dot(e,t){let n=new Set(t),r=[...t];return e.map(e=>n.has(e)?r.shift():e)}function fot({tab:e,active:t}){let n=uot[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)(lot,{}):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 pot({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":KYe(),...n,...r,children:(0,I.jsx)(Cm,{size:14,"aria-hidden":!0})}),(0,I.jsx)(fot,{tab:e,active:t})]})}function mot(){let e=P(V.me.getMe,{host:bO}),t=F(V.me.setSettingsTabOrder),n=N7(Gs({select:e=>e.pathname})),r=n===void 0?void 0:F9(n),i=(0,N.useMemo)(()=>I9(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)&&F9(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=P9.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=dot(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:Ett,modifiers:[Int],onDragEnd:d,children:(0,I.jsx)(K8,{items:c,strategy:Unt,children:c.map(e=>(0,I.jsx)(pot,{tab:e,active:e===n},e))})})})}function hot(){let e=P(V.me.getMe,{host:bO}),t=ss(),n=N7(Gs({select:e=>e.pathname})),r=n===void 0?void 0:F9(n),i=(0,N.useMemo)(()=>new Set(j7(e?.permissions??[])),[e?.permissions]),a=(0,N.useMemo)(()=>I9(e?.settingsTabOrder??null).filter(e=>i.has(e)),[e?.settingsTabOrder,i]),o=P9.filter(e=>e.tabs.some(e=>i.has(e)));function s(e){let n=cot(a,e.id);n&&t({to:M7(n)})}return(0,I.jsxs)(`nav`,{className:`oc-settings-nav`,"aria-label":YYe(),children:[(0,I.jsx)(xs,{to:`/`,className:`oc-settings-nav__back`,children:QYe()}),(0,I.jsx)(`div`,{className:`oc-settings-nav__title`,children:tXe()}),(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 got=12*1024*1024,_ot=480,vot=160,yot=.92;async function bot(e,t={}){if(!e.type.startsWith(`image/`))throw Error(iF());if(e.size>got)throw Error(sF());let{source:n,width:r,height:i,cleanup:a}=await xot(e);try{let a=e.type===`image/svg+xml`,o=Math.min(_ot/r,vot/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(pF());if(u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,u.drawImage(n,0,0,s,c),t.invert){let e=u.getImageData(0,0,s,c),t=e.data;for(let e=0;e<t.length;e+=4)t[e]=255-t[e],t[e+1]=255-t[e+1],t[e+2]=255-t[e+2];u.putImageData(e,0,0)}let d=await R9(l,`image/webp`,yot)??await R9(l,`image/png`);if(!d)throw Error(gF());return d}finally{a()}}async function xot(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(uF())),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`},Sot=[{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 Cot(e){return e===`light`?QO():e===`dark`?tk():ik()}var wot=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function Tot({tokens:e,mode:t}){let n=e.colors[t];return(0,I.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:wot.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:W$(`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)(dm,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,I.jsx)(Tot,{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 Eot({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:jM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:PM()})]}),(0,I.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,I.jsx)(H9,{selected:e===null,title:LM(),subtitle:BM(),tokens:null,mode:t,onSelect:()=>void i(null)}),(n??[]).map(n=>{let r=n.via===`common`?UM():n.via===`owner`?KM():YM({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:QM()}):null]})}function Dot(){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(uP())}}}async function f(){if(o(null),c(!1),t.trim()===``){o(gP());return}let a;try{a=JSON.parse(r)}catch{o(uP());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:BN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:UN()})]}),(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:KN()}),(0,I.jsx)(a1,{value:t,onChange:e=>n(e.target.value),placeholder:YN(),maxLength:60})]}),(0,I.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,I.jsx)(`span`,{className:`oc-chart-import__label`,children:QN()}),(0,I.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:r,onChange:e=>i(e.target.value),placeholder:tP(),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)(Vm,{className:`size-4`}),iP(),(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:sP()})]}),a?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null,s?(0,I.jsx)(`p`,{className:`oc-chart-import__ok`,children:pP()}):null]})]})}function Oot({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=!1){if(e.chartId!==void 0){o(null),i(!0);try{let i=await(await bot(r,{invert: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(),!0)}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`?LP():BP()}),(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)(Vm,{className:`size-4`}),t?KP():UP(),(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:QP()}):null,t?(0,I.jsx)(X,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void u(e),children:YP()}):null]})}return(0,I.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:PP()}),(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:tF()}):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:bO}),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:yF()}),(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:jF()}):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":PF({domain:e}),onClick:()=>void f(e),children:(0,I.jsx)(Wm,{className:`size-3`})})]},e))}),(0,I.jsxs)(`div`,{className:`oc-show__row`,children:[(0,I.jsx)(a1,{value:i,onChange:e=>a(e.target.value),placeholder:TF(),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:OF()})]}),(0,I.jsx)(`span`,{className:`oc-show__desc`,children:SF()}),o?(0,I.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null]})]})}function kot({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(uP());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(YF()))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:OP()}),(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>void h(),children:jP()})]})})]}),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:UF()}),(0,I.jsx)(a1,{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:KF()}),(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:LF()}),(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>i(!1),children:BF()})]})]}):null,(0,I.jsx)(Oot,{chart:e}),(0,I.jsx)(U9,{chart:e})]})}function Aot(){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:yP()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:SP()})]}),e!==void 0&&t.length===0?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:TP()}):(0,I.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,I.jsx)(kot,{chart:e},e.key))})]})}function jot({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?SN():e.kind===`custom`&&e.scope===`personal`?sI():yN()}),e.isGlobalDefault?(0,I.jsx)($,{variant:`default`,children:TN()}):null]}),(0,I.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,I.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:jN()}),(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":LN({group:e.name}),onClick:()=>void l(e.groupId),children:(0,I.jsx)(Wm,{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:PN()})}),(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:ON()}):null]})]})}function Mot({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(YF()))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`?uI():sI()}),e.ownerLabel?(0,I.jsx)(`span`,{className:`oc-show__desc`,children:iI({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:pI()}):null,(0,I.jsx)(X,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:gI()})]})]})}function Not({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:TM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:OM()})]}),(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:tN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:iN()})]}),(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:LM()}),SO.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:sN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:uN()})]}),(0,I.jsx)(`div`,{className:`oc-chart-avail-list`,children:(o??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,I.jsx)(jot,{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:pN()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:gN()})]}),(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:QF()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:tI()})]}),(()=>{let e=(o??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,I.jsx)(`p`,{className:`oc-show__desc`,children:yI()}):(0,I.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,I.jsx)(Mot,{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:sM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:uM()})]}),(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:Cot(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:pM()}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:gM()})]}),(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`?Yk():Qk()},e))}),(0,I.jsx)(`p`,{className:`oc-show__desc`,children:yM()})]})]})}function Pot(){let e=P(V.me.getMe,{host:bO}),t=CO(e?.resolvedThemeMode);return(0,I.jsxs)(`div`,{className:`oc-appearance`,children:[(0,I.jsx)(Eot,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,I.jsx)(Dot,{}),(0,I.jsx)(Aot,{}),e?.role===`admin`?(0,I.jsx)(Not,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function Fot(){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)(Pot,{}),(0,I.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,I.jsx)(`summary`,{className:`oc-show__title`,children:SM()}),(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)(bm,{})}),(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)(a1,{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)(A1,{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)(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: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)(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: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:Sot,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)(G$,{children:[(0,I.jsx)(K$,{asChild:!0,children:(0,I.jsx)(X,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,I.jsx)(bm,{})})}),(0,I.jsxs)(q$,{align:`start`,children:[(0,I.jsx)(Y$,{children:`Actions`}),(0,I.jsx)(X$,{}),(0,I.jsx)(J$,{children:`Edit`}),(0,I.jsx)(J$,{children:`Duplicate`}),(0,I.jsx)(X$,{}),(0,I.jsx)(J$,{variant:`destructive`,children:`Delete`})]})]})}),(0,I.jsx)(V9,{title:`Card`,children:(0,I.jsxs)(r9,{className:`w-80`,children:[(0,I.jsxs)(i9,{children:[(0,I.jsx)(a9,{children:`Instance`}),(0,I.jsx)(o9,{children:`Non-secret metadata only.`})]}),(0,I.jsx)(s9,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,I.jsxs)(uat,{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)(w5,{children:[(0,I.jsx)(T5,{children:(0,I.jsxs)(D5,{children:[(0,I.jsx)(O5,{className:`w-8`,children:(0,I.jsx)(A1,{"aria-label":`select all`})}),(0,I.jsx)(O5,{children:`Name`}),(0,I.jsx)(O5,{children:`Mode`}),(0,I.jsx)(O5,{className:`text-right`,children:`Status`}),(0,I.jsx)(O5,{className:`w-8`})]})}),(0,I.jsx)(E5,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,I.jsxs)(D5,{children:[(0,I.jsx)(k5,{children:(0,I.jsx)(A1,{"aria-label":`select ${e.n}`})}),(0,I.jsx)(k5,{className:`font-medium`,children:e.n}),(0,I.jsx)(k5,{children:(0,I.jsx)($,{variant:`secondary`,children:e.m})}),(0,I.jsx)(k5,{className:`text-right`,children:(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-muted-foreground`,children:[(0,I.jsx)(dm,{className:`size-3.5`}),` `,e.s]})}),(0,I.jsx)(k5,{children:(0,I.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,I.jsx)(bm,{})})})]},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 Iot(e){(0,N.useEffect)(()=>{if(!e)return;document.documentElement.lang=e;let t;try{t=q()}catch{t=void 0}t!==e&&BO(e)},[e])}function Lot(){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(mr,{children:(0,I.jsx)(`div`,{className:`oc-boot`,children:hQ()})}),(0,I.jsx)(pr,{children:(0,I.jsx)(zot,{})}),(0,I.jsx)(fr,{children:(0,I.jsx)(z2e,{children:(0,I.jsx)(Bot,{})})})]})}function Rot(){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 zot(){let{signIn:e}=Ir();K9(void 0);let t=P(V.charts.brandForHost,{host:bO}),n=efe(bO),r=t??n??null,i=CO(void 0);wO(r?.tokens??null,i),(0,N.useEffect)(()=>{t&&tfe(bO,t)},[t]);let a=r?.brand,o=a&&!a.isDefault?AO(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(dAe())}}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:mAe()}),(0,I.jsx)(`p`,{className:`oc-signin__subtitle`,children:_Ae()}),(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)(Rot,{}),(0,I.jsx)(`span`,{children:bAe()})]}):null}),l?(0,I.jsx)(`p`,{className:`oc-signin__error`,children:l}):null,f?(0,I.jsx)(`p`,{className:`oc-signin__error`,children:CAe()}):null,c?.anonymous?(0,I.jsx)(`button`,{type:`button`,className:`oc-signin__dev`,onClick:()=>void e(`anonymous`),children:EAe()}):null]})]})}function Bot(){let e=P(V.me.getMe,{host:bO}),t=F(V.me.bootstrap),n=ss();(0,N.useEffect)(()=>{e&&!e.hasProfile&&t()},[e,t]),K9(e?.resolvedThemeMode);let r=CO(e?.resolvedThemeMode);wO(e?.resolvedChartTokens,r),Iot(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:hQ()});let a=e.name||e.email||kAe();return e.role===`pending`?(0,I.jsxs)(`div`,{className:`oc-shell`,children:[(0,I.jsx)(q9,{}),(0,I.jsx)(p5,{}),(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)(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:MAe()}),(0,I.jsx)(`p`,{className:`oc-pending__body`,children:FAe()})]})]}):(0,I.jsx)(Hot,{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)(Eee,{className:`size-4 shrink-0`}),(0,I.jsxs)(`span`,{className:`oc-imp__text`,children:[RAe(),` `,(0,I.jsx)(`strong`,{children:e.targetLabel}),VAe(),(0,I.jsx)(`strong`,{children:e.realLabel}),WAe()]}),(0,I.jsx)(X,{size:`sm`,variant:`outline`,className:`oc-imp__exit`,onClick:()=>void t(),children:qAe()})]})}function J9({brand:e,resolvedThemeMode:t}){let n=CO(t),r=e?.label??`Atrium`,i=e?.isDefault??!0,a=AO(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)(jO,{className:`oc-brand__logo`}):null,(0,I.jsx)(`span`,{className:`oc-brand__label`,children:r})]})}function Vot({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?XAe():$Ae(),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)(vrt,{})}),(0,I.jsxs)(`div`,{className:`oc-topbar__actions`,children:[(0,I.jsx)(prt,{}),(0,I.jsx)(m5,{label:e,mode:t})]})]})}function Hot({canOpenSettings:e,userLabel:t,themeMode:n,resolvedThemeMode:r,brand:i}){let{width:a,collapsed:o,toggleCollapsed:s,collapse:c,startResize:l,isMobile:u}=k4e(),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:_}=lrt(h),v=(0,N.useMemo)(()=>b5(_5,y5()),[]);return(0,N.useEffect)(()=>{let e=e=>{x5(e,_5)&&(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)(p5,{}),(0,I.jsx)(Vot,{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)(hot,{}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(irt,{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:nje()})}):null]}),(0,I.jsx)(`div`,{className:`oc-sidebar-resizer`,onPointerDown:l,role:`separator`,"aria-orientation":`vertical`,"aria-label":aje()})]}),(0,I.jsx)(`main`,{className:`oc-main`,children:(0,I.jsx)(Fs,{})})]})]})}function Uot(){let e=P(V.me.getMe,{host:bO}),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:hQ()});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)(mot,{}),(0,I.jsx)(`div`,{className:`oc-admin__body`,children:o?(0,I.jsx)(Wot,{}):(0,I.jsx)(Fs,{})})]})}function Wot(){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)(Bm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:cje()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:dje()})]})}function Got(){let e=P(V.me.getMe,{host:bO}),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:hQ()})}function Kot(){let{tab:e}=as({from:`/settings/$tab`});switch(e){case`groups`:return(0,I.jsx)(Zit,{});case`integrations`:return(0,I.jsx)(Mat,{});case`instances`:return(0,I.jsx)(xit,{});case`bridge`:return(0,I.jsx)(Zrt,{});case`theme`:return(0,I.jsx)(Fot,{});case`feedbacks`:return(0,I.jsx)(Fat,{});case`files`:return(0,I.jsx)(Iat,{});case`agentFiles`:return(0,I.jsx)(Vat,{});case`preferences`:return(0,I.jsx)($at,{});case`chatDefaults`:return(0,I.jsx)(not,{});case`access`:return(0,I.jsx)(oot,{});default:return(0,I.jsx)(Uit,{})}}function qot(){let{chatId:e}=as({from:`/chat/$chatId`}),{m:t}=os({from:`/chat/$chatId`});return(0,I.jsx)(q3,{chatId:e,focusMessageId:t??null})}function Jot(){return(0,I.jsx)(q3,{chatId:null})}var Y9=Es({component:Lot}),Yot=ws({getParentRoute:()=>Y9,path:`/`,component:Jot}),Xot=ws({getParentRoute:()=>Y9,path:`chat/$chatId`,component:qot,validateSearch:e=>({m:typeof e.m==`string`?e.m:void 0})}),X9=ws({getParentRoute:()=>Y9,path:`settings`,component:Uot}),Zot=ws({getParentRoute:()=>X9,path:`/`,component:Got}),Qot=ws({getParentRoute:()=>X9,path:`traces`,validateSearch:lit,component:sat}),$ot=ws({getParentRoute:()=>X9,path:`audit`,validateSearch:uit,component:jit}),est=ws({getParentRoute:()=>X9,path:`anomalies`,validateSearch:dit,component:Eat}),tst=ws({getParentRoute:()=>X9,path:`kpi`,validateSearch:fit,component:hat}),nst=ws({getParentRoute:()=>X9,path:`serviceAccounts`,validateSearch:pit,component:Pit}),rst=ws({getParentRoute:()=>X9,path:`users`,validateSearch:mit,component:vit}),ist=ws({getParentRoute:()=>X9,path:`uiprefs`,beforeLoad:()=>{throw ia({to:`/settings/$tab`,params:{tab:git.uiprefs},replace:!0})}}),ast=ws({getParentRoute:()=>X9,path:`$tab`,parseParams:e=>({tab:Wp([...D7]).catch(`roles`).parse(e.tab)}),component:Kot});function ost({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)(Bm,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:mje()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:_je()}),(0,I.jsxs)(`div`,{className:`oc-route-error__actions`,children:[(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta`,onClick:()=>e(),children:bje()}),(0,I.jsx)(`button`,{type:`button`,className:`oc-route-error__cta oc-route-error__cta--ghost`,onClick:()=>void t({to:`/`}),children:gQ()})]})]})}function sst(){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)(Tee,{size:28})}),(0,I.jsx)(`h2`,{className:`oc-route-error__title`,children:Tje()}),(0,I.jsx)(`p`,{className:`oc-route-error__body`,children:Oje()}),(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:gQ()})})]})}var Z9=Vs({routeTree:Y9.addChildren([Yot,Xot,X9.addChildren([Zot,Qot,$ot,est,tst,nst,rst,ist,ast])]),defaultPreload:`intent`,defaultErrorComponent:ost,defaultNotFoundComponent:sst});async function cst(){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 lst=()=>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…`})})),cst().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)(L2e,{children:[(0,I.jsx)(Eet,{children:(0,I.jsx)(Ws,{router:Z9})}),(0,I.jsx)(N.Suspense,{fallback:null,children:(0,I.jsx)(lst,{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)]})}))});