@sesamehr/react-design-system 2.0.0-beta.21 → 2.0.0-beta.23

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.
@@ -22,7 +22,7 @@ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var Y=ee(B,K,R,L,j+"."+K
22
22
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m9 6 6 6-6 6"/>
23
23
  </g>
24
24
  </svg>
25
- `,Ce=g.forwardRef(({icon:e,...t},n)=>{const o=e.replace(/ height="[^"]*"/g,"").replace(/ width="[^"]*"/g,"");return g.createElement("i",{...t,ref:n,dangerouslySetInnerHTML:{__html:o},style:{display:"inline-flex",alignItems:"center",justifyContent:"center"}})});Ce.displayName="Icon";const xl={"ox-action-item":"_ox-action-item_lke24_2","ox-action-item-label":"_ox-action-item-label_lke24_2","ox-action-item-chevron":"_ox-action-item-chevron_lke24_2"},fh=g.forwardRef(({className:e,showChevron:t=!0,dataTestid:n,children:o,...r},s)=>h.jsxs("button",{ref:s,type:"button","data-slot":"action-item","data-testid":n,className:H(xl["ox-action-item"],e),...r,children:[h.jsx("span",{className:xl["ox-action-item-label"],"data-slot":"label",children:o}),t&&h.jsx("span",{className:xl["ox-action-item-chevron"],"data-slot":"icon","data-testid":`${n}-chevron`,"aria-hidden":"true",children:h.jsx(Ce,{icon:ml})})]}));fh.displayName="OxActionItem";const hh={oxCard:"_oxCard_1lmys_2","ox-card--default":"_ox-card--default_1lmys_2","ox-card--muted":"_ox-card--muted_1lmys_2","ox-card--highlighted":"_ox-card--highlighted_1lmys_2"},Ls=g.forwardRef(({className:e,asChild:t=!1,tone:n="default",flat:o=!1,dataTestid:r,...s},a)=>{const i=t?An:"div";return h.jsx(i,{ref:a,"data-slot":"card","data-testid":r,"data-flat":o,className:H(hh.oxCard,He(hh,gh({tone:n})),e),...s})});Ls.displayName="OxCard";const gh=qe("",{variants:{tone:{default:"ox-card--default",muted:"ox-card--muted",highlighted:"ox-card--highlighted"}},defaultVariants:{tone:"default"}}),Pt={oxCardStack:"_oxCardStack_6ml0j_2",oxCardStackInner:"_oxCardStackInner_6ml0j_2",oxCardStackSlot:"_oxCardStackSlot_6ml0j_2",oxCardStackCard:"_oxCardStackCard_6ml0j_2",oxNextEnter:"_oxNextEnter_6ml0j_2",oxNextExitActive:"_oxNextExitActive_6ml0j_2",oxPrevEnter:"_oxPrevEnter_6ml0j_2",oxPrevExitActive:"_oxPrevExitActive_6ml0j_2",oxEnterActive:"_oxEnterActive_6ml0j_2",oxExit:"_oxExit_6ml0j_2"},ph=g.forwardRef(({className:e,index:t=0,dataTestid:n,children:o,...r},s)=>{const a=g.Children.toArray(o).filter(g.isValidElement).map((f,p)=>({key:f.key??String(p),node:f})),i=SS(a,t),l=g.useRef(t),c=g.useRef("next");l.current!==t&&(c.current=_S(l.current,t,a.length),l.current=t);const u=g.useRef(new Map),d=c.current==="next"?{enter:Pt.oxNextEnter,enterActive:Pt.oxEnterActive,exit:Pt.oxExit,exitActive:Pt.oxNextExitActive}:{enter:Pt.oxPrevEnter,enterActive:Pt.oxEnterActive,exit:Pt.oxExit,exitActive:Pt.oxPrevExitActive};return h.jsx("div",{ref:s,"data-slot":"card-stack","data-testid":n,className:H(Pt.oxCardStack,e),style:{"--ox-card-stack-behind":i.length-1},...r,children:h.jsx(gl,{className:Pt.oxCardStackInner,children:i.map((f,p)=>{const x=String(f.key),m=v=>{u.current.set(x,v)};return h.jsx(Fs,{timeout:460,classNames:d,nodeRef:{get current(){return u.current.get(x)??null}},children:h.jsx("div",{ref:m,className:Pt.oxCardStackSlot,style:{zIndex:vl-p},children:h.jsx("div",{className:Pt.oxCardStackCard,"data-slot":"card-stack-card","data-depth":p,"aria-hidden":p>0?"true":void 0,"data-testid":`${n}-card-${p}`,style:{transform:wS(p)},children:f.node})})},x)})})})});ph.displayName="OxCardStack";const vl=3,yS=10,CS=.055,wS=e=>`translateY(${e*yS}px) scale(${1-e*CS})`,SS=(e,t)=>{const n=e.length;if(n===0)return[];const o=Math.min(vl,n),r=(Math.trunc(t)%n+n)%n;return Array.from({length:o},(s,a)=>e[(r+a)%n])},_S=(e,t,n)=>n<2?"next":(t-e+n)%n===n-1?"prev":"next",TS={oxDivider:"_oxDivider_bamml_2"},mh=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!1,asChild:o=!1,dataTestid:r,...s},a)=>{const i=o?An:"div";return h.jsx(i,{ref:a,"data-slot":"divider","data-testid":r,"data-orientation":t,role:n?"none":"separator","aria-orientation":n||t==="horizontal"?void 0:"vertical",className:H(TS.oxDivider,e),...s})});mh.displayName="OxDivider";const Rs=g.createContext(null);Rs.displayName="PanelGroupContext";const $e={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},bl=10,no=g.useLayoutEffect,xh=b.useId,ES=typeof xh=="function"?xh:()=>null;let PS=0;function yl(e=null){const t=ES(),n=g.useRef(e||t||null);return n.current===null&&(n.current=""+PS++),e??n.current}function vh({children:e,className:t="",collapsedSize:n,collapsible:o,defaultSize:r,forwardedRef:s,id:a,maxSize:i,minSize:l,onCollapse:c,onExpand:u,onResize:d,order:f,style:p,tagName:x="div",...m}){const v=g.useContext(Rs);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:y,expandPanel:w,getPanelSize:C,getPanelStyle:T,groupId:S,isPanelCollapsed:_,reevaluatePanelConstraints:E,registerPanel:P,resizePanel:k,unregisterPanel:A}=v,F=yl(a),O=g.useRef({callbacks:{onCollapse:c,onExpand:u,onResize:d},constraints:{collapsedSize:n,collapsible:o,defaultSize:r,maxSize:i,minSize:l},id:F,idIsFromProps:a!==void 0,order:f});g.useRef({didLogMissingDefaultSizeWarning:!1}),no(()=>{const{callbacks:$,constraints:X}=O.current,Z={...X};O.current.id=F,O.current.idIsFromProps=a!==void 0,O.current.order=f,$.onCollapse=c,$.onExpand=u,$.onResize=d,X.collapsedSize=n,X.collapsible=o,X.defaultSize=r,X.maxSize=i,X.minSize=l,(Z.collapsedSize!==X.collapsedSize||Z.collapsible!==X.collapsible||Z.maxSize!==X.maxSize||Z.minSize!==X.minSize)&&E(O.current,Z)}),no(()=>{const $=O.current;return P($),()=>{A($)}},[f,F,P,A]),g.useImperativeHandle(s,()=>({collapse:()=>{y(O.current)},expand:$=>{w(O.current,$)},getId(){return F},getSize(){return C(O.current)},isCollapsed(){return _(O.current)},isExpanded(){return!_(O.current)},resize:$=>{k(O.current,$)}}),[y,w,C,_,F,k]);const G=T(O.current,r);return g.createElement(x,{...m,children:e,className:t,id:F,style:{...G,...p},[$e.groupId]:S,[$e.panel]:"",[$e.panelCollapsible]:o||void 0,[$e.panelId]:F,[$e.panelSize]:parseFloat(""+G.flexGrow).toFixed(1)})}const bh=g.forwardRef((e,t)=>g.createElement(vh,{...e,forwardedRef:t}));vh.displayName="Panel",bh.displayName="forwardRef(Panel)";let Cl=null,zs=-1,Nn=null;function kS(e,t){if(t){const n=(t&Ph)!==0,o=(t&kh)!==0,r=(t&Ih)!==0,s=(t&Dh)!==0;if(n)return r?"se-resize":s?"ne-resize":"e-resize";if(o)return r?"sw-resize":s?"nw-resize":"w-resize";if(r)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function IS(){Nn!==null&&(document.head.removeChild(Nn),Cl=null,Nn=null,zs=-1)}function wl(e,t){var n,o;const r=kS(e,t);if(Cl!==r){if(Cl=r,Nn===null&&(Nn=document.createElement("style"),document.head.appendChild(Nn)),zs>=0){var s;(s=Nn.sheet)===null||s===void 0||s.removeRule(zs)}zs=(n=(o=Nn.sheet)===null||o===void 0?void 0:o.insertRule(`*{cursor: ${r} !important;}`))!==null&&n!==void 0?n:-1}}function yh(e){return e.type==="keydown"}function Ch(e){return e.type.startsWith("pointer")}function wh(e){return e.type.startsWith("mouse")}function Bs(e){if(Ch(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(wh(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function DS(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function OS(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function MS(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Th(e),b:Th(t)};let o;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),o=e;pe(o,"Stacking order can only be calculated for elements with a common ancestor");const r={a:_h(Sh(n.a)),b:_h(Sh(n.b))};if(r.a===r.b){const s=o.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let i=s.length;for(;i--;){const l=s[i];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(r.a-r.b)}const AS=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function NS(e){var t;const n=getComputedStyle((t=Eh(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function FS(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||NS(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||AS.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Sh(e){let t=e.length;for(;t--;){const n=e[t];if(pe(n,"Missing node"),FS(n))return n}return null}function _h(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Th(e){const t=[];for(;e;)t.push(e),e=Eh(e);return t}function Eh(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Ph=1,kh=2,Ih=4,Dh=8,$S=DS()==="coarse";let $t=[],$o=!1,oo=new Map,Hs=new Map;const Dr=new Set;function LS(e,t,n,o,r){var s;const{ownerDocument:a}=t,i={direction:n,element:t,hitAreaMargins:o,setResizeHandlerState:r},l=(s=oo.get(a))!==null&&s!==void 0?s:0;return oo.set(a,l+1),Dr.add(i),Vs(),function(){var u;Hs.delete(e),Dr.delete(i);const d=(u=oo.get(a))!==null&&u!==void 0?u:1;if(oo.set(a,d-1),Vs(),d===1&&oo.delete(a),$t.includes(i)){const f=$t.indexOf(i);f>=0&&$t.splice(f,1),Pl(),r("up",!0,null)}}}function RS(e){const{target:t}=e,{x:n,y:o}=Bs(e);$o=!0,Tl({target:t,x:n,y:o}),Vs(),$t.length>0&&(Ws("down",e),e.preventDefault(),Oh(t)||e.stopImmediatePropagation())}function Sl(e){const{x:t,y:n}=Bs(e);if($o&&e.buttons===0&&($o=!1,Ws("up",e)),!$o){const{target:o}=e;Tl({target:o,x:t,y:n})}Ws("move",e),Pl(),$t.length>0&&e.preventDefault()}function _l(e){const{target:t}=e,{x:n,y:o}=Bs(e);Hs.clear(),$o=!1,$t.length>0&&(e.preventDefault(),Oh(t)||e.stopImmediatePropagation()),Ws("up",e),Tl({target:t,x:n,y:o}),Pl(),Vs()}function Oh(e){let t=e;for(;t;){if(t.hasAttribute($e.resizeHandle))return!0;t=t.parentElement}return!1}function Tl({target:e,x:t,y:n}){$t.splice(0);let o=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(o=e),Dr.forEach(r=>{const{element:s,hitAreaMargins:a}=r,i=s.getBoundingClientRect(),{bottom:l,left:c,right:u,top:d}=i,f=$S?a.coarse:a.fine;if(t>=c-f&&t<=u+f&&n>=d-f&&n<=l+f){if(o!==null&&document.contains(o)&&s!==o&&!s.contains(o)&&!o.contains(s)&&MS(o,s)>0){let x=o,m=!1;for(;x&&!x.contains(s);){if(OS(x.getBoundingClientRect(),i)){m=!0;break}x=x.parentElement}if(m)return}$t.push(r)}})}function El(e,t){Hs.set(e,t)}function Pl(){let e=!1,t=!1;$t.forEach(o=>{const{direction:r}=o;r==="horizontal"?e=!0:t=!0});let n=0;Hs.forEach(o=>{n|=o}),e&&t?wl("intersection",n):e?wl("horizontal",n):t?wl("vertical",n):IS()}let kl=new AbortController;function Vs(){kl.abort(),kl=new AbortController;const e={capture:!0,signal:kl.signal};Dr.size&&($o?($t.length>0&&oo.forEach((t,n)=>{const{body:o}=n;t>0&&(o.addEventListener("contextmenu",_l,e),o.addEventListener("pointerleave",Sl,e),o.addEventListener("pointermove",Sl,e))}),window.addEventListener("pointerup",_l,e),window.addEventListener("pointercancel",_l,e)):oo.forEach((t,n)=>{const{body:o}=n;t>0&&(o.addEventListener("pointerdown",RS,e),o.addEventListener("pointermove",Sl,e))}))}function Ws(e,t){Dr.forEach(n=>{const{setResizeHandlerState:o}=n,r=$t.includes(n);o(e,r,t)})}function zS(){const[e,t]=g.useState(0);return g.useCallback(()=>t(n=>n+1),[])}function pe(e,t){if(!e)throw console.error(t),Error(t)}function ro(e,t,n=bl){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function fn(e,t,n=bl){return ro(e,t,n)===0}function bt(e,t,n){return ro(e,t,n)===0}function BS(e,t,n){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++){const r=e[o],s=t[o];if(!bt(r,s,n))return!1}return!0}function Lo({panelConstraints:e,panelIndex:t,size:n}){const o=e[t];pe(o!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:r=0,collapsible:s,maxSize:a=100,minSize:i=0}=o;if(ro(n,i)<0)if(s){const l=(r+i)/2;ro(n,l)<0?n=r:n=i}else n=i;return n=Math.min(a,n),n=parseFloat(n.toFixed(bl)),n}function Or({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:o,prevLayout:r,trigger:s}){if(bt(e,0))return t;const a=[...t],[i,l]=o;pe(i!=null,"Invalid first pivot index"),pe(l!=null,"Invalid second pivot index");let c=0;if(s==="keyboard"){{const d=e<0?l:i,f=n[d];pe(f,`Panel constraints not found for index ${d}`);const{collapsedSize:p=0,collapsible:x,minSize:m=0}=f;if(x){const v=t[d];if(pe(v!=null,`Previous layout not found for panel index ${d}`),bt(v,p)){const y=m-v;ro(y,Math.abs(e))>0&&(e=e<0?0-y:y)}}}{const d=e<0?i:l,f=n[d];pe(f,`No panel constraints found for index ${d}`);const{collapsedSize:p=0,collapsible:x,minSize:m=0}=f;if(x){const v=t[d];if(pe(v!=null,`Previous layout not found for panel index ${d}`),bt(v,m)){const y=v-p;ro(y,Math.abs(e))>0&&(e=e<0?0-y:y)}}}}{const d=e<0?1:-1;let f=e<0?l:i,p=0;for(;;){const m=t[f];pe(m!=null,`Previous layout not found for panel index ${f}`);const y=Lo({panelConstraints:n,panelIndex:f,size:100})-m;if(p+=y,f+=d,f<0||f>=n.length)break}const x=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-x:x}{let f=e<0?i:l;for(;f>=0&&f<n.length;){const p=Math.abs(e)-Math.abs(c),x=t[f];pe(x!=null,`Previous layout not found for panel index ${f}`);const m=x-p,v=Lo({panelConstraints:n,panelIndex:f,size:m});if(!bt(x,v)&&(c+=x-v,a[f]=v,c.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(BS(r,a))return r;{const d=e<0?l:i,f=t[d];pe(f!=null,`Previous layout not found for panel index ${d}`);const p=f+c,x=Lo({panelConstraints:n,panelIndex:d,size:p});if(a[d]=x,!bt(x,p)){let m=p-x,y=e<0?l:i;for(;y>=0&&y<n.length;){const w=a[y];pe(w!=null,`Previous layout not found for panel index ${y}`);const C=w+m,T=Lo({panelConstraints:n,panelIndex:y,size:C});if(bt(w,T)||(m-=T-w,a[y]=T),bt(m,0))break;e>0?y--:y++}}}const u=a.reduce((d,f)=>f+d,0);return bt(u,100)?a:r}function HS({layout:e,panelsArray:t,pivotIndices:n}){let o=0,r=100,s=0,a=0;const i=n[0];pe(i!=null,"No pivot index found"),t.forEach((d,f)=>{const{constraints:p}=d,{maxSize:x=100,minSize:m=0}=p;f===i?(o=m,r=x):(s+=m,a+=x)});const l=Math.min(r,100-s),c=Math.max(o,100-a),u=e[i];return{valueMax:l,valueMin:c,valueNow:u}}function Mr(e,t=document){return Array.from(t.querySelectorAll(`[${$e.resizeHandleId}][data-panel-group-id="${e}"]`))}function Mh(e,t,n=document){const r=Mr(e,n).findIndex(s=>s.getAttribute($e.resizeHandleId)===t);return r??null}function Ah(e,t,n){const o=Mh(e,t,n);return o!=null?[o,o+1]:[-1,-1]}function Nh(e,t=document){var n;if(t instanceof HTMLElement&&(t==null||(n=t.dataset)===null||n===void 0?void 0:n.panelGroupId)==e)return t;const o=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return o||null}function Gs(e,t=document){const n=t.querySelector(`[${$e.resizeHandleId}="${e}"]`);return n||null}function VS(e,t,n,o=document){var r,s,a,i;const l=Gs(t,o),c=Mr(e,o),u=l?c.indexOf(l):-1,d=(r=(s=n[u])===null||s===void 0?void 0:s.id)!==null&&r!==void 0?r:null,f=(a=(i=n[u+1])===null||i===void 0?void 0:i.id)!==null&&a!==void 0?a:null;return[d,f]}function WS({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:o,panelDataArray:r,panelGroupElement:s,setLayout:a}){g.useRef({didWarnAboutMissingResizeHandle:!1}),no(()=>{if(!s)return;const i=Mr(n,s);for(let l=0;l<r.length-1;l++){const{valueMax:c,valueMin:u,valueNow:d}=HS({layout:o,panelsArray:r,pivotIndices:[l,l+1]}),f=i[l];if(f!=null){const p=r[l];pe(p,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",p.id),f.setAttribute("aria-valuemax",""+Math.round(c)),f.setAttribute("aria-valuemin",""+Math.round(u)),f.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{i.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,o,r,s]),g.useEffect(()=>{if(!s)return;const i=t.current;pe(i,"Eager values not found");const{panelDataArray:l}=i,c=Nh(n,s);pe(c!=null,`No group found for id "${n}"`);const u=Mr(n,s);pe(u,`No resize handles found for group id "${n}"`);const d=u.map(f=>{const p=f.getAttribute($e.resizeHandleId);pe(p,"Resize handle element has no handle id attribute");const[x,m]=VS(n,p,l,s);if(x==null||m==null)return()=>{};const v=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const w=l.findIndex(C=>C.id===x);if(w>=0){const C=l[w];pe(C,`No panel data found for index ${w}`);const T=o[w],{collapsedSize:S=0,collapsible:_,minSize:E=0}=C.constraints;if(T!=null&&_){const P=Or({delta:bt(T,S)?E-S:S-T,initialLayout:o,panelConstraints:l.map(k=>k.constraints),pivotIndices:Ah(n,p,s),prevLayout:o,trigger:"keyboard"});o!==P&&a(P)}}break}}};return f.addEventListener("keydown",v),()=>{f.removeEventListener("keydown",v)}});return()=>{d.forEach(f=>f())}},[s,e,t,n,o,r,a])}function Fh(e,t){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 $h(e,t){const n=e==="horizontal",{x:o,y:r}=Bs(t);return n?o:r}function GS(e,t,n,o,r){const s=n==="horizontal",a=Gs(t,r);pe(a,`No resize handle element found for id "${t}"`);const i=a.getAttribute($e.groupId);pe(i,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=o;const c=$h(n,e),u=Nh(i,r);pe(u,`No group element found for id "${i}"`);const d=u.getBoundingClientRect(),f=s?d.width:d.height;return(c-l)/f*100}function jS(e,t,n,o,r,s){if(yh(e)){const a=n==="horizontal";let i=0;e.shiftKey?i=100:r!=null?i=r:i=10;let l=0;switch(e.key){case"ArrowDown":l=a?0:i;break;case"ArrowLeft":l=a?-i:0;break;case"ArrowRight":l=a?i:0;break;case"ArrowUp":l=a?0:-i;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return o==null?0:GS(e,t,n,o,s)}function qS({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let o=0,r=100;for(let s=0;s<e.length;s++){const a=n[s];pe(a,`Panel constraints not found for index ${s}`);const{defaultSize:i}=a;i!=null&&(o++,t[s]=i,r-=i)}for(let s=0;s<e.length;s++){const a=n[s];pe(a,`Panel constraints not found for index ${s}`);const{defaultSize:i}=a;if(i!=null)continue;const l=e.length-o,c=r/l;o++,t[s]=c,r-=c}return t}function Ro(e,t,n){t.forEach((o,r)=>{const s=e[r];pe(s,`Panel data not found for index ${r}`);const{callbacks:a,constraints:i,id:l}=s,{collapsedSize:c=0,collapsible:u}=i,d=n[l];if(d==null||o!==d){n[l]=o;const{onCollapse:f,onExpand:p,onResize:x}=a;x&&x(o,d),u&&(f||p)&&(p&&(d==null||fn(d,c))&&!fn(o,c)&&p(),f&&(d==null||!fn(d,c))&&fn(o,c)&&f())}})}function js(e,t){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 YS({defaultSize:e,dragState:t,layout:n,panelData:o,panelIndex:r,precision:s=3}){const a=n[r];let i;return a==null?i=e!=null?e.toPrecision(s):"1":o.length===1?i="1":i=a.toPrecision(s),{flexBasis:0,flexGrow:i,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function US(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function Lh(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function Rh(e){return`react-resizable-panels:${e}`}function zh(e){return e.map(t=>{const{constraints:n,id:o,idIsFromProps:r,order:s}=t;return r?o:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function Bh(e,t){try{const n=Rh(e),o=t.getItem(n);if(o){const r=JSON.parse(o);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function KS(e,t,n){var o,r;const s=(o=Bh(e,n))!==null&&o!==void 0?o:{},a=zh(t);return(r=s[a])!==null&&r!==void 0?r:null}function XS(e,t,n,o,r){var s;const a=Rh(e),i=zh(t),l=(s=Bh(e,r))!==null&&s!==void 0?s:{};l[i]={expandToSizes:Object.fromEntries(n.entries()),layout:o};try{r.setItem(a,JSON.stringify(l))}catch(c){console.error(c)}}function Hh({layout:e,panelConstraints:t}){const n=[...e],o=n.reduce((s,a)=>s+a,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!bt(o,100)&&n.length>0)for(let s=0;s<t.length;s++){const a=n[s];pe(a!=null,`No layout data found for index ${s}`);const i=100/o*a;n[s]=i}let r=0;for(let s=0;s<t.length;s++){const a=n[s];pe(a!=null,`No layout data found for index ${s}`);const i=Lo({panelConstraints:t,panelIndex:s,size:a});a!=i&&(r+=a-i,n[s]=i)}if(!bt(r,0))for(let s=0;s<t.length;s++){const a=n[s];pe(a!=null,`No layout data found for index ${s}`);const i=a+r,l=Lo({panelConstraints:t,panelIndex:s,size:i});if(a!==l&&(r-=l-a,n[s]=l,bt(r,0)))break}return n}const ZS=100,Ar={getItem:e=>(Lh(Ar),Ar.getItem(e)),setItem:(e,t)=>{Lh(Ar),Ar.setItem(e,t)}},Vh={};function Wh({autoSaveId:e=null,children:t,className:n="",direction:o,forwardedRef:r,id:s=null,onLayout:a=null,keyboardResizeBy:i=null,storage:l=Ar,style:c,tagName:u="div",...d}){const f=yl(s),p=g.useRef(null),[x,m]=g.useState(null),[v,y]=g.useState([]),w=zS(),C=g.useRef({}),T=g.useRef(new Map),S=g.useRef(0),_=g.useRef({autoSaveId:e,direction:o,dragState:x,id:f,keyboardResizeBy:i,onLayout:a,storage:l}),E=g.useRef({layout:v,panelDataArray:[],panelDataArrayChanged:!1});g.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),g.useImperativeHandle(r,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:D}=E.current;return D},setLayout:D=>{const{onLayout:R}=_.current,{layout:L,panelDataArray:j}=E.current,B=Hh({layout:D,panelConstraints:j.map(V=>V.constraints)});Fh(L,B)||(y(B),E.current.layout=B,R&&R(B),Ro(j,B,C.current))}}),[]),no(()=>{_.current.autoSaveId=e,_.current.direction=o,_.current.dragState=x,_.current.id=f,_.current.onLayout=a,_.current.storage=l}),WS({committedValuesRef:_,eagerValuesRef:E,groupId:f,layout:v,panelDataArray:E.current.panelDataArray,setLayout:y,panelGroupElement:p.current}),g.useEffect(()=>{const{panelDataArray:D}=E.current;if(e){if(v.length===0||v.length!==D.length)return;let R=Vh[e];R==null&&(R=US(XS,ZS),Vh[e]=R);const L=[...D],j=new Map(T.current);R(e,L,j,v,l)}},[e,v,l]),g.useEffect(()=>{});const P=g.useCallback(D=>{const{onLayout:R}=_.current,{layout:L,panelDataArray:j}=E.current;if(D.constraints.collapsible){const B=j.map(ee=>ee.constraints),{collapsedSize:V=0,panelSize:U,pivotIndices:K}=so(j,D,L);if(pe(U!=null,`Panel size not found for panel "${D.id}"`),!fn(U,V)){T.current.set(D.id,U);const Y=zo(j,D)===j.length-1?U-V:V-U,Q=Or({delta:Y,initialLayout:L,panelConstraints:B,pivotIndices:K,prevLayout:L,trigger:"imperative-api"});js(L,Q)||(y(Q),E.current.layout=Q,R&&R(Q),Ro(j,Q,C.current))}}},[]),k=g.useCallback((D,R)=>{const{onLayout:L}=_.current,{layout:j,panelDataArray:B}=E.current;if(D.constraints.collapsible){const V=B.map(he=>he.constraints),{collapsedSize:U=0,panelSize:K=0,minSize:ee=0,pivotIndices:Y}=so(B,D,j),Q=R??ee;if(fn(K,U)){const he=T.current.get(D.id),_e=he!=null&&he>=Q?he:Q,Ne=zo(B,D)===B.length-1?K-_e:_e-K,Te=Or({delta:Ne,initialLayout:j,panelConstraints:V,pivotIndices:Y,prevLayout:j,trigger:"imperative-api"});js(j,Te)||(y(Te),E.current.layout=Te,L&&L(Te),Ro(B,Te,C.current))}}},[]),A=g.useCallback(D=>{const{layout:R,panelDataArray:L}=E.current,{panelSize:j}=so(L,D,R);return pe(j!=null,`Panel size not found for panel "${D.id}"`),j},[]),F=g.useCallback((D,R)=>{const{panelDataArray:L}=E.current,j=zo(L,D);return YS({defaultSize:R,dragState:x,layout:v,panelData:L,panelIndex:j})},[x,v]),O=g.useCallback(D=>{const{layout:R,panelDataArray:L}=E.current,{collapsedSize:j=0,collapsible:B,panelSize:V}=so(L,D,R);return pe(V!=null,`Panel size not found for panel "${D.id}"`),B===!0&&fn(V,j)},[]),G=g.useCallback(D=>{const{layout:R,panelDataArray:L}=E.current,{collapsedSize:j=0,collapsible:B,panelSize:V}=so(L,D,R);return pe(V!=null,`Panel size not found for panel "${D.id}"`),!B||ro(V,j)>0},[]),$=g.useCallback(D=>{const{panelDataArray:R}=E.current;R.push(D),R.sort((L,j)=>{const B=L.order,V=j.order;return B==null&&V==null?0:B==null?-1:V==null?1:B-V}),E.current.panelDataArrayChanged=!0,w()},[w]);no(()=>{if(E.current.panelDataArrayChanged){E.current.panelDataArrayChanged=!1;const{autoSaveId:D,onLayout:R,storage:L}=_.current,{layout:j,panelDataArray:B}=E.current;let V=null;if(D){const K=KS(D,B,L);K&&(T.current=new Map(Object.entries(K.expandToSizes)),V=K.layout)}V==null&&(V=qS({panelDataArray:B}));const U=Hh({layout:V,panelConstraints:B.map(K=>K.constraints)});Fh(j,U)||(y(U),E.current.layout=U,R&&R(U),Ro(B,U,C.current))}}),no(()=>{const D=E.current;return()=>{D.layout=[]}},[]);const X=g.useCallback(D=>{let R=!1;const L=p.current;return L&&window.getComputedStyle(L,null).getPropertyValue("direction")==="rtl"&&(R=!0),function(B){B.preventDefault();const V=p.current;if(!V)return()=>null;const{direction:U,dragState:K,id:ee,keyboardResizeBy:Y,onLayout:Q}=_.current,{layout:he,panelDataArray:_e}=E.current,{initialLayout:Ie}=K??{},Ne=Ah(ee,D,V);let Te=jS(B,D,U,K,Y,V);const ft=U==="horizontal";ft&&R&&(Te=-Te);const Ke=_e.map(cn=>cn.constraints),Xe=Or({delta:Te,initialLayout:Ie??he,panelConstraints:Ke,pivotIndices:Ne,prevLayout:he,trigger:yh(B)?"keyboard":"mouse-or-touch"}),Le=!js(he,Xe);(Ch(B)||wh(B))&&S.current!=Te&&(S.current=Te,!Le&&Te!==0?ft?El(D,Te<0?Ph:kh):El(D,Te<0?Ih:Dh):El(D,0)),Le&&(y(Xe),E.current.layout=Xe,Q&&Q(Xe),Ro(_e,Xe,C.current))}},[]),Z=g.useCallback((D,R)=>{const{onLayout:L}=_.current,{layout:j,panelDataArray:B}=E.current,V=B.map(he=>he.constraints),{panelSize:U,pivotIndices:K}=so(B,D,j);pe(U!=null,`Panel size not found for panel "${D.id}"`);const Y=zo(B,D)===B.length-1?U-R:R-U,Q=Or({delta:Y,initialLayout:j,panelConstraints:V,pivotIndices:K,prevLayout:j,trigger:"imperative-api"});js(j,Q)||(y(Q),E.current.layout=Q,L&&L(Q),Ro(B,Q,C.current))},[]),J=g.useCallback((D,R)=>{const{layout:L,panelDataArray:j}=E.current,{collapsedSize:B=0,collapsible:V}=R,{collapsedSize:U=0,collapsible:K,maxSize:ee=100,minSize:Y=0}=D.constraints,{panelSize:Q}=so(j,D,L);Q!=null&&(V&&K&&fn(Q,B)?fn(B,U)||Z(D,U):Q<Y?Z(D,Y):Q>ee&&Z(D,ee))},[Z]),W=g.useCallback((D,R)=>{const{direction:L}=_.current,{layout:j}=E.current;if(!p.current)return;const B=Gs(D,p.current);pe(B,`Drag handle element not found for id "${D}"`);const V=$h(L,R);m({dragHandleId:D,dragHandleRect:B.getBoundingClientRect(),initialCursorPosition:V,initialLayout:j})},[]),q=g.useCallback(()=>{m(null)},[]),N=g.useCallback(D=>{const{panelDataArray:R}=E.current,L=zo(R,D);L>=0&&(R.splice(L,1),delete C.current[D.id],E.current.panelDataArrayChanged=!0,w())},[w]),z=g.useMemo(()=>({collapsePanel:P,direction:o,dragState:x,expandPanel:k,getPanelSize:A,getPanelStyle:F,groupId:f,isPanelCollapsed:O,isPanelExpanded:G,reevaluatePanelConstraints:J,registerPanel:$,registerResizeHandle:X,resizePanel:Z,startDragging:W,stopDragging:q,unregisterPanel:N,panelGroupElement:p.current}),[P,x,o,k,A,F,f,O,G,J,$,X,Z,W,q,N]),M={display:"flex",flexDirection:o==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return g.createElement(Rs.Provider,{value:z},g.createElement(u,{...d,children:t,className:n,id:s,ref:p,style:{...M,...c},[$e.group]:"",[$e.groupDirection]:o,[$e.groupId]:f}))}const Gh=g.forwardRef((e,t)=>g.createElement(Wh,{...e,forwardedRef:t}));Wh.displayName="PanelGroup",Gh.displayName="forwardRef(PanelGroup)";function zo(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function so(e,t,n){const o=zo(e,t),s=o===e.length-1?[o-1,o]:[o,o+1],a=n[o];return{...t.constraints,panelSize:a,pivotIndices:s}}function JS({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:o}){g.useEffect(()=>{if(e||n==null||o==null)return;const r=Gs(t,o);if(r==null)return;const s=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const i=r.getAttribute($e.groupId);pe(i,`No group element found for id "${i}"`);const l=Mr(i,o),c=Mh(i,t,o);pe(c!==null,`No resize element found for id "${t}"`);const u=a.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return r.addEventListener("keydown",s),()=>{r.removeEventListener("keydown",s)}},[o,e,t,n])}function jh({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:o,id:r,onBlur:s,onClick:a,onDragging:i,onFocus:l,onPointerDown:c,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p="div",...x}){var m,v;const y=g.useRef(null),w=g.useRef({onClick:a,onDragging:i,onPointerDown:c,onPointerUp:u});g.useEffect(()=>{w.current.onClick=a,w.current.onDragging=i,w.current.onPointerDown=c,w.current.onPointerUp=u});const C=g.useContext(Rs);if(C===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:T,groupId:S,registerResizeHandle:_,startDragging:E,stopDragging:P,panelGroupElement:k}=C,A=yl(r),[F,O]=g.useState("inactive"),[G,$]=g.useState(!1),[X,Z]=g.useState(null),J=g.useRef({state:F});no(()=>{J.current.state=F}),g.useEffect(()=>{if(n)Z(null);else{const z=_(A);Z(()=>z)}},[n,A,_]);const W=(m=o==null?void 0:o.coarse)!==null&&m!==void 0?m:15,q=(v=o==null?void 0:o.fine)!==null&&v!==void 0?v:5;g.useEffect(()=>{if(n||X==null)return;const z=y.current;pe(z,"Element ref not attached");let M=!1;return LS(A,z,T,{coarse:W,fine:q},(R,L,j)=>{if(!L){O("inactive");return}switch(R){case"down":{O("drag"),M=!1,pe(j,'Expected event to be defined for "down" action'),E(A,j);const{onDragging:B,onPointerDown:V}=w.current;B==null||B(!0),V==null||V();break}case"move":{const{state:B}=J.current;M=!0,B!=="drag"&&O("hover"),pe(j,'Expected event to be defined for "move" action'),X(j);break}case"up":{O("hover"),P();const{onClick:B,onDragging:V,onPointerUp:U}=w.current;V==null||V(!1),U==null||U(),M||B==null||B();break}}})},[W,T,n,q,_,A,X,E,P]),JS({disabled:n,handleId:A,resizeHandler:X,panelGroupElement:k});const N={touchAction:"none",userSelect:"none"};return g.createElement(p,{...x,children:e,className:t,id:r,onBlur:()=>{$(!1),s==null||s()},onFocus:()=>{$(!0),l==null||l()},ref:y,role:"separator",style:{...N,...d},tabIndex:f,[$e.groupDirection]:T,[$e.groupId]:S,[$e.resizeHandle]:"",[$e.resizeHandleActive]:F==="drag"?"pointer":G?"keyboard":void 0,[$e.resizeHandleEnabled]:!n,[$e.resizeHandleId]:A,[$e.resizeHandleState]:F})}jh.displayName="PanelResizeHandle";const QS={oxResizable:"_oxResizable_v00cx_2"},qh=g.forwardRef(({className:e,direction:t="horizontal",keyboardResizeBy:n=10,dataTestid:o,...r},s)=>h.jsx(Gh,{ref:s,direction:t,keyboardResizeBy:n,"data-slot":"resizable","data-testid":o,"data-orientation":t,className:H(QS.oxResizable,e),...r}));qh.displayName="OxResizable";const e_={oxResizablePanel:"_oxResizablePanel_1xocv_2"},Yh=g.forwardRef(({className:e,collapsible:t=!1,dataTestid:n,...o},r)=>h.jsx(bh,{ref:r,collapsible:t,"data-slot":"resizable-panel","data-testid":n,className:H(e_.oxResizablePanel,e),...o}));Yh.displayName="OxResizablePanel";const Uh=`<svg width="1.2em" height="1.2em" stroke-color="currentColor" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
25
+ `,Ce=g.forwardRef(({icon:e,...t},n)=>{const o=e.replace(/ height="[^"]*"/g,"").replace(/ width="[^"]*"/g,"");return g.createElement("i",{...t,ref:n,dangerouslySetInnerHTML:{__html:o},style:{display:"inline-flex",alignItems:"center",justifyContent:"center"}})});Ce.displayName="Icon";const xl={"ox-action-item":"_ox-action-item_lke24_2","ox-action-item-label":"_ox-action-item-label_lke24_2","ox-action-item-chevron":"_ox-action-item-chevron_lke24_2"},fh=g.forwardRef(({className:e,showChevron:t=!0,dataTestid:n,children:o,...r},s)=>h.jsxs("button",{ref:s,type:"button","data-slot":"action-item","data-testid":n,className:H(xl["ox-action-item"],e),...r,children:[h.jsx("span",{className:xl["ox-action-item-label"],"data-slot":"label",children:o}),t&&h.jsx("span",{className:xl["ox-action-item-chevron"],"data-slot":"icon","data-testid":`${n}-chevron`,"aria-hidden":"true",children:h.jsx(Ce,{icon:ml})})]}));fh.displayName="OxActionItem";const hh={oxCard:"_oxCard_dj8c9_2","ox-card--default":"_ox-card--default_dj8c9_2","ox-card--muted":"_ox-card--muted_dj8c9_2","ox-card--highlighted":"_ox-card--highlighted_dj8c9_2"},Ls=g.forwardRef(({className:e,asChild:t=!1,tone:n="default",flat:o=!1,dataTestid:r,...s},a)=>{const i=t?An:"div";return h.jsx(i,{ref:a,"data-slot":"card","data-testid":r,"data-flat":o,className:H(hh.oxCard,He(hh,gh({tone:n})),e),...s})});Ls.displayName="OxCard";const gh=qe("",{variants:{tone:{default:"ox-card--default",muted:"ox-card--muted",highlighted:"ox-card--highlighted"}},defaultVariants:{tone:"default"}}),Pt={oxCardStack:"_oxCardStack_6ml0j_2",oxCardStackInner:"_oxCardStackInner_6ml0j_2",oxCardStackSlot:"_oxCardStackSlot_6ml0j_2",oxCardStackCard:"_oxCardStackCard_6ml0j_2",oxNextEnter:"_oxNextEnter_6ml0j_2",oxNextExitActive:"_oxNextExitActive_6ml0j_2",oxPrevEnter:"_oxPrevEnter_6ml0j_2",oxPrevExitActive:"_oxPrevExitActive_6ml0j_2",oxEnterActive:"_oxEnterActive_6ml0j_2",oxExit:"_oxExit_6ml0j_2"},ph=g.forwardRef(({className:e,index:t=0,dataTestid:n,children:o,...r},s)=>{const a=g.Children.toArray(o).filter(g.isValidElement).map((f,p)=>({key:f.key??String(p),node:f})),i=SS(a,t),l=g.useRef(t),c=g.useRef("next");l.current!==t&&(c.current=_S(l.current,t,a.length),l.current=t);const u=g.useRef(new Map),d=c.current==="next"?{enter:Pt.oxNextEnter,enterActive:Pt.oxEnterActive,exit:Pt.oxExit,exitActive:Pt.oxNextExitActive}:{enter:Pt.oxPrevEnter,enterActive:Pt.oxEnterActive,exit:Pt.oxExit,exitActive:Pt.oxPrevExitActive};return h.jsx("div",{ref:s,"data-slot":"card-stack","data-testid":n,className:H(Pt.oxCardStack,e),style:{"--ox-card-stack-behind":i.length-1},...r,children:h.jsx(gl,{className:Pt.oxCardStackInner,children:i.map((f,p)=>{const x=String(f.key),m=v=>{u.current.set(x,v)};return h.jsx(Fs,{timeout:460,classNames:d,nodeRef:{get current(){return u.current.get(x)??null}},children:h.jsx("div",{ref:m,className:Pt.oxCardStackSlot,style:{zIndex:vl-p},children:h.jsx("div",{className:Pt.oxCardStackCard,"data-slot":"card-stack-card","data-depth":p,"aria-hidden":p>0?"true":void 0,"data-testid":`${n}-card-${p}`,style:{transform:wS(p)},children:f.node})})},x)})})})});ph.displayName="OxCardStack";const vl=3,yS=10,CS=.055,wS=e=>`translateY(${e*yS}px) scale(${1-e*CS})`,SS=(e,t)=>{const n=e.length;if(n===0)return[];const o=Math.min(vl,n),r=(Math.trunc(t)%n+n)%n;return Array.from({length:o},(s,a)=>e[(r+a)%n])},_S=(e,t,n)=>n<2?"next":(t-e+n)%n===n-1?"prev":"next",TS={oxDivider:"_oxDivider_bamml_2"},mh=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!1,asChild:o=!1,dataTestid:r,...s},a)=>{const i=o?An:"div";return h.jsx(i,{ref:a,"data-slot":"divider","data-testid":r,"data-orientation":t,role:n?"none":"separator","aria-orientation":n||t==="horizontal"?void 0:"vertical",className:H(TS.oxDivider,e),...s})});mh.displayName="OxDivider";const Rs=g.createContext(null);Rs.displayName="PanelGroupContext";const $e={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},bl=10,no=g.useLayoutEffect,xh=b.useId,ES=typeof xh=="function"?xh:()=>null;let PS=0;function yl(e=null){const t=ES(),n=g.useRef(e||t||null);return n.current===null&&(n.current=""+PS++),e??n.current}function vh({children:e,className:t="",collapsedSize:n,collapsible:o,defaultSize:r,forwardedRef:s,id:a,maxSize:i,minSize:l,onCollapse:c,onExpand:u,onResize:d,order:f,style:p,tagName:x="div",...m}){const v=g.useContext(Rs);if(v===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:y,expandPanel:w,getPanelSize:C,getPanelStyle:T,groupId:S,isPanelCollapsed:_,reevaluatePanelConstraints:E,registerPanel:P,resizePanel:k,unregisterPanel:A}=v,F=yl(a),O=g.useRef({callbacks:{onCollapse:c,onExpand:u,onResize:d},constraints:{collapsedSize:n,collapsible:o,defaultSize:r,maxSize:i,minSize:l},id:F,idIsFromProps:a!==void 0,order:f});g.useRef({didLogMissingDefaultSizeWarning:!1}),no(()=>{const{callbacks:$,constraints:X}=O.current,Z={...X};O.current.id=F,O.current.idIsFromProps=a!==void 0,O.current.order=f,$.onCollapse=c,$.onExpand=u,$.onResize=d,X.collapsedSize=n,X.collapsible=o,X.defaultSize=r,X.maxSize=i,X.minSize=l,(Z.collapsedSize!==X.collapsedSize||Z.collapsible!==X.collapsible||Z.maxSize!==X.maxSize||Z.minSize!==X.minSize)&&E(O.current,Z)}),no(()=>{const $=O.current;return P($),()=>{A($)}},[f,F,P,A]),g.useImperativeHandle(s,()=>({collapse:()=>{y(O.current)},expand:$=>{w(O.current,$)},getId(){return F},getSize(){return C(O.current)},isCollapsed(){return _(O.current)},isExpanded(){return!_(O.current)},resize:$=>{k(O.current,$)}}),[y,w,C,_,F,k]);const G=T(O.current,r);return g.createElement(x,{...m,children:e,className:t,id:F,style:{...G,...p},[$e.groupId]:S,[$e.panel]:"",[$e.panelCollapsible]:o||void 0,[$e.panelId]:F,[$e.panelSize]:parseFloat(""+G.flexGrow).toFixed(1)})}const bh=g.forwardRef((e,t)=>g.createElement(vh,{...e,forwardedRef:t}));vh.displayName="Panel",bh.displayName="forwardRef(Panel)";let Cl=null,zs=-1,Nn=null;function kS(e,t){if(t){const n=(t&Ph)!==0,o=(t&kh)!==0,r=(t&Ih)!==0,s=(t&Dh)!==0;if(n)return r?"se-resize":s?"ne-resize":"e-resize";if(o)return r?"sw-resize":s?"nw-resize":"w-resize";if(r)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function IS(){Nn!==null&&(document.head.removeChild(Nn),Cl=null,Nn=null,zs=-1)}function wl(e,t){var n,o;const r=kS(e,t);if(Cl!==r){if(Cl=r,Nn===null&&(Nn=document.createElement("style"),document.head.appendChild(Nn)),zs>=0){var s;(s=Nn.sheet)===null||s===void 0||s.removeRule(zs)}zs=(n=(o=Nn.sheet)===null||o===void 0?void 0:o.insertRule(`*{cursor: ${r} !important;}`))!==null&&n!==void 0?n:-1}}function yh(e){return e.type==="keydown"}function Ch(e){return e.type.startsWith("pointer")}function wh(e){return e.type.startsWith("mouse")}function Bs(e){if(Ch(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(wh(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function DS(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function OS(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function MS(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Th(e),b:Th(t)};let o;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),o=e;pe(o,"Stacking order can only be calculated for elements with a common ancestor");const r={a:_h(Sh(n.a)),b:_h(Sh(n.b))};if(r.a===r.b){const s=o.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let i=s.length;for(;i--;){const l=s[i];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(r.a-r.b)}const AS=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function NS(e){var t;const n=getComputedStyle((t=Eh(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function FS(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||NS(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||AS.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Sh(e){let t=e.length;for(;t--;){const n=e[t];if(pe(n,"Missing node"),FS(n))return n}return null}function _h(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Th(e){const t=[];for(;e;)t.push(e),e=Eh(e);return t}function Eh(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Ph=1,kh=2,Ih=4,Dh=8,$S=DS()==="coarse";let $t=[],$o=!1,oo=new Map,Hs=new Map;const Dr=new Set;function LS(e,t,n,o,r){var s;const{ownerDocument:a}=t,i={direction:n,element:t,hitAreaMargins:o,setResizeHandlerState:r},l=(s=oo.get(a))!==null&&s!==void 0?s:0;return oo.set(a,l+1),Dr.add(i),Vs(),function(){var u;Hs.delete(e),Dr.delete(i);const d=(u=oo.get(a))!==null&&u!==void 0?u:1;if(oo.set(a,d-1),Vs(),d===1&&oo.delete(a),$t.includes(i)){const f=$t.indexOf(i);f>=0&&$t.splice(f,1),Pl(),r("up",!0,null)}}}function RS(e){const{target:t}=e,{x:n,y:o}=Bs(e);$o=!0,Tl({target:t,x:n,y:o}),Vs(),$t.length>0&&(Ws("down",e),e.preventDefault(),Oh(t)||e.stopImmediatePropagation())}function Sl(e){const{x:t,y:n}=Bs(e);if($o&&e.buttons===0&&($o=!1,Ws("up",e)),!$o){const{target:o}=e;Tl({target:o,x:t,y:n})}Ws("move",e),Pl(),$t.length>0&&e.preventDefault()}function _l(e){const{target:t}=e,{x:n,y:o}=Bs(e);Hs.clear(),$o=!1,$t.length>0&&(e.preventDefault(),Oh(t)||e.stopImmediatePropagation()),Ws("up",e),Tl({target:t,x:n,y:o}),Pl(),Vs()}function Oh(e){let t=e;for(;t;){if(t.hasAttribute($e.resizeHandle))return!0;t=t.parentElement}return!1}function Tl({target:e,x:t,y:n}){$t.splice(0);let o=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(o=e),Dr.forEach(r=>{const{element:s,hitAreaMargins:a}=r,i=s.getBoundingClientRect(),{bottom:l,left:c,right:u,top:d}=i,f=$S?a.coarse:a.fine;if(t>=c-f&&t<=u+f&&n>=d-f&&n<=l+f){if(o!==null&&document.contains(o)&&s!==o&&!s.contains(o)&&!o.contains(s)&&MS(o,s)>0){let x=o,m=!1;for(;x&&!x.contains(s);){if(OS(x.getBoundingClientRect(),i)){m=!0;break}x=x.parentElement}if(m)return}$t.push(r)}})}function El(e,t){Hs.set(e,t)}function Pl(){let e=!1,t=!1;$t.forEach(o=>{const{direction:r}=o;r==="horizontal"?e=!0:t=!0});let n=0;Hs.forEach(o=>{n|=o}),e&&t?wl("intersection",n):e?wl("horizontal",n):t?wl("vertical",n):IS()}let kl=new AbortController;function Vs(){kl.abort(),kl=new AbortController;const e={capture:!0,signal:kl.signal};Dr.size&&($o?($t.length>0&&oo.forEach((t,n)=>{const{body:o}=n;t>0&&(o.addEventListener("contextmenu",_l,e),o.addEventListener("pointerleave",Sl,e),o.addEventListener("pointermove",Sl,e))}),window.addEventListener("pointerup",_l,e),window.addEventListener("pointercancel",_l,e)):oo.forEach((t,n)=>{const{body:o}=n;t>0&&(o.addEventListener("pointerdown",RS,e),o.addEventListener("pointermove",Sl,e))}))}function Ws(e,t){Dr.forEach(n=>{const{setResizeHandlerState:o}=n,r=$t.includes(n);o(e,r,t)})}function zS(){const[e,t]=g.useState(0);return g.useCallback(()=>t(n=>n+1),[])}function pe(e,t){if(!e)throw console.error(t),Error(t)}function ro(e,t,n=bl){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function fn(e,t,n=bl){return ro(e,t,n)===0}function bt(e,t,n){return ro(e,t,n)===0}function BS(e,t,n){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++){const r=e[o],s=t[o];if(!bt(r,s,n))return!1}return!0}function Lo({panelConstraints:e,panelIndex:t,size:n}){const o=e[t];pe(o!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:r=0,collapsible:s,maxSize:a=100,minSize:i=0}=o;if(ro(n,i)<0)if(s){const l=(r+i)/2;ro(n,l)<0?n=r:n=i}else n=i;return n=Math.min(a,n),n=parseFloat(n.toFixed(bl)),n}function Or({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:o,prevLayout:r,trigger:s}){if(bt(e,0))return t;const a=[...t],[i,l]=o;pe(i!=null,"Invalid first pivot index"),pe(l!=null,"Invalid second pivot index");let c=0;if(s==="keyboard"){{const d=e<0?l:i,f=n[d];pe(f,`Panel constraints not found for index ${d}`);const{collapsedSize:p=0,collapsible:x,minSize:m=0}=f;if(x){const v=t[d];if(pe(v!=null,`Previous layout not found for panel index ${d}`),bt(v,p)){const y=m-v;ro(y,Math.abs(e))>0&&(e=e<0?0-y:y)}}}{const d=e<0?i:l,f=n[d];pe(f,`No panel constraints found for index ${d}`);const{collapsedSize:p=0,collapsible:x,minSize:m=0}=f;if(x){const v=t[d];if(pe(v!=null,`Previous layout not found for panel index ${d}`),bt(v,m)){const y=v-p;ro(y,Math.abs(e))>0&&(e=e<0?0-y:y)}}}}{const d=e<0?1:-1;let f=e<0?l:i,p=0;for(;;){const m=t[f];pe(m!=null,`Previous layout not found for panel index ${f}`);const y=Lo({panelConstraints:n,panelIndex:f,size:100})-m;if(p+=y,f+=d,f<0||f>=n.length)break}const x=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-x:x}{let f=e<0?i:l;for(;f>=0&&f<n.length;){const p=Math.abs(e)-Math.abs(c),x=t[f];pe(x!=null,`Previous layout not found for panel index ${f}`);const m=x-p,v=Lo({panelConstraints:n,panelIndex:f,size:m});if(!bt(x,v)&&(c+=x-v,a[f]=v,c.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(BS(r,a))return r;{const d=e<0?l:i,f=t[d];pe(f!=null,`Previous layout not found for panel index ${d}`);const p=f+c,x=Lo({panelConstraints:n,panelIndex:d,size:p});if(a[d]=x,!bt(x,p)){let m=p-x,y=e<0?l:i;for(;y>=0&&y<n.length;){const w=a[y];pe(w!=null,`Previous layout not found for panel index ${y}`);const C=w+m,T=Lo({panelConstraints:n,panelIndex:y,size:C});if(bt(w,T)||(m-=T-w,a[y]=T),bt(m,0))break;e>0?y--:y++}}}const u=a.reduce((d,f)=>f+d,0);return bt(u,100)?a:r}function HS({layout:e,panelsArray:t,pivotIndices:n}){let o=0,r=100,s=0,a=0;const i=n[0];pe(i!=null,"No pivot index found"),t.forEach((d,f)=>{const{constraints:p}=d,{maxSize:x=100,minSize:m=0}=p;f===i?(o=m,r=x):(s+=m,a+=x)});const l=Math.min(r,100-s),c=Math.max(o,100-a),u=e[i];return{valueMax:l,valueMin:c,valueNow:u}}function Mr(e,t=document){return Array.from(t.querySelectorAll(`[${$e.resizeHandleId}][data-panel-group-id="${e}"]`))}function Mh(e,t,n=document){const r=Mr(e,n).findIndex(s=>s.getAttribute($e.resizeHandleId)===t);return r??null}function Ah(e,t,n){const o=Mh(e,t,n);return o!=null?[o,o+1]:[-1,-1]}function Nh(e,t=document){var n;if(t instanceof HTMLElement&&(t==null||(n=t.dataset)===null||n===void 0?void 0:n.panelGroupId)==e)return t;const o=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return o||null}function Gs(e,t=document){const n=t.querySelector(`[${$e.resizeHandleId}="${e}"]`);return n||null}function VS(e,t,n,o=document){var r,s,a,i;const l=Gs(t,o),c=Mr(e,o),u=l?c.indexOf(l):-1,d=(r=(s=n[u])===null||s===void 0?void 0:s.id)!==null&&r!==void 0?r:null,f=(a=(i=n[u+1])===null||i===void 0?void 0:i.id)!==null&&a!==void 0?a:null;return[d,f]}function WS({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:o,panelDataArray:r,panelGroupElement:s,setLayout:a}){g.useRef({didWarnAboutMissingResizeHandle:!1}),no(()=>{if(!s)return;const i=Mr(n,s);for(let l=0;l<r.length-1;l++){const{valueMax:c,valueMin:u,valueNow:d}=HS({layout:o,panelsArray:r,pivotIndices:[l,l+1]}),f=i[l];if(f!=null){const p=r[l];pe(p,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",p.id),f.setAttribute("aria-valuemax",""+Math.round(c)),f.setAttribute("aria-valuemin",""+Math.round(u)),f.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{i.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,o,r,s]),g.useEffect(()=>{if(!s)return;const i=t.current;pe(i,"Eager values not found");const{panelDataArray:l}=i,c=Nh(n,s);pe(c!=null,`No group found for id "${n}"`);const u=Mr(n,s);pe(u,`No resize handles found for group id "${n}"`);const d=u.map(f=>{const p=f.getAttribute($e.resizeHandleId);pe(p,"Resize handle element has no handle id attribute");const[x,m]=VS(n,p,l,s);if(x==null||m==null)return()=>{};const v=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const w=l.findIndex(C=>C.id===x);if(w>=0){const C=l[w];pe(C,`No panel data found for index ${w}`);const T=o[w],{collapsedSize:S=0,collapsible:_,minSize:E=0}=C.constraints;if(T!=null&&_){const P=Or({delta:bt(T,S)?E-S:S-T,initialLayout:o,panelConstraints:l.map(k=>k.constraints),pivotIndices:Ah(n,p,s),prevLayout:o,trigger:"keyboard"});o!==P&&a(P)}}break}}};return f.addEventListener("keydown",v),()=>{f.removeEventListener("keydown",v)}});return()=>{d.forEach(f=>f())}},[s,e,t,n,o,r,a])}function Fh(e,t){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 $h(e,t){const n=e==="horizontal",{x:o,y:r}=Bs(t);return n?o:r}function GS(e,t,n,o,r){const s=n==="horizontal",a=Gs(t,r);pe(a,`No resize handle element found for id "${t}"`);const i=a.getAttribute($e.groupId);pe(i,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=o;const c=$h(n,e),u=Nh(i,r);pe(u,`No group element found for id "${i}"`);const d=u.getBoundingClientRect(),f=s?d.width:d.height;return(c-l)/f*100}function jS(e,t,n,o,r,s){if(yh(e)){const a=n==="horizontal";let i=0;e.shiftKey?i=100:r!=null?i=r:i=10;let l=0;switch(e.key){case"ArrowDown":l=a?0:i;break;case"ArrowLeft":l=a?-i:0;break;case"ArrowRight":l=a?i:0;break;case"ArrowUp":l=a?0:-i;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return o==null?0:GS(e,t,n,o,s)}function qS({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let o=0,r=100;for(let s=0;s<e.length;s++){const a=n[s];pe(a,`Panel constraints not found for index ${s}`);const{defaultSize:i}=a;i!=null&&(o++,t[s]=i,r-=i)}for(let s=0;s<e.length;s++){const a=n[s];pe(a,`Panel constraints not found for index ${s}`);const{defaultSize:i}=a;if(i!=null)continue;const l=e.length-o,c=r/l;o++,t[s]=c,r-=c}return t}function Ro(e,t,n){t.forEach((o,r)=>{const s=e[r];pe(s,`Panel data not found for index ${r}`);const{callbacks:a,constraints:i,id:l}=s,{collapsedSize:c=0,collapsible:u}=i,d=n[l];if(d==null||o!==d){n[l]=o;const{onCollapse:f,onExpand:p,onResize:x}=a;x&&x(o,d),u&&(f||p)&&(p&&(d==null||fn(d,c))&&!fn(o,c)&&p(),f&&(d==null||!fn(d,c))&&fn(o,c)&&f())}})}function js(e,t){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 YS({defaultSize:e,dragState:t,layout:n,panelData:o,panelIndex:r,precision:s=3}){const a=n[r];let i;return a==null?i=e!=null?e.toPrecision(s):"1":o.length===1?i="1":i=a.toPrecision(s),{flexBasis:0,flexGrow:i,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function US(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function Lh(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function Rh(e){return`react-resizable-panels:${e}`}function zh(e){return e.map(t=>{const{constraints:n,id:o,idIsFromProps:r,order:s}=t;return r?o:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function Bh(e,t){try{const n=Rh(e),o=t.getItem(n);if(o){const r=JSON.parse(o);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function KS(e,t,n){var o,r;const s=(o=Bh(e,n))!==null&&o!==void 0?o:{},a=zh(t);return(r=s[a])!==null&&r!==void 0?r:null}function XS(e,t,n,o,r){var s;const a=Rh(e),i=zh(t),l=(s=Bh(e,r))!==null&&s!==void 0?s:{};l[i]={expandToSizes:Object.fromEntries(n.entries()),layout:o};try{r.setItem(a,JSON.stringify(l))}catch(c){console.error(c)}}function Hh({layout:e,panelConstraints:t}){const n=[...e],o=n.reduce((s,a)=>s+a,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!bt(o,100)&&n.length>0)for(let s=0;s<t.length;s++){const a=n[s];pe(a!=null,`No layout data found for index ${s}`);const i=100/o*a;n[s]=i}let r=0;for(let s=0;s<t.length;s++){const a=n[s];pe(a!=null,`No layout data found for index ${s}`);const i=Lo({panelConstraints:t,panelIndex:s,size:a});a!=i&&(r+=a-i,n[s]=i)}if(!bt(r,0))for(let s=0;s<t.length;s++){const a=n[s];pe(a!=null,`No layout data found for index ${s}`);const i=a+r,l=Lo({panelConstraints:t,panelIndex:s,size:i});if(a!==l&&(r-=l-a,n[s]=l,bt(r,0)))break}return n}const ZS=100,Ar={getItem:e=>(Lh(Ar),Ar.getItem(e)),setItem:(e,t)=>{Lh(Ar),Ar.setItem(e,t)}},Vh={};function Wh({autoSaveId:e=null,children:t,className:n="",direction:o,forwardedRef:r,id:s=null,onLayout:a=null,keyboardResizeBy:i=null,storage:l=Ar,style:c,tagName:u="div",...d}){const f=yl(s),p=g.useRef(null),[x,m]=g.useState(null),[v,y]=g.useState([]),w=zS(),C=g.useRef({}),T=g.useRef(new Map),S=g.useRef(0),_=g.useRef({autoSaveId:e,direction:o,dragState:x,id:f,keyboardResizeBy:i,onLayout:a,storage:l}),E=g.useRef({layout:v,panelDataArray:[],panelDataArrayChanged:!1});g.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),g.useImperativeHandle(r,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:D}=E.current;return D},setLayout:D=>{const{onLayout:R}=_.current,{layout:L,panelDataArray:j}=E.current,B=Hh({layout:D,panelConstraints:j.map(V=>V.constraints)});Fh(L,B)||(y(B),E.current.layout=B,R&&R(B),Ro(j,B,C.current))}}),[]),no(()=>{_.current.autoSaveId=e,_.current.direction=o,_.current.dragState=x,_.current.id=f,_.current.onLayout=a,_.current.storage=l}),WS({committedValuesRef:_,eagerValuesRef:E,groupId:f,layout:v,panelDataArray:E.current.panelDataArray,setLayout:y,panelGroupElement:p.current}),g.useEffect(()=>{const{panelDataArray:D}=E.current;if(e){if(v.length===0||v.length!==D.length)return;let R=Vh[e];R==null&&(R=US(XS,ZS),Vh[e]=R);const L=[...D],j=new Map(T.current);R(e,L,j,v,l)}},[e,v,l]),g.useEffect(()=>{});const P=g.useCallback(D=>{const{onLayout:R}=_.current,{layout:L,panelDataArray:j}=E.current;if(D.constraints.collapsible){const B=j.map(ee=>ee.constraints),{collapsedSize:V=0,panelSize:U,pivotIndices:K}=so(j,D,L);if(pe(U!=null,`Panel size not found for panel "${D.id}"`),!fn(U,V)){T.current.set(D.id,U);const Y=zo(j,D)===j.length-1?U-V:V-U,Q=Or({delta:Y,initialLayout:L,panelConstraints:B,pivotIndices:K,prevLayout:L,trigger:"imperative-api"});js(L,Q)||(y(Q),E.current.layout=Q,R&&R(Q),Ro(j,Q,C.current))}}},[]),k=g.useCallback((D,R)=>{const{onLayout:L}=_.current,{layout:j,panelDataArray:B}=E.current;if(D.constraints.collapsible){const V=B.map(he=>he.constraints),{collapsedSize:U=0,panelSize:K=0,minSize:ee=0,pivotIndices:Y}=so(B,D,j),Q=R??ee;if(fn(K,U)){const he=T.current.get(D.id),_e=he!=null&&he>=Q?he:Q,Ne=zo(B,D)===B.length-1?K-_e:_e-K,Te=Or({delta:Ne,initialLayout:j,panelConstraints:V,pivotIndices:Y,prevLayout:j,trigger:"imperative-api"});js(j,Te)||(y(Te),E.current.layout=Te,L&&L(Te),Ro(B,Te,C.current))}}},[]),A=g.useCallback(D=>{const{layout:R,panelDataArray:L}=E.current,{panelSize:j}=so(L,D,R);return pe(j!=null,`Panel size not found for panel "${D.id}"`),j},[]),F=g.useCallback((D,R)=>{const{panelDataArray:L}=E.current,j=zo(L,D);return YS({defaultSize:R,dragState:x,layout:v,panelData:L,panelIndex:j})},[x,v]),O=g.useCallback(D=>{const{layout:R,panelDataArray:L}=E.current,{collapsedSize:j=0,collapsible:B,panelSize:V}=so(L,D,R);return pe(V!=null,`Panel size not found for panel "${D.id}"`),B===!0&&fn(V,j)},[]),G=g.useCallback(D=>{const{layout:R,panelDataArray:L}=E.current,{collapsedSize:j=0,collapsible:B,panelSize:V}=so(L,D,R);return pe(V!=null,`Panel size not found for panel "${D.id}"`),!B||ro(V,j)>0},[]),$=g.useCallback(D=>{const{panelDataArray:R}=E.current;R.push(D),R.sort((L,j)=>{const B=L.order,V=j.order;return B==null&&V==null?0:B==null?-1:V==null?1:B-V}),E.current.panelDataArrayChanged=!0,w()},[w]);no(()=>{if(E.current.panelDataArrayChanged){E.current.panelDataArrayChanged=!1;const{autoSaveId:D,onLayout:R,storage:L}=_.current,{layout:j,panelDataArray:B}=E.current;let V=null;if(D){const K=KS(D,B,L);K&&(T.current=new Map(Object.entries(K.expandToSizes)),V=K.layout)}V==null&&(V=qS({panelDataArray:B}));const U=Hh({layout:V,panelConstraints:B.map(K=>K.constraints)});Fh(j,U)||(y(U),E.current.layout=U,R&&R(U),Ro(B,U,C.current))}}),no(()=>{const D=E.current;return()=>{D.layout=[]}},[]);const X=g.useCallback(D=>{let R=!1;const L=p.current;return L&&window.getComputedStyle(L,null).getPropertyValue("direction")==="rtl"&&(R=!0),function(B){B.preventDefault();const V=p.current;if(!V)return()=>null;const{direction:U,dragState:K,id:ee,keyboardResizeBy:Y,onLayout:Q}=_.current,{layout:he,panelDataArray:_e}=E.current,{initialLayout:Ie}=K??{},Ne=Ah(ee,D,V);let Te=jS(B,D,U,K,Y,V);const ft=U==="horizontal";ft&&R&&(Te=-Te);const Ke=_e.map(cn=>cn.constraints),Xe=Or({delta:Te,initialLayout:Ie??he,panelConstraints:Ke,pivotIndices:Ne,prevLayout:he,trigger:yh(B)?"keyboard":"mouse-or-touch"}),Le=!js(he,Xe);(Ch(B)||wh(B))&&S.current!=Te&&(S.current=Te,!Le&&Te!==0?ft?El(D,Te<0?Ph:kh):El(D,Te<0?Ih:Dh):El(D,0)),Le&&(y(Xe),E.current.layout=Xe,Q&&Q(Xe),Ro(_e,Xe,C.current))}},[]),Z=g.useCallback((D,R)=>{const{onLayout:L}=_.current,{layout:j,panelDataArray:B}=E.current,V=B.map(he=>he.constraints),{panelSize:U,pivotIndices:K}=so(B,D,j);pe(U!=null,`Panel size not found for panel "${D.id}"`);const Y=zo(B,D)===B.length-1?U-R:R-U,Q=Or({delta:Y,initialLayout:j,panelConstraints:V,pivotIndices:K,prevLayout:j,trigger:"imperative-api"});js(j,Q)||(y(Q),E.current.layout=Q,L&&L(Q),Ro(B,Q,C.current))},[]),J=g.useCallback((D,R)=>{const{layout:L,panelDataArray:j}=E.current,{collapsedSize:B=0,collapsible:V}=R,{collapsedSize:U=0,collapsible:K,maxSize:ee=100,minSize:Y=0}=D.constraints,{panelSize:Q}=so(j,D,L);Q!=null&&(V&&K&&fn(Q,B)?fn(B,U)||Z(D,U):Q<Y?Z(D,Y):Q>ee&&Z(D,ee))},[Z]),W=g.useCallback((D,R)=>{const{direction:L}=_.current,{layout:j}=E.current;if(!p.current)return;const B=Gs(D,p.current);pe(B,`Drag handle element not found for id "${D}"`);const V=$h(L,R);m({dragHandleId:D,dragHandleRect:B.getBoundingClientRect(),initialCursorPosition:V,initialLayout:j})},[]),q=g.useCallback(()=>{m(null)},[]),N=g.useCallback(D=>{const{panelDataArray:R}=E.current,L=zo(R,D);L>=0&&(R.splice(L,1),delete C.current[D.id],E.current.panelDataArrayChanged=!0,w())},[w]),z=g.useMemo(()=>({collapsePanel:P,direction:o,dragState:x,expandPanel:k,getPanelSize:A,getPanelStyle:F,groupId:f,isPanelCollapsed:O,isPanelExpanded:G,reevaluatePanelConstraints:J,registerPanel:$,registerResizeHandle:X,resizePanel:Z,startDragging:W,stopDragging:q,unregisterPanel:N,panelGroupElement:p.current}),[P,x,o,k,A,F,f,O,G,J,$,X,Z,W,q,N]),M={display:"flex",flexDirection:o==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return g.createElement(Rs.Provider,{value:z},g.createElement(u,{...d,children:t,className:n,id:s,ref:p,style:{...M,...c},[$e.group]:"",[$e.groupDirection]:o,[$e.groupId]:f}))}const Gh=g.forwardRef((e,t)=>g.createElement(Wh,{...e,forwardedRef:t}));Wh.displayName="PanelGroup",Gh.displayName="forwardRef(PanelGroup)";function zo(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function so(e,t,n){const o=zo(e,t),s=o===e.length-1?[o-1,o]:[o,o+1],a=n[o];return{...t.constraints,panelSize:a,pivotIndices:s}}function JS({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:o}){g.useEffect(()=>{if(e||n==null||o==null)return;const r=Gs(t,o);if(r==null)return;const s=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const i=r.getAttribute($e.groupId);pe(i,`No group element found for id "${i}"`);const l=Mr(i,o),c=Mh(i,t,o);pe(c!==null,`No resize element found for id "${t}"`);const u=a.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return r.addEventListener("keydown",s),()=>{r.removeEventListener("keydown",s)}},[o,e,t,n])}function jh({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:o,id:r,onBlur:s,onClick:a,onDragging:i,onFocus:l,onPointerDown:c,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p="div",...x}){var m,v;const y=g.useRef(null),w=g.useRef({onClick:a,onDragging:i,onPointerDown:c,onPointerUp:u});g.useEffect(()=>{w.current.onClick=a,w.current.onDragging=i,w.current.onPointerDown=c,w.current.onPointerUp=u});const C=g.useContext(Rs);if(C===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:T,groupId:S,registerResizeHandle:_,startDragging:E,stopDragging:P,panelGroupElement:k}=C,A=yl(r),[F,O]=g.useState("inactive"),[G,$]=g.useState(!1),[X,Z]=g.useState(null),J=g.useRef({state:F});no(()=>{J.current.state=F}),g.useEffect(()=>{if(n)Z(null);else{const z=_(A);Z(()=>z)}},[n,A,_]);const W=(m=o==null?void 0:o.coarse)!==null&&m!==void 0?m:15,q=(v=o==null?void 0:o.fine)!==null&&v!==void 0?v:5;g.useEffect(()=>{if(n||X==null)return;const z=y.current;pe(z,"Element ref not attached");let M=!1;return LS(A,z,T,{coarse:W,fine:q},(R,L,j)=>{if(!L){O("inactive");return}switch(R){case"down":{O("drag"),M=!1,pe(j,'Expected event to be defined for "down" action'),E(A,j);const{onDragging:B,onPointerDown:V}=w.current;B==null||B(!0),V==null||V();break}case"move":{const{state:B}=J.current;M=!0,B!=="drag"&&O("hover"),pe(j,'Expected event to be defined for "move" action'),X(j);break}case"up":{O("hover"),P();const{onClick:B,onDragging:V,onPointerUp:U}=w.current;V==null||V(!1),U==null||U(),M||B==null||B();break}}})},[W,T,n,q,_,A,X,E,P]),JS({disabled:n,handleId:A,resizeHandler:X,panelGroupElement:k});const N={touchAction:"none",userSelect:"none"};return g.createElement(p,{...x,children:e,className:t,id:r,onBlur:()=>{$(!1),s==null||s()},onFocus:()=>{$(!0),l==null||l()},ref:y,role:"separator",style:{...N,...d},tabIndex:f,[$e.groupDirection]:T,[$e.groupId]:S,[$e.resizeHandle]:"",[$e.resizeHandleActive]:F==="drag"?"pointer":G?"keyboard":void 0,[$e.resizeHandleEnabled]:!n,[$e.resizeHandleId]:A,[$e.resizeHandleState]:F})}jh.displayName="PanelResizeHandle";const QS={oxResizable:"_oxResizable_v00cx_2"},qh=g.forwardRef(({className:e,direction:t="horizontal",keyboardResizeBy:n=10,dataTestid:o,...r},s)=>h.jsx(Gh,{ref:s,direction:t,keyboardResizeBy:n,"data-slot":"resizable","data-testid":o,"data-orientation":t,className:H(QS.oxResizable,e),...r}));qh.displayName="OxResizable";const e_={oxResizablePanel:"_oxResizablePanel_1xocv_2"},Yh=g.forwardRef(({className:e,collapsible:t=!1,dataTestid:n,...o},r)=>h.jsx(bh,{ref:r,collapsible:t,"data-slot":"resizable-panel","data-testid":n,className:H(e_.oxResizablePanel,e),...o}));Yh.displayName="OxResizablePanel";const Uh=`<svg width="1.2em" height="1.2em" stroke-color="currentColor" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
26
26
  <g>
27
27
  <g>
28
28
  <g>
@@ -139,7 +139,7 @@ Defaulting to \`null\`.`}hn(ep,"getInvalidValueError");var i1=r1,l1=a1;const tp=
139
139
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m6 9 6 6 6-6"/>
140
140
  </g>
