@a-multilayout-splitter/core 6.0.0-alpha.6 → 6.0.0-alpha.7

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.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var We=Object.defineProperty;var Ze=(t,e,n)=>e in t?We(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var te=(t,e,n)=>Ze(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react/jsx-runtime"),u=require("react");function Qe(t,e){e?(t.classList.add("a-split-hidden"),t.style.flexGrow="0",t.style.flexShrink="0",t.style.flexBasis="0"):(t.classList.remove("a-split-hidden"),t.style.flexGrow="",t.style.flexShrink="")}function ye(t,e,n={}){return new Promise(r=>{const a=n.duration||300;if(!n.animate){t.style.flexBasis=e,r();return}t.style.transition=`flex-basis ${a}ms ease`,t.offsetHeight,t.style.flexBasis=e,setTimeout(()=>{t.style.transition="",r()},a)})}function Ke(t){return{...t,collapsed:!t.collapsed}}function et(t,e){return t.findIndex(n=>n.id===e)}function ve(t){return!t.collapsed}function tt(t){return t.filter(ve)}function nt(t){return document.querySelector(`[data-pane-id="${t}"]`)}function st(t,e,n){return Math.max(e,Math.min(n,t))}function rt(t,e,n,r={}){return{id:t,size:e,content:n,collapsed:r.collapsed??!1,minSize:r.minSize??0,maxSize:r.maxSize??100}}function it(t,e){return{...t,size:e}}function ot(t,e){return t.map(n=>{const r=e.get(n.id);return r?{...n,...r}:n})}function at(t,e){return{...t,size:e.size,collapsed:e.collapsed}}function lt(t){return{id:t.id,size:t.size,collapsed:t.collapsed}}function $e(t,e){return!0}function ne(t,e){return typeof e=="boolean"?e:Array.isArray(e)?e.length>0&&typeof e[0]=="boolean"?e[t-1]===!0:e.includes(t):!1}function se(t,e){return typeof e=="boolean"?e:Array.isArray(e)?e.length>0&&typeof e[0]=="boolean"?e[t-1]!==!1:e.includes(t):!0}function re(t,e){return typeof e=="boolean"?e:Array.isArray(e)?e.length>0&&typeof e[0]=="boolean"?e[t-1]===!0:e.includes(t):!1}function Ce(t,e=[],n=[],r=[],a=[],w="split"){const[p,m]=u.useState(()=>u.Children.toArray(t).map((d,s)=>({id:`${w}-pane-${s}`,size:e[s]||"100%",collapsed:n[s]||!1,minSize:r[s]||0,maxSize:a[s]||100}))),v=u.Children.toArray(t);if(v.length!==p.length){if(v.length>p.length){const l=[...p];for(let d=p.length;d<v.length;d++)l.push({id:`${w}-pane-${Date.now()}-${d}`,size:e[d]||"100%",collapsed:n[d]||!1,minSize:r[d]||0,maxSize:a[d]||100});setTimeout(()=>m(l),0)}else if(v.length<p.length){const l=p.slice(0,v.length);setTimeout(()=>m(l),0)}}const b=p.map((l,d)=>({...l,content:v[d]})),$=u.useCallback(l=>{m(d=>{const s=l.position??d.length,i={id:`${w}-pane-${Date.now()}`,size:l.size,collapsed:l.collapsed||!1,minSize:l.minSize||0,maxSize:l.maxSize||100},o=[...d];return o.splice(s,0,i),ct(o,s,l.size)})},[w]),c=u.useCallback(l=>{m(d=>{if(l<0||l>=d.length)return d;const s=[...d],i=s.splice(l,1)[0];return i?ut(s,i.size):s})},[]),x=u.useCallback(l=>{m(d=>{if(l<0||l>=d.length)return d;const s=d[l];if(!s)return d;const i=[...d];i[l]={...s,collapsed:!s.collapsed};const o=document.querySelector(`[data-pane-id="${s.id}"]`);if(o){const f=i[l];(f==null?void 0:f.collapsed)??!1?(o.classList.add("a-split-hidden"),o.style.flexGrow="0"):(o.classList.remove("a-split-hidden"),o.style.flexGrow="")}return i})},[]),g=u.useCallback((l,d,s)=>{m(i=>{if(l<0||l>=i.length)return i;const o=i[l];if(!o)return i;const f=[...i];f[l]={...o,size:d,flexGrow:void 0};const S=document.querySelector(`[data-pane-id="${o.id}"]`);return S&&ye(S,d,s||{animate:!1}),f})},[]),E=u.useCallback(()=>b,[b]),F=u.useCallback(l=>{m(d=>{const s=[...l].sort((f,S)=>S-f);let i=[...d],o=0;if(s.forEach(f=>{if(f>=0&&f<i.length){const S=i.splice(f,1)[0];S&&(o+=parseFloat(S.size)||0)}}),i.length>0&&o>0){const f=o/i.length;i=i.map(S=>({...S,size:`${(parseFloat(S.size)||0)+f}%`}))}return i})},[]),I=u.useCallback((l,d)=>{m(s=>{if(l<0||l>=s.length||d<0||d>=s.length||l===d)return s;const i=[...s],o=i[l];return i[l]=i[d],i[d]=o,i})},[]),L=u.useCallback((l,d)=>{m(s=>{if(l<0||l>=s.length)return s;const i=s[l];if(!i||i.collapsed)return s;const o=d==null?void 0:d.direction;let f;o==="left"?f=l+1:o==="right"?f=l-1:f=l<s.length-1?l+1:l-1;const S=s.map((y,D)=>D===l?{...y,collapsed:!0,flexGrow:0}:D===f&&!y.collapsed?{...y,flexGrow:1}:y.collapsed?y:{...y,flexGrow:0});if(d!=null&&d.animate){const y=document.querySelector(`[data-pane-id="${i.id}"]`);y&&(y.style.transition=`flex-basis ${d.duration||300}ms ease`,setTimeout(()=>{y.style.transition=""},d.duration||300))}return S})},[]),T=u.useCallback((l,d)=>{m(s=>{if(l<0||l>=s.length)return s;const i=s[l];if(!i||!i.collapsed)return s;const o=s.filter(y=>!y.collapsed).length+1,f=s.length;let S=[...s];if(S[l]={...i,collapsed:!1,flexGrow:void 0},o===f)S=S.map(y=>({...y,flexGrow:void 0}));else{const y=d==null?void 0:d.direction;let D;if(y==="left"?D=l+1:y==="right"?D=l-1:D=l<s.length-1?l+1:l-1,D>=0&&D<S.length){const C=S[D];C&&C.flexGrow===1&&(S[D]={...C,flexGrow:void 0})}}if(d!=null&&d.animate){const y=document.querySelector(`[data-pane-id="${i.id}"]`);y&&(y.style.transition=`flex-basis ${d.duration||300}ms ease`,setTimeout(()=>{y.style.transition=""},d.duration||300))}return S})},[]),A=u.useCallback((l,d)=>{m(s=>{if(l<0||l>=s.length)return s;const i=s[l];if(!i)return s;const o=parseFloat(i.size)||0,f=Math.max(i.minSize||0,Math.min(i.maxSize||100,o+d)),S=[...s];S[l]={...i,size:`${f}%`};const y=document.querySelector(`[data-pane-id="${i.id}"]`);return y&&(y.style.flexBasis=`${f}%`),S})},[]);return{panes:b,addPane:$,removePane:c,togglePane:x,setPaneSize:g,getPaneState:E,removePanes:F,swapPanes:I,collapsePane:L,expandPane:T,resizePane:A}}function ct(t,e,n){const r=parseFloat(n);if(!n.includes("%"))return t;const p=t.filter((v,b)=>b!==e).reduce((v,b)=>v+parseFloat(b.size),0),m=(100-r)/p;return t.map((v,b)=>{if(b===e)return v;const c=parseFloat(v.size)*m;return{...v,size:v.size.includes("%")?`${c}%`:v.size}})}function ut(t,e){if(t.length===0)return t;const n=parseFloat(e);if(!e.includes("%"))return t;const a=n/t.length;return t.map(w=>{if(!w.size.includes("%"))return w;const m=parseFloat(w.size)+a;return{...w,size:`${m}%`}})}function Ee(t,e){let n=null,r=0;return function(...w){const p=Date.now();p-r>=e?(t(...w),r=p):(n&&clearTimeout(n),n=setTimeout(()=>{t(...w),r=Date.now()},e-(p-r)))}}function ke(t,e){let n=null;return function(...a){n&&clearTimeout(n),n=setTimeout(()=>{t(...a)},e)}}function Ie(t,e,n={}){const{onDragStart:r,onDragMove:a,onDragEnd:w}=n,p=u.useRef(null),m=u.useRef(null),v=u.useCallback((x,g)=>{var f,S;g.preventDefault(),g.stopPropagation();const E=g.target;if(E.closest("button")||E.tagName==="BUTTON")return;const F=t.current;if(!F)return;const I=Array.from(F.children),L=(x-1)*2,T=x*2,A=I[L],l=I[T];if(!A||!l||A.classList.contains("a-split-hidden")||l.classList.contains("a-split-hidden"))return;const d="touches"in g?((f=g.touches[0])==null?void 0:f.clientX)??0:g.clientX,s="touches"in g?((S=g.touches[0])==null?void 0:S.clientY)??0:g.clientY,i=Array.from(F.querySelectorAll(".a-split-handlebar")).filter(y=>y.parentElement===F);let o=0;i.forEach(y=>{const D=y,C=window.getComputedStyle(D);if(e==="horizontal"){const V=parseFloat(C.marginLeft)||0,_=parseFloat(C.marginRight)||0;o+=D.offsetWidth+V+_}else{const V=parseFloat(C.marginTop)||0,_=parseFloat(C.marginBottom)||0;o+=D.offsetHeight+V+_}}),p.current={active:!0,paneIndex:x,startX:d,startY:s,prevElement:A,nextElement:l,prevInitialWidth:A.offsetWidth,nextInitialWidth:l.offsetWidth,prevInitialHeight:A.offsetHeight,nextInitialHeight:l.offsetHeight,containerWidth:F.offsetWidth-(e==="horizontal"?o:0),containerHeight:F.offsetHeight-(e==="vertical"?o:0),minPrevSize:parseFloat(A.getAttribute("data-min-size")||"0"),maxPrevSize:parseFloat(A.getAttribute("data-max-size")||"100"),minNextSize:parseFloat(l.getAttribute("data-min-size")||"0"),maxNextSize:parseFloat(l.getAttribute("data-max-size")||"100")},m.current=null,r==null||r({paneIndex:x})},[t,r,e]),b=u.useCallback(x=>{var C,V;const g=p.current;if(!(g!=null&&g.active))return null;const E=e==="horizontal",F="touches"in x?((C=x.touches[0])==null?void 0:C.clientX)??0:x.clientX,I="touches"in x?((V=x.touches[0])==null?void 0:V.clientY)??0:x.clientY,L=E?F-g.startX:I-g.startY,T=E?g.containerWidth:g.containerHeight,A=E?g.prevInitialWidth:g.prevInitialHeight,l=E?g.nextInitialWidth:g.nextInitialHeight;let d=A+L,s=l-L;d<0&&(d=0),s<0&&(s=0);const i=d/T*100,o=s/T*100,f=i<=g.minPrevSize,S=i>=g.maxPrevSize,y=o<=g.minNextSize,D=o>=g.maxNextSize;return f||S||y||D?null:{prevSize:i,nextSize:o,prevSizePx:d,nextSizePx:s,state:g}},[e]),$=u.useCallback(Ee(x=>{const g=b(x);if(!g)return;const{prevSize:E,nextSize:F,prevSizePx:I,nextSizePx:L,state:T}=g,{prevInitialWidth:A,prevInitialHeight:l}=T,d=e==="horizontal"?A:l;Math.abs(g.prevSizePx-d)<=1||(m.current={prevSize:E,nextSize:F},requestAnimationFrame(()=>{if(!T.prevElement||!T.nextElement)return;const s=T.prevElement.style.flexBasis.includes("%"),i=T.nextElement.style.flexBasis.includes("%");s?T.prevElement.style.flexBasis=`${E}%`:T.prevElement.style.flexBasis=`${I}px`,i?T.nextElement.style.flexBasis=`${F}%`:T.nextElement.style.flexBasis=`${L}px`}),a==null||a({paneIndex:T.paneIndex,prevSize:E,nextSize:F}))},16),[b,e,a]),c=u.useCallback(x=>{const g=p.current;if(!(g!=null&&g.active))return;const E=b(x);E&&(m.current={prevSize:E.prevSize,nextSize:E.nextSize});const F=m.current;F&&(w==null||w({paneIndex:g.paneIndex,prevSize:F.prevSize,nextSize:F.nextSize})),p.current=null,m.current=null},[b,w]);return u.useEffect(()=>{const x=$,g=c;return window.addEventListener("mousemove",x),window.addEventListener("mouseup",g),window.addEventListener("touchmove",x,{passive:!1}),window.addEventListener("touchend",g),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",g),window.removeEventListener("touchmove",x),window.removeEventListener("touchend",g)}},[$,c]),{handleMouseDown:v}}function Fe(t,e,n){const r=u.useCallback(ke(p=>{if(t)try{const m=`${e}-${n}`,v=p.map(b=>({id:b.id,size:b.size,collapsed:b.collapsed}));localStorage.setItem(m,JSON.stringify(v))}catch(m){console.warn("Failed to save split state to localStorage:",m)}},300),[t,e,n]),a=u.useCallback(()=>{if(!t)return null;try{const p=`${e}-${n}`,m=localStorage.getItem(p);return m?JSON.parse(m):null}catch(p){return console.warn("Failed to load split state from localStorage:",p),null}},[t,e,n]),w=u.useCallback(()=>{if(t)try{const p=`${e}-${n}`;localStorage.removeItem(p)}catch(p){console.warn("Failed to clear split state from localStorage:",p)}},[t,e,n]);return{save:r,load:a,clear:w}}function De(t,e,n,r){const a=u.useRef(e),w=u.useRef(n);return a.current=e,w.current=n,u.useMemo(()=>({splitId:t,getState:()=>a.current(),dispatch:m=>w.current(m),getElement:()=>r.current,getPanes:()=>a.current().panes}),[t,r])}const Ae=u.createContext(0);function ie(){return u.useContext(Ae)}const Z=({level:t=0,children:e})=>N.jsx(Ae.Provider,{value:t,children:e});Z.displayName="NestingProvider";function ft(t){const e=n=>{const r=ie();return N.jsx(Z,{level:r+1,children:N.jsx(t,{...n})})};return e.displayName=`withNesting(${t.displayName||t.name||"Component"})`,e}const oe=({index:t,mode:e,disabled:n,lineBar:r,onMouseDown:a,onTouchStart:w,onCollapse:p,onExpand:m,renderCustom:v,leftPaneCollapsed:b=!1,rightPaneCollapsed:$=!1,explicitlyDisabled:c=!1})=>{if(v){const o={index:t,mode:e,disabled:n,lineBar:r,onMouseDown:a,onTouchStart:w||a,onCollapse:p,onExpand:m};return N.jsx("div",{className:"a-split-handlebar",onMouseDown:f=>!n&&a(f),onTouchStart:f=>!n&&(w?w(f):a(f)),children:v(o,t)})}const x=["a-split-handlebar",e==="horizontal"?"a-split-handlebar-horizontal":"a-split-handlebar-vertical",n?"a-split-handlebar-disabled":"",r?"a-split-handlebar-line":""].filter(Boolean).join(" "),g=o=>{o.stopPropagation(),$?m==null||m("right"):p==null||p("left")},E=o=>{o.stopPropagation(),b?m==null||m("left"):p==null||p("right")},F=!r&&!c,I=e==="horizontal",L=b&&!$,T=$&&!b,A=I?"M8 3L4 6L8 9":"M3 8L6 4L9 8",l=I?"M4 3L8 6L4 9":"M3 4L6 8L9 4",d=A,s=l,i=b||$;return N.jsx("div",{className:x,onMouseDown:o=>!n&&a(o),onTouchStart:o=>!n&&a(o),style:{cursor:n?"default":I?"col-resize":"row-resize"},children:F&&N.jsxs(N.Fragment,{children:[N.jsx("button",{className:`a-split-collapse-btn a-split-collapse-btn-${I?"left":"top"}${L?" hidden":""}`,onClick:g,"aria-label":$?`Expand ${I?"right":"bottom"} pane`:`Collapse ${I?"left":"top"} pane`,title:$?`Expand ${I?"right":"bottom"} pane`:`Collapse ${I?"left":"top"} pane`,children:N.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:N.jsx("path",{d,stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),N.jsx("div",{className:`a-split-grip-icon${i?" hidden":""}`,"aria-hidden":"true",children:I?N.jsxs("svg",{width:"8",height:"24",viewBox:"0 0 8 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[N.jsx("circle",{cx:"4",cy:"4",r:"2.5",fill:"currentColor"}),N.jsx("circle",{cx:"4",cy:"12",r:"2.5",fill:"currentColor"}),N.jsx("circle",{cx:"4",cy:"20",r:"2.5",fill:"currentColor"})]}):N.jsxs("svg",{width:"24",height:"8",viewBox:"0 0 24 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[N.jsx("circle",{cx:"4",cy:"4",r:"2.5",fill:"currentColor"}),N.jsx("circle",{cx:"12",cy:"4",r:"2.5",fill:"currentColor"}),N.jsx("circle",{cx:"20",cy:"4",r:"2.5",fill:"currentColor"})]})}),N.jsx("button",{className:`a-split-collapse-btn a-split-collapse-btn-${I?"right":"bottom"}${T?" hidden":""}`,onClick:E,"aria-label":b?`Expand ${I?"left":"top"} pane`:`Collapse ${I?"right":"bottom"} pane`,title:b?`Expand ${I?"left":"top"} pane`:`Collapse ${I?"right":"bottom"} pane`,children:N.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:N.jsx("path",{d:s,stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})};oe.displayName="DragHandle";function dt(t,e){if(e.includes("vw")){const n=parseFloat(e);return t/100*window.innerWidth*(n/100)}if(e.includes("vh")){const n=parseFloat(e);return t/100*window.innerHeight*(n/100)}if(e.includes("px")){const n=parseFloat(e);return t/100*n}return e.includes("%")?(console.warn("Percentage reference not fully supported, assuming viewport"),t/100*window.innerWidth*(parseFloat(e)/100)):t/100*parseFloat(e)}function ht(t,e){if(e.includes("vw")){const n=parseFloat(e),r=window.innerWidth*(n/100);return t/r*100}if(e.includes("vh")){const n=parseFloat(e),r=window.innerHeight*(n/100);return t/r*100}if(e.includes("px")){const n=parseFloat(e);return t/n*100}if(e.includes("%")){console.warn("Percentage reference not fully supported, assuming viewport");const n=window.innerWidth*(parseFloat(e)/100);return t/n*100}return t/parseFloat(e)*100}function pt(t,e,n){const r=parseFloat(t);return t.includes("%")?n==="px"?`${r/100*e}px`:t:t.includes("px")?n==="%"?`${r/e*100}%`:t:n==="px"?`${r}px`:`${r/e*100}%`}function B(t){const e=parseFloat(t);return t.includes("%")?{value:e,unit:"%"}:t.includes("px")?{value:e,unit:"px"}:t.includes("vw")?{value:e,unit:"vw"}:t.includes("vh")?{value:e,unit:"vh"}:t.includes("fr")?{value:e,unit:"fr"}:{value:e,unit:"px"}}function gt(t,e){const n=B(t),r=B(e);return n.unit===r.unit}function mt(t,e,n,r){return`${Math.max(e,Math.min(n,t))}${r}`}function St(t){if(t.length===0)return{total:0,unit:"px"};const e=t[0];if(!e)return{total:0,unit:"px"};const n=B(e.size);let r=0;for(const a of t){const w=B(a.size);w.unit===n.unit||console.warn(`Mixed units detected: ${n.unit} and ${w.unit}. Results may be inaccurate.`),r+=w.value}return{total:r,unit:n.unit}}function zt(t,e){const n=[];if(t.length===0)return n.push("No panes defined"),{valid:!1,errors:n};const r=t.filter(a=>a.size.includes("%"));if(r.length>0){const a=r.reduce((w,p)=>w+parseFloat(p.size),0);a>100.1&&n.push(`Total percentage (${a}%) exceeds 100%`)}return t.forEach((a,w)=>{a.minSize<0&&n.push(`Pane ${w}: minSize cannot be negative`),a.maxSize<a.minSize&&n.push(`Pane ${w}: maxSize (${a.maxSize}) less than minSize (${a.minSize})`),a.maxSize>100&&n.push(`Pane ${w}: maxSize (${a.maxSize}%) exceeds 100%`)}),{valid:n.length===0,errors:n}}function He(t,e){const n=B(t);switch(n.unit){case"%":return t;case"px":return t;case"vw":return`${n.value/100*window.innerWidth}px`;case"vh":return`${n.value/100*window.innerHeight}px`;case"fr":return"0";default:return`${n.value}px`}}function Ne(t,e=!1){if(e)return{flexGrow:0,flexShrink:0};const n=B(t.size);return n.unit==="%"?{flexGrow:1,flexShrink:1}:n.unit==="fr"?{flexGrow:n.value,flexShrink:1}:{flexGrow:0,flexShrink:0}}function wt(t,e,n){const r=B(t);return r.unit==="%"?r.value/100*e:r.unit==="px"?r.value:r.unit==="vw"?r.value/100*window.innerWidth:r.unit==="vh"?r.value/100*window.innerHeight:r.value}function xt(t){const e=t.filter(a=>a.size.includes("%"));if(e.length===0)return t;const n=e.reduce((a,w)=>a+parseFloat(w.size),0);if(Math.abs(n-100)<.01)return t;const r=100/n;return t.map(a=>{if(!a.size.includes("%"))return a;const p=parseFloat(a.size)*r;return{...a,size:`${p}%`}})}function Pt(t,e,n){const r=e+n;return!(r<t.minSize||r>t.maxSize)}function bt(t){return t==="horizontal"?"width":"height"}function yt(t){return t==="horizontal"?"clientX":"clientY"}const ae=({id:t,size:e,collapsed:n,minSize:r,maxSize:a,mode:w,content:p,flexGrow:m})=>{const v=e||"100%",b={size:v},{flexGrow:$,flexShrink:c}=Ne(b,n),x=m!==void 0?m:$,g=n?"0":He(v);return N.jsx("div",{"data-pane-id":t,"data-min-size":r,"data-max-size":a,className:`a-split-pane${n?" a-split-hidden":""}`,style:{flexBasis:g,flexGrow:x,flexShrink:c,overflow:n?"hidden":"auto"},children:p})};ae.displayName="Pane";class Re{constructor(e){te(this,"plugins",[]);te(this,"context");this.context=e}registerPlugins(e){this.plugins=e,this.plugins.forEach(n=>{n.onInit&&n.onInit(this.context)})}destroy(){this.plugins.forEach(e=>{e.onDestroy&&e.onDestroy(this.context)}),this.plugins=[]}onPaneAdd(e){this.plugins.forEach(n=>{n.onPaneAdd&&n.onPaneAdd(e,this.context)})}onPaneRemove(e){this.plugins.forEach(n=>{n.onPaneRemove&&n.onPaneRemove(e,this.context)})}onPaneCollapse(e){this.plugins.forEach(n=>{n.onPaneCollapse&&n.onPaneCollapse(e,this.context)})}onPaneExpand(e){this.plugins.forEach(n=>{n.onPaneExpand&&n.onPaneExpand(e,this.context)})}onDragStart(e){this.plugins.forEach(n=>{n.onDragStart&&n.onDragStart(e,this.context)})}onDragMove(e){let n=!0;for(const r of this.plugins)r.onDragMove&&r.onDragMove(e,this.context)===!1&&(n=!1);return n}onDragEnd(e){this.plugins.forEach(n=>{n.onDragEnd&&n.onDragEnd(e,this.context)})}onResize(e){this.plugins.forEach(n=>{n.onResize&&n.onResize(e,this.context)})}renderHandle(e){for(const n of this.plugins)if(n.renderHandle){const r=n.renderHandle(e,this.context);if(r)return r}return null}renderPane(e){for(const n of this.plugins)if(n.renderPane){const r=n.renderPane(e,this.context);if(r)return r}return null}getPlugins(){return this.plugins}getPlugin(e){return this.plugins.find(n=>n.name===e)}hasPlugin(e){return this.plugins.some(n=>n.name===e)}}const Te=u.forwardRef((t,e)=>{const{id:n,mode:r="horizontal",initialSizes:a=[],minSizes:w=[],maxSizes:p=[],collapsed:m=[],disable:v=!1,visible:b=!0,lineBar:$=!1,renderBar:c,plugins:x=[],enablePersistence:g=!1,width:E=null,height:F=null,className:I="",style:L={},fixClass:T=!1,children:A,onDragging:l,onDragEnd:d,onLayoutChange:s}=t,i=u.useRef(`split-${Math.random().toString(36).slice(2,11)}`),o=n||i.current,f=u.useRef(null),S=u.useRef(null),y=ie(),D=!T&&y>2;u.useEffect(()=>{var P,z;if(typeof globalThis<"u"&&((z=(P=globalThis.process)==null?void 0:P.env)==null?void 0:z.NODE_ENV)!=="production"){if(a.length>0){const k=u.Children.toArray(A);a.length!==k.length&&console.warn(`[Split] initialSizes length (${a.length}) doesn't match children count (${k.length})`),a.forEach((R,M)=>{if(typeof R=="string"){const J=parseFloat(R);if(isNaN(J)&&console.warn(`[Split] Invalid size at index ${M}: "${R}". Expected format: "50%", "100px", etc.`),R.includes("%")){const W=parseFloat(R);(W<0||W>100)&&console.warn(`[Split] Size at index ${M} is out of range: "${R}". Percentage should be 0-100.`)}}});const H=a.reduce((R,M)=>typeof M=="string"&&M.includes("%")?R+parseFloat(M):R,0);H>100&&console.warn(`[Split] Total percentage (${H}%) exceeds 100%. Sizes will be normalized.`)}if((w.length>0||p.length>0)&&(w.forEach((k,H)=>{const R=p[H];R!==void 0&&k>R&&console.warn(`[Split] minSize (${k}) is greater than maxSize (${R}) at index ${H}`),(k<0||k>100)&&console.warn(`[Split] minSize at index ${H} is out of range: ${k}. Should be 0-100.`)}),p.forEach((k,H)=>{(k<0||k>100)&&console.warn(`[Split] maxSize at index ${H} is out of range: ${k}. Should be 0-100.`)})),m.length>0){const k=u.Children.toArray(A);m.length!==k.length&&console.warn(`[Split] collapsed length (${m.length}) doesn't match children count (${k.length})`)}}},[a,w,p,m,A]);const{panes:C,addPane:V,removePane:_,togglePane:q,setPaneSize:G,getPaneState:le,removePanes:ce,swapPanes:ue,collapsePane:X,expandPane:Y,resizePane:fe}=Ce(A,a,m,w,p,o),[j,de]=u.useState(null);u.useEffect(()=>(j&&j.active?(document.body.classList.add("a-split-body-dragging"),document.body.classList.add(r==="horizontal"?"a-split-body-dragging-horizontal":"a-split-body-dragging-vertical")):(document.body.classList.remove("a-split-body-dragging"),document.body.classList.remove("a-split-body-dragging-horizontal"),document.body.classList.remove("a-split-body-dragging-vertical")),()=>{document.body.classList.remove("a-split-body-dragging"),document.body.classList.remove("a-split-body-dragging-horizontal"),document.body.classList.remove("a-split-body-dragging-vertical")}),[j,r]);const Be=u.useCallback(()=>({panes:C,mode:r,dragState:j}),[C,r,j]),qe=u.useCallback(h=>{switch(h.type){case"ADD_PANE":V(h.payload);break;case"REMOVE_PANE":_(h.payload);break;case"TOGGLE_PANE":q(h.payload);break;case"SET_PANE_SIZE":G(h.payload.index,h.payload.size);break;case"RESTORE_STATE":h.payload.panes.forEach((P,z)=>{G(z,P.size),P.collapsed&&q(z)});break;case"ADJUST_PANE_SIZE":if(h.payload&&(j==null?void 0:j.paneIndex)!=null){const P=j.paneIndex,z=C[P];if(z){const k=parseFloat(z.size),H=h.payload.direction==="grow"?h.payload.amount:-h.payload.amount,R=Math.max(z.minSize||0,Math.min(z.maxSize||100,k+H));G(P,`${R}%`)}}break}},[V,_,q,G,C,j]),he=De(o,Be,qe,f);u.useEffect(()=>{if(x.length>0)return S.current=new Re(he),S.current.registerPlugins(x),()=>{var h;(h=S.current)==null||h.destroy(),S.current=null}},[x,he]);const Q=Fe(g,`split-state-${o}`,r);u.useEffect(()=>{const h=Q.load();h&&h.length===C.length&&h.forEach((P,z)=>{C[z]&&P.id===C[z].id&&(G(z,P.size),P.collapsed!==C[z].collapsed&&q(z))})},[]),u.useEffect(()=>{Q.save(C)},[C,Q]);const pe=u.useRef(!0),ge=u.useRef(u.Children.count(A)),K=u.useRef(a);u.useEffect(()=>{if(!f.current||a.length===0)return;const h=u.Children.count(A),P=h!==ge.current,z=a.length!==K.current.length||a.some((k,H)=>k!==K.current[H]);(pe.current||P||z)&&(a.forEach((k,H)=>{G(H,k)}),pe.current=!1,ge.current=h,K.current=a)},[A,a]);const ee=u.useRef(m);u.useEffect(()=>{!f.current||!m.some((P,z)=>P!==ee.current[z])&&ee.current.length===m.length||(ee.current=m,m.forEach((P,z)=>{const k=C[z];k&&k.collapsed!==P&&(P?X(z):Y(z))}))},[m,C,X,Y]),u.useEffect(()=>{f.current&&C.forEach((h,P)=>{var k;const z=(k=f.current)==null?void 0:k.querySelector(`[data-pane-id="${h.id}"]`);if(z){const H=w[P],R=p[P];H!==void 0&&z.setAttribute("data-min-size",String(w[P])),R!==void 0&&z.setAttribute("data-max-size",String(p[P]))}})},[w,p,C]),u.useEffect(()=>{if(!f.current)return;f.current.querySelectorAll(".a-split-handlebar").forEach((P,z)=>{const k=P,H=z+1;ne(H,v)?(k.classList.add("a-split-handlebar-disabled"),k.style.cursor="default"):(k.classList.remove("a-split-handlebar-disabled"),k.style.cursor=r==="horizontal"?"col-resize":"row-resize");const M=se(H,b);k.style.display=M?"":"none",re(H,$)?k.classList.add("a-split-handlebar-line"):k.classList.remove("a-split-handlebar-line")})},[v,b,$,r]);const{handleMouseDown:me}=Ie(f,r,{onDragStart:h=>{var z;de({active:!0,paneIndex:h.paneIndex}),(z=S.current)==null||z.onDragStart(h);const P=C[h.paneIndex];P&&(s==null||s(h.paneIndex,P.id,"dragging",null))},onDragMove:h=>{var z;(((z=S.current)==null?void 0:z.onDragMove(h))??!0)&&(l==null||l(h.prevSize,h.nextSize,h.paneIndex))},onDragEnd:h=>{var z;G(h.paneIndex-1,`${h.prevSize}%`),G(h.paneIndex,`${h.nextSize}%`),de(null),(z=S.current)==null||z.onDragEnd(h),d==null||d(h.prevSize,h.nextSize,h.paneIndex);const P=C[h.paneIndex];P&&(s==null||s(h.paneIndex,P.id,"dragged",null))}}),Oe=u.useCallback((h,P)=>{var k;const z=P==="left"?h-1:h;if(z>=0&&z<C.length){X(z,{direction:P});const H=C[z];H&&((k=S.current)==null||k.onPaneCollapse({pane:H,index:z,direction:P}),s==null||s(z,H.id,"close",P))}},[C,X,s]),Xe=u.useCallback((h,P)=>{var k;const z=P==="left"?h-1:h;if(z>=0&&z<C.length){Y(z,{direction:P});const H=C[z];H&&((k=S.current)==null||k.onPaneExpand({pane:H,index:z,direction:P}),s==null||s(z,H.id,"open",P))}},[C,Y,s]);u.useImperativeHandle(e,()=>({addPane:V,removePane:_,togglePane:q,setPaneSize:G,getPaneState:le,removePanes:ce,swapPanes:ue,collapsePane:X,expandPane:Y,resizePane:fe,getSnapshot:()=>{const h=f.current,P=h?r==="horizontal"?h.offsetWidth:h.offsetHeight:0;return{panes:C.map(z=>({...z})),totalSize:P,mode:r,timestamp:Date.now()}},restore:h=>{if(h.mode!==r){console.warn(`Cannot restore snapshot with different mode. Current: ${r}, Snapshot: ${h.mode}`);return}h.panes.forEach((P,z)=>{C[z]&&(G(z,P.size),P.collapsed!==C[z].collapsed&&q(z))})}}),[V,_,q,G,le,ce,ue,X,Y,fe,C,r]);const Ye=u.useMemo(()=>({display:"flex",flexDirection:r==="horizontal"?"row":"column",width:E||"100%",height:F||"100%",overflow:"hidden",...L}),[r,E,F,L]),Ue=u.useMemo(()=>{const h=["a-split-container"];return r==="vertical"&&h.push("a-split-vertical"),(T||D)&&h.push("a-split-fix"),j!=null&&j.active&&h.push("a-split-dragging"),I&&h.push(I),h.join(" ")},[r,T,D,I,j==null?void 0:j.active]),Je=()=>{const h=[];return C.forEach((P,z)=>{var H;const k=N.jsx(Z,{level:y+1,children:P.content});if(h.push(N.jsx(ae,{id:P.id,size:P.size,collapsed:P.collapsed,minSize:P.minSize,maxSize:P.maxSize,mode:r,content:k,flexGrow:P.flexGrow},P.id)),z<C.length-1){const R=z+1,M=C[z+1];if(!M)return;const J=$e(),W=se(R,b),Se=re(R,$),ze=P.collapsed||!1,we=M.collapsed||!1,xe=ne(R,v),Pe=xe||ze||we;if(W&&J){const be=(H=S.current)==null?void 0:H.renderHandle({index:R,mode:r,disabled:Pe,lineBar:Se,onMouseDown:O=>me(R,O)});be?h.push(N.jsx(u.Fragment,{children:be},`handlebar-${R}`)):h.push(N.jsx(oe,{index:R,mode:r,disabled:Pe,lineBar:Se,explicitlyDisabled:xe,onMouseDown:O=>me(R,O),onCollapse:O=>Oe(R,O),onExpand:O=>Xe(R,O),renderCustom:c,leftPaneCollapsed:ze,rightPaneCollapsed:we},`handlebar-${R}`))}}}),h};return N.jsx("div",{ref:f,id:o,className:Ue,style:Ye,children:Je()})});Te.displayName="Split";function vt(t={}){const{mode:e="horizontal",initialPanes:n=[],initialSizes:r=[],minSizes:a=[],maxSizes:w=[],onPaneChange:p}=t,[m,v]=u.useState(()=>n.length>0?n:r.map((s,i)=>({id:`pane-${i}`,size:s,collapsed:!1,minSize:a[i]||0,maxSize:w[i]||100,content:null}))),[b]=u.useState(!1),$=u.useRef(!1),c=u.useCallback(s=>{v(i=>{const o=typeof s=="function"?s(i):s;return!$.current&&p&&p(o),o})},[p]),x=u.useCallback(s=>{c(i=>{const o=s.position??i.length,f={id:`pane-${Date.now()}`,size:s.size,collapsed:s.collapsed||!1,minSize:s.minSize||0,maxSize:s.maxSize||100,content:s.content},S=[...i];return S.splice(o,0,f),S})},[c]),g=u.useCallback(s=>{c(i=>{if(s<0||s>=i.length)return i;const o=[...i],f=o.splice(s,1)[0];if(f&&o.length>0){const y=(parseFloat(f.size)||0)/o.length;return o.map(D=>({...D,size:`${(parseFloat(D.size)||0)+y}%`}))}return o})},[c]),E=u.useCallback(s=>{c(i=>{const o=[...s].sort((y,D)=>D-y);let f=[...i],S=0;if(o.forEach(y=>{if(y>=0&&y<f.length){const D=f.splice(y,1)[0];D&&(S+=parseFloat(D.size)||0)}}),f.length>0&&S>0){const y=S/f.length;f=f.map(D=>({...D,size:`${(parseFloat(D.size)||0)+y}%`}))}return f})},[c]),F=u.useCallback(s=>{c(i=>{if(s<0||s>=i.length)return i;const o=i[s];if(!o)return i;const f=[...i];return f[s]={...o,collapsed:!o.collapsed},f})},[c]),I=u.useCallback(s=>{c(i=>{if(s<0||s>=i.length)return i;const o=i[s];if(!o||o.collapsed)return i;const f=[...i];return f[s]={...o,collapsed:!0},f})},[c]),L=u.useCallback(s=>{c(i=>{if(s<0||s>=i.length)return i;const o=i[s];if(!o||!o.collapsed)return i;const f=[...i];return f[s]={...o,collapsed:!1},f})},[c]),T=u.useCallback((s,i,o)=>{c(f=>{if(s<0||s>=f.length)return f;const S=f[s];if(!S)return f;const y=[...f];return y[s]={...S,size:i},y})},[c]),A=u.useCallback((s,i)=>{c(o=>{if(s<0||s>=o.length||i<0||i>=o.length||s===i)return o;const f=[...o],S=f[s];return f[s]=f[i],f[i]=S,f})},[c]),l=u.useCallback(()=>({panes:m.map(s=>({...s})),totalSize:0,mode:e,timestamp:Date.now()}),[m,e]),d=u.useCallback(s=>{if(s.mode!==e){console.warn(`Cannot restore snapshot with different mode. Current: ${e}, Snapshot: ${s.mode}`);return}$.current=!0,c(i=>s.panes.map((o,f)=>{const S=i.find(y=>y.id===o.id)||i[f];return{id:o.id,size:o.size,collapsed:o.collapsed,minSize:(S==null?void 0:S.minSize)??0,maxSize:(S==null?void 0:S.maxSize)??100,content:(S==null?void 0:S.content)??null}})),$.current=!1,p&&v(i=>(p(i),i))},[e,c,p]);return u.useMemo(()=>({panes:m,mode:e,isDragging:b,addPane:x,removePane:g,removePanes:E,togglePane:F,collapsePane:I,expandPane:L,setPaneSize:T,swapPanes:A,setPanes:c,getSnapshot:l,restore:d}),[m,e,b,x,g,E,F,I,L,T,A,c,l,d])}function $t(t){return t}function Ct(t={}){const{storage:e="localStorage",key:n,debounceDelay:r=300}=t;let a=null;const w=$=>n||`a-multilayout-splitter:${$}`,p=()=>typeof window>"u"?null:e==="localStorage"?window.localStorage:window.sessionStorage,m=($,c)=>{const x=p();if(x)try{const g=w($),E=JSON.stringify({panes:c.panes.map(F=>({id:F.id,size:F.size,collapsed:F.collapsed})),mode:c.mode,timestamp:Date.now()});x.setItem(g,E)}catch(g){console.error("Failed to save split state:",g)}},v=$=>{const c=p();if(!c)return null;try{const x=w($),g=c.getItem(x);return g?JSON.parse(g):null}catch(x){return console.error("Failed to load split state:",x),null}},b=($,c)=>{a&&clearTimeout(a),a=setTimeout(()=>{m($,c),a=null},r)};return{name:"persistence",version:"1.0.0",onInit($){const c=v($.splitId),x=c==null?void 0:c.panes;x&&x.length>0?setTimeout(()=>{$.getState().panes.length===x.length&&$.dispatch({type:"RESTORE_STATE",payload:{panes:x}})},0):setTimeout(()=>{const g=$.getState();m($.splitId,g)},0)},onDragEnd($,c){setTimeout(()=>{const x=c.getState();b(c.splitId,x)},0)},onPaneAdd($,c){setTimeout(()=>{const x=c.getState();b(c.splitId,x)},0)},onPaneRemove($,c){setTimeout(()=>{const x=c.getState();b(c.splitId,x)},0)},onPaneCollapse($,c){setTimeout(()=>{const x=c.getState();b(c.splitId,x)},0)},onPaneExpand($,c){setTimeout(()=>{const x=c.getState();b(c.splitId,x)},0)},onDestroy(){a&&(clearTimeout(a),a=null)}}}function Et(t,e="localStorage"){const n=e==="localStorage"?window.localStorage:window.sessionStorage;try{const r=`a-multilayout-splitter:${t}`;n.removeItem(r)}catch(r){console.error("Failed to clear persisted state:",r)}}function kt(t={}){const{enableArrowKeys:e=!0,enableNumberKeys:n=!0,stepSize:r=5,enableTabNavigation:a=!0}=t;let w=0,p=null;const m=(v,b)=>{if(!v)return;const c=v.querySelectorAll(".a-split-pane")[b];c&&(c.focus(),c.setAttribute("tabindex","0"),w=b)};return{name:"keyboard",version:"1.0.0",onInit(v){const b=v.getElement();if(!b)return;b.setAttribute("tabindex","0"),b.querySelectorAll(".a-split-pane").forEach((c,x)=>{c.setAttribute("tabindex",x===0?"0":"-1")}),p=c=>{const x=v.getState(),g=x.panes;if(e&&(c.key==="ArrowLeft"||c.key==="ArrowRight"||c.key==="ArrowUp"||c.key==="ArrowDown")){c.preventDefault();const E=x.mode==="horizontal",F=E&&c.key==="ArrowRight"||!E&&c.key==="ArrowDown",I=w,L=g[I],T=I<g.length-1?I+1:I-1,A=g[T];if(!L||!A)return;const l=parseFloat(L.size),d=parseFloat(A.size),s=F?r:-r;let i=l+s,o=d-s;const f=L.minSize||0,S=L.maxSize||100,y=A.minSize||0,D=A.maxSize||100;i=Math.max(f,Math.min(S,i)),o=Math.max(y,Math.min(D,o));const C=l+d;i+o!==C&&(i===f||i===S?o=C-i:i=C-o),v.dispatch({type:"SET_PANE_SIZE",payload:{index:I,size:`${i}%`}}),v.dispatch({type:"SET_PANE_SIZE",payload:{index:T,size:`${o}%`}})}if(n){const E=parseInt(c.key,10);if(!isNaN(E)&&E>=1&&E<=9){const F=E-1;F<g.length&&m(b,F)}}if(a&&c.key==="Tab"){c.preventDefault();let E=c.shiftKey?w-1:w+1;E<0?E=g.length-1:E>=g.length&&(E=0),m(b,E)}},b.addEventListener("keydown",p)},onDestroy(v){const b=v.getElement();b&&p&&(b.removeEventListener("keydown",p),p=null)}}}function It(t,e){return{name:"custom-handle",version:"1.0.0",renderHandle(n){return u.createElement(t,{...n,...e})}}}function Ft(t){return{name:"custom-handle-render",version:"1.0.0",renderHandle(e){return t(e)}}}const Le=u.createContext(null),je=u.createContext(null),Ve=u.createContext(null);function Dt({id:t,mode:e="horizontal",enablePersistence:n=!1,storageKey:r=`split-state-${t}`,children:a,_panes:w=[],_addPane:p,_removePane:m,_togglePane:v,_setPaneSize:b,_getPaneState:$}){const c=u.useRef({isDragging:!1,activeHandlebar:null}),x=u.useMemo(()=>({id:t,mode:e,enablePersistence:n,storageKey:r}),[t,e,n,r]),g=u.useMemo(()=>({panes:w,isDragging:c.current.isDragging,activeHandlebar:c.current.activeHandlebar}),[w,c.current.isDragging,c.current.activeHandlebar]),E=u.useMemo(()=>({addPane:p||(()=>console.warn("addPane not available")),removePane:m||(()=>console.warn("removePane not available")),togglePane:v||(()=>console.warn("togglePane not available")),setPaneSize:b||(()=>console.warn("setPaneSize not available")),getPaneState:$||(()=>[]),setDragging:(F,I)=>{c.current.isDragging=F,c.current.activeHandlebar=I??null}}),[p,m,v,b,$]);return N.jsx(Le.Provider,{value:x,children:N.jsx(je.Provider,{value:g,children:N.jsx(Ve.Provider,{value:E,children:a})})})}function Ge(){const t=u.useContext(Le);if(!t)throw new Error("useSplitConfig must be used within SplitProvider");return t}function U(){const t=u.useContext(je);if(!t)throw new Error("useSplitState must be used within SplitProvider");return t}function Me(){return u.useContext(Ve)}function At(){const t=Me();if(!t)throw new Error("useSplit must be used within SplitProvider");return{config:Ge(),state:U(),actions:t}}function _e(t){const{panes:e}=U();return e[t]}function Ht(){const{panes:t}=U();return t.length}function Nt(){const{isDragging:t}=U();return t}function Rt(t){const e=_e(t);return(e==null?void 0:e.collapsed)??!1}function Tt(){const{panes:t}=U();return u.useMemo(()=>t.filter(e=>!e.collapsed),[t])}exports.DragHandle=oe;exports.NestingProvider=Z;exports.PaneComponent=ae;exports.PluginManager=Re;exports.Split=Te;exports.SplitProvider=Dt;exports.animatePaneSize=ye;exports.applyCollapseState=Qe;exports.batchUpdatePanes=ot;exports.calculateFlexBasis=He;exports.calculateFlexValues=Ne;exports.calculateHandlebarPosition=wt;exports.calculateTotalSize=St;exports.canResize=Pt;exports.clampSize=mt;exports.clearPersistedState=Et;exports.constrainSize=st;exports.createPane=rt;exports.createPlugin=$t;exports.customHandlePlugin=It;exports.customHandleRenderPlugin=Ft;exports.debounce=ke;exports.findPaneIndex=et;exports.getAxisProperty=bt;exports.getCoordinateProperty=yt;exports.getPaneElement=nt;exports.getVisiblePanes=tt;exports.haveSameUnit=gt;exports.isHandlebarDisabled=ne;exports.isHandlebarVisible=se;exports.isLineBarStyle=re;exports.isPaneVisible=ve;exports.keyboardPlugin=kt;exports.normalizePaneSizes=xt;exports.normalizeSize=pt;exports.parseSize=B;exports.percentageToPixel=dt;exports.persistencePlugin=Ct;exports.pixelToPercentage=ht;exports.restorePaneState=at;exports.serializePaneState=lt;exports.shouldShowHandlebar=$e;exports.throttle=Ee;exports.togglePaneCollapse=Ke;exports.updatePaneSize=it;exports.useDragHandler=Ie;exports.useIsCollapsed=Rt;exports.useIsDragging=Nt;exports.useNestingLevel=ie;exports.usePane=_e;exports.usePaneCount=Ht;exports.usePaneManager=Ce;exports.usePersistence=Fe;exports.usePluginContext=De;exports.useSplit=At;exports.useSplitActions=Me;exports.useSplitConfig=Ge;exports.useSplitController=vt;exports.useSplitState=U;exports.useVisiblePanes=Tt;exports.validatePaneSizes=zt;exports.withNesting=ft;
1
+ "use strict";var tt=Object.defineProperty;var nt=(t,e,n)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var se=(t,e,n)=>nt(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),u=require("react");function rt(t,e){e?(t.classList.add("a-split-hidden"),t.style.flexGrow="0",t.style.flexShrink="0",t.style.flexBasis="0"):(t.classList.remove("a-split-hidden"),t.style.flexGrow="",t.style.flexShrink="")}function Ce(t,e,n={}){return new Promise(r=>{const o=n.duration||300;if(!n.animate){t.style.flexBasis=e,r();return}t.style.transition=`flex-basis ${o}ms ease`,t.offsetHeight,t.style.flexBasis=e,setTimeout(()=>{t.style.transition="",r()},o)})}function it(t){return{...t,collapsed:!t.collapsed}}function st(t,e){return t.findIndex(n=>n.id===e)}function $e(t){return!t.collapsed}function ot(t){return t.filter($e)}function at(t){return document.querySelector(`[data-pane-id="${t}"]`)}function lt(t,e,n){return Math.max(e,Math.min(n,t))}function ct(t,e,n,r={}){return{id:t,size:e,content:n,collapsed:r.collapsed??!1,minSize:r.minSize??0,maxSize:r.maxSize??100}}function ut(t,e){return{...t,size:e}}function ft(t,e){return t.map(n=>{const r=e.get(n.id);return r?{...n,...r}:n})}function dt(t,e){return{...t,size:e.size,collapsed:e.collapsed}}function ht(t){return{id:t.id,size:t.size,collapsed:t.collapsed}}function Ee(t,e){return!0}function oe(t,e){return typeof e=="boolean"?e:Array.isArray(e)?e.length>0&&typeof e[0]=="boolean"?e[t-1]===!0:e.includes(t):!1}function ae(t,e){return typeof e=="boolean"?e:Array.isArray(e)?e.length>0&&typeof e[0]=="boolean"?e[t-1]!==!1:e.includes(t):!0}function le(t,e){return typeof e=="boolean"?e:Array.isArray(e)?e.length>0&&typeof e[0]=="boolean"?e[t-1]===!0:e.includes(t):!1}function pt(t,e){if(e.includes("vw")){const n=parseFloat(e);return t/100*window.innerWidth*(n/100)}if(e.includes("vh")){const n=parseFloat(e);return t/100*window.innerHeight*(n/100)}if(e.includes("px")){const n=parseFloat(e);return t/100*n}return e.includes("%")?(console.warn("Percentage reference not fully supported, assuming viewport"),t/100*window.innerWidth*(parseFloat(e)/100)):t/100*parseFloat(e)}function gt(t,e){if(e.includes("vw")){const n=parseFloat(e),r=window.innerWidth*(n/100);return t/r*100}if(e.includes("vh")){const n=parseFloat(e),r=window.innerHeight*(n/100);return t/r*100}if(e.includes("px")){const n=parseFloat(e);return t/n*100}if(e.includes("%")){console.warn("Percentage reference not fully supported, assuming viewport");const n=window.innerWidth*(parseFloat(e)/100);return t/n*100}return t/parseFloat(e)*100}function mt(t,e,n){const r=parseFloat(t);return t.includes("%")?n==="px"?`${r/100*e}px`:t:t.includes("px")?n==="%"?`${r/e*100}%`:t:n==="px"?`${r}px`:`${r/e*100}%`}function j(t){const e=parseFloat(t);return t.includes("%")?{value:e,unit:"%"}:t.includes("px")?{value:e,unit:"px"}:t.includes("vw")?{value:e,unit:"vw"}:t.includes("vh")?{value:e,unit:"vh"}:t.includes("fr")?{value:e,unit:"fr"}:{value:e,unit:"px"}}function St(t,e){const n=j(t),r=j(e);return n.unit===r.unit}function zt(t,e,n,r){return`${Math.max(e,Math.min(n,t))}${r}`}function ye(t,e,n){let r=0;const o=[];if(t.forEach((h,$)=>{if($!==e){const y=j(h.size);y.unit==="%"&&(r+=y.value,o.push({index:$,percent:y.value}))}}),o.length===0)return t;const c=(100-n)/r;return t.map((h,$)=>{if($===e)return h;const y=j(h.size);if(y.unit==="%"){const b=y.value*c;return{...h,size:`${b}%`}}return h})}function ke(t,e,n,r){const o=j(n),S=o.unit==="%",c=o.unit==="px";if(o.unit==="fr")return t;if(c&&r&&r>0){const $=o.value/r*100,y=t.map((b,g)=>g===e?{...b,size:`${$}%`}:b);return ye(y,e,$)}if(c){const $=t.filter((g,x)=>x!==e&&j(g.size).unit==="%");if($.length===0||$.reduce((g,x)=>g+j(x.size).value,0)<=0)return t;const b=.8;return t.map((g,x)=>{if(x===e)return g;const a=j(g.size);if(a.unit!=="%")return g;const E=a.value*b;return{...g,size:`${E}%`}})}return S?ye(t,e,o.value):t}function Ie(t,e){if(t.length===0)return t;const n=j(e);if(n.unit!=="%")return t;const r=n.value/t.length;return t.map(o=>{const S=j(o.size);if(S.unit!=="%")return o;const c=S.value+r;return{...o,size:`${c}%`}})}function De(t,e){const n=[...e].sort((S,c)=>c-S);let r=[...t],o=0;if(n.forEach(S=>{if(S>=0&&S<r.length){const c=r.splice(S,1)[0];if(c){const h=j(c.size);h.unit==="%"&&(o+=h.value)}}}),r.length>0&&o>0){const S=o/r.length;r=r.map(c=>{const h=j(c.size);return h.unit==="%"?{...c,size:`${h.value+S}%`}:c})}return r}function Fe(t,e=[],n=[],r=[],o=[],S="split",c="horizontal"){const h=u.Children.toArray(t),$=u.useRef(h.length),[y,b]=u.useState(()=>h.map((s,p)=>({id:`${S}-pane-${p}`,size:e[p]||"100%",collapsed:n[p]||!1,minSize:r[p]||0,maxSize:o[p]||100,isDynamic:!1})));u.useLayoutEffect(()=>{const s=$.current,p=h.length;p!==s&&(b(d=>{const i=d.filter(z=>!z.isDynamic),l=d.filter(z=>z.isDynamic);if(p>i.length){const z=[...i];for(let w=i.length;w<p;w++)z.push({id:`${S}-pane-${Date.now()}-${w}`,size:e[w]||"100%",collapsed:n[w]||!1,minSize:r[w]||0,maxSize:o[w]||100,isDynamic:!1});return ve(z,l,d)}else if(p<i.length){const z=i.slice(0,p);return ve(z,l,d)}return d}),$.current=p)},[h.length,S,e,n,r,o]);const g=y.map((s,p)=>{let d;if(s.isDynamic)s.renderFn?d=s.renderFn():d=s.dynamicContent;else{const i=y.slice(0,p).filter(l=>!l.isDynamic).length;d=h[i]}return{id:s.id,size:s.size,collapsed:s.collapsed,minSize:s.minSize,maxSize:s.maxSize,flexGrow:s.flexGrow,content:d}}),x=u.useCallback(s=>{const p=document.getElementById(S),d=p?c==="horizontal"?p.offsetWidth:p.offsetHeight:void 0;b(i=>{const l=s.position??i.length,z={id:`${S}-pane-${Date.now()}`,size:s.size,collapsed:s.collapsed||!1,minSize:s.minSize||0,maxSize:s.maxSize||100,renderFn:s.render,dynamicContent:s.content,isDynamic:!0},w=[...i];return w.splice(l,0,z),ke(w,l,s.size,d)})},[S,c]),a=u.useCallback(s=>{b(p=>{if(s<0||s>=p.length)return p;const d=[...p],i=d.splice(s,1)[0];return i?Ie(d,i.size):d})},[]),E=u.useCallback(s=>{b(p=>{if(s<0||s>=p.length)return p;const d=p[s];if(!d)return p;const i=[...p];i[s]={...d,collapsed:!d.collapsed};const l=document.querySelector(`[data-pane-id="${d.id}"]`);if(l){const z=i[s];(z==null?void 0:z.collapsed)??!1?(l.classList.add("a-split-hidden"),l.style.flexGrow="0"):(l.classList.remove("a-split-hidden"),l.style.flexGrow="")}return i})},[]),k=u.useCallback((s,p,d)=>{b(i=>{if(s<0||s>=i.length)return i;const l=i[s];if(!l)return i;const z=[...i];z[s]={...l,size:p,flexGrow:void 0};const w=document.querySelector(`[data-pane-id="${l.id}"]`);return w&&Ce(w,p,d||{animate:!1}),z})},[]),I=u.useCallback(()=>g,[g]),M=u.useCallback(s=>{b(p=>De(p,s))},[]),A=u.useCallback((s,p)=>{b(d=>{if(s<0||s>=d.length||p<0||p>=d.length||s===p)return d;const i=[...d],l=i[s];return i[s]=i[p],i[p]=l,i})},[]),H=u.useCallback((s,p)=>{b(d=>{if(s<0||s>=d.length)return d;const i=d[s];if(!i||i.collapsed)return d;const l=p==null?void 0:p.direction;let z;l==="left"?z=s+1:l==="right"?z=s-1:z=s<d.length-1?s+1:s-1;const w=d.map((f,N)=>N===s?{...f,collapsed:!0,flexGrow:0}:N===z&&!f.collapsed?{...f,flexGrow:1}:f.collapsed?f:{...f,flexGrow:0});if(p!=null&&p.animate){const f=document.querySelector(`[data-pane-id="${i.id}"]`);f&&(f.style.transition=`flex-basis ${p.duration||300}ms ease`,setTimeout(()=>{f.style.transition=""},p.duration||300))}return w})},[]),T=u.useCallback((s,p)=>{b(d=>{if(s<0||s>=d.length)return d;const i=d[s];if(!i||!i.collapsed)return d;const l=d.filter(f=>!f.collapsed).length+1,z=d.length;let w=[...d];if(w[s]={...i,collapsed:!1,flexGrow:void 0},l===z)w=w.map(f=>({...f,flexGrow:void 0}));else{const f=p==null?void 0:p.direction;let N;if(f==="left"?N=s+1:f==="right"?N=s-1:N=s<d.length-1?s+1:s-1,N>=0&&N<w.length){const _=w[N];_&&_.flexGrow===1&&(w[N]={..._,flexGrow:void 0})}}if(p!=null&&p.animate){const f=document.querySelector(`[data-pane-id="${i.id}"]`);f&&(f.style.transition=`flex-basis ${p.duration||300}ms ease`,setTimeout(()=>{f.style.transition=""},p.duration||300))}return w})},[]),L=u.useCallback((s,p)=>{b(d=>{if(s<0||s>=d.length)return d;const i=d[s];if(!i)return d;const l=parseFloat(i.size)||0,z=Math.max(i.minSize||0,Math.min(i.maxSize||100,l+p)),w=[...d];w[s]={...i,size:`${z}%`};const f=document.querySelector(`[data-pane-id="${i.id}"]`);return f&&(f.style.flexBasis=`${z}%`),w})},[]);return{panes:g,addPane:x,removePane:a,togglePane:E,setPaneSize:k,getPaneState:I,removePanes:M,swapPanes:A,collapsePane:H,expandPane:T,resizePane:L}}function ve(t,e,n){if(e.length===0)return t;const r=[];let o=0,S=0;for(const c of n)if(c.isDynamic){const h=e[S];h&&(r.push(h),S++)}else{const h=t[o];h&&(r.push(h),o++)}for(let c=o;c<t.length;c++){const h=t[c];h&&r.push(h)}for(let c=S;c<e.length;c++){const h=e[c];h&&r.push(h)}return r}function He(t,e){let n=null,r=0;return function(...S){const c=Date.now();c-r>=e?(t(...S),r=c):(n&&clearTimeout(n),n=setTimeout(()=>{t(...S),r=Date.now()},e-(c-r)))}}function Re(t,e){let n=null;return function(...o){n&&clearTimeout(n),n=setTimeout(()=>{t(...o)},e)}}function Ae(t,e,n={}){const{onDragStart:r,onDragMove:o,onDragEnd:S}=n,c=u.useRef(null),h=u.useRef(null),$=u.useCallback((x,a)=>{var f,N;a.preventDefault(),a.stopPropagation();const E=a.target;if(E.closest("button")||E.tagName==="BUTTON")return;const k=t.current;if(!k)return;const I=Array.from(k.children),M=(x-1)*2,A=x*2,H=I[M],T=I[A];if(!H||!T||H.classList.contains("a-split-hidden")||T.classList.contains("a-split-hidden"))return;const L="touches"in a?((f=a.touches[0])==null?void 0:f.clientX)??0:a.clientX,s="touches"in a?((N=a.touches[0])==null?void 0:N.clientY)??0:a.clientY,p=Array.from(k.querySelectorAll(".a-split-handlebar")).filter(_=>_.parentElement===k);let d=0;p.forEach(_=>{const U=_,G=window.getComputedStyle(U);if(e==="horizontal"){const X=parseFloat(G.marginLeft)||0,Y=parseFloat(G.marginRight)||0;d+=U.offsetWidth+X+Y}else{const X=parseFloat(G.marginTop)||0,Y=parseFloat(G.marginBottom)||0;d+=U.offsetHeight+X+Y}});const i=H.getAttribute("data-size")||"50%",l=T.getAttribute("data-size")||"50%",z=j(i),w=j(l);c.current={active:!0,paneIndex:x,startX:L,startY:s,prevElement:H,nextElement:T,prevInitialWidth:H.offsetWidth,nextInitialWidth:T.offsetWidth,prevInitialHeight:H.offsetHeight,nextInitialHeight:T.offsetHeight,containerWidth:k.offsetWidth-(e==="horizontal"?d:0),containerHeight:k.offsetHeight-(e==="vertical"?d:0),minPrevSize:parseFloat(H.getAttribute("data-min-size")||"0"),maxPrevSize:parseFloat(H.getAttribute("data-max-size")||"100"),minNextSize:parseFloat(T.getAttribute("data-min-size")||"0"),maxNextSize:parseFloat(T.getAttribute("data-max-size")||"100"),prevUnit:z.unit,nextUnit:w.unit},h.current=null,r==null||r({paneIndex:x})},[t,r,e]),y=u.useCallback(x=>{var f,N;const a=c.current;if(!(a!=null&&a.active))return null;const E=e==="horizontal",k="touches"in x?((f=x.touches[0])==null?void 0:f.clientX)??0:x.clientX,I="touches"in x?((N=x.touches[0])==null?void 0:N.clientY)??0:x.clientY,M=E?k-a.startX:I-a.startY,A=E?a.containerWidth:a.containerHeight,H=E?a.prevInitialWidth:a.prevInitialHeight,T=E?a.nextInitialWidth:a.nextInitialHeight;let L=H+M,s=T-M;L<0&&(L=0),s<0&&(s=0);const p=L/A*100,d=s/A*100,i=p<=a.minPrevSize,l=p>=a.maxPrevSize,z=d<=a.minNextSize,w=d>=a.maxNextSize;return i||l||z||w?null:{prevSize:p,nextSize:d,prevSizePx:L,nextSizePx:s,state:a}},[e]),b=u.useCallback(He(x=>{const a=y(x);if(!a)return;const{prevSize:E,nextSize:k,prevSizePx:I,nextSizePx:M,state:A}=a,{prevInitialWidth:H,prevInitialHeight:T}=A,L=e==="horizontal"?H:T;Math.abs(a.prevSizePx-L)<=1||(h.current={prevSize:E,nextSize:k,prevSizePx:I,nextSizePx:M},requestAnimationFrame(()=>{if(!A.prevElement||!A.nextElement)return;const s=A;s.prevUnit==="%"?A.prevElement.style.flexBasis=`${E}%`:A.prevElement.style.flexBasis=`${I}px`,s.nextUnit==="%"?A.nextElement.style.flexBasis=`${k}%`:A.nextElement.style.flexBasis=`${M}px`}),o==null||o({paneIndex:A.paneIndex,prevSize:E,nextSize:k}))},16),[y,e,o]),g=u.useCallback(x=>{const a=c.current;if(!(a!=null&&a.active))return;const E=y(x);E&&(h.current={prevSize:E.prevSize,nextSize:E.nextSize,prevSizePx:E.prevSizePx,nextSizePx:E.nextSizePx});const k=h.current;k&&(S==null||S({paneIndex:a.paneIndex,prevSize:k.prevSize,nextSize:k.nextSize,prevSizePx:k.prevSizePx,nextSizePx:k.nextSizePx,prevUnit:a.prevUnit,nextUnit:a.nextUnit})),c.current=null,h.current=null},[y,S]);return u.useEffect(()=>{const x=b,a=g;return window.addEventListener("mousemove",x),window.addEventListener("mouseup",a),window.addEventListener("touchmove",x,{passive:!1}),window.addEventListener("touchend",a),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",a),window.removeEventListener("touchmove",x),window.removeEventListener("touchend",a)}},[b,g]),{handleMouseDown:$}}function Ne(t,e,n){const r=u.useCallback(Re(c=>{if(t)try{const h=`${e}-${n}`,$=c.map(y=>({id:y.id,size:y.size,collapsed:y.collapsed}));localStorage.setItem(h,JSON.stringify($))}catch(h){console.warn("Failed to save split state to localStorage:",h)}},300),[t,e,n]),o=u.useCallback(()=>{if(!t)return null;try{const c=`${e}-${n}`,h=localStorage.getItem(c);return h?JSON.parse(h):null}catch(c){return console.warn("Failed to load split state from localStorage:",c),null}},[t,e,n]),S=u.useCallback(()=>{if(t)try{const c=`${e}-${n}`;localStorage.removeItem(c)}catch(c){console.warn("Failed to clear split state from localStorage:",c)}},[t,e,n]);return{save:r,load:o,clear:S}}function Te(t,e,n,r){const o=u.useRef(e),S=u.useRef(n);return o.current=e,S.current=n,u.useMemo(()=>({splitId:t,getState:()=>o.current(),dispatch:h=>S.current(h),getElement:()=>r.current,getPanes:()=>o.current().panes}),[t,r])}const Me=u.createContext(0);function ce(){return u.useContext(Me)}const te=({level:t=0,children:e})=>R.jsx(Me.Provider,{value:t,children:e});te.displayName="NestingProvider";function xt(t){const e=n=>{const r=ce();return R.jsx(te,{level:r+1,children:R.jsx(t,{...n})})};return e.displayName=`withNesting(${t.displayName||t.name||"Component"})`,e}const ue=({index:t,mode:e,disabled:n,lineBar:r,onMouseDown:o,onTouchStart:S,onCollapse:c,onExpand:h,renderCustom:$,leftPaneCollapsed:y=!1,rightPaneCollapsed:b=!1,explicitlyDisabled:g=!1})=>{if($){const d={index:t,mode:e,disabled:n,lineBar:r,onMouseDown:o,onTouchStart:S||o,onCollapse:c,onExpand:h};return R.jsx("div",{className:"a-split-handlebar",onMouseDown:i=>!n&&o(i),onTouchStart:i=>!n&&(S?S(i):o(i)),children:$(d,t)})}const x=["a-split-handlebar",e==="horizontal"?"a-split-handlebar-horizontal":"a-split-handlebar-vertical",n?"a-split-handlebar-disabled":"",r?"a-split-handlebar-line":""].filter(Boolean).join(" "),a=d=>{d.stopPropagation(),b?h==null||h("right"):c==null||c("left")},E=d=>{d.stopPropagation(),y?h==null||h("left"):c==null||c("right")},k=!r&&!g,I=e==="horizontal",M=y&&!b,A=b&&!y,H=I?"M8 3L4 6L8 9":"M3 8L6 4L9 8",T=I?"M4 3L8 6L4 9":"M3 4L6 8L9 4",L=H,s=T,p=y||b;return R.jsx("div",{className:x,onMouseDown:d=>!n&&o(d),onTouchStart:d=>!n&&o(d),children:k&&R.jsxs(R.Fragment,{children:[R.jsx("button",{className:`a-split-collapse-btn a-split-collapse-btn-${I?"left":"top"}${M?" hidden":""}`,onClick:a,"aria-label":b?`Expand ${I?"right":"bottom"} pane`:`Collapse ${I?"left":"top"} pane`,title:b?`Expand ${I?"right":"bottom"} pane`:`Collapse ${I?"left":"top"} pane`,children:R.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:L,stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),R.jsx("div",{className:`a-split-grip-icon${p?" hidden":""}`,"aria-hidden":"true",children:I?R.jsxs("svg",{width:"8",height:"24",viewBox:"0 0 8 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("circle",{cx:"4",cy:"4",r:"2.5",fill:"currentColor"}),R.jsx("circle",{cx:"4",cy:"12",r:"2.5",fill:"currentColor"}),R.jsx("circle",{cx:"4",cy:"20",r:"2.5",fill:"currentColor"})]}):R.jsxs("svg",{width:"24",height:"8",viewBox:"0 0 24 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("circle",{cx:"4",cy:"4",r:"2.5",fill:"currentColor"}),R.jsx("circle",{cx:"12",cy:"4",r:"2.5",fill:"currentColor"}),R.jsx("circle",{cx:"20",cy:"4",r:"2.5",fill:"currentColor"})]})}),R.jsx("button",{className:`a-split-collapse-btn a-split-collapse-btn-${I?"right":"bottom"}${A?" hidden":""}`,onClick:E,"aria-label":y?`Expand ${I?"left":"top"} pane`:`Collapse ${I?"right":"bottom"} pane`,title:y?`Expand ${I?"left":"top"} pane`:`Collapse ${I?"right":"bottom"} pane`,children:R.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:s,stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})};ue.displayName="DragHandle";function wt(t){if(t.length===0)return{total:0,unit:"px"};const e=t[0];if(!e)return{total:0,unit:"px"};const n=j(e.size);let r=0;for(const o of t){const S=j(o.size);S.unit===n.unit||console.warn(`Mixed units detected: ${n.unit} and ${S.unit}. Results may be inaccurate.`),r+=S.value}return{total:r,unit:n.unit}}function Pt(t,e){const n=[];if(t.length===0)return n.push("No panes defined"),{valid:!1,errors:n};const r=t.filter(o=>o.size.includes("%"));if(r.length>0){const o=r.reduce((S,c)=>S+parseFloat(c.size),0);o>100.1&&n.push(`Total percentage (${o}%) exceeds 100%`)}return t.forEach((o,S)=>{o.minSize<0&&n.push(`Pane ${S}: minSize cannot be negative`),o.maxSize<o.minSize&&n.push(`Pane ${S}: maxSize (${o.maxSize}) less than minSize (${o.minSize})`),o.maxSize>100&&n.push(`Pane ${S}: maxSize (${o.maxSize}%) exceeds 100%`)}),{valid:n.length===0,errors:n}}function Le(t,e){const n=j(t);switch(n.unit){case"%":return t;case"px":return t;case"vw":return`${n.value/100*window.innerWidth}px`;case"vh":return`${n.value/100*window.innerHeight}px`;case"fr":return"0";default:return`${n.value}px`}}function je(t,e=!1){if(e)return{flexGrow:0,flexShrink:0};const n=j(t.size);return n.unit==="%"?{flexGrow:1,flexShrink:1}:n.unit==="fr"?{flexGrow:n.value,flexShrink:1}:{flexGrow:0,flexShrink:0}}function bt(t,e,n){const r=j(t);return r.unit==="%"?r.value/100*e:r.unit==="px"?r.value:r.unit==="vw"?r.value/100*window.innerWidth:r.unit==="vh"?r.value/100*window.innerHeight:r.value}function yt(t){const e=t.filter(o=>o.size.includes("%"));if(e.length===0)return t;const n=e.reduce((o,S)=>o+parseFloat(S.size),0);if(Math.abs(n-100)<.01)return t;const r=100/n;return t.map(o=>{if(!o.size.includes("%"))return o;const c=parseFloat(o.size)*r;return{...o,size:`${c}%`}})}function vt(t,e,n){const r=e+n;return!(r<t.minSize||r>t.maxSize)}function Ct(t){return t==="horizontal"?"width":"height"}function $t(t){return t==="horizontal"?"clientX":"clientY"}const fe=({id:t,size:e,collapsed:n,minSize:r,maxSize:o,mode:S,content:c,flexGrow:h})=>{const $=e||"100%",y={size:$},{flexGrow:b,flexShrink:g}=je(y,n),x=h!==void 0?h:b,a=n?"0":Le($);return R.jsx("div",{"data-pane-id":t,"data-size":$,"data-min-size":r,"data-max-size":o,className:`a-split-pane${n?" a-split-hidden":""}`,style:{flexBasis:a,flexGrow:x,flexShrink:g,overflow:n?"hidden":"auto"},children:c})};fe.displayName="Pane";class Ge{constructor(e){se(this,"plugins",[]);se(this,"context");this.context=e}registerPlugins(e){this.plugins=e,this.plugins.forEach(n=>{n.onInit&&n.onInit(this.context)})}destroy(){this.plugins.forEach(e=>{e.onDestroy&&e.onDestroy(this.context)}),this.plugins=[]}onPaneAdd(e){this.plugins.forEach(n=>{n.onPaneAdd&&n.onPaneAdd(e,this.context)})}onPaneRemove(e){this.plugins.forEach(n=>{n.onPaneRemove&&n.onPaneRemove(e,this.context)})}onPaneCollapse(e){this.plugins.forEach(n=>{n.onPaneCollapse&&n.onPaneCollapse(e,this.context)})}onPaneExpand(e){this.plugins.forEach(n=>{n.onPaneExpand&&n.onPaneExpand(e,this.context)})}onDragStart(e){this.plugins.forEach(n=>{n.onDragStart&&n.onDragStart(e,this.context)})}onDragMove(e){let n=!0;for(const r of this.plugins)r.onDragMove&&r.onDragMove(e,this.context)===!1&&(n=!1);return n}onDragEnd(e){this.plugins.forEach(n=>{n.onDragEnd&&n.onDragEnd(e,this.context)})}onResize(e){this.plugins.forEach(n=>{n.onResize&&n.onResize(e,this.context)})}renderHandle(e){for(const n of this.plugins)if(n.renderHandle){const r=n.renderHandle(e,this.context);if(r)return r}return null}renderPane(e){for(const n of this.plugins)if(n.renderPane){const r=n.renderPane(e,this.context);if(r)return r}return null}getPlugins(){return this.plugins}getPlugin(e){return this.plugins.find(n=>n.name===e)}hasPlugin(e){return this.plugins.some(n=>n.name===e)}}const Ve=u.forwardRef((t,e)=>{const{id:n,mode:r="horizontal",initialSizes:o=[],minSizes:S=[],maxSizes:c=[],collapsed:h=[],disable:$=!1,visible:y=!0,lineBar:b=!1,renderBar:g,plugins:x=[],enablePersistence:a=!1,width:E=null,height:k=null,className:I="",style:M={},fixClass:A=!1,children:H,onDragging:T,onDragEnd:L,onLayoutChange:s}=t,p=u.useRef(`split-${Math.random().toString(36).slice(2,11)}`),d=n||p.current,i=u.useRef(null),l=u.useRef(null),z=ce(),w=!A&&z>2;u.useEffect(()=>{var v,P;if(typeof globalThis<"u"&&((P=(v=globalThis.process)==null?void 0:v.env)==null?void 0:P.NODE_ENV)!=="production"){if(o.length>0){const C=u.Children.toArray(H);o.length!==C.length&&console.warn(`[Split] initialSizes length (${o.length}) doesn't match children count (${C.length})`),o.forEach((F,B)=>{if(typeof F=="string"){const q=parseFloat(F);if(isNaN(q)&&console.warn(`[Split] Invalid size at index ${B}: "${F}". Expected format: "50%", "100px", etc.`),F.includes("%")){const Z=parseFloat(F);(Z<0||Z>100)&&console.warn(`[Split] Size at index ${B} is out of range: "${F}". Percentage should be 0-100.`)}}});const D=o.reduce((F,B)=>typeof B=="string"&&B.includes("%")?F+parseFloat(B):F,0);D>100&&console.warn(`[Split] Total percentage (${D}%) exceeds 100%. Sizes will be normalized.`)}if((S.length>0||c.length>0)&&(S.forEach((C,D)=>{const F=c[D];F!==void 0&&C>F&&console.warn(`[Split] minSize (${C}) is greater than maxSize (${F}) at index ${D}`),(C<0||C>100)&&console.warn(`[Split] minSize at index ${D} is out of range: ${C}. Should be 0-100.`)}),c.forEach((C,D)=>{(C<0||C>100)&&console.warn(`[Split] maxSize at index ${D} is out of range: ${C}. Should be 0-100.`)})),h.length>0){const C=u.Children.toArray(H);h.length!==C.length&&console.warn(`[Split] collapsed length (${h.length}) doesn't match children count (${C.length})`)}}},[o,S,c,h,H]);const{panes:f,addPane:N,removePane:_,togglePane:U,setPaneSize:G,getPaneState:X,removePanes:Y,swapPanes:de,collapsePane:W,expandPane:J,resizePane:he}=Fe(H,o,h,S,c,d,r),[V,pe]=u.useState(null);u.useEffect(()=>(V&&V.active?(document.body.classList.add("a-split-body-dragging"),document.body.classList.add(r==="horizontal"?"a-split-body-dragging-horizontal":"a-split-body-dragging-vertical")):(document.body.classList.remove("a-split-body-dragging"),document.body.classList.remove("a-split-body-dragging-horizontal"),document.body.classList.remove("a-split-body-dragging-vertical")),()=>{document.body.classList.remove("a-split-body-dragging"),document.body.classList.remove("a-split-body-dragging-horizontal"),document.body.classList.remove("a-split-body-dragging-vertical")}),[V,r]);const Ye=u.useCallback(()=>({panes:f,mode:r,dragState:V}),[f,r,V]),We=u.useCallback(m=>{switch(m.type){case"ADD_PANE":N(m.payload);break;case"REMOVE_PANE":_(m.payload);break;case"TOGGLE_PANE":U(m.payload);break;case"SET_PANE_SIZE":G(m.payload.index,m.payload.size);break;case"RESTORE_STATE":m.payload.panes.forEach((v,P)=>{G(P,v.size),v.collapsed&&U(P)});break;case"ADJUST_PANE_SIZE":if(m.payload&&(V==null?void 0:V.paneIndex)!=null){const v=V.paneIndex,P=f[v];if(P){const C=parseFloat(P.size),D=m.payload.direction==="grow"?m.payload.amount:-m.payload.amount,F=Math.max(P.minSize||0,Math.min(P.maxSize||100,C+D));G(v,`${F}%`)}}break}},[N,_,U,G,f,V]),ge=Te(d,Ye,We,i);u.useEffect(()=>{if(x.length>0)return l.current=new Ge(ge),l.current.registerPlugins(x),()=>{var m;(m=l.current)==null||m.destroy(),l.current=null}},[x,ge]);const ne=Ne(a,`split-state-${d}`,r);u.useEffect(()=>{const m=ne.load();m&&m.length===f.length&&m.forEach((v,P)=>{f[P]&&v.id===f[P].id&&(G(P,v.size),v.collapsed!==f[P].collapsed&&U(P))})},[]),u.useEffect(()=>{ne.save(f)},[f,ne]);const me=u.useRef(!0),Se=u.useRef(u.Children.count(H)),re=u.useRef(o);u.useEffect(()=>{if(!i.current||o.length===0)return;const m=u.Children.count(H),v=m!==Se.current,P=o.length!==re.current.length||o.some((C,D)=>C!==re.current[D]);(me.current||v||P)&&(o.forEach((C,D)=>{G(D,C)}),me.current=!1,Se.current=m,re.current=o)},[H,o]);const ie=u.useRef(h);u.useEffect(()=>{!i.current||!h.some((v,P)=>v!==ie.current[P])&&ie.current.length===h.length||(ie.current=h,h.forEach((v,P)=>{const C=f[P];C&&C.collapsed!==v&&(v?W(P):J(P))}))},[h,f,W,J]),u.useEffect(()=>{i.current&&f.forEach((m,v)=>{var C;const P=(C=i.current)==null?void 0:C.querySelector(`[data-pane-id="${m.id}"]`);if(P){const D=S[v],F=c[v];D!==void 0&&P.setAttribute("data-min-size",String(S[v])),F!==void 0&&P.setAttribute("data-max-size",String(c[v]))}})},[S,c,f]),u.useEffect(()=>{if(!i.current)return;i.current.querySelectorAll(".a-split-handlebar").forEach((v,P)=>{const C=v,D=P+1;oe(D,$)?(C.classList.add("a-split-handlebar-disabled"),C.style.cursor="default"):(C.classList.remove("a-split-handlebar-disabled"),C.style.cursor=r==="horizontal"?"col-resize":"row-resize");const B=ae(D,y);C.style.display=B?"":"none",le(D,b)?C.classList.add("a-split-handlebar-line"):C.classList.remove("a-split-handlebar-line")})},[$,y,b,r]);const{handleMouseDown:ze}=Ae(i,r,{onDragStart:m=>{var D;pe({active:!0,paneIndex:m.paneIndex}),(D=l.current)==null||D.onDragStart(m);const v=m.paneIndex-1,P=f[v],C=f[m.paneIndex];P&&(s==null||s(v,P.id,"dragging",null)),C&&(s==null||s(m.paneIndex,C.id,"dragging",null))},onDragMove:m=>{var P;(((P=l.current)==null?void 0:P.onDragMove(m))??!0)&&(T==null||T(m.prevSize,m.nextSize,m.paneIndex))},onDragEnd:m=>{var q;const v=(Z,K,ee)=>Z==="%"?`${ee}%`:`${Math.round(K)}px`,P=v(m.prevUnit,m.prevSizePx,m.prevSize),C=v(m.nextUnit,m.nextSizePx,m.nextSize),D=m.paneIndex-1;G(D,P),G(m.paneIndex,C),pe(null),(q=l.current)==null||q.onDragEnd(m),L==null||L(m.prevSize,m.nextSize,m.paneIndex);const F=f[D],B=f[m.paneIndex];F&&(s==null||s(D,F.id,"dragged",null)),B&&(s==null||s(m.paneIndex,B.id,"dragged",null))}}),Je=u.useCallback((m,v)=>{var C;const P=v==="left"?m-1:m;if(P>=0&&P<f.length){W(P,{direction:v});const D=f[P];D&&((C=l.current)==null||C.onPaneCollapse({pane:D,index:P,direction:v}),s==null||s(P,D.id,"close",v))}},[f,W,s]),Ze=u.useCallback((m,v)=>{var C;const P=v==="left"?m-1:m;if(P>=0&&P<f.length){J(P,{direction:v});const D=f[P];D&&((C=l.current)==null||C.onPaneExpand({pane:D,index:P,direction:v}),s==null||s(P,D.id,"open",v))}},[f,J,s]);u.useImperativeHandle(e,()=>({addPane:N,removePane:_,togglePane:U,setPaneSize:G,getPaneState:X,removePanes:Y,swapPanes:de,collapsePane:W,expandPane:J,resizePane:he,getSnapshot:()=>{const m=i.current,v=m?r==="horizontal"?m.offsetWidth:m.offsetHeight:0;return{panes:f.map(P=>({...P})),totalSize:v,mode:r,timestamp:Date.now()}},restore:m=>{if(m.mode!==r){console.warn(`Cannot restore snapshot with different mode. Current: ${r}, Snapshot: ${m.mode}`);return}m.panes.forEach((v,P)=>{f[P]&&(G(P,v.size),v.collapsed!==f[P].collapsed&&U(P))})}}),[N,_,U,G,X,Y,de,W,J,he,f,r]);const Qe=u.useMemo(()=>({display:"flex",flexDirection:r==="horizontal"?"row":"column",width:E||"100%",height:k||"100%",overflow:"hidden",...M}),[r,E,k,M]),Ke=u.useMemo(()=>{const m=["a-split-container"];return r==="vertical"&&m.push("a-split-vertical"),(A||w)&&m.push("a-split-fix"),V!=null&&V.active&&m.push("a-split-dragging"),I&&m.push(I),m.join(" ")},[r,A,w,I,V==null?void 0:V.active]),et=()=>{const m=[];return f.forEach((v,P)=>{var D;const C=R.jsx(te,{level:z+1,children:v.content});if(m.push(R.jsx(fe,{id:v.id,size:v.size,collapsed:v.collapsed,minSize:v.minSize,maxSize:v.maxSize,mode:r,content:C,flexGrow:v.flexGrow},v.id)),P<f.length-1){const F=P+1,B=f[P+1];if(!B)return;const q=Ee(),Z=ae(F,y),K=le(F,b),ee=v.collapsed||!1,xe=B.collapsed||!1,we=oe(F,$),Pe=we||ee||xe;if(Z&&q){const be=(D=l.current)==null?void 0:D.renderHandle({index:F,mode:r,disabled:Pe,lineBar:K,onMouseDown:O=>ze(F,O)});be?m.push(R.jsx(u.Fragment,{children:be},`handlebar-${F}`)):m.push(R.jsx(ue,{index:F,mode:r,disabled:Pe,lineBar:K,explicitlyDisabled:we,onMouseDown:O=>ze(F,O),onCollapse:O=>Je(F,O),onExpand:O=>Ze(F,O),renderCustom:g,leftPaneCollapsed:ee,rightPaneCollapsed:xe},`handlebar-${F}`))}}}),m};return R.jsx("div",{ref:i,id:d,className:Ke,style:Qe,children:et()})});Ve.displayName="Split";function Et(t={}){const{mode:e="horizontal",initialPanes:n=[],initialSizes:r=[],minSizes:o=[],maxSizes:S=[],onPaneChange:c}=t,[h,$]=u.useState(()=>n.length>0?n.map(i=>({...i})):r.map((i,l)=>({id:`pane-${l}`,size:i,collapsed:!1,minSize:o[l]||0,maxSize:S[l]||100,content:null}))),[y]=u.useState(!1),b=u.useRef(!1),g=u.useRef(null),x=u.useCallback(i=>{g.current=i},[]),a=u.useCallback(i=>{$(l=>{const z=typeof i=="function"?i(l):i;return!b.current&&c&&c(z),z})},[c]),E=u.useCallback(i=>{let l;if(g.current){const z=document.getElementById(g.current);z&&(l=e==="horizontal"?z.offsetWidth:z.offsetHeight)}$(z=>{const w=i.position??z.length,f=i.render,N=f?f():i.content,_={id:`pane-${Date.now()}`,size:i.size,collapsed:i.collapsed||!1,minSize:i.minSize||0,maxSize:i.maxSize||100,content:N,renderFn:f},U=[...z];return U.splice(w,0,_),ke(U,w,i.size,l)})},[e]),k=u.useCallback(i=>{a(l=>{if(i<0||i>=l.length)return l;const z=[...l],w=z.splice(i,1)[0];return w?Ie(z,w.size):z})},[a]),I=u.useCallback(i=>{a(l=>De(l,i))},[a]),M=u.useCallback(i=>{a(l=>{if(i<0||i>=l.length)return l;const z=l[i];if(!z)return l;const w=[...l];return w[i]={...z,collapsed:!z.collapsed},w})},[a]),A=u.useCallback(i=>{a(l=>{if(i<0||i>=l.length)return l;const z=l[i];if(!z||z.collapsed)return l;const w=[...l];return w[i]={...z,collapsed:!0},w})},[a]),H=u.useCallback(i=>{a(l=>{if(i<0||i>=l.length)return l;const z=l[i];if(!z||!z.collapsed)return l;const w=[...l];return w[i]={...z,collapsed:!1},w})},[a]),T=u.useCallback((i,l,z)=>{a(w=>{if(i<0||i>=w.length)return w;const f=w[i];if(!f)return w;const N=[...w];return N[i]={...f,size:l},N})},[a]),L=u.useCallback((i,l)=>{a(z=>{if(i<0||i>=z.length||l<0||l>=z.length||i===l)return z;const w=[...z],f=w[i];return w[i]=w[l],w[l]=f,w})},[a]),s=u.useCallback(()=>({panes:h.map(i=>({id:i.id,size:i.size,collapsed:i.collapsed,minSize:i.minSize,maxSize:i.maxSize,content:i.content})),totalSize:0,mode:e,timestamp:Date.now()}),[h,e]),p=u.useCallback(i=>{if(i.mode!==e){console.warn(`Cannot restore snapshot with different mode. Current: ${e}, Snapshot: ${i.mode}`);return}b.current=!0,a(l=>i.panes.map((z,w)=>{const f=l.find(N=>N.id===z.id)||l[w];return{id:z.id,size:z.size,collapsed:z.collapsed,minSize:(f==null?void 0:f.minSize)??0,maxSize:(f==null?void 0:f.maxSize)??100,content:(f==null?void 0:f.content)??null}})),b.current=!1,c&&$(l=>(c(l),l))},[e,a,c]),d=u.useMemo(()=>h.map(i=>i.renderFn?{...i,content:i.renderFn()}:i),[h]);return u.useMemo(()=>({panes:d,mode:e,isDragging:y,addPane:E,removePane:k,removePanes:I,togglePane:M,collapsePane:A,expandPane:H,setPaneSize:T,swapPanes:L,setPanes:a,getSnapshot:s,restore:p,setContainerId:x}),[d,e,y,E,k,I,M,A,H,T,L,a,s,p,x])}function kt(t){return t}function It(t={}){const{storage:e="localStorage",key:n,debounceDelay:r=300}=t;let o=null;const S=b=>n||`a-multilayout-splitter:${b}`,c=()=>typeof window>"u"?null:e==="localStorage"?window.localStorage:window.sessionStorage,h=(b,g)=>{const x=c();if(x)try{const a=S(b),E=JSON.stringify({panes:g.panes.map(k=>({id:k.id,size:k.size,collapsed:k.collapsed})),mode:g.mode,timestamp:Date.now()});x.setItem(a,E)}catch(a){console.error("Failed to save split state:",a)}},$=b=>{const g=c();if(!g)return null;try{const x=S(b),a=g.getItem(x);return a?JSON.parse(a):null}catch(x){return console.error("Failed to load split state:",x),null}},y=(b,g)=>{o&&clearTimeout(o),o=setTimeout(()=>{h(b,g),o=null},r)};return{name:"persistence",version:"1.0.0",onInit(b){const g=$(b.splitId),x=g==null?void 0:g.panes;x&&x.length>0?setTimeout(()=>{b.getState().panes.length===x.length&&b.dispatch({type:"RESTORE_STATE",payload:{panes:x}})},0):setTimeout(()=>{const a=b.getState();h(b.splitId,a)},0)},onDragEnd(b,g){setTimeout(()=>{const x=g.getState();y(g.splitId,x)},0)},onPaneAdd(b,g){setTimeout(()=>{const x=g.getState();y(g.splitId,x)},0)},onPaneRemove(b,g){setTimeout(()=>{const x=g.getState();y(g.splitId,x)},0)},onPaneCollapse(b,g){setTimeout(()=>{const x=g.getState();y(g.splitId,x)},0)},onPaneExpand(b,g){setTimeout(()=>{const x=g.getState();y(g.splitId,x)},0)},onDestroy(){o&&(clearTimeout(o),o=null)}}}function Dt(t,e="localStorage"){const n=e==="localStorage"?window.localStorage:window.sessionStorage;try{const r=`a-multilayout-splitter:${t}`;n.removeItem(r)}catch(r){console.error("Failed to clear persisted state:",r)}}function Ft(t={}){const{enableArrowKeys:e=!0,enableNumberKeys:n=!0,stepSize:r=5,enableTabNavigation:o=!0}=t;let S=0,c=null;const h=($,y)=>{if(!$)return;const g=$.querySelectorAll(".a-split-pane")[y];g&&(g.focus(),g.setAttribute("tabindex","0"),S=y)};return{name:"keyboard",version:"1.0.0",onInit($){const y=$.getElement();if(!y)return;y.setAttribute("tabindex","0"),y.querySelectorAll(".a-split-pane").forEach((g,x)=>{g.setAttribute("tabindex",x===0?"0":"-1")}),c=g=>{const x=$.getState(),a=x.panes;if(e&&(g.key==="ArrowLeft"||g.key==="ArrowRight"||g.key==="ArrowUp"||g.key==="ArrowDown")){g.preventDefault();const E=x.mode==="horizontal",k=E&&g.key==="ArrowRight"||!E&&g.key==="ArrowDown",I=S,M=a[I],A=I<a.length-1?I+1:I-1,H=a[A];if(!M||!H)return;const T=parseFloat(M.size),L=parseFloat(H.size),s=k?r:-r;let p=T+s,d=L-s;const i=M.minSize||0,l=M.maxSize||100,z=H.minSize||0,w=H.maxSize||100;p=Math.max(i,Math.min(l,p)),d=Math.max(z,Math.min(w,d));const f=T+L;p+d!==f&&(p===i||p===l?d=f-p:p=f-d),$.dispatch({type:"SET_PANE_SIZE",payload:{index:I,size:`${p}%`}}),$.dispatch({type:"SET_PANE_SIZE",payload:{index:A,size:`${d}%`}})}if(n){const E=parseInt(g.key,10);if(!isNaN(E)&&E>=1&&E<=9){const k=E-1;k<a.length&&h(y,k)}}if(o&&g.key==="Tab"){g.preventDefault();let E=g.shiftKey?S-1:S+1;E<0?E=a.length-1:E>=a.length&&(E=0),h(y,E)}},y.addEventListener("keydown",c)},onDestroy($){const y=$.getElement();y&&c&&(y.removeEventListener("keydown",c),c=null)}}}function Ht(t,e){return{name:"custom-handle",version:"1.0.0",renderHandle(n){return u.createElement(t,{...n,...e})}}}function Rt(t){return{name:"custom-handle-render",version:"1.0.0",renderHandle(e){return t(e)}}}const _e=u.createContext(null),Ue=u.createContext(null),Be=u.createContext(null);function At({id:t,mode:e="horizontal",enablePersistence:n=!1,storageKey:r=`split-state-${t}`,children:o,_panes:S=[],_addPane:c,_removePane:h,_togglePane:$,_setPaneSize:y,_getPaneState:b}){const g=u.useRef({isDragging:!1,activeHandlebar:null}),x=u.useMemo(()=>({id:t,mode:e,enablePersistence:n,storageKey:r}),[t,e,n,r]),a=u.useMemo(()=>({panes:S,isDragging:g.current.isDragging,activeHandlebar:g.current.activeHandlebar}),[S,g.current.isDragging,g.current.activeHandlebar]),E=u.useMemo(()=>({addPane:c||(()=>console.warn("addPane not available")),removePane:h||(()=>console.warn("removePane not available")),togglePane:$||(()=>console.warn("togglePane not available")),setPaneSize:y||(()=>console.warn("setPaneSize not available")),getPaneState:b||(()=>[]),setDragging:(k,I)=>{g.current.isDragging=k,g.current.activeHandlebar=I??null}}),[c,h,$,y,b]);return R.jsx(_e.Provider,{value:x,children:R.jsx(Ue.Provider,{value:a,children:R.jsx(Be.Provider,{value:E,children:o})})})}function qe(){const t=u.useContext(_e);if(!t)throw new Error("useSplitConfig must be used within SplitProvider");return t}function Q(){const t=u.useContext(Ue);if(!t)throw new Error("useSplitState must be used within SplitProvider");return t}function Oe(){return u.useContext(Be)}function Nt(){const t=Oe();if(!t)throw new Error("useSplit must be used within SplitProvider");return{config:qe(),state:Q(),actions:t}}function Xe(t){const{panes:e}=Q();return e[t]}function Tt(){const{panes:t}=Q();return t.length}function Mt(){const{isDragging:t}=Q();return t}function Lt(t){const e=Xe(t);return(e==null?void 0:e.collapsed)??!1}function jt(){const{panes:t}=Q();return u.useMemo(()=>t.filter(e=>!e.collapsed),[t])}exports.DragHandle=ue;exports.NestingProvider=te;exports.PaneComponent=fe;exports.PluginManager=Ge;exports.Split=Ve;exports.SplitProvider=At;exports.animatePaneSize=Ce;exports.applyCollapseState=rt;exports.batchUpdatePanes=ft;exports.calculateFlexBasis=Le;exports.calculateFlexValues=je;exports.calculateHandlebarPosition=bt;exports.calculateTotalSize=wt;exports.canResize=vt;exports.clampSize=zt;exports.clearPersistedState=Dt;exports.constrainSize=lt;exports.createPane=ct;exports.createPlugin=kt;exports.customHandlePlugin=Ht;exports.customHandleRenderPlugin=Rt;exports.debounce=Re;exports.findPaneIndex=st;exports.getAxisProperty=Ct;exports.getCoordinateProperty=$t;exports.getPaneElement=at;exports.getVisiblePanes=ot;exports.haveSameUnit=St;exports.isHandlebarDisabled=oe;exports.isHandlebarVisible=ae;exports.isLineBarStyle=le;exports.isPaneVisible=$e;exports.keyboardPlugin=Ft;exports.normalizePaneSizes=yt;exports.normalizeSize=mt;exports.parseSize=j;exports.percentageToPixel=pt;exports.persistencePlugin=It;exports.pixelToPercentage=gt;exports.restorePaneState=dt;exports.serializePaneState=ht;exports.shouldShowHandlebar=Ee;exports.throttle=He;exports.togglePaneCollapse=it;exports.updatePaneSize=ut;exports.useDragHandler=Ae;exports.useIsCollapsed=Lt;exports.useIsDragging=Mt;exports.useNestingLevel=ce;exports.usePane=Xe;exports.usePaneCount=Tt;exports.usePaneManager=Fe;exports.usePersistence=Ne;exports.usePluginContext=Te;exports.useSplit=Nt;exports.useSplitActions=Oe;exports.useSplitConfig=qe;exports.useSplitController=Et;exports.useSplitState=Q;exports.useVisiblePanes=jt;exports.validatePaneSizes=Pt;exports.withNesting=xt;
2
2
  //# sourceMappingURL=index.cjs.map