@av-pi-studio/web-client 0.0.8

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.
Files changed (59) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/web/assets/BinaryFallbackViewer-BVnOJSh_.js +2 -0
  3. package/dist/web/assets/BinaryFallbackViewer-BVnOJSh_.js.map +1 -0
  4. package/dist/web/assets/BinaryFallbackViewer-CLiNWU_S.css +1 -0
  5. package/dist/web/assets/ChatPanel-BOR3MYdN.js +3 -0
  6. package/dist/web/assets/ChatPanel-BOR3MYdN.js.map +1 -0
  7. package/dist/web/assets/ChatPanel-DW5U4HRf.css +1 -0
  8. package/dist/web/assets/CodeView-BJb8T6q4.js +2 -0
  9. package/dist/web/assets/CodeView-BJb8T6q4.js.map +1 -0
  10. package/dist/web/assets/CodeView-CLRODhB8.css +1 -0
  11. package/dist/web/assets/DiffView-B4H-yHuX.js +3 -0
  12. package/dist/web/assets/DiffView-B4H-yHuX.js.map +1 -0
  13. package/dist/web/assets/DiffView-CRbeRztO.css +1 -0
  14. package/dist/web/assets/FilePanel-DIInFr3h.css +1 -0
  15. package/dist/web/assets/FilePanel-lERDJldp.js +3 -0
  16. package/dist/web/assets/FilePanel-lERDJldp.js.map +1 -0
  17. package/dist/web/assets/ImageViewer-Cnr0mhRu.js +2 -0
  18. package/dist/web/assets/ImageViewer-Cnr0mhRu.js.map +1 -0
  19. package/dist/web/assets/ImageViewer-ijzMsq8H.css +1 -0
  20. package/dist/web/assets/MarkdownFileViewer-BD5Ri_Fb.css +1 -0
  21. package/dist/web/assets/MarkdownFileViewer-CDHJBxdH.js +2 -0
  22. package/dist/web/assets/MarkdownFileViewer-CDHJBxdH.js.map +1 -0
  23. package/dist/web/assets/TerminalPanel-BQj62G6N.css +1 -0
  24. package/dist/web/assets/TerminalPanel-cnkK_YF5.js +2 -0
  25. package/dist/web/assets/TerminalPanel-cnkK_YF5.js.map +1 -0
  26. package/dist/web/assets/TextViewer-DWYO-J8z.js +2 -0
  27. package/dist/web/assets/TextViewer-DWYO-J8z.js.map +1 -0
  28. package/dist/web/assets/VideoViewer-BBuZ4wou.css +1 -0
  29. package/dist/web/assets/VideoViewer-D2ZnEQoA.js +2 -0
  30. package/dist/web/assets/VideoViewer-D2ZnEQoA.js.map +1 -0
  31. package/dist/web/assets/index-DnTTpAX5.js +3 -0
  32. package/dist/web/assets/index-DnTTpAX5.js.map +1 -0
  33. package/dist/web/assets/index-DrGTLQo0.css +1 -0
  34. package/dist/web/assets/markdown-BQwXm0MF.css +1 -0
  35. package/dist/web/assets/markdown-Biwdm3dP.js +2 -0
  36. package/dist/web/assets/markdown-Biwdm3dP.js.map +1 -0
  37. package/dist/web/assets/use-file-download-BpyWNVxA.js +2 -0
  38. package/dist/web/assets/use-file-download-BpyWNVxA.js.map +1 -0
  39. package/dist/web/assets/vendor-BFXtRv5b.js +83 -0
  40. package/dist/web/assets/vendor-BFXtRv5b.js.map +1 -0
  41. package/dist/web/assets/vendor-dnd-D9kA7FgH.js +6 -0
  42. package/dist/web/assets/vendor-dnd-D9kA7FgH.js.map +1 -0
  43. package/dist/web/assets/vendor-highlight-DaTzDdJW.js +5 -0
  44. package/dist/web/assets/vendor-highlight-DaTzDdJW.js.map +1 -0
  45. package/dist/web/assets/vendor-icons-DUloQbkI.js +182 -0
  46. package/dist/web/assets/vendor-icons-DUloQbkI.js.map +1 -0
  47. package/dist/web/assets/vendor-markdown-CpaoCv-a.js +36 -0
  48. package/dist/web/assets/vendor-markdown-CpaoCv-a.js.map +1 -0
  49. package/dist/web/assets/vendor-overlays-Bo99M0pM.js +2 -0
  50. package/dist/web/assets/vendor-overlays-Bo99M0pM.js.map +1 -0
  51. package/dist/web/assets/vendor-query-CAh-Aqig.js +2 -0
  52. package/dist/web/assets/vendor-query-CAh-Aqig.js.map +1 -0
  53. package/dist/web/assets/vendor-react-BoIQBqDW.js +50 -0
  54. package/dist/web/assets/vendor-react-BoIQBqDW.js.map +1 -0
  55. package/dist/web/assets/vendor-terminal-BhzX2_ts.js +10 -0
  56. package/dist/web/assets/vendor-terminal-BhzX2_ts.js.map +1 -0
  57. package/dist/web/assets/vendor-terminal-DYP7pi_n.css +32 -0
  58. package/dist/web/index.html +21 -0
  59. package/package.json +56 -0
