1import{r as l,R as M,a as De,j as he}from"./vendor-wHC2ntYA.js";import{c as Nt}from"./app-CJjB2_mY.js";import{P as yn}from"./PositionBadge-ZwrkW000.js";import{g as wn}from"./teamColors-BHdOQr_K.js";import{c as xn}from"./createLucideIcon-Dy18DS_c.js";const Dn=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Cn=xn("grip-vertical",Dn),Ke=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pe(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function st(e){return"nodeType"in e}function P(e){var t,n;return e?pe(e)?e:st(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function at(e){const{Document:t}=P(e);return e instanceof t}function Ae(e){return pe(e)?!1:e instanceof P(e).HTMLElement}function Ut(e){return e instanceof P(e).SVGElement}function be(e){return e?pe(e)?e.document:st(e)?at(e)?e:Ae(e)||Ut(e)?e.ownerDocument:document:document:document}const J=Ke?l.useLayoutEffect:l.useEffect;function Ue(e){const t=l.useRef(e);return J(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Sn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Ee(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return J(()=>{n.current!==e&&(n.current=e)},t),n}function Oe(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function je(e){const t=Ue(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Be(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Ze={};function We(e,t){return l.useMemo(()=>{if(t)return t;const n=Ze[e]==null?0:Ze[e]+1;return Ze[e]=n,e+"-"+n},[e,t])}function Wt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[c,u]of s){const f=i[c];f!=null&&(i[c]=f+e*u)}return i},{...t})}}const ge=Wt(1),Fe=Wt(-1);function Rn(e){return"clientX"in e&&"clientY"in e}function lt(e){if(!e)return!1;const{KeyboardEvent:t}=P(e.target);return t&&e instanceof t}function En(e){if(!e)return!1;const{TouchEvent:t}=P(e.target);return t&&e instanceof t}function Xe(e){if(En(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Rn(e)?{x:e.clientX,y:e.clientY}:null}const ve=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ve.Translate.toString(e),ve.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Mn(e){return e.matches(Tt)?e:e.querySelector(Tt)}const An={display:"none"};function On(e){let{id:t,value:n}=e;return M.createElement("div",{id:t,style:An},n)}function Nn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return M.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Tn(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ht=l.createContext(null);function kn(e){const t=l.useContext(Ht);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Ln(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const In={draggable:` 2 To pick up a draggable item, press the space bar. 3 While dragging, use the arrow keys to move the item. 4 Press space again to drop the item in its new position, or press escape to cancel. 5 `},Pn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function zn(e){let{announcements:t=Pn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=In}=e;const{announce:i,announcement:a}=Tn(),s=We("DndLiveRegion"),[c,u]=l.useState(!1);if(l.useEffect(()=>{u(!0)},[]),kn(l.useMemo(()=>({onDragStart(d){let{active:v}=d;i(t.onDragStart({active:v}))},onDragMove(d){let{active:v,over:h}=d;t.onDragMove&&i(t.onDragMove({active:v,over:h}))},onDragOver(d){let{active:v,over:h}=d;i(t.onDragOver({active:v,over:h}))},onDragEnd(d){let{active:v,over:h}=d;i(t.onDragEnd({active:v,over:h}))},onDragCancel(d){let{active:v,over:h}=d;
5i(t.onDragCancel({active:v,over:h}))}}),[i,t])),!c)return null;const f=M.createElement(M.Fragment,null,M.createElement(On,{id:r,value:o.draggable}),M.createElement(Nn,{id:s,announcement:a}));return n?De.createPortal(f,n):f}var O;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(O||(O={}));function $e(){}function io(e,t){return l.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function so(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const K=Object.freeze({x:0,y:0});function jn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Bn(e,t){const n=Xe(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Fn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Xn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function $n(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function kt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const ao=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=kt(t,t.left,t.top),i=[];for(const a of r){const{id:s}=a,c=n.get(s);if(c){const u=jn(kt(c),o);i.push({id:s,data:{droppableContainer:a,value:u}})}}return i.sort(Fn)};function Yn(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,f=a*s,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}const Kn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:a}=i,s=n.get(a);if(s){const c=Yn(s,t);c>0&&o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(Xn)};function Un(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Vt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:K}function Wn(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const Hn=Wn(1);function _t(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Vn(e,t,n){const r=_t(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,c=e.left-a-(1-o)*parseFloat(n),u=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const _n={ignoreTransform:!1};function Ne(e,t){t===void 0&&(t=_n);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=P(e).getComputedStyle(e);u&&(n=Vn(n,u,f))}const{top:r,left:o,width:i,height:a,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:c}}function Lt(e){return Ne(e,{ignoreTransform:!0})}function qn(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Jn(e,t){return t===void 0&&(t=P(e).getComputedStyle(e)),t.position==="fixed"}function Gn(e,t){t===void 0&&(t=P(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function ct(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(at(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ae(o)||Ut(o)||n.includes(o))return n;const i=P(e).getComputedStyle(o);return o!==e&&Gn(o,i)&&n.push(o),Jn(o,i)?n:r(o.parentNode)}return e?r(e):n}function qt(e){const[t]=ct(e,1);return t??null}function et(e){return!Ke||!e?null:pe(e)?e:st(e)?at(e)||e===be(e).scrollingElement?window:Ae(e)?e:null:null}function Jt(e){return pe(e)?e.scrollX:e.scrollLeft}function Gt(e){return pe(e)?e.scrollY:e.scrollTop}function rt(e){return{x:Jt(e),y:Gt(e)}}var T;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(T||(T={}));function Qt(e){return!Ke||!e?!1:e===document.scrollingElement}function Zt(e){const t={x:0,y:0},n=Qt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const Qn={x:.2,y:.2};function Zn(e,t,n,r,o){let{top:i,left:a,right:s,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=Qn);const{isTop:u,isBottom:f,isLeft:d,isRight:v}=Zt(e),h={x:0,y:0},C={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+g.height?(h.y=T.Backward,C.y=r*Math.abs((t.top+g.height-i)/g.height)):!f&&c>=t.bottom-g.height&&(h.y=T.Forward,C.y=r*Math.abs((t.bottom-g.height-c)/g.height)),!v&&s>=t.right-g.width?(h.x=T.Forward,C.x=r*Math.abs((t.right-g.width-s)/g.width)):!d&&a<=t.left+g.width&&(h.x=T.Backward,C.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:h,speed:C}}function er(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function en(e){return e.reduce((t,n)=>ge(t,rt(n)),K)}function tr(e){return e.reduce((t,n)=>t+Jt(n),0)}function nr(e){return e.reduce((t,n)=>t+Gt(n),0)}function tn(e,t){if(t===void 0&&(t=Ne),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);qt(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const rr=[["x",["left","right"],tr],["y",["top","bottom"],nr]];class ut{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ct(n),o=en(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,s]of rr)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(r),f=o[i]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ce{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>
5{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function or(e){const{EventTarget:t}=P(e);return e instanceof t?e:be(e)}function tt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var X;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(X||(X={}));function It(e){e.preventDefault()}function ir(e){e.stopPropagation()}var D;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(D||(D={}));const nn={start:[D.Space,D.Enter],cancel:[D.Esc],end:[D.Space,D.Enter,D.Tab]},sr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case D.Right:return{...n,x:n.x+25};case D.Left:return{...n,x:n.x-25};case D.Down:return{...n,y:n.y+25};case D.Up:return{...n,y:n.y-25}}};class rn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Ce(be(n)),this.windowListeners=new Ce(P(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(X.Resize,this.handleCancel),this.windowListeners.add(X.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(X.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&tn(r),n(K)}handleKeyDown(t){if(lt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=nn,coordinateGetter:a=sr,scrollBehavior:s="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:K;this.referenceCoordinates||(this.referenceCoordinates=f);const d=a(t,{active:n,context:r.current,currentCoordinates:f});if(d){const v=Fe(d,f),h={x:0,y:0},{scrollableAncestors:C}=r.current;for(const g of C){const p=t.code,{isTop:y,isRight:x,isLeft:w,isBottom:N,maxScroll:S,minScroll:R}=Zt(g),b=er(g),m={x:Math.min(p===D.Right?b.right-b.width/2:b.right,Math.max(p===D.Right?b.left:b.left+b.width/2,d.x)),y:Math.min(p===D.Down?b.bottom-b.height/2:b.bottom,Math.max(p===D.Down?b.top:b.top+b.height/2,d.y))},E=p===D.Right&&!x||p===D.Left&&!w,k=p===D.Down&&!N||p===D.Up&&!y;if(E&&m.x!==d.x){const A=g.scrollLeft+v.x,H=p===D.Right&&A<=S.x||p===D.Left&&A>=R.x;if(H&&!v.y){g.scrollTo({left:A,behavior:s});return}H?h.x=g.scrollLeft-A:h.x=p===D.Right?g.scrollLeft-S.x:g.scrollLeft-R.x,h.x&&g.scrollBy({left:-h.x,behavior:s});break}else if(k&&m.y!==d.y){const A=g.scrollTop+v.y,H=p===D.Down&&A<=S.y||p===D.Up&&A>=R.y;if(H&&!v.x){g.scrollTo({top:A,behavior:s});return}H?h.y=g.scrollTop-A:h.y=p===D.Down?g.scrollTop-S.y:g.scrollTop-R.y,h.y&&g.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,ge(Fe(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}rn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=nn,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=i.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Pt(e){return!!(e&&"distance"in e)}function zt(e){return!!(e&&"delay"in e)}class dt{constructor(t,n,r){var o;r===void 0&&(r=or(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:a}=i;
5this.props=t,this.events=n,this.document=be(a),this.documentListeners=new Ce(this.document),this.listeners=new Ce(r),this.windowListeners=new Ce(P(a)),this.initialCoordinates=(o=Xe(i))!=null?o:K,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(X.Resize,this.handleCancel),this.windowListeners.add(X.DragStart,It),this.windowListeners.add(X.VisibilityChange,this.handleCancel),this.windowListeners.add(X.ContextMenu,It),this.documentListeners.add(X.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(zt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Pt(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(X.Click,ir,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(X.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!o)return;const c=(n=Xe(t))!=null?n:K,u=Fe(o,c);if(!r&&s){if(Pt(s)){if(s.tolerance!=null&&tt(u,s.tolerance))return this.handleCancel();if(tt(u,s.distance))return this.handleStart()}if(zt(s)&&tt(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===D.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const ar={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class on extends dt{constructor(t){const{event:n}=t,r=be(n.target);super(t,ar,r)}}on.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const lr={move:{name:"mousemove"},end:{name:"mouseup"}};var ot;(function(e){e[e.RightClick=2]="RightClick"})(ot||(ot={}));class cr extends dt{constructor(t){super(t,lr,be(t.event.target))}}cr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ot.RightClick?!1:(r?.({event:n}),!0)}}];const nt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ur extends dt{constructor(t){super(t,nt)}static setup(){return window.addEventListener(nt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(nt.move.name,t)};function t(){}}}ur.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Se;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Se||(Se={}));var Ye;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ye||(Ye={}));function dr(e){let{acceleration:t,activator:n=Se.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=Ye.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:v}=e;const h=hr({delta:d,disabled:!i}),[C,g]=Sn(),p=l.useRef({x:0,y:0}),y=l.useRef({x:0,y:0}),x=l.useMemo(()=>{switch(n){case Se.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Se.DraggableRect:return o}},[n,o,c]),w=l.useRef(null),N=l.useCallback(()=>{const R=w.current;if(!R)return;const b=p.current.x*y.current.x,m=p.current.y*y.current.y;R.scrollBy(b,m)},[]),S=l.useMemo(()=>s===Ye.TreeOrder?[...u].reverse():u,[s,u]);l.useEffect(()=>{if(!i||!u.length||!x){g();return}for(const R of S){if(r?.(R)===!1)continue;const b=u.indexOf(R),m=f[b];if(!m)continue;const{direction:E,speed:k}=Zn(R,m,x,t,v);for(const A of["x","y"])h[A][E[A]]||(k[A]=0,E[A]=0);if(k.x>0||k.y>0){g(),w.current=R,C(N,a),p.current=k,y.current=E;return}}p.current={x:0,y:0},y.current={x:0,y:0},g()},[t,N,r,g,i,a,JSON.stringify(x),JSON.stringify(h),C,u,S,f,JSON.stringify(v)])}const fr={x:{[T.Backward]:!1,[T.Forward]:!1},y:{[T.Backward]:!1,[T.Forward]:!1}};function hr(e){let{delta:t,disabled:n}=e;const r=Be(t);return Oe(o=>{if(n||!r||!o)return fr;
5const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[T.Backward]:o.x[T.Backward]||i.x===-1,[T.Forward]:o.x[T.Forward]||i.x===1},y:{[T.Backward]:o.y[T.Backward]||i.y===-1,[T.Forward]:o.y[T.Forward]||i.y===1}}},[n,t,r])}function gr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Oe(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function vr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...i]},[]),[e,t])}var Me;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Me||(Me={}));var it;(function(e){e.Optimized="optimized"})(it||(it={}));const jt=new Map;function pr(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=l.useState(null),{frequency:s,measure:c,strategy:u}=o,f=l.useRef(e),d=p(),v=Ee(d),h=l.useCallback(function(y){y===void 0&&(y=[]),!v.current&&a(x=>x===null?y:x.concat(y.filter(w=>!x.includes(w))))},[v]),C=l.useRef(null),g=Oe(y=>{if(d&&!n)return jt;if(!y||y===jt||f.current!==e||i!=null){const x=new Map;for(let w of e){if(!w)continue;if(i&&i.length>0&&!i.includes(w.id)&&w.rect.current){x.set(w.id,w.rect.current);continue}const N=w.node.current,S=N?new ut(c(N),N):null;w.rect.current=S,S&&x.set(w.id,S)}return x}return y},[e,i,n,d,c]);return l.useEffect(()=>{f.current=e},[e]),l.useEffect(()=>{d||h()},[n,d]),l.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),l.useEffect(()=>{d||typeof s!="number"||C.current!==null||(C.current=setTimeout(()=>{h(),C.current=null},s))},[s,d,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:i!=null};function p(){switch(u){case Me.Always:return!1;case Me.BeforeDragging:return n;default:return!n}}}function ft(e,t){return Oe(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function br(e,t){return ft(e,t)}function mr(e){let{callback:t,disabled:n}=e;const r=Ue(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return l.useEffect(()=>()=>o?.disconnect(),[o]),o}function He(e){let{callback:t,disabled:n}=e;const r=Ue(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return l.useEffect(()=>()=>o?.disconnect(),[o]),o}function yr(e){return new ut(Ne(e),e)}function Bt(e,t,n){t===void 0&&(t=yr);const[r,o]=l.useState(null);function i(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const a=mr({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),s=He({callback:i});return J(()=>{i(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),r}function wr(e){const t=ft(e);return Vt(e,t)}const Ft=[];function xr(e){const t=l.useRef(e),n=Oe(r=>e?r&&r!==Ft&&e&&t.current&&e.parentNode===t.current.parentNode?r:ct(e):Ft,[e]);return l.useEffect(()=>{t.current=e},[e]),n}function Dr(e){const[t,n]=l.useState(null),r=l.useRef(e),o=l.useCallback(i=>{const a=et(i.target);a&&n(s=>s?(s.set(a,rt(a)),new Map(s)):null)},[]);return l.useEffect(()=>{const i=r.current;if(e!==i){a(i);const s=e.map(c=>{const u=et(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,rt(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(i)};function a(s){s.forEach(c=>{const u=et(c);u?.removeEventListener("scroll",o)})}},[o,e]),l.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>ge(i,a),K):en(e):K,[e,t])}function Xt(e,t){t===void 0&&(t=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},t),l.useEffect(()=>{const r=e!==K;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Fe(e,n.current):K}function Cr(e){l.useEffect(()=>{if(!Ke)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function Sr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=a=>{i(a,t)},n},{}),[e,t])}function sn(e){return l.useMemo(()=>e?qn(e):null,[e])}const $t=[];function Rr(e,t){t===void 0&&(t=Ne);const[n]=e,r=sn(n?P(n):null),[o,i]=l.useState($t);function a(){i(()=>e.length?e.map(c=>Qt(c)?r:new ut(t(c),c)):$t)}const s=He({callback:a});return J(()=>{s?.disconnect(),a(),e.forEach(c=>s?.observe(c))},[e]),o}function an(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ae(t)?t:e}function Er(e){let{measure:t}=e;const[n,r]=l.useState(null),o=l.useCallback(u=>{for(const{target:f}of u)if(Ae(f)){r(d=>{const v=t(f);return d?{...d,width:v.width,height:v.height}:v});break}},[t]),i=He({callback:o}),a=l.useCallback(u=>{const f=an(u);i?.disconnect(),f&&i?.observe(f),r(f?t(f):null)},[t,i]),[s,c]=je(a);return l.useMemo(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const Mr=[{sensor:on,options:{}},{sensor:rn,options:{}}],Ar={current:{}},ze={draggable:{measure:Lt},droppable:{measure:Lt,strategy:Me.WhileDragging,frequency:it.Optimized},dragOverlay:{measure:Ne}};class Re extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;
5return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Or={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Re,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:$e},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ze,measureDroppableContainers:$e,windowRect:null,measuringScheduled:!1},ln={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:$e,draggableNodes:new Map,over:null,measureDroppableContainers:$e},Te=l.createContext(ln),cn=l.createContext(Or);function Nr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Re}}}function Tr(e,t){switch(t.type){case O.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case O.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case O.DragEnd:case O.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case O.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Re(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case O.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Re(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case O.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Re(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function kr(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=l.useContext(Te),i=Be(r),a=Be(n?.id);return l.useEffect(()=>{if(!t&&!r&&i&&a!=null){if(!lt(i)||document.activeElement===i.target)return;const s=o.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=Mn(f);if(d){d.focus();break}}})}},[r,t,o,a,i]),null}function un(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function Lr(e){return l.useMemo(()=>({draggable:{...ze.draggable,...e?.draggable},droppable:{...ze.droppable,...e?.droppable},dragOverlay:{...ze.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Ir(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l.useRef(!1),{x:a,y:s}=typeof o=="boolean"?{x:o,y:o}:o;J(()=>{if(!a&&!s||!t){i.current=!1;return}if(i.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=Vt(f,r);if(a||(d.x=0),s||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const v=qt(u);v&&v.scrollBy({top:d.y,left:d.x})}},[t,a,s,r,n])}const Ve=l.createContext({...K,scaleX:1,scaleY:1});var re;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(re||(re={}));const lo=l.memo(function(t){var n,r,o,i;let{id:a,accessibility:s,autoScroll:c=!0,children:u,sensors:f=Mr,collisionDetection:d=Kn,measuring:v,modifiers:h,...C}=t;const g=l.useReducer(Tr,void 0,Nr),[p,y]=g,[x,w]=Ln(),[N,S]=l.useState(re.Uninitialized),R=N===re.Initialized,{draggable:{active:b,nodes:m,translate:E},droppable:{containers:k}}=p,A=b!=null?m.get(b):null,H=l.useRef({initial:null,translated:null}),V=l.useMemo(()=>{var I;return b!=null?{id:b,data:(I=A?.data)!=null?I:Ar,rect:H}:null},[b,A]),G=l.useRef(null),[ht,gt]=l.useState(null),[_,vt]=l.useState(null),oe=Ee(C,Object.values(C)),_e=We("DndDescribedBy",a),pt=l.useMemo(()=>k.getEnabled(),[k]),ie=Lr(v),{droppableRects:le,measureDroppableContainers:ke,measuringScheduled:bt}=pr(pt,{dragging:R,dependencies:[E.x,E.y],config:ie.droppable}),$=gr(m,b),mt=l.useMemo(()=>_?Xe(_):null,[_]),yt=mn(),wt=br($,ie.draggable.measure);Ir({activeNode:b!=null?m.get(b):null,config:yt.layoutShiftCompensation,initialRect:wt,measure:ie.draggable.measure});const Y=Bt($,ie.draggable.measure,wt),qe=Bt($?$.parentElement:null),se=l.useRef({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:le,draggableNodes:m,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),xt=k.getNodeFor((n=se.current.over)==null?void 0:n.id),ae=Er({measure:ie.dragOverlay.measure}),Le=(r=ae.nodeRef.current)!=null?r:$,ce=R?(o=ae.rect)!=null?o:Y:null,Dt=!!(ae.nodeRef.current&&ae.rect),Ct=wr(Dt?null:Y),Je=sn(Le?P(Le):null),Q=xr(R?xt??$:null),Ie=Rr(Q),Pe=un(h,{transform:{x:E.x-Ct.x,y:E.y-Ct.y,scaleX:1,scaleY:1},activatorEvent:_,active:V,activeNodeRect:Y,containerNodeRect:qe,draggingNodeRect:ce,over:se.current.over,overlayNodeRect:ae.rect,scrollableAncestors:Q,scrollableAncestorRects:Ie,windowRect:Je}),St=mt?ge(mt,E):null,Rt=Dr(Q),dn=Xt(Rt),fn=Xt(Rt,[Y]),ue=ge(Pe,dn),de=ce?Hn(ce,Pe):null,me=V&&de?d({active:V,collisionRect:de,droppableRects:le,droppableContainers:pt,pointerCoordinates:St}):null,Et=$n(me,"id"),[Z,Mt]=l.useState(null),hn=Dt?Pe:ge(Pe,fn),gn=Un(hn,(i=Z?.rect)!=null?i:null,Y),Ge=l.useRef(null),At=l.useCallback((I,z)=>{let{sensor:j,options:ee}=z;if(G.current==null)return;const F=m.get(G.current);if(!F)return;const B=I.nativeEvent,U=new j({active:G.current,activeNode:F,event:B,options:ee,context:se,onAbort(L){if(!m.get(L))return;const{onDragAbort:W}=oe.current,q={id:L};W?.(q),x({type:"onDragAbort",event:q})},onPending(L,te,W,q){if(!m.get(L))return;const{onDragPending:we}=oe.current,ne={id:L,constraint:te,initialCoordinates:W,offset:q};we?.(ne),x({type:"onDragPending",event:ne})},onStart(L){const te=G.current;if(te==null)return;const W=m.get(te);if(!W)return;const{onDragStart:q}=oe.current,ye={activatorEvent:B,active:{id:te,data:W.data,rect:H}};De.unstable_batchedUpdates(()=>{q?.(ye),S(re.Initializing),y({type:O.DragStart,initialCoordinates:L,active:te}),x({type:"onDragStart",event:ye}),gt(Ge.current),vt(B)})},onMove(L){y({type:O.DragMove,coordinates:L})},onEnd:fe(O.DragEnd),onCancel:fe(O.DragCancel)});Ge.current=U;function fe(L){return async function(){const{active:W,collisions:q,over:ye,scrollAdjustedTranslate:we}=se.current;let ne=null;if(W&&we){const{cancelDrop:xe}=oe.current;ne={activatorEvent:B,active:W,collisions:q,delta:we,over:ye},L===O.DragEnd&&typeof xe=="function"&&await Promise.resolve(xe(ne))&&(L=O.DragCancel)}G.current=null,De.unstable_batchedUpdates(()=>{y({type:L}),S(re.Uninitialized),Mt(null),gt(null),vt(null),Ge.current=null;const xe=L===O.DragEnd?"onDragEnd":"onDragCancel";if(ne){const Qe=oe.current[xe];Qe?.(ne),x({type:xe,event:ne})}})}}},[m]),vn=l.useCallback((I,z)=>(j,ee)=>{const F=j.nativeEvent,B=m.get(ee);if(G.current!==null||!B||F.dndKit||F.defaultPrevented)return;const U={active:B};I(j,z.options,U)===!0&&(F.dndKit={capturedBy:z.sensor},G.current=ee,At(j,z))},[m,At]),Ot=vr(f,vn);Cr(f),J(()=>{Y&&N===re.Initializing&&S(re.Initialized)},[Y,N]),l.useEffect(()=>{const{onDragMove:I}=oe.current,{active:z,activatorEvent:j,collisions:ee,over:F}=se.current;if(!z||!j)return;const B={active:z,activatorEvent:j,collisions:ee,delta:{x:ue.x,y:ue.y},over:F};De.unstable_batchedUpdates(()=>{I?.(B),x({type:"onDragMove",event:B})})},[ue.x,ue.y]),l.useEffect(()=>{const{active:I,activatorEvent:z,collisions:j,droppableContainers:ee,scrollAdjustedTranslate:F}=se.current;if(!I||G.current==null||!z||!F)return;const{onDragOver:B}=oe.current,U=ee.get(Et),fe=U&&U.rect.current?{id:U.id,rect:U.rect.current,data:U.data,disabled:U.disabled}:null,L={active:I,activatorEvent:z,collisions:j,delta:{x:F.x,y:F.y},over:fe};De.unstable_batchedUpdates(()=>{Mt(fe),B?.(L),x({type:"onDragOver",event:L})})},[Et]),J(()=>{se.current={activatorEvent:_,active:V,activeNode:$,collisionRect:de,collisions:me,droppableRects:le,draggableNodes:m,draggingNode:Le,draggingNodeRect:ce,droppableContainers:k,over:Z,scrollableAncestors:Q,scrollAdjustedTranslate:ue},H.current={initial:ce,translated:de}},[V,$,me,de,m,Le,ce,le,k,Z,Q,ue]),dr({...yt,delta:E,draggingRect:de,pointerCoordinates:St,scrollableAncestors:Q,scrollableAncestorRects:Ie});const pn=l.useMemo(()=>({active:V,activeNode:$,activeNodeRect:Y,activatorEvent:_,collisions:me,containerNodeRect:qe,dragOverlay:ae,draggableNodes:m,droppableContainers:k,droppableRects:le,over:Z,measureDroppableContainers:ke,scrollableAncestors:Q,scrollableAncestorRects:Ie,measuringConfiguration:ie,measuringScheduled:bt,windowRect:Je}),[V,$,Y,_,me,qe,ae,m,k,le,Z,ke,Q,Ie,ie,bt,Je]),bn=l.useMemo(()=>({activatorEvent:_,activators:Ot,active:V,activeNodeRect:Y,ariaDescribedById:{draggable:_e},dispatch:y,draggableNodes:m,over:Z,measureDroppableContainers:ke}),[_,Ot,V,Y,y,_e,m,Z,ke]);return M.createElement(Ht.Provider,{value:w},M.createElement(Te.Provider,{value:bn},M.createElement(cn.Provider,{value:pn},M.createElement(Ve.Provider,{value:gn},u)),M.createElement(kr,{disabled:s?.restoreFocus===!1})),M.createElement(zn,{...s,hiddenTextDescribedById:_e}));function mn(){const I=ht?.autoScrollEnabled===!1,z=typeof c=="object"?c.enabled===!1:c===!1,j=R&&!I&&!z;return typeof c=="object"?{...c,enabled:j}:{enabled:j}}}),Pr=l.createContext(null),Yt="button",zr="Draggable";function jr(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=We(zr),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:v}=l.useContext(Te),{role:h=Yt,roleDescription:C="draggable",tabIndex:g=0}=o??{},p=c?.id===t,y=l.useContext(p?Ve:Pr),[x,w]=je(),[N,S]=je(),R=Sr(a,t),b=Ee(n);J(()=>(d.set(t,{id:t,key:i,node:x,activatorNode:N,data:b}),()=>{const E=d.get(t);E&&E.key===i&&d.delete(t)}),[d,t]);const m=l.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":p&&h===Yt?!0:void 0,"aria-roledescription":C,"aria-describedby":f.draggable}),[r,h,g,p,C,f.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:m,isDragging:p,listeners:r?void 0:R,node:x,over:v,setNodeRef:w,setActivatorNodeRef:S,transform:y}}function Br(){return l.useContext(cn)}const Fr="Droppable",Xr={timeout:25};function co(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=We(Fr),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=l.useContext(Te),f=l.useRef({disabled:n}),d=l.useRef(!1),v=l.useRef(null),h=l.useRef(null),{disabled:C,updateMeasurementsFor:g,timeout:p}={...Xr,...o},y=Ee(g??r),x=l.useCallback(()=>
5{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),h.current=null},p)},[p]),w=He({callback:x,disabled:C||!a}),N=l.useCallback((m,E)=>{w&&(E&&(w.unobserve(E),d.current=!1),m&&w.observe(m))},[w]),[S,R]=je(N),b=Ee(t);return l.useEffect(()=>{!w||!S.current||(w.disconnect(),d.current=!1,w.observe(S.current))},[S,w]),l.useEffect(()=>(s({type:O.RegisterDroppable,element:{id:r,key:i,disabled:n,node:S,rect:v,data:b}}),()=>s({type:O.UnregisterDroppable,key:i,id:r})),[r]),l.useEffect(()=>{n!==f.current.disabled&&(s({type:O.SetDroppableDisabled,id:r,key:i,disabled:n}),f.current.disabled=n)},[r,i,n,s]),{active:a,rect:v,isOver:c?.id===r,node:S,over:c,setNodeRef:R}}function $r(e){let{animation:t,children:n}=e;const[r,o]=l.useState(null),[i,a]=l.useState(null),s=Be(n);return!n&&!r&&s&&o(s),J(()=>{if(!i)return;const c=r?.key,u=r?.props.id;if(c==null||u==null){o(null);return}Promise.resolve(t(u,i)).then(()=>{o(null)})},[t,r,i]),M.createElement(M.Fragment,null,n,r?l.cloneElement(r,{ref:a}):null)}const Yr={x:0,y:0,scaleX:1,scaleY:1};function Kr(e){let{children:t}=e;return M.createElement(Te.Provider,{value:ln},M.createElement(Ve.Provider,{value:Yr},t))}const Ur={position:"fixed",touchAction:"none"},Wr=e=>lt(e)?"transform 250ms ease":void 0,Hr=l.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:a,rect:s,style:c,transform:u,transition:f=Wr}=e;if(!s)return null;const d=o?u:{...u,scaleX:1,scaleY:1},v={...Ur,width:s.width,height:s.height,top:s.top,left:s.left,transform:ve.Transform.toString(d),transformOrigin:o&&r?Bn(r,s):void 0,transition:typeof f=="function"?f(r):f,...c};return M.createElement(n,{className:a,style:v,ref:t},i)}),Vr=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(i!=null&&i.active)for(const[s,c]of Object.entries(i.active))c!==void 0&&(o[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,c));if(i!=null&&i.dragOverlay)for(const[s,c]of Object.entries(i.dragOverlay))c!==void 0&&r.node.style.setProperty(s,c);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[c,u]of Object.entries(o))n.node.style.setProperty(c,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},_r=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:ve.Transform.toString(t)},{transform:ve.Transform.toString(n)}]},qr={duration:250,easing:"ease",keyframes:_r,sideEffects:Vr({styles:{active:{opacity:"0"}}})};function Jr(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Ue((i,a)=>{if(t===null)return;const s=n.get(i);if(!s)return;const c=s.node.current;if(!c)return;const u=an(a);if(!u)return;const{transform:f}=P(a).getComputedStyle(a),d=_t(f);if(!d)return;const v=typeof t=="function"?t:Gr(t);return tn(c,o.draggable.measure),v({active:{id:i,data:s.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:o,transform:d})})}function Gr(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...qr,...e};return i=>{let{active:a,dragOverlay:s,transform:c,...u}=i;if(!t)return;const f={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},d={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/s.rect.height:1},v={x:c.x-f.x,y:c.y-f.y,...d},h=o({...u,active:a,dragOverlay:s,transform:{initial:c,final:v}}),[C]=h,g=h[h.length-1];if(JSON.stringify(C)===JSON.stringify(g))return;const p=r?.({active:a,dragOverlay:s,...u}),y=s.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{y.onfinish=()=>{p?.(),x()}})}}let Kt=0;function Qr(e){return l.useMemo(()=>{if(e!=null)return Kt++,Kt},[e])}const uo=M.memo(e=>
5{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:a,wrapperElement:s="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:v,containerNodeRect:h,draggableNodes:C,droppableContainers:g,dragOverlay:p,over:y,measuringConfiguration:x,scrollableAncestors:w,scrollableAncestorRects:N,windowRect:S}=Br(),R=l.useContext(Ve),b=Qr(d?.id),m=un(a,{activatorEvent:f,active:d,activeNodeRect:v,containerNodeRect:h,draggingNodeRect:p.rect,over:y,overlayNodeRect:p.rect,scrollableAncestors:w,scrollableAncestorRects:N,transform:R,windowRect:S}),E=ft(v),k=Jr({config:r,draggableNodes:C,droppableContainers:g,measuringConfiguration:x}),A=E?p.setRef:void 0;return M.createElement(Kr,null,M.createElement($r,{animation:k},d&&b?M.createElement(Hr,{key:b,id:d.id,ref:A,as:s,activatorEvent:f,adjustScale:t,className:c,transition:i,rect:E,style:{zIndex:u,...o},transform:m},n):null))});function Zr({player:e,teamColor:t,disabled:n=!1,showPosition:r=!1}){const{attributes:o,listeners:i,setNodeRef:a,transform:s,isDragging:c}=jr({id:`player-${e.playerId}`,data:{player:e,team:e.team},disabled:n}),u={transform:ve.Translate.toString(s)},f=wn(t);return he.jsxs("li",{ref:a,style:u,className:Nt("flex items-center justify-between py-2 px-3 bg-white rounded-button min-h-[44px]","transition-shadow duration-150","motion-reduce:transition-none",c&&"opacity-50 shadow-lg ring-2 ring-blue-400 z-10",!n&&"cursor-grab active:cursor-grabbing",n&&"cursor-default"),...o,...i,tabIndex:n?-1:0,"aria-describedby":n?void 0:"dnd-instructions","aria-roledescription":"draggable player",role:"listitem",children:[he.jsxs("div",{className:"flex items-center gap-2",children:[!n&&he.jsx(Cn,{className:"w-4 h-4 text-zinc-400 flex-shrink-0","aria-hidden":"true"}),r&&e.position&&he.jsx(yn,{position:e.position}),he.jsx("span",{className:"font-medium text-zinc-900",children:e.playerName})]}),he.jsx("span",{className:Nt("text-sm font-semibold px-2 py-0.5 rounded-full",f.badge),children:e.rating.toFixed(1)})]})}const fo=Object.freeze(Object.defineProperty({__proto__:null,default:Zr},Symbol.toStringTag,{value:"Module"}));export{lo as D,rn as K,on as P,ur as T,io as a,uo as b,ao as c,co as d,Zr as e,fo as f,so as u};
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.