1import{aY as ie,e as ce,aP as ft,aN as He,ak as Fe,r as B,D as ae,aA as Pe,C as de,o as V,w as W,k as G,q as C,ae as Te,Z as Ie,f as pt,ai as mt,c as we,b as Se,a as Re,L as vt}from"./BUUR9w5Q.js";import{u as Ce,a as ht}from"./aGDtOmxH.js";function gt(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}let Ee=null,Y=null;function yt(t,e){if(e){const n=(e&qe)!==0,a=(e&Ue)!==0,i=(e&Ye)!==0,o=(e&Je)!==0;if(n)return i?"se-resize":o?"ne-resize":"e-resize";if(a)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Oe(){Y!==null&&(document.head.removeChild(Y),Ee=null,Y=null)}function xe(t,e){const n=yt(t,e);Ee!==n&&(Ee=n,Y===null&&(Y=document.createElement("style"),document.head.appendChild(Y)),Y.innerHTML=`*{cursor: ${n}!important;}`)}function zt({defaultSize:t,dragState:e,layout:n,panelData:a,panelIndex:i,precision:o=3}){const l=n[i];let s;return l==null?s=t!==void 0?t.toPrecision(o):"1":a.length===1?s="1":s=l.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Ve(t){return t.type==="keydown"}function We(t){return t.type.startsWith("mouse")}function Ke(t){return t.type.startsWith("touch")}function he(t){if(We(t))return{x:t.clientX,y:t.clientY};if(Ke(t)){const e=t.touches[0];if(e&&e.clientX&&e.clientY)return{x:e.clientX,y:e.clientY}}return{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY}}function Xe(t,e){const n=t==="horizontal",{x:a,y:i}=he(e);return n?a:i}function St(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function x(t,e="Assertion failed!"){if(!t)throw console.error(e),new Error(e)}function xt(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:$e(t),b:$e(e)};let a;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),a=t;x(a);const i={a:Ne(De(n.a)),b:Ne(De(n.b))};if(i.a===i.b){const o=a.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let s=o.length;for(;s--;){const c=o[s];if(c===l.a)return 1;if(c===l.b)return-1}}return Math.sign(i.a-i.b)}const bt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function wt(t){const e=getComputedStyle(je(t)).display;return e==="flex"||e==="inline-flex"}function Et(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||wt(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||bt.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function De(t){let e=t.length;for(;e--;){const n=t[e];if(x(n),Et(n))return n}return null}function Ne(t){return t&&Number(getComputedStyle(t).zIndex)||0}function $e(t){const e=[];for(;t;)e.push(t),t=je(t);return e}function je(t){var e;return t.parentNode instanceof DocumentFragment&&((e=t.parentNode)==null?void 0:e.host)||t.parentNode}const qe=1,Ue=2,Ye=4,Je=8;function Pt(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const It=Pt()==="coarse",K=[];let ge=!1;const O=new Map,ye=new Map,se=new Set;function Ct(t,e,n,a,i){const{ownerDocument:o}=e,l={direction:n,element:e,hitAreaMargins:a,setResizeHandlerState:i},s=O.get(o)??0;return O.set(o,s+1),se.add(l),ve(),function(){ye.delete(t),se.delete(l);const f=O.get(o)??1;O.set(o,f-1),ve(),Oe(),f===1&&O.delete(o)}}function pe(t){const{target:e}=t,{x:n,y:a}=he(t);ge=!0,ke({target:e,x:n,y:a}),ve(),K.length>0&&(Le("down",t),t.preventDefault())}function F(t){const{x:e,y:n}=he(t);if(!ge){const{target:a}=t;ke({target:a,x:e,y:n})}Le("move",t),Ze(),K.length>0&&t.preventDefault()}function T(t){const{target:e}=t,{x:n,y:a}=he(t);ye.clear(),ge=!1,K.length>0&&t.preventDefault(),Le("up",t),ke({target:e,x:n,y:a}),Ze(),ve()}function ke({target:t,x:e,y:n}){K.splice(0);let a=null;t instanceof HTMLElement&&(a=t),se.forEach(i=>
1{const{element:o,hitAreaMargins:l}=i,s=o.getBoundingClientRect(),{bottom:c,left:f,right:h,top:u}=s,m=It?l.coarse:l.fine;if(e>=f-m&&e<=h+m&&n>=u-m&&n<=c+m){if(a!==null&&o!==a&&!o.contains(a)&&!a.contains(o)&&xt(a,o)>0){let g=a,w=!1;for(;g&&!g.contains(o);){if(St(g.getBoundingClientRect(),s)){w=!0;break}g=g.parentElement}if(w)return}K.push(i)}})}function be(t,e){ye.set(t,e)}function Ze(){let t=!1,e=!1;K.forEach(a=>{const{direction:i}=a;i.value==="horizontal"?t=!0:e=!0});let n=0;ye.forEach(a=>{n|=a}),t&&e?xe("intersection",n):t?xe("horizontal",n):e?xe("vertical",n):Oe()}function ve(){O.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",T),n.removeEventListener("mousedown",pe),n.removeEventListener("mouseleave",F),n.removeEventListener("mousemove",F),n.removeEventListener("touchmove",F),n.removeEventListener("touchstart",pe)}),window.removeEventListener("mouseup",T),window.removeEventListener("touchcancel",T),window.removeEventListener("touchend",T),se.size>0&&(ge?(K.length>0&&O.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",T),n.addEventListener("mouseleave",F),n.addEventListener("mousemove",F),n.addEventListener("touchmove",F,{passive:!1}))}),window.addEventListener("mouseup",T),window.addEventListener("touchcancel",T),window.addEventListener("touchend",T)):O.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("mousedown",pe),n.addEventListener("mousemove",F),n.addEventListener("touchmove",F,{passive:!1}),n.addEventListener("touchstart",pe))}))}function Le(t,e){se.forEach(n=>{const{setResizeHandlerState:a}=n,i=K.includes(n);a(t,i,e)})}const Ae=10;function re(t,e,n=Ae){t=Number.parseFloat(t.toFixed(n)),e=Number.parseFloat(e.toFixed(n));const a=t-e;return a===0?0:a>0?1:-1}function N(t,e,n){return re(t,e,n)===0}function Z({panelConstraints:t,panelIndex:e,size:n}){const a=t[e];x(a!=null);const{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:s=0}=a;if(re(n,s)<0)if(o){const c=(i+s)/2;re(n,c)<0?n=i:n=s}else n=s;return n=Math.min(l,n),n=Number.parseFloat(n.toFixed(Ae)),n}function me(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function oe({delta:t,layout:e,panelConstraints:n,pivotIndices:a,trigger:i}){if(N(t,0))return e;const o=[...e],[l,s]=a;x(l!=null),x(s!=null);let c=0;if(i==="keyboard"){{const h=t<0?s:l,u=n[h];if(x(u),u.collapsible){const m=e[h];x(m!=null);const v=n[h];x(v);const{collapsedSize:g=0,minSize:w=0}=v;if(N(m,g)){const d=w-m;re(d,Math.abs(t))>0&&(t=t<0?0-d:d)}}}{const h=t<0?l:s,u=n[h];x(u);const{collapsible:m}=u;if(m){const v=e[h];x(v!=null);const g=n[h];x(g);const{collapsedSize:w=0,minSize:d=0}=g;if(N(v,d)){const b=v-w;re(b,Math.abs(t))>0&&(t=t<0?0-b:b)}}}}{const h=t<0?1:-1;let u=t<0?s:l,m=0;for(;;){const g=e[u];x(g!=null);const d=Z({panelConstraints:n,panelIndex:u,size:100})-g;if(m+=d,u+=h,u<0||u>=n.length)break}const v=Math.min(Math.abs(t),Math.abs(m));t=t<0?0-v:v}{let u=t<0?l:s;for(;u>=0&&u<n.length;){const m=Math.abs(t)-Math.abs(c),v=e[u];x(v!=null);const g=v-m,w=Z({panelConstraints:n,panelIndex:u,size:g});if(!N(v,w)&&(c+=v-w,o[u]=w,c.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?u--:u++}}if(N(c,0))return e;{const h=t<0?s:l,u=e[h];x(u!=null);const m=u+c,v=Z({panelConstraints:n,panelIndex:h,size:m});if(o[h]=v,!N(v,m)){let g=m-v,d=t<0?s:l;for(;d>=0&&d<n.length;){const b=o[d];x(b!=null);const A=b+g,I=Z({panelConstraints:n,panelIndex:d,size:A});if(N(b,I)||(g-=I-b,o[d]=I),N(g,0))break;t>0?d--:d++}}}const f=o.reduce((h,u)=>u+h,0);return N(f,100)?o:e}const fe=typeof document<"u";function Qe(t,e=document){var a;if(!fe)return null;if(e instanceof HTMLElement&&((a=e==null?void 0:e.dataset)==null?void 0:a.panelGroupId)===t)return e;
1const n=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return n||null}function ze(t,e=document){if(!fe)return null;const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function et(t,e,n=document){return fe?ue(t,n).findIndex(o=>o.getAttribute("data-panel-resize-handle-id")===e)??null:null}function ue(t,e=document){return fe?Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`)):[]}function kt(t,e,n,a=document){var f,h;const i=ze(e,a),o=ue(t,a),l=i?o.indexOf(i):-1,s=((f=n[l])==null?void 0:f.id)??null,c=((h=n[l+1])==null?void 0:h.id)??null;return[s,c]}function Lt(t,e,n,a,i){const o=n==="horizontal",l=ze(e,i);x(l);const s=l.getAttribute("data-panel-group-id");x(s);const{initialCursorPosition:c}=a,f=Xe(n,t),h=Qe(s,i);x(h);const u=h.getBoundingClientRect(),m=o?u.width:u.height;return(f-c)/m*100}function At(t,e,n,a,i,o){if(Ve(t)){const l=n==="horizontal";let s=0;t.shiftKey?s=100:s=i??10;let c=0;switch(t.key){case"ArrowDown":c=l?0:s;break;case"ArrowLeft":c=l?-s:0;break;case"ArrowRight":c=l?s:0;break;case"ArrowUp":c=l?0:-s;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return a==null?0:Lt(t,e,n,a,o)}function _t({layout:t,panelsArray:e,pivotIndices:n}){let a=0,i=100,o=0,l=0;const s=n[0];x(s!=null),e.forEach((u,m)=>{const{constraints:v}=u,{maxSize:g=100,minSize:w=0}=v;m===s?(a=w,i=g):(o+=w,l+=g)});const c=Math.min(i,100-o),f=Math.max(a,100-l),h=t[s];return{valueMax:c,valueMin:f,valueNow:h}}function Mt({panelDataArray:t}){const e=Array(t.length),n=t.map(o=>o.constraints);let a=0,i=100;for(let o=0;o<t.length;o++){const l=n[o];x(l);const{defaultSize:s}=l;s!=null&&(a++,e[o]=s,i-=s)}for(let o=0;o<t.length;o++){const l=n[o];x(l);const{defaultSize:s}=l;if(s!=null)continue;const c=t.length-a,f=i/c;a++,e[o]=f,i-=f}return e}function ne(t,e,n){e.forEach((a,i)=>{const o=t[i];x(o);const{callbacks:l,constraints:s,id:c}=o,{collapsedSize:f=0,collapsible:h}=s,u=n[c];if(u==null||a!==u){n[c]=a;const{onCollapse:m,onExpand:v,onResize:g}=l;g&&g(a,u),h&&(m||v)&&(v&&(u==null||u===f)&&a!==f&&v(),m&&(u==null||u!==f)&&a===f&&m())}})}function Rt(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function tt(t,e,n){const a=et(t,e,n);return a!=null?[a,a+1]:[-1,-1]}function Dt({layout:t,panelConstraints:e}){const n=[...t],a=n.reduce((o,l)=>o+l,0);if(n.length!==e.length)throw new Error(`Invalid ${e.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!N(a,100)){console.warn(`WARNING: Invalid layout total size: ${n.map(o=>`${o}%`).join(", ")}. Layout normalization will be applied.`);for(let o=0;o<e.length;o++){const l=n[o];x(l!=null);const s=100/a*l;n[o]=s}}let i=0;for(let o=0;o<e.length;o++){const l=n[o];x(l!=null);const s=Z({panelConstraints:e,panelIndex:o,size:l});l!==s&&(i+=l-s,n[o]=s)}if(!N(i,0))for(let o=0;o<e.length;o++){const l=n[o];x(l!=null);const s=l+i,c=Z({panelConstraints:e,panelIndex:o,size:s});if(l!==c&&(i-=c-l,n[o]=c,N(i,0)))break}return n}function Be(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new TypeError("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function nt(t){return`reka:${t}`}function at(t){return t.map(e=>{const{constraints:n,id:a,idIsFromProps:i,order:o}=e;return i?a:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function ot(t,e){try{const n=nt(t),a=e.getItem(n);if(a){const i=JSON.parse(a);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Nt(t,e,n){const a=ot(t,n)??{},i=at(e);return a[i]??null}function $t(t,e,n,a,i){const o=nt(t),l=at(e),s=ot(t,i)??{};s[l]={expandToSizes:Object.fromEntries(n.entries()),layout:a};try{i.setItem(o,JSON.stringify(s))}catch(c){console.error(c)}}function Bt({eagerValuesRef:t,groupId:e,layout:n,panelDataArray:a,panelGroupElement:i,setLayout:o}){ie(l=>{const s=i.value;if(!s)return;const c=ue(e,s);for(let f=0;f<a.length-1;f++){const{valueMax:h,valueMin:u,valueNow:m}=_t({layout:n.value,panelsArray:a,pivotIndices:[f,f+1]}),v=c[f];if(v!=null){const g=a[f];x(g),v.setAttribute("aria-controls",g.id),v.setAttribute("aria-valuemax",`${Math.round(h)}`),v.setAttribute("aria-valuemin",`${Math.round(u)}`),v.setAttribute("aria-valuenow",m!=null?`${Math.round(m)}`:"")}}l(()=>
1{c.forEach(f=>{f.removeAttribute("aria-controls"),f.removeAttribute("aria-valuemax"),f.removeAttribute("aria-valuemin"),f.removeAttribute("aria-valuenow")})})}),ie(l=>{const s=i.value;if(!s)return;const c=t.value;x(c);const{panelDataArray:f}=c,h=Qe(e,s);x(h!=null,`No group found for id "${e}"`);const u=ue(e,s);x(u);const m=u.map(v=>{const g=v.getAttribute("data-panel-resize-handle-id");x(g);const[w,d]=kt(e,g,f,s);if(w==null||d==null)return()=>{};const b=A=>{if(!A.defaultPrevented)switch(A.key){case"Enter":{A.preventDefault();const I=f.findIndex(D=>D.id===w);if(I>=0){const D=f[I];x(D);const P=n.value[I],{collapsedSize:_=0,collapsible:Q,minSize:ee=0}=D.constraints;if(P!=null&&Q){const X=oe({delta:N(P,_)?ee-_:_-P,layout:n.value,panelConstraints:f.map(J=>J.constraints),pivotIndices:tt(e,g,s),trigger:"keyboard"});n.value!==X&&o(X)}}break}}};return v.addEventListener("keydown",b),()=>{v.removeEventListener("keydown",b)}});l(()=>{m.forEach(v=>v())})})}const Gt=100,le={getItem:t=>(Be(le),le.getItem(t)),setItem:(t,e)=>{Be(le),le.setItem(t,e)}},[lt,Ht]=ft("PanelGroup"),Ft=ce({__name:"SplitterGroup",props:{id:{},autoSaveId:{default:null},direction:{},keyboardResizeBy:{default:10},storage:{default:()=>le},asChild:{type:Boolean},as:{}},emits:["layout"],setup(t,{emit:e}){const n=t,a=e,i={},{direction:o}=He(n),l=Ce(n.id,"reka-splitter-group"),s=ht(),{forwardRef:c,currentElement:f}=Fe(),h=B(null),u=B([]),m=B({}),v=B(new Map),g=B(0),w=ae(()=>({autoSaveId:n.autoSaveId,direction:n.direction,dragState:h.value,id:l,keyboardResizeBy:n.keyboardResizeBy,storage:n.storage})),d=B({layout:u.value,panelDataArray:[],panelDataArrayChanged:!1}),b=r=>u.value=r;Bt({eagerValuesRef:d,groupId:l,layout:u,panelDataArray:d.value.panelDataArray,setLayout:b,panelGroupElement:f}),ie(()=>{const{panelDataArray:r}=d.value,{autoSaveId:z}=n;if(z){if(u.value.length===0||u.value.length!==r.length)return;let p=i[z];p||(p=Rt($t,Gt),i[z]=p);const y=[...r],E=new Map(v.value);p(z,y,E,u.value,n.storage)}});function A(r,z){const{panelDataArray:p}=d.value,y=j(p,r);return zt({defaultSize:z,dragState:h.value,layout:u.value,panelData:p,panelIndex:y})}function I(r){const{panelDataArray:z}=d.value;z.push(r),z.sort((p,y)=>{const E=p.order,S=y.order;return E==null&&S==null?0:E==null?-1:S==null?1:E-S}),d.value.panelDataArrayChanged=!0}Pe(()=>d.value.panelDataArrayChanged,()=>{if(d.value.panelDataArrayChanged){d.value.panelDataArrayChanged=!1;const{autoSaveId:r,storage:z}=w.value,{layout:p,panelDataArray:y}=d.value;let E=null;if(r){const L=Nt(r,y,z);L&&(v.value=new Map(Object.entries(L.expandToSizes)),E=L.layout)}E===null&&(E=Mt({panelDataArray:y}));const S=Dt({layout:E,panelConstraints:y.map(L=>L.constraints)});gt(p,S)||(b(S),d.value.layout=S,a("layout",S),ne(y,S,m.value))}});function D(r){return function(p){p.preventDefault();const y=f.value;if(!y)return()=>null;const{direction:E,dragState:S,id:L,keyboardResizeBy:$}=w.value,{layout:M,panelDataArray:k}=d.value,{initialLayout:U}=S??{},H=tt(L,r,y);let R=At(p,r,E,S,$,y);if(R===0)return;const _e=E==="horizontal";s.value==="rtl"&&_e&&(R=-R);const ct=k.map(dt=>dt.constraints),te=oe({delta:R,layout:U??M,panelConstraints:ct,pivotIndices:H,trigger:Ve(p)?"keyboard":"mouse-or-touch"}),Me=!me(M,te);(We(p)||Ke(p))&&g.value!==R&&(g.value=R,Me?be(r,0):_e?be(r,R<0?qe:Ue):be(r,R<0?Ye:Je)),Me&&(b(te),d.value.layout=te,a("layout",te),ne(k,te,m.value))}}function P(r,z){const{layout:p,panelDataArray:y}=d.value,E=y.map(U=>U.constraints),{panelSize:S,pivotIndices:L}=q(y,r,p);x(S!=null);const M=j(y,r)===y.length-1?S-z:z-S,k=oe({delta:M,layout:p,panelConstraints:E,pivotIndices:L,trigger:"imperative-api"});me(p,k)||(b(k),d.value.layout=k,a("layout",k),ne(y,k,m.value))}function _(r,z){const{layout:p,panelDataArray:y}=d.value,E=j(y,r);y[E]=r,d.value.panelDataArrayChanged=!0;const{collapsedSize:S=0,collapsible:L}=z,{collapsedSize:$=0,collapsible:M,maxSize:k=100,minSize:U=0}=r.constraints,{panelSize:H}=q(y,r,p);H!==null&&(L&&M&&H===S?S!==$&&P(r,$):H<U?P(r,U):H>k&&P(r,k))}function Q(r,z){const{direction:p}=w.value,{layout:y}=d.value;if(!f.value)return;const E=ze(r,f.value);x(E);const S=Xe(p,z);h.value={dragHandleId:r,dragHandleRect:E.getBoundingClientRect(),initialCursorPosition:S,initialLayout:y}}function ee(){h.value=null}function X(r){const{panelDataArray:z}=d.value,p=j(z,r);p>=0&&(z.splice(p,1),delete m.value[r.id],d.value.panelDataArrayChanged=!0)}function J(r){const{layout:z,panelDataArray:p}=d.value;if(r.constraints.collapsible){const y=p.map($=>$.constraints),{collapsedSize:E=0,panelSize:S,pivotIndices:L}=q(p,r,z);if(x(S!=null,`Panel size not found for panel "${r.id}"`),S!==E){v.value.set(r.id,S);const M=j(p,r)===p.length-1?S-E:E-S,k=oe({delta:M,layout:z,panelConstraints:y,pivotIndices:L,trigger:"imperative-api"});me(z,k)||(b(k),d.value.layout=k,a("layout",k),ne(p,k,m.value))}}}function it(r){const{layout:z,panelDataArray:p}=d.value;if(r.constraints.collapsible){const y=p.map(M=>M.constraints),{collapsedSize:E=0,panelSize:S,minSize:L=0,pivotIndices:$}=q(p,r,z);if(S===E){const M=v.value.get(r.id),k=M!=null&&M>=L?M:L,H=j(p,r)===p.length-1?S-k:k-S,R=oe({delta:H,layout:z,panelConstraints:y,pivotIndices:$,trigger:"imperative-api"});me(z,R)||(b(R),d.value.layout=R,a("layout",R),ne(p,R,m.value))}}}function st(r){const{layout:z,panelDataArray:p}=d.value,{panelSize:y}=q(p,r,z);return x(y!=null,`Panel size not found for panel "${r.id}"`),y}function rt(r){const{layout:z,panelDataArray:p}=d.value,{collapsedSize:y=0,collapsible:E,panelSize:S}=q(p,r,z);return E?S===void 0?r.constraints.defaultSize===r.constraints.collapsedSize:S===y:!1}function ut(r){const{layout:z,panelDataArray:p}=d.value,{collapsedSize:y=0,collapsible:E,panelSize:S}=q(p,r,z);return x(S!=null,`Panel size not found for panel "${r.id}"`),!E||S>y}Ht({direction:o,dragState:h.value,groupId:l,reevaluatePanelConstraints:_,registerPanel:I,registerResizeHandle:D,resizePanel:P,startDragging:Q,stopDragging:ee,unregisterPanel:X,panelGroupElement:f,collapsePanel:J,expandPanel:it,isPanelCollapsed:rt,isPanelExpanded:ut,getPanelSize:st,getPanelStyle:A});function j(r,z){return r.findIndex(p=>p===z||p.id===z.id)}function q(r,z,p){const y=j(r,z),S=y===r.length-1?[y-1,y]:[y,y+1],L=p[y];return{...z.constraints,panelSize:L,pivotIndices:S}}return(r,z)=>(V(),de(C(Ie),{ref:C(c),as:r.as,"as-child":r.asChild,style:Te({display:"flex",flexDirection:C(o)==="horizontal"?"row":"column",height:"100%",overflow:"hidden",
1width:"100%"}),"data-panel-group":"","data-orientation":C(o),"data-panel-group-id":C(l)},{default:W(()=>[G(r.$slots,"default",{layout:u.value})]),_:3},8,["as","as-child","style","data-orientation","data-panel-group-id"]))}}),Ge=ce({__name:"SplitterPanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const a=t,i=n,o=lt();if(o===null)throw new Error("SplitterPanel components must be rendered within a SplitterGroup container");const{collapsePanel:l,expandPanel:s,getPanelSize:c,getPanelStyle:f,isPanelCollapsed:h,resizePanel:u,groupId:m,reevaluatePanelConstraints:v,registerPanel:g,unregisterPanel:w}=o,d=Ce(a.id,"reka-splitter-panel"),b=ae(()=>({callbacks:{onCollapse:()=>i("collapse"),onExpand:()=>i("expand"),onResize:(...P)=>i("resize",...P)},constraints:{collapsedSize:a.collapsedSize&&Number.parseFloat(a.collapsedSize.toFixed(Ae)),collapsible:a.collapsible,defaultSize:a.defaultSize,maxSize:a.maxSize,minSize:a.minSize},id:d,idIsFromProps:a.id!==void 0,order:a.order}));Pe(()=>b.value.constraints,(P,_)=>{(_.collapsedSize!==P.collapsedSize||_.collapsible!==P.collapsible||_.maxSize!==P.maxSize||_.minSize!==P.minSize)&&v(b.value,_)},{deep:!0}),pt(()=>{const P=b.value;g(P),mt(()=>{w(P)})});const A=ae(()=>f(b.value,a.defaultSize)),I=ae(()=>h(b.value)),D=ae(()=>!I.value);return e({collapse:()=>{l(b.value)},expand:()=>{s(b.value)},getSize(){return c(b.value)},resize:P=>{u(b.value,P)},isCollapsed:I,isExpanded:D}),(P,_)=>(V(),de(C(Ie),{id:C(d),style:Te(A.value),as:P.as,"as-child":P.asChild,"data-panel":"","data-panel-collapsible":P.collapsible||void 0,"data-panel-group-id":C(m),"data-panel-id":C(d),"data-panel-size":Number.parseFloat(`${A.value.flexGrow}`).toFixed(1),"data-state":P.collapsible?I.value?"collapsed":"expanded":void 0},{default:W(()=>[G(P.$slots,"default",{isCollapsed:I.value,isExpanded:D.value})]),_:3}
1,8,["id","style","as","as-child","data-panel-collapsible","data-panel-group-id","data-panel-id","data-panel-size","data-state"]))}});function Tt({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:a}){ie(i=>{const o=a.value;if(t.value||n.value===null||o===null)return;const l=ze(e,o);if(l==null)return;const s=c=>{var f;if(!c.defaultPrevented)switch(c.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{c.preventDefault(),(f=n.value)==null||f.call(n,c);break}case"F6":{c.preventDefault();const h=l.getAttribute("data-panel-group-id");x(h);const u=ue(h,o),m=et(h,e,o);x(m!==null);const v=c.shiftKey?m>0?m-1:u.length-1:m+1<u.length?m+1:0;u[v].focus();break}}};l.addEventListener("keydown",s),i(()=>{l.removeEventListener("keydown",s)})})}const Ot=ce({__name:"SplitterResizeHandle",props:{id:{},hitAreaMargins:{},tabindex:{default:0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["dragging"],setup(t,{emit:e}){const n=t,a=e,{forwardRef:i,currentElement:o}=Fe(),{disabled:l}=He(n),s=lt();if(s===null)throw new Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:c,groupId:f,registerResizeHandle:h,startDragging:u,stopDragging:m,panelGroupElement:v}=s,g=Ce(n.id,"reka-splitter-resize-handle"),w=B("inactive"),d=B(!1),b=B(null);return Pe(l,()=>{fe&&(l.value?b.value=null:b.value=h(g))},{immediate:!0}),ie(A=>{var P,_;if(l.value||b.value===null)return;const I=o.value;if(!I)return;x(I);const D=(Q,ee,X)=>{var J;if(ee)switch(Q){case"down":{w.value="drag",u(g,X),a("dragging",!0);break}case"move":{w.value!=="drag"&&(w.value="hover"),(J=b.value)==null||J.call(b,X);break}case"up":{w.value="hover",m(),a("dragging",!1);break}}else w.value="inactive"};A(Ct(g,I,c,{coarse:((P=n.hitAreaMargins)==null?void 0:P.coarse)??15,fine:((_=n.hitAreaMargins)==null?void 0:_.fine)??5},D))}),Tt({disabled:l,resizeHandler:b,handleId:g,panelGroupElement:v}),(A,I)=>(V(),de(C(Ie),{id:C(g),ref:C(i),style:{touchAction:"none",userSelect:"none"},as:A.as,"as-child":A.asChild,role:"separator","data-resize-handle":"",tabindex:A.tabindex,"data-state":w.value,"data-disabled":C(l)?"":void 0,"data-orientation":C(c),"data-panel-group-id":C(f),"data-resize-handle-active":w.value==="drag"?"pointer":d.value?"keyboard":void 0,"data-resize-handle-state":w.value,"data-panel-resize-handle-enabled":!C(l),"data-panel-resize-handle-id":C(g),onBlur:I[0]||(I[0]=D=>d.value=!1),onFocus:I[1]||(I[1]=D=>d.value=!1)},{default:W(()=>[G(A.$slots,"default")]),_:3},8,["id","as","as-child","tabindex","data-state","data-disabled","data-orientation","data-panel-group-id","data-resize-handle-active","data-resize-handle-state","data-panel-resize-handle-enabled","data-panel-resize-handle-id"]))}}),Vt={key:1,class:"not-prose my-8 flex h-full flex-col items-center overflow-hidden rounded-lg bg-gray-900"},Wt={class:"w-full p-4"},Kt={class:"w-full border-t-0 px-4 pb-4 dark:border-gray-900 [&>pre]:overflow-x-auto [&>pre]:rounded-lg [&>pre]:!bg-gray-950 [&>pre]:p-4"},Xt=ce({__name:"DemoWithCode",props:{stacked:{type:Boolean,default:!0}},setup(t){return(e,n)=>e.stacked?(V(),we("div",Vt,[Re("div",Wt,[G(e.$slots,"demo")]),Re("div",Kt,[G(e.$slots,"code")])])):(V(),de(C(Ft),{key:0,direction:"horizontal",class:"not-prose my-8 h-full rounded-lg bg-gray-900"},{default:W(()=>[Se(C(Ge),{"default-size":50,"min-size":20,class:"[&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:p-4"},{default:W(()=>[G(e.$slots,"code")]),_:3}),Se(C(Ot),{class:"w-1 rounded-lg bg-gray-700 transition-colors hover:bg-gray-500"}),Se(C(Ge),{"default-size":50,"min-size":20,class:"h-full p-4"},{default:W(()=>[G(e.$slots,"demo")]),_:3})]),_:3}))}}),jt=Object.assign(Xt,{__name:"DemoWithCode"}),qt={class:"not-prose text-gray-200 lg:mx-[-5%] lg:w-[110%]"},Ut=ce({__name:"Demo",props:{layout:{default:"default"},fullWidth:{type:Boolean,default:!1}},setup(t){return(e,n)=>{var i;const a=jt;return V(),we("div",qt,[(i=e.layout)!=null&&i.startsWith("code")?(V(),de(a,{key:0,stacked:e.layout==="code-stacked"},{code:W(()=>[G(e.$slots,"code")]),demo:W(()=>[G(e.$slots,"demo")]),_:3},8,["stacked"])):(V(),we("div",{key:1,class:vt(["my-8 overflow-hidden rounded-lg",{"bg-gray-900 p-8":!e.fullWidth}])},null,2))])}}}),Zt=Object.assign(Ut,{__name:"Demo"});export{Zt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.