@@ -0,0 +1,6 @@
1
+ import{r as a,R as P,a as Oe}from"./vendor-react-BoIQBqDW.js";function wn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Ze=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function gt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:gt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function vt(e){const{Document:t}=B(e);return e instanceof t}function Pe(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Yt(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:gt(e)?vt(e)?e:Pe(e)||Yt(e)?e.ownerDocument:document:document:document}const Q=Ze?a.useLayoutEffect:a.useEffect;function pt(e){const t=a.useRef(e);return Q(()=>{t.current=e}),a.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 mn(){const e=a.useRef(null),t=a.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=a.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=a.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Be(e,t){const n=a.useRef();return a.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function qe(e){const t=pt(e),n=a.useRef(null),r=a.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function ct(e){const t=a.useRef();return a.useEffect(()=>{t.current=e},[e]),t.current}let it={};function Fe(e,t){return a.useMemo(()=>{if(t)return t;const n=it[e]==null?0:it[e]+1;return it[e]=n,e+"-"+n},[e,t])}function jt(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,s)=>{const l=Object.entries(s);for(const[c,u]of l){const d=i[c];d!=null&&(i[c]=d+e*u)}return i},{...t})}}const we=jt(1),Ge=jt(-1);function yn(e){return"clientX"in e&&"clientY"in e}function bt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function xn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ut(e){if(xn(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 yn(e)?{x:e.clientX,y:e.clientY}:null}const Je=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[Je.Translate.toString(e),Je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),At="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Dn(e){return e.matches(At)?e:e.querySelector(At)}const Cn={display:"none"};function Rn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:Cn},n)}function Sn(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 P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function En(){const[e,t]=a.useState("");return{announce:a.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ut=a.createContext(null);function Mn(e){const t=a.useContext(Ut);a.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function In(){const[e]=a.useState(()=>new Set),t=a.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[a.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,i)})},[e]),t]}const An={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
+ `},On={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 Tn(e){let{announcements:t=On,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=An}=e;const{announce:i,announcement:s}=En(),l=Fe("DndLiveRegion"),[c,u]=a.useState(!1);if(a.useEffect(()=>{u(!0)},[]),Mn(a.useMemo(()=>({onDragStart(f){let{active:v}=f;i(t.onDragStart({active:v}))},onDragMove(f){let{active:v,over:h}=f;t.onDragMove&&i(t.onDragMove({active:v,over:h}))},onDragOver(f){let{active:v,over:h}=f;i(t.onDragOver({active:v,over:h}))},onDragEnd(f){let{active:v,over:h}=f;i(t.onDragEnd({active:v,over:h}))},onDragCancel(f){let{active:v,over:h}=f;i(t.onDragCancel({active:v,over:h}))}}),[i,t])),!c)return null;const d=P.createElement(P.Fragment,null,P.createElement(Rn,{id:r,value:o.draggable}),P.createElement(Sn,{id:l,announcement:s}));return n?Oe.createPortal(d,n):d}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 Zr(e,t){return a.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function eo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const V=Object.freeze({x:0,y:0});function Nn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ln(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function kn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function zn(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Ot(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 to=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ot(t,t.left,t.top),i=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const u=Nn(Ot(c),o);i.push({id:l,data:{droppableContainer:s,value:u}})}}return i.sort(Ln)};function Pn(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),s=o-r,l=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,d=s*l,f=d/(c+u-d);return Number(f.toFixed(4))}return 0}const Bn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const c=Pn(l,t);c>0&&o.push({id:s,data:{droppableContainer:i,value:c}})}}return o.sort(kn)};function Fn(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Wt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:V}function $n(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((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...n})}}const Xn=$n(1);function Yn(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 jn(e,t,n){const r=Yn(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:l}=r,c=e.left-s-(1-o)*parseFloat(n),u=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c}}const Un={ignoreTransform:!1};function xe(e,t){t===void 0&&(t=Un);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=B(e).getComputedStyle(e);u&&(n=jn(n,u,d))}const{top:r,left:o,width:i,height:s,bottom:l,right:c}=n;return{top:r,left:o,width:i,height:s,bottom:l,right:c}}function Tt(e){return xe(e,{ignoreTransform:!0})}function Wn(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Hn(e,t){return t===void 0&&(t=B(e).getComputedStyle(e)),t.position==="fixed"}function Kn(e,t){t===void 0&&(t=B(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 wt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(vt(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Pe(o)||Yt(o)||n.includes(o))return n;const i=B(e).getComputedStyle(o);return o!==e&&Kn(o,i)&&n.push(o),Hn(o,i)?n:r(o.parentNode)}return e?r(e):n}function Ht(e){const[t]=wt(e,1);return t??null}function st(e){return!Ze||!e?null:me(e)?e:gt(e)?vt(e)||e===ye(e).scrollingElement?window:Pe(e)?e:null:null}function Kt(e){return me(e)?e.scrollX:e.scrollLeft}function Vt(e){return me(e)?e.scrollY:e.scrollTop}function dt(e){return{x:Kt(e),y:Vt(e)}}var N;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(N||(N={}));function qt(e){return!Ze||!e?!1:e===document.scrollingElement}function Gt(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,s=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:s,isRight:l,maxScroll:r,minScroll:t}}const Vn={x:.2,y:.2};function qn(e,t,n,r,o){let{top:i,left:s,right:l,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=Vn);const{isTop:u,isBottom:d,isLeft:f,isRight:v}=Gt(e),h={x:0,y:0},M={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+g.height?(h.y=N.Backward,M.y=r*Math.abs((t.top+g.height-i)/g.height)):!d&&c>=t.bottom-g.height&&(h.y=N.Forward,M.y=r*Math.abs((t.bottom-g.height-c)/g.height)),!v&&l>=t.right-g.width?(h.x=N.Forward,M.x=r*Math.abs((t.right-g.width-l)/g.width)):!f&&s<=t.left+g.width&&(h.x=N.Backward,M.x=r*Math.abs((t.left+g.width-s)/g.width)),{direction:h,speed:M}}function Gn(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}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 Jt(e){return e.reduce((t,n)=>we(t,dt(n)),V)}function Jn(e){return e.reduce((t,n)=>t+Kt(n),0)}function _n(e){return e.reduce((t,n)=>t+Vt(n),0)}function Qn(e,t){if(t===void 0&&(t=xe),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Ht(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Zn=[["x",["left","right"],Jn],["y",["top","bottom"],_n]];class mt{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=wt(n),o=Jt(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,l]of Zn)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=l(r),d=o[i]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Te{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{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 er(e){const{EventTarget:t}=B(e);return e instanceof t?e:ye(e)}function at(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 W;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(W||(W={}));function Nt(e){e.preventDefault()}function tr(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 _t={start:[D.Space,D.Enter],cancel:[D.Esc],end:[D.Space,D.Enter,D.Tab]},nr=(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 Qt{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 Te(ye(n)),this.windowListeners=new Te(B(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(W.Resize,this.handleCancel),this.windowListeners.add(W.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(W.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Qn(r),n(V)}handleKeyDown(t){if(bt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=_t,coordinateGetter:s=nr,scrollBehavior:l="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,d=u?{x:u.left,y:u.top}:V;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:n,context:r.current,currentCoordinates:d});if(f){const v=Ge(f,d),h={x:0,y:0},{scrollableAncestors:M}=r.current;for(const g of M){const p=t.code,{isTop:m,isRight:x,isLeft:b,isBottom:C,maxScroll:R,minScroll:S}=Gt(g),y=Gn(g),w={x:Math.min(p===D.Right?y.right-y.width/2:y.right,Math.max(p===D.Right?y.left:y.left+y.width/2,f.x)),y:Math.min(p===D.Down?y.bottom-y.height/2:y.bottom,Math.max(p===D.Down?y.top:y.top+y.height/2,f.y))},A=p===D.Right&&!x||p===D.Left&&!b,T=p===D.Down&&!C||p===D.Up&&!m;if(A&&w.x!==f.x){const I=g.scrollLeft+v.x,H=p===D.Right&&I<=R.x||p===D.Left&&I>=S.x;if(H&&!v.y){g.scrollTo({left:I,behavior:l});return}H?h.x=g.scrollLeft-I:h.x=p===D.Right?g.scrollLeft-R.x:g.scrollLeft-S.x,h.x&&g.scrollBy({left:-h.x,behavior:l});break}else if(T&&w.y!==f.y){const I=g.scrollTop+v.y,H=p===D.Down&&I<=R.y||p===D.Up&&I>=S.y;if(H&&!v.x){g.scrollTo({top:I,behavior:l});return}H?h.y=g.scrollTop-I:h.y=p===D.Down?g.scrollTop-R.y:g.scrollTop-S.y,h.y&&g.scrollBy({top:-h.y,behavior:l});break}}this.handleMove(t,we(Ge(f,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()}}Qt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=_t,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const l=i.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Lt(e){return!!(e&&"distance"in e)}function kt(e){return!!(e&&"delay"in e)}class yt{constructor(t,n,r){var o;r===void 0&&(r=er(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:s}=i;this.props=t,this.events=n,this.document=ye(s),this.documentListeners=new Te(this.document),this.listeners=new Te(r),this.windowListeners=new Te(B(s)),this.initialCoordinates=(o=ut(i))!=null?o:V,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(W.Resize,this.handleCancel),this.windowListeners.add(W.DragStart,Nt),this.windowListeners.add(W.VisibilityChange,this.handleCancel),this.windowListeners.add(W.ContextMenu,Nt),this.documentListeners.add(W.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(kt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Lt(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(W.Click,tr,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(W.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:l}}=i;if(!o)return;const c=(n=ut(t))!=null?n:V,u=Ge(o,c);if(!r&&l){if(Lt(l)){if(l.tolerance!=null&&at(u,l.tolerance))return this.handleCancel();if(at(u,l.distance))return this.handleStart()}if(kt(l)&&at(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),s(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 rr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Zt extends yt{constructor(t){const{event:n}=t,r=ye(n.target);super(t,rr,r)}}Zt.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const or={move:{name:"mousemove"},end:{name:"mouseup"}};var ft;(function(e){e[e.RightClick=2]="RightClick"})(ft||(ft={}));class ir extends yt{constructor(t){super(t,or,ye(t.event.target))}}ir.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ft.RightClick?!1:(r==null||r({event:n}),!0)}}];const lt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class sr extends yt{constructor(t){super(t,lt)}static setup(){return window.addEventListener(lt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(lt.move.name,t)};function t(){}}}sr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Ne;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ne||(Ne={}));var Qe;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Qe||(Qe={}));function ar(e){let{acceleration:t,activator:n=Ne.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:l=Qe.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:v}=e;const h=cr({delta:f,disabled:!i}),[M,g]=mn(),p=a.useRef({x:0,y:0}),m=a.useRef({x:0,y:0}),x=a.useMemo(()=>{switch(n){case Ne.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ne.DraggableRect:return o}},[n,o,c]),b=a.useRef(null),C=a.useCallback(()=>{const S=b.current;if(!S)return;const y=p.current.x*m.current.x,w=p.current.y*m.current.y;S.scrollBy(y,w)},[]),R=a.useMemo(()=>l===Qe.TreeOrder?[...u].reverse():u,[l,u]);a.useEffect(()=>{if(!i||!u.length||!x){g();return}for(const S of R){if((r==null?void 0:r(S))===!1)continue;const y=u.indexOf(S),w=d[y];if(!w)continue;const{direction:A,speed:T}=qn(S,w,x,t,v);for(const I of["x","y"])h[I][A[I]]||(T[I]=0,A[I]=0);if(T.x>0||T.y>0){g(),b.current=S,M(C,s),p.current=T,m.current=A;return}}p.current={x:0,y:0},m.current={x:0,y:0},g()},[t,C,r,g,i,s,JSON.stringify(x),JSON.stringify(h),M,u,R,d,JSON.stringify(v)])}const lr={x:{[N.Backward]:!1,[N.Forward]:!1},y:{[N.Backward]:!1,[N.Forward]:!1}};function cr(e){let{delta:t,disabled:n}=e;const r=ct(t);return Be(o=>{if(n||!r||!o)return lr;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[N.Backward]:o.x[N.Backward]||i.x===-1,[N.Forward]:o.x[N.Forward]||i.x===1},y:{[N.Backward]:o.y[N.Backward]||i.y===-1,[N.Forward]:o.y[N.Forward]||i.y===1}}},[n,t,r])}function ur(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Be(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function dr(e,t){return a.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...i]},[]),[e,t])}var ze;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ze||(ze={}));var ht;(function(e){e.Optimized="optimized"})(ht||(ht={}));const zt=new Map;function fr(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=a.useState(null),{frequency:l,measure:c,strategy:u}=o,d=a.useRef(e),f=p(),v=ke(f),h=a.useCallback(function(m){m===void 0&&(m=[]),!v.current&&s(x=>x===null?m:x.concat(m.filter(b=>!x.includes(b))))},[v]),M=a.useRef(null),g=Be(m=>{if(f&&!n)return zt;if(!m||m===zt||d.current!==e||i!=null){const x=new Map;for(let b of e){if(!b)continue;if(i&&i.length>0&&!i.includes(b.id)&&b.rect.current){x.set(b.id,b.rect.current);continue}const C=b.node.current,R=C?new mt(c(C),C):null;b.rect.current=R,R&&x.set(b.id,R)}return x}return m},[e,i,n,f,c]);return a.useEffect(()=>{d.current=e},[e]),a.useEffect(()=>{f||h()},[n,f]),a.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),a.useEffect(()=>{f||typeof l!="number"||M.current!==null||(M.current=setTimeout(()=>{h(),M.current=null},l))},[l,f,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:i!=null};function p(){switch(u){case ze.Always:return!1;case ze.BeforeDragging:return n;default:return!n}}}function en(e,t){return Be(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function hr(e,t){return en(e,t)}function gr(e){let{callback:t,disabled:n}=e;const r=pt(t),o=a.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return a.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function et(e){let{callback:t,disabled:n}=e;const r=pt(t),o=a.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return a.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function vr(e){return new mt(xe(e),e)}function Pt(e,t,n){t===void 0&&(t=vr);const[r,o]=a.useState(null);function i(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const s=gr({callback(c){if(e)for(const u of c){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),l=et({callback:i});return Q(()=>{i(),e?(l==null||l.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),s==null||s.disconnect())},[e]),r}function pr(e){const t=en(e);return Wt(e,t)}const Bt=[];function br(e){const t=a.useRef(e),n=Be(r=>e?r&&r!==Bt&&e&&t.current&&e.parentNode===t.current.parentNode?r:wt(e):Bt,[e]);return a.useEffect(()=>{t.current=e},[e]),n}function wr(e){const[t,n]=a.useState(null),r=a.useRef(e),o=a.useCallback(i=>{const s=st(i.target);s&&n(l=>l?(l.set(s,dt(s)),new Map(l)):null)},[]);return a.useEffect(()=>{const i=r.current;if(e!==i){s(i);const l=e.map(c=>{const u=st(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,dt(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{s(e),s(i)};function s(l){l.forEach(c=>{const u=st(c);u==null||u.removeEventListener("scroll",o)})}},[o,e]),a.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>we(i,s),V):Jt(e):V,[e,t])}function Ft(e,t){t===void 0&&(t=[]);const n=a.useRef(null);return a.useEffect(()=>{n.current=null},t),a.useEffect(()=>{const r=e!==V;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ge(e,n.current):V}function mr(e){a.useEffect(()=>{if(!Ze)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==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function yr(e,t){return a.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=s=>{i(s,t)},n},{}),[e,t])}function tn(e){return a.useMemo(()=>e?Wn(e):null,[e])}const $t=[];function xr(e,t){t===void 0&&(t=xe);const[n]=e,r=tn(n?B(n):null),[o,i]=a.useState($t);function s(){i(()=>e.length?e.map(c=>qt(c)?r:new mt(t(c),c)):$t)}const l=et({callback:s});return Q(()=>{l==null||l.disconnect(),s(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),o}function Dr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Pe(t)?t:e}function Cr(e){let{measure:t}=e;const[n,r]=a.useState(null),o=a.useCallback(u=>{for(const{target:d}of u)if(Pe(d)){r(f=>{const v=t(d);return f?{...f,width:v.width,height:v.height}:v});break}},[t]),i=et({callback:o}),s=a.useCallback(u=>{const d=Dr(u);i==null||i.disconnect(),d&&(i==null||i.observe(d)),r(d?t(d):null)},[t,i]),[l,c]=qe(s);return a.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const Rr=[{sensor:Zt,options:{}},{sensor:Qt,options:{}}],Sr={current:{}},Ve={draggable:{measure:Tt},droppable:{measure:Tt,strategy:ze.WhileDragging,frequency:ht.Optimized},dragOverlay:{measure:xe}};class Le 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;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Er={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Le,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:_e},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ve,measureDroppableContainers:_e,windowRect:null,measuringScheduled:!1},Mr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:_e,draggableNodes:new Map,over:null,measureDroppableContainers:_e},tt=a.createContext(Mr),nn=a.createContext(Er);function Ir(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Le}}}function Ar(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 Le(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 s=new Le(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}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 Le(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Or(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=a.useContext(tt),i=ct(r),s=ct(n==null?void 0:n.id);return a.useEffect(()=>{if(!t&&!r&&i&&s!=null){if(!bt(i)||document.activeElement===i.target)return;const l=o.get(s);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const f=Dn(d);if(f){f.focus();break}}})}},[r,t,o,s,i]),null}function Tr(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function Nr(e){return a.useMemo(()=>({draggable:{...Ve.draggable,...e==null?void 0:e.draggable},droppable:{...Ve.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ve.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Lr(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=a.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;Q(()=>{if(!s&&!l||!t){i.current=!1;return}if(i.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=Wt(d,r);if(s||(f.x=0),l||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const v=Ht(u);v&&v.scrollBy({top:f.y,left:f.x})}},[t,s,l,r,n])}const rn=a.createContext({...V,scaleX:1,scaleY:1});var ue;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ue||(ue={}));const no=a.memo(function(t){var n,r,o,i;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:d=Rr,collisionDetection:f=Bn,measuring:v,modifiers:h,...M}=t;const g=a.useReducer(Ar,void 0,Ir),[p,m]=g,[x,b]=In(),[C,R]=a.useState(ue.Uninitialized),S=C===ue.Initialized,{draggable:{active:y,nodes:w,translate:A},droppable:{containers:T}}=p,I=y!=null?w.get(y):null,H=a.useRef({initial:null,translated:null}),K=a.useMemo(()=>{var k;return y!=null?{id:y,data:(k=I==null?void 0:I.data)!=null?k:Sr,rect:H}:null},[y,I]),q=a.useRef(null),[De,$e]=a.useState(null),[F,Xe]=a.useState(null),Z=ke(M,Object.values(M)),Ce=Fe("DndDescribedBy",s),Ye=a.useMemo(()=>T.getEnabled(),[T]),z=Nr(v),{droppableRects:ee,measureDroppableContainers:de,measuringScheduled:Re}=fr(Ye,{dragging:S,dependencies:[A.x,A.y],config:z.droppable}),j=ur(w,y),je=a.useMemo(()=>F?ut(F):null,[F]),oe=bn(),te=hr(j,z.draggable.measure);Lr({activeNode:y!=null?w.get(y):null,config:oe.layoutShiftCompensation,initialRect:te,measure:z.draggable.measure});const E=Pt(j,z.draggable.measure,te),Se=Pt(j?j.parentElement:null),G=a.useRef({activatorEvent:null,active:null,activeNode:j,collisionRect:null,collisions:null,droppableRects:ee,draggableNodes:w,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),fe=T.getNodeFor((n=G.current.over)==null?void 0:n.id),ne=Cr({measure:z.dragOverlay.measure}),he=(r=ne.nodeRef.current)!=null?r:j,ge=S?(o=ne.rect)!=null?o:E:null,xt=!!(ne.nodeRef.current&&ne.rect),Dt=pr(xt?null:E),nt=tn(he?B(he):null),ie=br(S?fe??j:null),Ue=xr(ie),We=Tr(h,{transform:{x:A.x-Dt.x,y:A.y-Dt.y,scaleX:1,scaleY:1},activatorEvent:F,active:K,activeNodeRect:E,containerNodeRect:Se,draggingNodeRect:ge,over:G.current.over,overlayNodeRect:ne.rect,scrollableAncestors:ie,scrollableAncestorRects:Ue,windowRect:nt}),Ct=je?we(je,A):null,Rt=wr(ie),un=Ft(Rt),dn=Ft(Rt,[E]),ve=we(We,un),pe=ge?Xn(ge,We):null,Ee=K&&pe?f({active:K,collisionRect:pe,droppableRects:ee,droppableContainers:Ye,pointerCoordinates:Ct}):null,St=zn(Ee,"id"),[se,Et]=a.useState(null),fn=xt?We:we(We,dn),hn=Fn(fn,(i=se==null?void 0:se.rect)!=null?i:null,E),rt=a.useRef(null),Mt=a.useCallback((k,$)=>{let{sensor:X,options:ae}=$;if(q.current==null)return;const U=w.get(q.current);if(!U)return;const Y=k.nativeEvent,J=new X({active:q.current,activeNode:U,event:Y,options:ae,context:G,onAbort(L){if(!w.get(L))return;const{onDragAbort:_}=Z.current,re={id:L};_==null||_(re),x({type:"onDragAbort",event:re})},onPending(L,le,_,re){if(!w.get(L))return;const{onDragPending:Ie}=Z.current,ce={id:L,constraint:le,initialCoordinates:_,offset:re};Ie==null||Ie(ce),x({type:"onDragPending",event:ce})},onStart(L){const le=q.current;if(le==null)return;const _=w.get(le);if(!_)return;const{onDragStart:re}=Z.current,Me={activatorEvent:Y,active:{id:le,data:_.data,rect:H}};Oe.unstable_batchedUpdates(()=>{re==null||re(Me),R(ue.Initializing),m({type:O.DragStart,initialCoordinates:L,active:le}),x({type:"onDragStart",event:Me}),$e(rt.current),Xe(Y)})},onMove(L){m({type:O.DragMove,coordinates:L})},onEnd:be(O.DragEnd),onCancel:be(O.DragCancel)});rt.current=J;function be(L){return async function(){const{active:_,collisions:re,over:Me,scrollAdjustedTranslate:Ie}=G.current;let ce=null;if(_&&Ie){const{cancelDrop:Ae}=Z.current;ce={activatorEvent:Y,active:_,collisions:re,delta:Ie,over:Me},L===O.DragEnd&&typeof Ae=="function"&&await Promise.resolve(Ae(ce))&&(L=O.DragCancel)}q.current=null,Oe.unstable_batchedUpdates(()=>{m({type:L}),R(ue.Uninitialized),Et(null),$e(null),Xe(null),rt.current=null;const Ae=L===O.DragEnd?"onDragEnd":"onDragCancel";if(ce){const ot=Z.current[Ae];ot==null||ot(ce),x({type:Ae,event:ce})}})}}},[w]),gn=a.useCallback((k,$)=>(X,ae)=>{const U=X.nativeEvent,Y=w.get(ae);if(q.current!==null||!Y||U.dndKit||U.defaultPrevented)return;const J={active:Y};k(X,$.options,J)===!0&&(U.dndKit={capturedBy:$.sensor},q.current=ae,Mt(X,$))},[w,Mt]),It=dr(d,gn);mr(d),Q(()=>{E&&C===ue.Initializing&&R(ue.Initialized)},[E,C]),a.useEffect(()=>{const{onDragMove:k}=Z.current,{active:$,activatorEvent:X,collisions:ae,over:U}=G.current;if(!$||!X)return;const Y={active:$,activatorEvent:X,collisions:ae,delta:{x:ve.x,y:ve.y},over:U};Oe.unstable_batchedUpdates(()=>{k==null||k(Y),x({type:"onDragMove",event:Y})})},[ve.x,ve.y]),a.useEffect(()=>{const{active:k,activatorEvent:$,collisions:X,droppableContainers:ae,scrollAdjustedTranslate:U}=G.current;if(!k||q.current==null||!$||!U)return;const{onDragOver:Y}=Z.current,J=ae.get(St),be=J&&J.rect.current?{id:J.id,rect:J.rect.current,data:J.data,disabled:J.disabled}:null,L={active:k,activatorEvent:$,collisions:X,delta:{x:U.x,y:U.y},over:be};Oe.unstable_batchedUpdates(()=>{Et(be),Y==null||Y(L),x({type:"onDragOver",event:L})})},[St]),Q(()=>{G.current={activatorEvent:F,active:K,activeNode:j,collisionRect:pe,collisions:Ee,droppableRects:ee,draggableNodes:w,draggingNode:he,draggingNodeRect:ge,droppableContainers:T,over:se,scrollableAncestors:ie,scrollAdjustedTranslate:ve},H.current={initial:ge,translated:pe}},[K,j,Ee,pe,w,he,ge,ee,T,se,ie,ve]),ar({...oe,delta:A,draggingRect:pe,pointerCoordinates:Ct,scrollableAncestors:ie,scrollableAncestorRects:Ue});const vn=a.useMemo(()=>({active:K,activeNode:j,activeNodeRect:E,activatorEvent:F,collisions:Ee,containerNodeRect:Se,dragOverlay:ne,draggableNodes:w,droppableContainers:T,droppableRects:ee,over:se,measureDroppableContainers:de,scrollableAncestors:ie,scrollableAncestorRects:Ue,measuringConfiguration:z,measuringScheduled:Re,windowRect:nt}),[K,j,E,F,Ee,Se,ne,w,T,ee,se,de,ie,Ue,z,Re,nt]),pn=a.useMemo(()=>({activatorEvent:F,activators:It,active:K,activeNodeRect:E,ariaDescribedById:{draggable:Ce},dispatch:m,draggableNodes:w,over:se,measureDroppableContainers:de}),[F,It,K,E,m,Ce,w,se,de]);return P.createElement(Ut.Provider,{value:b},P.createElement(tt.Provider,{value:pn},P.createElement(nn.Provider,{value:vn},P.createElement(rn.Provider,{value:hn},u)),P.createElement(Or,{disabled:(l==null?void 0:l.restoreFocus)===!1})),P.createElement(Tn,{...l,hiddenTextDescribedById:Ce}));function bn(){const k=(De==null?void 0:De.autoScrollEnabled)===!1,$=typeof c=="object"?c.enabled===!1:c===!1,X=S&&!k&&!$;return typeof c=="object"?{...c,enabled:X}:{enabled:X}}}),kr=a.createContext(null),Xt="button",zr="Draggable";function Pr(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=Fe(zr),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:v}=a.useContext(tt),{role:h=Xt,roleDescription:M="draggable",tabIndex:g=0}=o??{},p=(c==null?void 0:c.id)===t,m=a.useContext(p?rn:kr),[x,b]=qe(),[C,R]=qe(),S=yr(s,t),y=ke(n);Q(()=>(f.set(t,{id:t,key:i,node:x,activatorNode:C,data:y}),()=>{const A=f.get(t);A&&A.key===i&&f.delete(t)}),[f,t]);const w=a.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":p&&h===Xt?!0:void 0,"aria-roledescription":M,"aria-describedby":d.draggable}),[r,h,g,p,M,d.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:w,isDragging:p,listeners:r?void 0:S,node:x,over:v,setNodeRef:b,setActivatorNodeRef:R,transform:m}}function Br(){return a.useContext(nn)}const Fr="Droppable",$r={timeout:25};function Xr(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=Fe(Fr),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=a.useContext(tt),d=a.useRef({disabled:n}),f=a.useRef(!1),v=a.useRef(null),h=a.useRef(null),{disabled:M,updateMeasurementsFor:g,timeout:p}={...$r,...o},m=ke(g??r),x=a.useCallback(()=>{if(!f.current){f.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null},p)},[p]),b=et({callback:x,disabled:M||!s}),C=a.useCallback((w,A)=>{b&&(A&&(b.unobserve(A),f.current=!1),w&&b.observe(w))},[b]),[R,S]=qe(C),y=ke(t);return a.useEffect(()=>{!b||!R.current||(b.disconnect(),f.current=!1,b.observe(R.current))},[R,b]),a.useEffect(()=>(l({type:O.RegisterDroppable,element:{id:r,key:i,disabled:n,node:R,rect:v,data:y}}),()=>l({type:O.UnregisterDroppable,key:i,id:r})),[r]),a.useEffect(()=>{n!==d.current.disabled&&(l({type:O.SetDroppableDisabled,id:r,key:i,disabled:n}),d.current.disabled=n)},[r,i,n,l]),{active:s,rect:v,isOver:(c==null?void 0:c.id)===r,node:R,over:c,setNodeRef:S}}function on(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Yr(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function He(e){return e!==null&&e>=0}function jr(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ur(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Ke={scaleX:1,scaleY:1},ro=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:i,index:s}=e;const l=(t=n[o])!=null?t:r;if(!l)return null;const c=Wr(n,s,o);if(s===o){const u=n[i];return u?{x:o<i?u.left+u.width-(l.left+l.width):u.left-l.left,y:0,...Ke}:null}return s>o&&s<=i?{x:-l.width-c,y:0,...Ke}:s<o&&s>=i?{x:l.width+c,y:0,...Ke}:{x:0,y:0,...Ke}};function Wr(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return!r||!o&&!i?0:n<t?o?r.left-(o.left+o.width):i.left-(r.left+r.width):i?i.left-(r.left+r.width):r.left-(o.left+o.width)}const sn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=on(t,r,n),s=t[o],l=i[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},an="Sortable",ln=P.createContext({activeIndex:-1,containerId:an,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:sn,disabled:{draggable:!1,droppable:!1}});function oo(e){let{children:t,id:n,items:r,strategy:o=sn,disabled:i=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:d}=Br(),f=Fe(an,n),v=l.rect!==null,h=a.useMemo(()=>r.map(S=>typeof S=="object"&&"id"in S?S.id:S),[r]),M=s!=null,g=s?h.indexOf(s.id):-1,p=u?h.indexOf(u.id):-1,m=a.useRef(h),x=!jr(h,m.current),b=p!==-1&&g===-1||x,C=Ur(i);Q(()=>{x&&M&&d(h)},[x,h,M,d]),a.useEffect(()=>{m.current=h},[h]);const R=a.useMemo(()=>({activeIndex:g,containerId:f,disabled:C,disableTransforms:b,items:h,overIndex:p,useDragOverlay:v,sortedRects:Yr(h,c),strategy:o}),[g,f,C.draggable,C.droppable,b,h,p,c,v,o]);return P.createElement(ln.Provider,{value:R},t)}const Hr=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return on(n,r,o).indexOf(t)},Kr=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!r||l!==i&&o===s?!1:n?!0:s!==o&&t===c},Vr={duration:200,easing:"ease"},cn="transform",qr=Je.Transition.toString({property:cn,duration:0,easing:"linear"}),Gr={roleDescription:"sortable"};function Jr(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,s]=a.useState(null),l=a.useRef(n);return Q(()=>{if(!t&&n!==l.current&&r.current){const c=o.current;if(c){const u=xe(r.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&s(d)}}n!==l.current&&(l.current=n)},[t,n,r,o]),a.useEffect(()=>{i&&s(null)},[i]),i}function io(e){let{animateLayoutChanges:t=Kr,attributes:n,disabled:r,data:o,getNewIndex:i=Hr,id:s,strategy:l,resizeObserverConfig:c,transition:u=Vr}=e;const{items:d,containerId:f,activeIndex:v,disabled:h,disableTransforms:M,sortedRects:g,overIndex:p,useDragOverlay:m,strategy:x}=a.useContext(ln),b=_r(r,h),C=d.indexOf(s),R=a.useMemo(()=>({sortable:{containerId:f,index:C,items:d},...o}),[f,o,C,d]),S=a.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:y,node:w,isOver:A,setNodeRef:T}=Xr({id:s,data:R,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:I,activatorEvent:H,activeNodeRect:K,attributes:q,setNodeRef:De,listeners:$e,isDragging:F,over:Xe,setActivatorNodeRef:Z,transform:Ce}=Pr({id:s,data:R,attributes:{...Gr,...n},disabled:b.draggable}),Ye=wn(T,De),z=!!I,ee=z&&!M&&He(v)&&He(p),de=!m&&F,Re=de&&ee?Ce:null,je=ee?Re??(l??x)({rects:g,activeNodeRect:K,activeIndex:v,overIndex:p,index:C}):null,oe=He(v)&&He(p)?i({id:s,items:d,activeIndex:v,overIndex:p}):C,te=I==null?void 0:I.id,E=a.useRef({activeId:te,items:d,newIndex:oe,containerId:f}),Se=d!==E.current.items,G=t({active:I,containerId:f,isDragging:F,isSorting:z,id:s,index:C,items:d,newIndex:E.current.newIndex,previousItems:E.current.items,previousContainerId:E.current.containerId,transition:u,wasDragging:E.current.activeId!=null}),fe=Jr({disabled:!G,index:C,node:w,rect:y});return a.useEffect(()=>{z&&E.current.newIndex!==oe&&(E.current.newIndex=oe),f!==E.current.containerId&&(E.current.containerId=f),d!==E.current.items&&(E.current.items=d)},[z,oe,f,d]),a.useEffect(()=>{if(te===E.current.activeId)return;if(te!=null&&E.current.activeId==null){E.current.activeId=te;return}const he=setTimeout(()=>{E.current.activeId=te},50);return()=>clearTimeout(he)},[te]),{active:I,activeIndex:v,attributes:q,data:R,rect:y,index:C,newIndex:oe,items:d,isOver:A,isSorting:z,isDragging:F,listeners:$e,node:w,overIndex:p,over:Xe,setNodeRef:Ye,setActivatorNodeRef:Z,setDroppableNodeRef:T,setDraggableNodeRef:De,transform:fe??je,transition:ne()};function ne(){if(fe||Se&&E.current.newIndex===C)return qr;if(!(de&&!bt(H)||!u)&&(z||G))return Je.Transition.toString({...u,property:cn})}}function _r(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}D.Down,D.Right,D.Up,D.Left;export{Je as C,no as D,Zt as P,oo as S,Zr as a,io as b,to as c,ro as h,eo as u};
6
+ //# sourceMappingURL=vendor-dnd-D9kA7FgH.js.map