141
141
  </svg>
142
- `,ou={oxAccordionHeader:"_oxAccordionHeader_1wlp1_2",oxAccordionTrigger:"_oxAccordionTrigger_1wlp1_2",oxAccordionChevron:"_oxAccordionChevron_1wlp1_2"},Cx=g.forwardRef(({className:e,children:t,...n},o)=>h.jsx(EP,{className:ou.oxAccordionHeader,children:h.jsxs(PP,{ref:o,"data-slot":"accordion-trigger",className:H(ou.oxAccordionTrigger,e),...n,children:[t,h.jsx(Ce,{icon:xo,className:ou.oxAccordionChevron})]})}));Cx.displayName="OxAccordionTrigger";const wx={oxAccordionContent:"_oxAccordionContent_e3t2z_2",oxAccordionContentInner:"_oxAccordionContentInner_e3t2z_2"},Sx=g.forwardRef(({className:e,children:t,...n},o)=>h.jsx(kP,{ref:o,"data-slot":"accordion-content",className:H(wx.oxAccordionContent,e),...n,children:h.jsx("div",{className:wx.oxAccordionContentInner,children:t})}));Sx.displayName="OxAccordionContent";var ru=!1;function OP(){const[e,t]=b.useState(ru);return b.useEffect(()=>{ru||(ru=!0,t(!0))},[]),e}var _x=b[" useSyncExternalStore ".trim().toString()];function MP(){return()=>{}}function AP(){return _x(MP,()=>!0,()=>!1)}var NP=typeof _x=="function"?AP:OP,FP=Object.defineProperty,vo=(e,t)=>FP(e,"name",{value:t,configurable:!0}),su="rovingFocusGroup.onEntryFocus",$P={bubbles:!1,cancelable:!0},za="RovingFocusGroup",[au,Tx,LP]=fx(za),[RP,Ba]=It(za,[LP]),[zP,BP]=RP(za),HP=b.forwardRef(vo(function(t,n){return h.jsx(au.Provider,{scope:t.__scopeRovingFocusGroup,children:h.jsx(au.Slot,{scope:t.__scopeRovingFocusGroup,children:h.jsx(VP,{...t,ref:n})})})},"RovingFocusGroup")),VP=b.forwardRef(vo(function(t,n){const{__scopeRovingFocusGroup:o,orientation:r,loop:s=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,p=b.useRef(null),x=Me(n,p),m=$a(a),[v,y]=zt({prop:i,defaultProp:l??null,onChange:c,caller:za}),[w,C]=b.useState(!1),T=ho(u),S=Tx(o),_=b.useRef(!1),[E,P]=b.useState(0);return b.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(su,T),()=>k.removeEventListener(su,T)},[T]),h.jsx(zP,{scope:o,orientation:r,dir:m,loop:s,currentTabStopId:v,onItemFocus:b.useCallback(k=>y(k),[y]),onItemShiftTab:b.useCallback(()=>C(!0),[]),onFocusableItemAdd:b.useCallback(()=>P(k=>k+1),[]),onFocusableItemRemove:b.useCallback(()=>P(k=>k-1),[]),children:h.jsx(ge.div,{tabIndex:w||E===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...t.style},onMouseDown:ye(t.onMouseDown,()=>{_.current=!0}),onFocus:ye(t.onFocus,k=>{const A=!_.current;if(k.target===k.currentTarget&&A&&!w){const F=new CustomEvent(su,$P);if(k.currentTarget.dispatchEvent(F),!F.defaultPrevented){const O=S().filter(J=>J.focusable),G=O.find(J=>J.active),$=O.find(J=>J.id===v),Z=[G,$,...O].filter(Boolean).map(J=>J.ref.current);iu(Z,d)}}_.current=!1}),onBlur:ye(t.onBlur,()=>C(!1))})})},"RovingFocusGroupImpl")),WP="RovingFocusGroupItem",GP=b.forwardRef(vo(function(t,n){const{__scopeRovingFocusGroup:o,focusable:r=!0,active:s=!1,tabStopId:a,children:i,...l}=t,c=ct(),u=a||c,d=BP(WP,o),f=d.currentTabStopId===u,p=Tx(o),{onFocusableItemAdd:x,onFocusableItemRemove:m,currentTabStopId:v}=d,y=NP();return lt(()=>{if(!(!y||!r))return x(),()=>m()},[y,r,x,m]),b.useEffect(()=>{if(!(y||!r))return x(),()=>m()},[y,r,x,m]),h.jsx(au.ItemSlot,{scope:o,id:u,focusable:r,active:s,children:h.jsx(ge.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:ye(t.onMouseDown,w=>{r?d.onItemFocus(u):w.preventDefault()}),onFocus:ye(t.onFocus,()=>d.onItemFocus(u)),onKeyDown:ye(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const C=Px(w,d.orientation,d.dir);if(C!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let S=p().filter(_=>_.focusable).map(_=>_.ref.current);if(C==="last")S.reverse();else if(C==="prev"||C==="next"){C==="prev"&&S.reverse();const _=S.indexOf(w.currentTarget);S=d.loop?kx(S,_+1):S.slice(_+1)}setTimeout(()=>iu(S))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:v!=null}):i})})},"RovingFocusGroupItem")),jP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ex(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}vo(Ex,"getDirectionAwareKey");function Px(e,t,n){const o=Ex(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return jP[o]}vo(Px,"getFocusIntent");function iu(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}vo(iu,"focusFirst");function kx(e,t){return e.map((n,o)=>e[(t+o)%e.length])}vo(kx,"wrapArray");var Ix=HP,Dx=GP,qP=Object.defineProperty,er=(e,t)=>qP(e,"name",{value:t,configurable:!0}),lu="Tabs",[YP]=It(lu,[Ba]),Ox=Ba(),[UP,cu]=YP(lu),KP=b.forwardRef(er(function(t,n){const{__scopeTabs:o,value:r,onValueChange:s,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=t,d=$a(l),[f,p]=zt({prop:r,onChange:s,defaultProp:a??"",caller:lu});return h.jsx(UP,{scope:o,baseId:ct(),value:f,onValueChange:p,orientation:i,dir:d,activationMode:c,children:h.jsx(ge.div,{dir:d,"data-orientation":i,...u,ref:n})})},"Tabs")),XP="TabsList",ZP=b.forwardRef(er(function(t,n){const{__scopeTabs:o,loop:r=!0,...s}=t,a=cu(XP,o),i=Ox(o);return h.jsx(Ix,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:h.jsx(ge.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:n})})},"TabsList")),JP="TabsTrigger",QP=b.forwardRef(er(function(t,n){const{__scopeTabs:o,value:r,disabled:s=!1,...a}=t,i=cu(JP,o),l=Ox(o),c=uu(i.baseId,r),u=du(i.baseId,r),d=r===i.value;return h.jsx(Dx,{asChild:!0,...l,focusable:!s,active:d,children:h.jsx(ge.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...a,ref:n,onMouseDown:ye(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ye(t.onKeyDown,f=>{s||f.target!==f.currentTarget||[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ye(t.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})},"TabsTrigger")),ek="TabsContent",tk=b.forwardRef(er(function(t,n){const{__scopeTabs:o,value:r,forceMount:s,children:a,...i}=t,l=cu(ek,o),c=uu(l.baseId,r),u=du(l.baseId,r),d=r===l.value,f=b.useRef(d);return b.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),h.jsx(Bt,{present:s||d,children:({present:p})=>h.jsx(ge.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0},children:p&&a})})},"TabsContent"));function uu(e,t){return`${e}-trigger-${t}`}er(uu,"makeTriggerId");function du(e,t){return`${e}-content-${t}`}er(du,"makeContentId");var nk=KP,ok=ZP,rk=QP,sk=tk;const ak={oxToggleTabs:"_oxToggleTabs_1grj2_2"},Mx=g.forwardRef(({className:e,orientation:t="horizontal",dataTestid:n,...o},r)=>h.jsx(nk,{ref:r,"data-slot":"toggle-tabs","data-testid":n,orientation:t,className:H(ak.oxToggleTabs,e),...o}));Mx.displayName="OxToggleTabs";const Ax={oxToggleTabsList:"_oxToggleTabsList_1v2hd_2",oxToggleTabsPill:"_oxToggleTabsPill_1v2hd_2"},Nx='[data-slot="toggle-tabs-trigger"]',ik=`${Nx}[data-state="active"]`,lk='[data-slot="toggle-tabs-pill"]';function ck(e){g.useEffect(()=>{const t=e.current;if(!t)return;let n=null,o=null,r=0;const s=l=>{l.dataset.ready==="true"||r!==0||(r=requestAnimationFrame(()=>{r=0,l.dataset.ready="true"}))},a=()=>{const l=t.querySelector(lk);if(!l)return;const c=t.querySelector(ik);if(!c){l.removeAttribute("data-ready");return}const u=c.getBoundingClientRect();if(u.width===0&&u.height===0)return;const d=t.getBoundingClientRect(),f=u.left-d.left-t.clientLeft,p=u.top-d.top-t.clientTop;t.style.setProperty("--toggle-tabs-pill-x",`${f}px`),t.style.setProperty("--toggle-tabs-pill-y",`${p}px`),t.style.setProperty("--toggle-tabs-pill-width",`${u.width}px`),t.style.setProperty("--toggle-tabs-pill-height",`${u.height}px`),s(l)},i=()=>{if(n){n.disconnect(),n.observe(t);for(const l of t.querySelectorAll(Nx))n.observe(l)}};return a(),typeof ResizeObserver<"u"&&(n=new ResizeObserver(a),i()),typeof MutationObserver<"u"&&(o=new MutationObserver(()=>{i(),a()}),o.observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["data-state"]})),()=>{n==null||n.disconnect(),n=null,o==null||o.disconnect(),o=null,r!==0&&cancelAnimationFrame(r),r=0}},[e])}const Fx=g.forwardRef(({className:e,loop:t=!0,children:n,...o},r)=>{const s=g.useRef(null);ck(s);const a=g.useCallback(i=>{s.current=i,typeof r=="function"?r(i):r&&(r.current=i)},[r]);return h.jsxs(ok,{ref:a,"data-slot":"toggle-tabs-list",loop:t,className:H(Ax.oxToggleTabsList,e),...o,children:[h.jsx("span",{className:Ax.oxToggleTabsPill,"data-slot":"toggle-tabs-pill","aria-hidden":"true"}),n]})});Fx.displayName="OxToggleTabsList";const uk={oxToggleTabsTrigger:"_oxToggleTabsTrigger_17bwr_2"},$x=g.forwardRef(({className:e,...t},n)=>h.jsx(rk,{ref:n,"data-slot":"toggle-tabs-trigger",className:H(uk.oxToggleTabsTrigger,e),...t}));$x.displayName="OxToggleTabsTrigger";const dk={oxToggleTabsContent:"_oxToggleTabsContent_1uvag_2"},Lx=g.forwardRef(({className:e,...t},n)=>h.jsx(sk,{ref:n,"data-slot":"toggle-tabs-content",className:H(dk.oxToggleTabsContent,e),...t}));Lx.displayName="OxToggleTabsContent";const fu={oxPageControl:"_oxPageControl_1086x_2",oxPageControlDot:"_oxPageControlDot_1086x_2",oxPageControlLabel:"_oxPageControlLabel_1086x_2"},Rx=g.forwardRef(({className:e,count:t,index:n=0,interactive:o=!1,onIndexChange:r,dataTestid:s,...a},i)=>{const l=Math.min(Math.max(0,Math.trunc(n)),Math.max(0,t-1));return h.jsx("div",{ref:i,"data-slot":"page-control","data-testid":s,className:H(fu.oxPageControl,e),...a,children:zx(t,l).map(c=>{const u={className:fu.oxPageControlDot,"data-size":c.size,"data-active":c.index===l,"data-testid":`${s}-dot-${c.index}`};return o?h.jsx("button",{type:"button","data-slot":"page-control-dot","aria-current":c.index===l?"page":void 0,onClick:()=>r==null?void 0:r(c.index),...u,children:h.jsx("span",{className:fu.oxPageControlLabel,children:c.index+1})},c.index):h.jsx("span",{"data-slot":"page-control-dot",...u},c.index)})})});Rx.displayName="OxPageControl";const bo=7,zx=(e,t)=>{const n=Math.max(0,Math.trunc(e));if(n===0)return[];if(n<=bo)return Array.from({length:n},(l,c)=>({index:c,size:"full"}));const o=Math.min(Math.max(0,Math.trunc(t)),n-1),r=Math.min(Math.max(0,o-Math.floor(bo/2)),n-bo),s=r>0,a=r+bo<n,i=bo-1;return Array.from({length:bo},(l,c)=>{let u="full";return s&&c===0?u="small":s&&c===1&&(u="medium"),a&&c===i?u="small":a&&c===i-1&&(u="medium"),{index:r+c,size:u}})},fk={oxBreadcrumb:"_oxBreadcrumb_1baee_2"},Bx=g.forwardRef(({className:e,...t},n)=>h.jsx("nav",{ref:n,"data-slot":"breadcrumb","aria-label":"breadcrumb",className:H(fk.oxBreadcrumb,e),...t}));Bx.displayName="OxBreadcrumb";const hk={oxBreadcrumbList:"_oxBreadcrumbList_1tsca_2"},Hx=g.forwardRef(({className:e,...t},n)=>h.jsx("ol",{ref:n,"data-slot":"breadcrumb-list",className:H(hk.oxBreadcrumbList,e),...t}));Hx.displayName="OxBreadcrumbList";const gk={oxBreadcrumbItem:"_oxBreadcrumbItem_67rk1_2"},Vx=g.forwardRef(({className:e,...t},n)=>h.jsx("li",{ref:n,"data-slot":"breadcrumb-item",className:H(gk.oxBreadcrumbItem,e),...t}));Vx.displayName="OxBreadcrumbItem";const Wx={oxBreadcrumbLink:"_oxBreadcrumbLink_sjo2m_2",oxBreadcrumbLinkCurrent:"_oxBreadcrumbLinkCurrent_sjo2m_2"},Gx=g.forwardRef(({className:e,asChild:t=!1,current:n=!1,href:o,...r},s)=>{const a=t?An:"a";return h.jsx(a,{ref:s,href:t?void 0:o,"data-slot":"breadcrumb-link",className:H(Wx.oxBreadcrumbLink,n&&Wx.oxBreadcrumbLinkCurrent,e),...r})});Gx.displayName="OxBreadcrumbLink";const pk={oxBreadcrumbPage:"_oxBreadcrumbPage_13kk4_2"},jx=g.forwardRef(({className:e,...t},n)=>h.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page","data-slot":"breadcrumb-page",className:H(pk.oxBreadcrumbPage,e),...t}));jx.displayName="OxBreadcrumbPage";const qx={oxBreadcrumbSeparator:"_oxBreadcrumbSeparator_10ov8_2",oxBreadcrumbSeparatorIcon:"_oxBreadcrumbSeparatorIcon_10ov8_2"},Yx=g.forwardRef(({className:e,children:t,dataTestid:n,...o},r)=>h.jsx("li",{ref:r,role:"presentation","aria-hidden":"true","data-slot":"breadcrumb-separator","data-testid":n,className:H(qx.oxBreadcrumbSeparator,e),...o,children:t??h.jsx("svg",{"data-testid":`${n}-icon`,className:qx.oxBreadcrumbSeparatorIcon,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"m9 18 6-6-6-6"})})}));Yx.displayName="OxBreadcrumbSeparator";const hu={oxBreadcrumbEllipsis:"_oxBreadcrumbEllipsis_cg9sx_2",oxBreadcrumbEllipsisIcon:"_oxBreadcrumbEllipsisIcon_cg9sx_2",oxSrOnly:"_oxSrOnly_cg9sx_2"},Ux=g.forwardRef(({className:e,children:t,dataTestid:n,...o},r)=>h.jsxs("span",{ref:r,role:"presentation","aria-hidden":"true","data-slot":"breadcrumb-ellipsis","data-testid":n,className:H(hu.oxBreadcrumbEllipsis,e),...o,children:[t??h.jsxs("svg",{"data-testid":`${n}-icon`,className:hu.oxBreadcrumbEllipsisIcon,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("circle",{cx:"12",cy:"12",r:"1"}),h.jsx("circle",{cx:"19",cy:"12",r:"1"}),h.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),h.jsx("span",{className:hu.oxSrOnly,children:"More"})]}));Ux.displayName="OxBreadcrumbEllipsis";const Kx={"ox-counter":"_ox-counter_42os2_2","ox-counter--over":"_ox-counter--over_42os2_2","ox-counter-value":"_ox-counter-value_42os2_2"},Xx=g.forwardRef(({className:e,value:t,max:n,dataTestid:o,...r},s)=>{const a=t>n?"over":"within";return h.jsxs("span",{ref:s,className:H(He(Kx,Zx({state:a})),e),"data-slot":"counter","data-testid":o,...r,children:[h.jsx("span",{className:Kx["ox-counter-value"],children:t}),"/",n]})});Xx.displayName="OxCounter";const Zx=qe("ox-counter",{variants:{state:{within:"ox-counter--within",over:"ox-counter--over"}},defaultVariants:{state:"within"}}),Jx=g.createContext(null);function Ha(){return g.useContext(Jx)??void 0}function Qx(e){return e.variant==="error"?!0:void 0}function ev(e){return e.hasMessage?e.messageId:void 0}function tv(e){const t=Ha(),n=t==null?void 0:t.register;return g.useEffect(()=>n==null?void 0:n(e),[n,e]),t}function Dt(e){const t=Ha(),n=g.useId(),o=t?e??n:e,r=t==null?void 0:t.claimControl;return g.useEffect(()=>{if(!(!r||o===void 0))return r(o)},[r,o]),t?{id:o,"aria-invalid":Qx(t),"aria-describedby":ev(t)}:{id:e}}function gu(){const e=Ha();return e?{"aria-labelledby":e.hasLabel?e.labelId:void 0,"aria-invalid":Qx(e),"aria-describedby":ev(e)}:{}}function mk(){const e=tv("label");return e?{id:e.labelId,htmlFor:e.controlId}:{}}function xk(){const e=tv("message");return{id:e==null?void 0:e.messageId,variant:e==null?void 0:e.variant}}function vk(e){const t=g.useId(),[n,o]=g.useState(0),[r,s]=g.useState(0),[a,i]=g.useState(void 0),l=g.useRef(!1),c=g.useCallback(d=>{const f=d==="label"?o:s;return f(p=>p+1),()=>f(p=>p-1)},[]),u=g.useCallback(d=>l.current?()=>{}:(l.current=!0,i(d),()=>{l.current=!1,i(void 0)}),[]);return g.useMemo(()=>({labelId:`${t}-label`,messageId:`${t}-message`,controlId:a,variant:e,hasLabel:n>0,hasMessage:r>0,register:c,claimControl:u}),[t,a,e,n,r,c,u])}const qr={oxFieldGroup:"_oxFieldGroup_l4i6z_2",oxFieldGroupError:"_oxFieldGroupError_l4i6z_2",oxFieldGroupWarning:"_oxFieldGroupWarning_l4i6z_2",oxFieldGroupSuccess:"_oxFieldGroupSuccess_l4i6z_2"},bk={default:qr.fieldGroupDefault,error:qr.oxFieldGroupError,success:qr.oxFieldGroupSuccess,warning:qr.oxFieldGroupWarning},nv=g.forwardRef(({className:e,variant:t="default",children:n,...o},r)=>{const s=vk(t);return h.jsx(Jx.Provider,{value:s,children:h.jsx("div",{ref:r,"data-slot":"field-group",className:H(qr.oxFieldGroup,bk[t],e),...o,children:n})})});nv.displayName="OxFieldGroup";const yk={oxFieldLabel:"_oxFieldLabel_1kql1_2"},ov=g.forwardRef(({className:e,children:t,...n},o)=>{const r=mk();return h.jsx("label",{ref:o,...r,"data-slot":"label",className:H(yk.oxFieldLabel,e),...n,children:t})});ov.displayName="OxFieldLabel";const Va={oxFieldMessage:"_oxFieldMessage_xoufj_2",oxFieldMessageError:"_oxFieldMessageError_xoufj_2",oxFieldMessageSuccess:"_oxFieldMessageSuccess_xoufj_2",oxFieldMessageWarning:"_oxFieldMessageWarning_xoufj_2"},Ck={default:void 0,error:Va.oxFieldMessageError,success:Va.oxFieldMessageSuccess,warning:Va.oxFieldMessageWarning},rv=g.forwardRef(({className:e,variant:t,children:n,...o},r)=>{const s=xk(),a=t??s.variant??"default";return h.jsx("div",{ref:r,id:s.id,"data-slot":"message",role:a==="error"?"alert":void 0,className:H(Va.oxFieldMessage,Ck[a],e),...o,children:n})});rv.displayName="OxFieldMessage";const wk={oxInputGroup:"_oxInputGroup_2wka9_2"},sv=g.forwardRef(({className:e,children:t,...n},o)=>h.jsx("span",{ref:o,"data-slot":"controller",className:H(wk.oxInputGroup,e),...n,children:t}));sv.displayName="OxInputGroup";const Yr={oxInput:"_oxInput_1db18_2"},tr={sm:"ox-input-sm",md:"ox-input-md",lg:"ox-input-lg"},av=g.forwardRef(({className:e,size:t="md",field:n,onFieldChange:o,value:r,onChange:s,type:a="text",id:i,...l},c)=>{const u=Dt(i),[d,f]=g.useState(n??""),[p,x]=g.useState(n),m=n!==void 0&&o!==void 0;!m&&n!==p&&(x(n),f(n??""));const v=m?n:r??d;return h.jsx("input",{ref:c,...u,type:a,"data-slot":"controller",className:H(Yr.oxInput,tr[t],e),value:v,onChange:y=>{m||f(y.target.value),o==null||o(y.target.value),s==null||s(y)},...l})});av.displayName="OxInputText";const Sk={oxInputNumber:"_oxInputNumber_1j8f7_2"},iv=g.createContext(null);function pu(){const e=g.useContext(iv);if(!e)throw new Error("InputNumber components must be used within <InputNumber>.");return e}function mu(e,t,n){let o=e;return t!==void 0&&(o=Math.max(o,t)),n!==void 0&&(o=Math.min(o,n)),o}const lv=g.forwardRef(({className:e,children:t,size:n="md",value:o,defaultValue:r=null,onValueChange:s,min:a,max:i,step:l=1,disabled:c=!1,...u},d)=>{const[f,p]=g.useState(r),x=o!==void 0,m=x?o:f,v=g.useCallback(k=>{x||p(k),s==null||s(k)},[x,s]),y=m??a??0,w=g.useCallback(()=>{c||v(mu(y+l,a,i))},[c,v,y,l,a,i]),C=g.useCallback(()=>{c||v(mu(y-l,a,i))},[c,v,y,l,a,i]),T=g.useCallback(k=>{if(k.trim()===""){v(null);return}const A=Number(k);Number.isNaN(A)||v(mu(A,a,i))},[v,a,i]),S=!c&&(i===void 0||(m??a??0)<i),_=!c&&(a===void 0||(m??a??0)>a),E=m==null?"":String(m),P=g.useMemo(()=>({value:m??null,setInputValue:T,increment:w,decrement:C,canIncrement:S,canDecrement:_,disabled:c,min:a,max:i,step:l,displayValue:E}),[m,T,w,C,S,_,c,a,i,l,E]);return h.jsx(iv.Provider,{value:P,children:h.jsx("div",{ref:d,role:"group","data-slot":"input-number",className:H(Sk.oxInputNumber,tr[n],e),...u,children:t})})});lv.displayName="OxInputNumber";const _k={oxInputNumberContent:"_oxInputNumberContent_1g6fq_2"},cv=g.forwardRef(({className:e,children:t,...n},o)=>h.jsx("div",{ref:o,"data-slot":"controller",className:H(_k.oxInputNumberContent,e),...n,children:t}));cv.displayName="OxInputNumberContent";const uv={oxNumberFieldStep:"_oxNumberFieldStep_p8m4h_2",oxStepIcon:"_oxStepIcon_p8m4h_2"},dv=g.forwardRef(({className:e,children:t,onClick:n,disabled:o,...r},s)=>{const{decrement:a,canDecrement:i,disabled:l}=pu(),c=o??(l||!i);return h.jsx("button",{ref:s,type:"button",tabIndex:-1,"data-slot":"decrement",disabled:c,className:H(uv.oxNumberFieldStep,e),onClick:u=>{a(),n==null||n(u)},...r,children:t??h.jsx(Ce,{icon:xo,className:uv.oxStepIcon})})});dv.displayName="OxInputNumberDecrement";const fv=`<svg width="1.2em" height="1.2em" stroke-color="currentColor" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
142
+ `,ou={oxAccordionHeader:"_oxAccordionHeader_1wlp1_2",oxAccordionTrigger:"_oxAccordionTrigger_1wlp1_2",oxAccordionChevron:"_oxAccordionChevron_1wlp1_2"},Cx=g.forwardRef(({className:e,children:t,...n},o)=>h.jsx(EP,{className:ou.oxAccordionHeader,children:h.jsxs(PP,{ref:o,"data-slot":"accordion-trigger",className:H(ou.oxAccordionTrigger,e),...n,children:[t,h.jsx(Ce,{icon:xo,className:ou.oxAccordionChevron})]})}));Cx.displayName="OxAccordionTrigger";const wx={oxAccordionContent:"_oxAccordionContent_e3t2z_2",oxAccordionContentInner:"_oxAccordionContentInner_e3t2z_2"},Sx=g.forwardRef(({className:e,children:t,...n},o)=>h.jsx(kP,{ref:o,"data-slot":"accordion-content",className:H(wx.oxAccordionContent,e),...n,children:h.jsx("div",{className:wx.oxAccordionContentInner,children:t})}));Sx.displayName="OxAccordionContent";var ru=!1;function OP(){const[e,t]=b.useState(ru);return b.useEffect(()=>{ru||(ru=!0,t(!0))},[]),e}var _x=b[" useSyncExternalStore ".trim().toString()];function MP(){return()=>{}}function AP(){return _x(MP,()=>!0,()=>!1)}var NP=typeof _x=="function"?AP:OP,FP=Object.defineProperty,vo=(e,t)=>FP(e,"name",{value:t,configurable:!0}),su="rovingFocusGroup.onEntryFocus",$P={bubbles:!1,cancelable:!0},za="RovingFocusGroup",[au,Tx,LP]=fx(za),[RP,Ba]=It(za,[LP]),[zP,BP]=RP(za),HP=b.forwardRef(vo(function(t,n){return h.jsx(au.Provider,{scope:t.__scopeRovingFocusGroup,children:h.jsx(au.Slot,{scope:t.__scopeRovingFocusGroup,children:h.jsx(VP,{...t,ref:n})})})},"RovingFocusGroup")),VP=b.forwardRef(vo(function(t,n){const{__scopeRovingFocusGroup:o,orientation:r,loop:s=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,p=b.useRef(null),x=Me(n,p),m=$a(a),[v,y]=zt({prop:i,defaultProp:l??null,onChange:c,caller:za}),[w,C]=b.useState(!1),T=ho(u),S=Tx(o),_=b.useRef(!1),[E,P]=b.useState(0);return b.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(su,T),()=>k.removeEventListener(su,T)},[T]),h.jsx(zP,{scope:o,orientation:r,dir:m,loop:s,currentTabStopId:v,onItemFocus:b.useCallback(k=>y(k),[y]),onItemShiftTab:b.useCallback(()=>C(!0),[]),onFocusableItemAdd:b.useCallback(()=>P(k=>k+1),[]),onFocusableItemRemove:b.useCallback(()=>P(k=>k-1),[]),children:h.jsx(ge.div,{tabIndex:w||E===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...t.style},onMouseDown:ye(t.onMouseDown,()=>{_.current=!0}),onFocus:ye(t.onFocus,k=>{const A=!_.current;if(k.target===k.currentTarget&&A&&!w){const F=new CustomEvent(su,$P);if(k.currentTarget.dispatchEvent(F),!F.defaultPrevented){const O=S().filter(J=>J.focusable),G=O.find(J=>J.active),$=O.find(J=>J.id===v),Z=[G,$,...O].filter(Boolean).map(J=>J.ref.current);iu(Z,d)}}_.current=!1}),onBlur:ye(t.onBlur,()=>C(!1))})})},"RovingFocusGroupImpl")),WP="RovingFocusGroupItem",GP=b.forwardRef(vo(function(t,n){const{__scopeRovingFocusGroup:o,focusable:r=!0,active:s=!1,tabStopId:a,children:i,...l}=t,c=ct(),u=a||c,d=BP(WP,o),f=d.currentTabStopId===u,p=Tx(o),{onFocusableItemAdd:x,onFocusableItemRemove:m,currentTabStopId:v}=d,y=NP();return lt(()=>{if(!(!y||!r))return x(),()=>m()},[y,r,x,m]),b.useEffect(()=>{if(!(y||!r))return x(),()=>m()},[y,r,x,m]),h.jsx(au.ItemSlot,{scope:o,id:u,focusable:r,active:s,children:h.jsx(ge.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:ye(t.onMouseDown,w=>{r?d.onItemFocus(u):w.preventDefault()}),onFocus:ye(t.onFocus,()=>d.onItemFocus(u)),onKeyDown:ye(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const C=Px(w,d.orientation,d.dir);if(C!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let S=p().filter(_=>_.focusable).map(_=>_.ref.current);if(C==="last")S.reverse();else if(C==="prev"||C==="next"){C==="prev"&&S.reverse();const _=S.indexOf(w.currentTarget);S=d.loop?kx(S,_+1):S.slice(_+1)}setTimeout(()=>iu(S))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:v!=null}):i})})},"RovingFocusGroupItem")),jP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ex(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}vo(Ex,"getDirectionAwareKey");function Px(e,t,n){const o=Ex(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return jP[o]}vo(Px,"getFocusIntent");function iu(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}vo(iu,"focusFirst");function kx(e,t){return e.map((n,o)=>e[(t+o)%e.length])}vo(kx,"wrapArray");var Ix=HP,Dx=GP,qP=Object.defineProperty,er=(e,t)=>qP(e,"name",{value:t,configurable:!0}),lu="Tabs",[YP]=It(lu,[Ba]),Ox=Ba(),[UP,cu]=YP(lu),KP=b.forwardRef(er(function(t,n){const{__scopeTabs:o,value:r,onValueChange:s,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=t,d=$a(l),[f,p]=zt({prop:r,onChange:s,defaultProp:a??"",caller:lu});return h.jsx(UP,{scope:o,baseId:ct(),value:f,onValueChange:p,orientation:i,dir:d,activationMode:c,children:h.jsx(ge.div,{dir:d,"data-orientation":i,...u,ref:n})})},"Tabs")),XP="TabsList",ZP=b.forwardRef(er(function(t,n){const{__scopeTabs:o,loop:r=!0,...s}=t,a=cu(XP,o),i=Ox(o);return h.jsx(Ix,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:h.jsx(ge.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:n})})},"TabsList")),JP="TabsTrigger",QP=b.forwardRef(er(function(t,n){const{__scopeTabs:o,value:r,disabled:s=!1,...a}=t,i=cu(JP,o),l=Ox(o),c=uu(i.baseId,r),u=du(i.baseId,r),d=r===i.value;return h.jsx(Dx,{asChild:!0,...l,focusable:!s,active:d,children:h.jsx(ge.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...a,ref:n,onMouseDown:ye(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ye(t.onKeyDown,f=>{s||f.target!==f.currentTarget||[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ye(t.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})},"TabsTrigger")),ek="TabsContent",tk=b.forwardRef(er(function(t,n){const{__scopeTabs:o,value:r,forceMount:s,children:a,...i}=t,l=cu(ek,o),c=uu(l.baseId,r),u=du(l.baseId,r),d=r===l.value,f=b.useRef(d);return b.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),h.jsx(Bt,{present:s||d,children:({present:p})=>h.jsx(ge.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0},children:p&&a})})},"TabsContent"));function uu(e,t){return`${e}-trigger-${t}`}er(uu,"makeTriggerId");function du(e,t){return`${e}-content-${t}`}er(du,"makeContentId");var nk=KP,ok=ZP,rk=QP,sk=tk;const ak={oxToggleTabs:"_oxToggleTabs_1grj2_2"},Mx=g.forwardRef(({className:e,orientation:t="horizontal",dataTestid:n,...o},r)=>h.jsx(nk,{ref:r,"data-slot":"toggle-tabs","data-testid":n,orientation:t,className:H(ak.oxToggleTabs,e),...o}));Mx.displayName="OxToggleTabs";const Ax={oxToggleTabsList:"_oxToggleTabsList_107ul_2",oxToggleTabsPill:"_oxToggleTabsPill_107ul_2"},Nx='[data-slot="toggle-tabs-trigger"]',ik=`${Nx}[data-state="active"]`,lk='[data-slot="toggle-tabs-pill"]';function ck(e){g.useEffect(()=>{const t=e.current;if(!t)return;let n=null,o=null,r=0;const s=l=>{l.dataset.ready==="true"||r!==0||(r=requestAnimationFrame(()=>{r=0,l.dataset.ready="true"}))},a=()=>{const l=t.querySelector(lk);if(!l)return;const c=t.querySelector(ik);if(!c){l.removeAttribute("data-ready");return}const u=c.getBoundingClientRect();if(u.width===0&&u.height===0)return;const d=t.getBoundingClientRect(),f=u.left-d.left-t.clientLeft,p=u.top-d.top-t.clientTop;t.style.setProperty("--toggle-tabs-pill-x",`${f}px`),t.style.setProperty("--toggle-tabs-pill-y",`${p}px`),t.style.setProperty("--toggle-tabs-pill-width",`${u.width}px`),t.style.setProperty("--toggle-tabs-pill-height",`${u.height}px`),s(l)},i=()=>{if(n){n.disconnect(),n.observe(t);for(const l of t.querySelectorAll(Nx))n.observe(l)}};return a(),typeof ResizeObserver<"u"&&(n=new ResizeObserver(a),i()),typeof MutationObserver<"u"&&(o=new MutationObserver(()=>{i(),a()}),o.observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["data-state"]})),()=>{n==null||n.disconnect(),n=null,o==null||o.disconnect(),o=null,r!==0&&cancelAnimationFrame(r),r=0}},[e])}const Fx=g.forwardRef(({className:e,loop:t=!0,children:n,...o},r)=>{const s=g.useRef(null);ck(s);const a=g.useCallback(i=>{s.current=i,typeof r=="function"?r(i):r&&(r.current=i)},[r]);return h.jsxs(ok,{ref:a,"data-slot":"toggle-tabs-list",loop:t,className:H(Ax.oxToggleTabsList,e),...o,children:[h.jsx("span",{className:Ax.oxToggleTabsPill,"data-slot":"toggle-tabs-pill","aria-hidden":"true"}),n]})});Fx.displayName="OxToggleTabsList";const uk={oxToggleTabsTrigger:"_oxToggleTabsTrigger_fev5q_2"},$x=g.forwardRef(({className:e,...t},n)=>h.jsx(rk,{ref:n,"data-slot":"toggle-tabs-trigger",className:H(uk.oxToggleTabsTrigger,e),...t}));$x.displayName="OxToggleTabsTrigger";const dk={oxToggleTabsContent:"_oxToggleTabsContent_1uvag_2"},Lx=g.forwardRef(({className:e,...t},n)=>h.jsx(sk,{ref:n,"data-slot":"toggle-tabs-content",className:H(dk.oxToggleTabsContent,e),...t}));Lx.displayName="OxToggleTabsContent";const fu={oxPageControl:"_oxPageControl_1086x_2",oxPageControlDot:"_oxPageControlDot_1086x_2",oxPageControlLabel:"_oxPageControlLabel_1086x_2"},Rx=g.forwardRef(({className:e,count:t,index:n=0,interactive:o=!1,onIndexChange:r,dataTestid:s,...a},i)=>{const l=Math.min(Math.max(0,Math.trunc(n)),Math.max(0,t-1));return h.jsx("div",{ref:i,"data-slot":"page-control","data-testid":s,className:H(fu.oxPageControl,e),...a,children:zx(t,l).map(c=>{const u={className:fu.oxPageControlDot,"data-size":c.size,"data-active":c.index===l,"data-testid":`${s}-dot-${c.index}`};return o?h.jsx("button",{type:"button","data-slot":"page-control-dot","aria-current":c.index===l?"page":void 0,onClick:()=>r==null?void 0:r(c.index),...u,children:h.jsx("span",{className:fu.oxPageControlLabel,children:c.index+1})},c.index):h.jsx("span",{"data-slot":"page-control-dot",...u},c.index)})})});Rx.displayName="OxPageControl";const bo=7,zx=(e,t)=>{const n=Math.max(0,Math.trunc(e));if(n===0)return[];if(n<=bo)return Array.from({length:n},(l,c)=>({index:c,size:"full"}));const o=Math.min(Math.max(0,Math.trunc(t)),n-1),r=Math.min(Math.max(0,o-Math.floor(bo/2)),n-bo),s=r>0,a=r+bo<n,i=bo-1;return Array.from({length:bo},(l,c)=>{let u="full";return s&&c===0?u="small":s&&c===1&&(u="medium"),a&&c===i?u="small":a&&c===i-1&&(u="medium"),{index:r+c,size:u}})},fk={oxBreadcrumb:"_oxBreadcrumb_1baee_2"},Bx=g.forwardRef(({className:e,...t},n)=>h.jsx("nav",{ref:n,"data-slot":"breadcrumb","aria-label":"breadcrumb",className:H(fk.oxBreadcrumb,e),...t}));Bx.displayName="OxBreadcrumb";const hk={oxBreadcrumbList:"_oxBreadcrumbList_1tsca_2"},Hx=g.forwardRef(({className:e,...t},n)=>h.jsx("ol",{ref:n,"data-slot":"breadcrumb-list",className:H(hk.oxBreadcrumbList,e),...t}));Hx.displayName="OxBreadcrumbList";const gk={oxBreadcrumbItem:"_oxBreadcrumbItem_67rk1_2"},Vx=g.forwardRef(({className:e,...t},n)=>h.jsx("li",{ref:n,"data-slot":"breadcrumb-item",className:H(gk.oxBreadcrumbItem,e),...t}));Vx.displayName="OxBreadcrumbItem";const Wx={oxBreadcrumbLink:"_oxBreadcrumbLink_sjo2m_2",oxBreadcrumbLinkCurrent:"_oxBreadcrumbLinkCurrent_sjo2m_2"},Gx=g.forwardRef(({className:e,asChild:t=!1,current:n=!1,href:o,...r},s)=>{const a=t?An:"a";return h.jsx(a,{ref:s,href:t?void 0:o,"data-slot":"breadcrumb-link",className:H(Wx.oxBreadcrumbLink,n&&Wx.oxBreadcrumbLinkCurrent,e),...r})});Gx.displayName="OxBreadcrumbLink";const pk={oxBreadcrumbPage:"_oxBreadcrumbPage_13kk4_2"},jx=g.forwardRef(({className:e,...t},n)=>h.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page","data-slot":"breadcrumb-page",className:H(pk.oxBreadcrumbPage,e),...t}));jx.displayName="OxBreadcrumbPage";const qx={oxBreadcrumbSeparator:"_oxBreadcrumbSeparator_10ov8_2",oxBreadcrumbSeparatorIcon:"_oxBreadcrumbSeparatorIcon_10ov8_2"},Yx=g.forwardRef(({className:e,children:t,dataTestid:n,...o},r)=>h.jsx("li",{ref:r,role:"presentation","aria-hidden":"true","data-slot":"breadcrumb-separator","data-testid":n,className:H(qx.oxBreadcrumbSeparator,e),...o,children:t??h.jsx("svg",{"data-testid":`${n}-icon`,className:qx.oxBreadcrumbSeparatorIcon,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"m9 18 6-6-6-6"})})}));Yx.displayName="OxBreadcrumbSeparator";const hu={oxBreadcrumbEllipsis:"_oxBreadcrumbEllipsis_cg9sx_2",oxBreadcrumbEllipsisIcon:"_oxBreadcrumbEllipsisIcon_cg9sx_2",oxSrOnly:"_oxSrOnly_cg9sx_2"},Ux=g.forwardRef(({className:e,children:t,dataTestid:n,...o},r)=>h.jsxs("span",{ref:r,role:"presentation","aria-hidden":"true","data-slot":"breadcrumb-ellipsis","data-testid":n,className:H(hu.oxBreadcrumbEllipsis,e),...o,children:[t??h.jsxs("svg",{"data-testid":`${n}-icon`,className:hu.oxBreadcrumbEllipsisIcon,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("circle",{cx:"12",cy:"12",r:"1"}),h.jsx("circle",{cx:"19",cy:"12",r:"1"}),h.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),h.jsx("span",{className:hu.oxSrOnly,children:"More"})]}));Ux.displayName="OxBreadcrumbEllipsis";const Kx={"ox-counter":"_ox-counter_42os2_2","ox-counter--over":"_ox-counter--over_42os2_2","ox-counter-value":"_ox-counter-value_42os2_2"},Xx=g.forwardRef(({className:e,value:t,max:n,dataTestid:o,...r},s)=>{const a=t>n?"over":"within";return h.jsxs("span",{ref:s,className:H(He(Kx,Zx({state:a})),e),"data-slot":"counter","data-testid":o,...r,children:[h.jsx("span",{className:Kx["ox-counter-value"],children:t}),"/",n]})});Xx.displayName="OxCounter";const Zx=qe("ox-counter",{variants:{state:{within:"ox-counter--within",over:"ox-counter--over"}},defaultVariants:{state:"within"}}),Jx=g.createContext(null);function Ha(){return g.useContext(Jx)??void 0}function Qx(e){return e.variant==="error"?!0:void 0}function ev(e){return e.hasMessage?e.messageId:void 0}function tv(e){const t=Ha(),n=t==null?void 0:t.register;return g.useEffect(()=>n==null?void 0:n(e),[n,e]),t}function Dt(e){const t=Ha(),n=g.useId(),o=t?e??n:e,r=t==null?void 0:t.claimControl;return g.useEffect(()=>{if(!(!r||o===void 0))return r(o)},[r,o]),t?{id:o,"aria-invalid":Qx(t),"aria-describedby":ev(t)}:{id:e}}function gu(){const e=Ha();return e?{"aria-labelledby":e.hasLabel?e.labelId:void 0,"aria-invalid":Qx(e),"aria-describedby":ev(e)}:{}}function mk(){const e=tv("label");return e?{id:e.labelId,htmlFor:e.controlId}:{}}function xk(){const e=tv("message");return{id:e==null?void 0:e.messageId,variant:e==null?void 0:e.variant}}function vk(e){const t=g.useId(),[n,o]=g.useState(0),[r,s]=g.useState(0),[a,i]=g.useState(void 0),l=g.useRef(!1),c=g.useCallback(d=>{const f=d==="label"?o:s;return f(p=>p+1),()=>f(p=>p-1)},[]),u=g.useCallback(d=>l.current?()=>{}:(l.current=!0,i(d),()=>{l.current=!1,i(void 0)}),[]);return g.useMemo(()=>({labelId:`${t}-label`,messageId:`${t}-message`,controlId:a,variant:e,hasLabel:n>0,hasMessage:r>0,register:c,claimControl:u}),[t,a,e,n,r,c,u])}const qr={oxFieldGroup:"_oxFieldGroup_l4i6z_2",oxFieldGroupError:"_oxFieldGroupError_l4i6z_2",oxFieldGroupWarning:"_oxFieldGroupWarning_l4i6z_2",oxFieldGroupSuccess:"_oxFieldGroupSuccess_l4i6z_2"},bk={default:qr.fieldGroupDefault,error:qr.oxFieldGroupError,success:qr.oxFieldGroupSuccess,warning:qr.oxFieldGroupWarning},nv=g.forwardRef(({className:e,variant:t="default",children:n,...o},r)=>{const s=vk(t);return h.jsx(Jx.Provider,{value:s,children:h.jsx("div",{ref:r,"data-slot":"field-group",className:H(qr.oxFieldGroup,bk[t],e),...o,children:n})})});nv.displayName="OxFieldGroup";const yk={oxFieldLabel:"_oxFieldLabel_1kql1_2"},ov=g.forwardRef(({className:e,children:t,...n},o)=>{const r=mk();return h.jsx("label",{ref:o,...r,"data-slot":"label",className:H(yk.oxFieldLabel,e),...n,children:t})});ov.displayName="OxFieldLabel";const Va={oxFieldMessage:"_oxFieldMessage_xoufj_2",oxFieldMessageError:"_oxFieldMessageError_xoufj_2",oxFieldMessageSuccess:"_oxFieldMessageSuccess_xoufj_2",oxFieldMessageWarning:"_oxFieldMessageWarning_xoufj_2"},Ck={default:void 0,error:Va.oxFieldMessageError,success:Va.oxFieldMessageSuccess,warning:Va.oxFieldMessageWarning},rv=g.forwardRef(({className:e,variant:t,children:n,...o},r)=>{const s=xk(),a=t??s.variant??"default";return h.jsx("div",{ref:r,id:s.id,"data-slot":"message",role:a==="error"?"alert":void 0,className:H(Va.oxFieldMessage,Ck[a],e),...o,children:n})});rv.displayName="OxFieldMessage";const wk={oxInputGroup:"_oxInputGroup_2wka9_2"},sv=g.forwardRef(({className:e,children:t,...n},o)=>h.jsx("span",{ref:o,"data-slot":"controller",className:H(wk.oxInputGroup,e),...n,children:t}));sv.displayName="OxInputGroup";const Yr={oxInput:"_oxInput_1db18_2"},tr={sm:"ox-input-sm",md:"ox-input-md",lg:"ox-input-lg"},av=g.forwardRef(({className:e,size:t="md",field:n,onFieldChange:o,value:r,onChange:s,type:a="text",id:i,...l},c)=>{const u=Dt(i),[d,f]=g.useState(n??""),[p,x]=g.useState(n),m=n!==void 0&&o!==void 0;!m&&n!==p&&(x(n),f(n??""));const v=m?n:r??d;return h.jsx("input",{ref:c,...u,type:a,"data-slot":"controller",className:H(Yr.oxInput,tr[t],e),value:v,onChange:y=>{m||f(y.target.value),o==null||o(y.target.value),s==null||s(y)},...l})});av.displayName="OxInputText";const Sk={oxInputNumber:"_oxInputNumber_1j8f7_2"},iv=g.createContext(null);function pu(){const e=g.useContext(iv);if(!e)throw new Error("InputNumber components must be used within <InputNumber>.");return e}function mu(e,t,n){let o=e;return t!==void 0&&(o=Math.max(o,t)),n!==void 0&&(o=Math.min(o,n)),o}const lv=g.forwardRef(({className:e,children:t,size:n="md",value:o,defaultValue:r=null,onValueChange:s,min:a,max:i,step:l=1,disabled:c=!1,...u},d)=>{const[f,p]=g.useState(r),x=o!==void 0,m=x?o:f,v=g.useCallback(k=>{x||p(k),s==null||s(k)},[x,s]),y=m??a??0,w=g.useCallback(()=>{c||v(mu(y+l,a,i))},[c,v,y,l,a,i]),C=g.useCallback(()=>{c||v(mu(y-l,a,i))},[c,v,y,l,a,i]),T=g.useCallback(k=>{if(k.trim()===""){v(null);return}const A=Number(k);Number.isNaN(A)||v(mu(A,a,i))},[v,a,i]),S=!c&&(i===void 0||(m??a??0)<i),_=!c&&(a===void 0||(m??a??0)>a),E=m==null?"":String(m),P=g.useMemo(()=>({value:m??null,setInputValue:T,increment:w,decrement:C,canIncrement:S,canDecrement:_,disabled:c,min:a,max:i,step:l,displayValue:E}),[m,T,w,C,S,_,c,a,i,l,E]);return h.jsx(iv.Provider,{value:P,children:h.jsx("div",{ref:d,role:"group","data-slot":"input-number",className:H(Sk.oxInputNumber,tr[n],e),...u,children:t})})});lv.displayName="OxInputNumber";const _k={oxInputNumberContent:"_oxInputNumberContent_1g6fq_2"},cv=g.forwardRef(({className:e,children:t,...n},o)=>h.jsx("div",{ref:o,"data-slot":"controller",className:H(_k.oxInputNumberContent,e),...n,children:t}));cv.displayName="OxInputNumberContent";const uv={oxNumberFieldStep:"_oxNumberFieldStep_p8m4h_2",oxStepIcon:"_oxStepIcon_p8m4h_2"},dv=g.forwardRef(({className:e,children:t,onClick:n,disabled:o,...r},s)=>{const{decrement:a,canDecrement:i,disabled:l}=pu(),c=o??(l||!i);return h.jsx("button",{ref:s,type:"button",tabIndex:-1,"data-slot":"decrement",disabled:c,className:H(uv.oxNumberFieldStep,e),onClick:u=>{a(),n==null||n(u)},...r,children:t??h.jsx(Ce,{icon:xo,className:uv.oxStepIcon})})});dv.displayName="OxInputNumberDecrement";const fv=`<svg width="1.2em" height="1.2em" stroke-color="currentColor" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
143
143
  <g>
144
144
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m18 15-6-6-6 6"/>
145
145
  </g>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sesamehr/react-design-system",
3
- "version": "2.0.0-beta.21",
3
+ "version": "2.0.0-beta.23",
4
4
  "description": "Sesame HR React design system — components and design tokens",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,5 +1,24 @@
1
1
  @import './primitives-v3.css';
2
2
 
3
+ /*
4
+ * Shadows: there are none here, and that is the answer rather than an omission.
5
+ *
6
+ * The v3 file's `Shadow` collection is Tailwind's own scale, value for value —
7
+ * `2xs` `xs` `sm` `md` `lg` `xl` `2xl`, the same offsets, blurs, spreads and
8
+ * alphas. Figma splits the middle five into `/1` and `/2` because a variable
9
+ * there holds one shadow and Tailwind's are two layers; `md/1` + `md/2` *is*
10
+ * `shadow-md`. So `shadow-sm`, `shadow-md` and the rest already produce exactly
11
+ * what the design asks for, and declaring `--shadow-*` here would restate
12
+ * Tailwind rather than extend it.
13
+ *
14
+ * Reach for the utility. Write a literal only where a component uses one half
15
+ * of a step — `OxToggleTabs` takes `md/2` alone, which no utility spells — or
16
+ * where the shadow is not an elevation at all: `OxTable`'s pinned column casts
17
+ * `4px 0 …`, sideways, and `OxCard` uses the `md/1`+`lg/1` geometry at alpha
18
+ * 0.02/0.03 instead of 0.1 for its much fainter lift. Both are deliberate and
19
+ * say so where they are written.
20
+ */
21
+
3
22
  :root {
4
23
  --font-primary: var(--color-zinc-900);
5
24
  --font-secondary: var(--color-zinc-500);
@@ -69,7 +88,6 @@
69
88
  --accent: var(--color-zinc-100);
70
89
  --accent-foreground: var(--color-zinc-900);
71
90
 
72
-
73
91
  --success: var(--color-green-500);
74
92
  --success-foreground: var(--color-white);
75
93
  --warning: var(--color-amber-500);