PageSourceSearch

https://www.itlent.eus/static/js/dnd-kit-core.3f59671a.chunk.js

js itlent.eus collected 2026-10-07 23:04:07 UTC 54,009 bytes, 2 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[208,6279],{61544:(e,t,n)=>{n.r(t),n.d(t,{AutoScrollActivator:()=>we,DndContext:()=>Ge,DragOverlay:()=>pt,KeyboardCode:()=>oe,KeyboardSensor:()=>ce,MeasuringFrequency:()=>Re,MeasuringStrategy:()=>De,MouseSensor:()=>be,PointerSensor:()=>ve,TouchSensor:()=>ye,TraversalOrder:()=>xe,applyModifiers:()=>Ve,closestCenter:()=>S,closestCorners:()=>M,defaultAnnouncements:()=>f,defaultCoordinates:()=>m,defaultDropAnimation:()=>ft,defaultDropAnimationSideEffects:()=>dt,defaultScreenReaderInstructions:()=>d,getClientRect:()=>P,getFirstCollision:()=>D,getScrollableAncestors:()=>U,pointerWithin:()=>L,rectIntersection:()=>N,useDndContext:()=>tt,useDndMonitor:()=>u,useDraggable:()=>et,useDroppable:()=>ot,useSensor:()=>p,useSensors:()=>b});var r=n(83740),o=n(7012),i=n(84144);const a={display:"none"};function s(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:a},n)}function l(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.createElement("div",{id:t,style:{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"},role:"status","aria-live":o,"aria-atomic":!0},n)}const c=(0,r.createContext)(null);function u(e){const t=(0,r.useContext)(c);(0,r.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}const d={draggable:"\n    To pick up a draggable item, press the space bar.\n    While dragging, use the arrow keys to move the item.\n    Press space again to drop the item in its new position, or press escape to cancel.\n  "},f={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 g(e){let{announcements:t=f,container:n,hiddenTextDescribedById:a,screenReaderInstructions:c=d}=e;const{announce:g,announcement:v}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),h=(0,i.useUniqueId)("DndLiveRegion"),[p,b]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{b(!0)},[]),u((0,r.useMemo)(()=>({onDragStart(e){let{active:n}=e;g(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&g(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;g(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;g(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;g(t.onDragCancel({active:n,over:r}))}}),[g,t])),!p)return null;const m=r.createElement(r.Fragment,null,r.createElement(s,{id:a,value:c.draggable}),r.createElement(l,{id:h,announcement:v}));return n?(0,o.createPortal)(m,n):m}var v;function h(){}function p(e,t){return(0,r.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function b(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}!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"}(v||(v={}));const m=Object.freeze({x:0,y:0});function y(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function w(e,t){const n=(0,i.getEventCoordinates)(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function C(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function E(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function D(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function R(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const S=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=R(t,t.left,t.top),i=[];for(const a of r){const{id:e}=a,t=n.get(e);if(t){const n=y(R(t),o);i.push({id:e,data:{droppableContainer:a,value:n}})}}return i.sort(x)},M=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=E(t),i=[];for(const a of r){const{id:e}=a,t=n.get(e);if(t){const n=E(t),r=o.reduce((e,t,r)=>e+y(n[r],t),0),s=Number((r/4).toFixed(4));i.push({id:e,data:{droppableContainer:a,value:s}})}}return i.sort(x)};function I(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 n=t.width*t.height,r=e.width*e.height,o=a*s;return Number((o/(n+r-o)).toFixed(4))}return 0}const N=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:e}=i,r=n.get(e);if(r){const n=I(r,t);n>0&&o.push({id:e,data:{droppableContainer:i,value:n}})}}return o.sort(C)};function O(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}const L=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const i of t){const{id:e}=i,t=n.get(e);if(t&&O(r,t)){const n=E(t).reduce((e,t)=>
1e+y(r,t),0),a=Number((n/4).toFixed(4));o.push({id:e,data:{droppableContainer:i,value:a}})}}return o.sort(x)};function T(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:m}function A(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((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const k=A(1);function B(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]}}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}const z={ignoreTransform:!1};function P(e,t){void 0===t&&(t=z);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,i.getWindow)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=B(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),c=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:o,width:a,height:s,bottom:l,right:c}=n;return{top:r,left:o,width:a,height:s,bottom:l,right:c}}function K(e){return P(e,{ignoreTransform:!0})}function U(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,i.isDocument)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,i.isHTMLElement)(o)||(0,i.isSVGElement)(o))return n;if(n.includes(o))return n;const a=(0,i.getWindow)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,i.getWindow)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"===typeof r&&n.test(r)})}(o,a)&&n.push(o),function(e,t){return void 0===t&&(t=(0,i.getWindow)(e).getComputedStyle(e)),"fixed"===t.position}(o,a)?n:r(o.parentNode)}(e):n}function F(e){const[t]=U(e,1);return null!=t?t:null}function W(e){return i.canUseDOM&&e?(0,i.isWindow)(e)?e:(0,i.isNode)(e)?(0,i.isDocument)(e)||e===(0,i.getOwnerDocument)(e).scrollingElement?window:(0,i.isHTMLElement)(e)?e:null:null:null}function j(e){return(0,i.isWindow)(e)?e.scrollX:e.scrollLeft}function X(e){return(0,i.isWindow)(e)?e.scrollY:e.scrollTop}function Y(e){return{x:j(e),y:X(e)}}var _;function H(e){return!(!i.canUseDOM||!e)&&e===document.scrollingElement}function V(e){const t={x:0,y:0},n=H(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(_||(_={}));const q={x:.2,y:.2};function J(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=q);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=V(e),g={x:0,y:0},v={x:0,y:0},h=t.height*o.y,p=t.width*o.x;return!c&&i<=t.top+h?(g.y=_.Backward,v.y=r*Math.abs((t.top+h-i)/h)):!u&&l>=t.bottom-h&&(g.y=_.Forward,v.y=r*Math.abs((t.bottom-h-l)/h)),!f&&s>=t.right-p?(g.x=_.Forward,v.x=r*Math.abs((t.right-p-s)/p)):!d&&a<=t.left+p&&(g.x=_.Backward,v.x=r*Math.abs((t.left+p-a)/p)),{direction:g,speed:v}}function G(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}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 Q(e){return e.reduce((e,t)=>(0,i.add)(e,Y(t)),m)}function Z(e,t){if(void 0===t&&(t=P),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);F(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const $=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+j(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+X(t),0)}]];class ee{constructor(e,t){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 n=U(t),r=Q(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,i,a]of $)for(const e of i)Object.defineProperty(this,e,{get:()=>{const t=a(n),i=r[o]-t;return this.rect[e]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class te{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>
1{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ne(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"===typeof t?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}var re,oe;function ie(e){e.preventDefault()}function ae(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(re||(re={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(oe||(oe={}));const se={start:[oe.Space,oe.Enter],cancel:[oe.Esc],end:[oe.Space,oe.Enter]},le=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case oe.Right:return{...n,x:n.x+25};case oe.Left:return{...n,x:n.x-25};case oe.Down:return{...n,y:n.y+25};case oe.Up:return{...n,y:n.y-25}}};class ce{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new te((0,i.getOwnerDocument)(t)),this.windowListeners=new te((0,i.getWindow)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(re.Resize,this.handleCancel),this.windowListeners.add(re.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(re.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Z(n),t(m)}handleKeyDown(e){if((0,i.isKeyboardEvent)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=se,coordinateGetter:a=le,scrollBehavior:s="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:m;this.referenceCoordinates||(this.referenceCoordinates=u);const d=a(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,i.subtract)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:l,isBottom:c,maxScroll:u,minScroll:f}=V(n),g=G(n),v={x:Math.min(o===oe.Right?g.right-g.width/2:g.right,Math.max(o===oe.Right?g.left:g.left+g.width/2,d.x)),y:Math.min(o===oe.Down?g.bottom-g.height/2:g.bottom,Math.max(o===oe.Down?g.top:g.top+g.height/2,d.y))},h=o===oe.Right&&!a||o===oe.Left&&!l,p=o===oe.Down&&!c||o===oe.Up&&!i;if(h&&v.x!==d.x){const e=n.scrollLeft+t.x,i=o===oe.Right&&e<=u.x||o===oe.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:s});r.x=i?n.scrollLeft-e:o===oe.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:s});break}if(p&&v.y!==d.y){const e=n.scrollTop+t.y,i=o===oe.Down&&e<=u.y||o===oe.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:s});r.y=i?n.scrollTop-e:o===oe.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:s});break}}this.handleMove(e,(0,i.add)((0,i.subtract)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ue(e){return Boolean(e&&"distance"in e)}function de(e){return Boolean(e&&"delay"in e)}ce.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=se,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class fe{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,i.getWindow)(e);return e instanceof t?e:(0,i.getOwnerDocument)(e)}(e.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=e,this.events=t;const{event:o}=e,{target:a}=o;this.props=e,this.events=t,this.document=(0,i.getOwnerDocument)(a),this.documentListeners=new te(this.document),this.listeners=new te(n),this.windowListeners=new te((0,i.getWindow)(a)),this.initialCoordinates=null!=(r=(0,i.getEventC
1oordinates)(o))?r:m,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:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(re.Resize,this.handleCancel),this.windowListeners.add(re.DragStart,ie),this.windowListeners.add(re.VisibilityChange,this.handleCancel),this.windowListeners.add(re.ContextMenu,ie),this.documentListeners.add(re.Keydown,this.handleKeydown),t){if(ue(t))return;if(de(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(re.Click,ae,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(re.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!r)return;const l=null!=(t=(0,i.getEventCoordinates)(e))?t:m,c=(0,i.subtract)(r,l);
1if(!n&&s){if(de(s))return ne(c,s.tolerance)?this.handleCancel():void 0;if(ue(s))return null!=s.tolerance&&ne(c,s.tolerance)?this.handleCancel():ne(c,s.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===oe.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ge={move:{name:"pointermove"},end:{name:"pointerup"}};class ve extends fe{constructor(e){const{event:t}=e,n=(0,i.getOwnerDocument)(t.target);super(e,ge,n)}}ve.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const he={move:{name:"mousemove"},end:{name:"mouseup"}};var pe;!function(e){e[e.RightClick=2]="RightClick"}(pe||(pe={}));class be extends fe{constructor(e){super(e,he,(0,i.getOwnerDocument)(e.event.target))}}be.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==pe.RightClick&&(null==r||r({event:n}),!0)}}];const me={move:{name:"touchmove"},end:{name:"touchend"}};class ye extends fe{constructor(e){super(e,me)}static setup(){return window.addEventListener(me.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(me.move.name,e)};function e(){}}}var we,xe;function Ce(e){let{acceleration:t,activator:n=we.Pointer,canScroll:o,draggingRect:a,enabled:s,interval:l=5,order:c=xe.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:g,threshold:v}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=(0,i.usePrevious)(t);return(0,i.useLazyMemo)(e=>{if(n||!r||!e)return Ee;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[_.Backward]:e.x[_.Backward]||-1===o.x,[_.Forward]:e.x[_.Forward]||1===o.x},y:{[_.Backward]:e.y[_.Backward]||-1===o.y,[_.Forward]:e.y[_.Forward]||1===o.y}}},[n,t,r])}({delta:g,disabled:!s}),[p,b]=(0,i.useInterval)(),m=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)(()=>{switch(n){case we.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case we.DraggableRect:return a}},[n,a,u]),x=(0,r.useRef)(null),C=(0,r.useCallback)(()=>{const e=x.current;if(!e)return;const t=m.current.x*y.current.x,n=m.current.y*y.current.y;e.scrollBy(t,n)},[]),E=(0,r.useMemo)(()=>c===xe.TreeOrder?[...d].reverse():d,[c,d]);(0,r.useEffect)(()=>{if(s&&d.length&&w){for(const e of E){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=J(e,r,w,t,v);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return b(),x.current=e,p(C,l),m.current=a,void(y.current=i)}m.current={x:0,y:0},y.current={x:0,y:0},b()}else b()},[t,C,o,b,s,l,JSON.stringify(w),JSON.stringify(h),p,d,E,f,JSON.stringify(v)])}ye.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(we||(we={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(xe||(xe={}));const Ee={x:{[_.Backward]:!1,[_.Forward]:!1},y:{[_.Backward]:!1,[_.Forward]:!1}};var De,Re;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(De||(De={})),function(e){e.Optimized="optimized"}(Re||(Re={}));const Se=new Map;function Me(e,t){return(0,i.useLazyMemo)(n=>e?n||("function"===typeof t?t(e):e):null,[t,e])}function Ie(e){let{callback:t,disabled:n}=e;const o=(0,i.useEvent)(t),a=(0,r.useMemo)(()=>{if(n||"undefined"===typeof window||"undefined"===typeof window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)},[n]);return(0,r.useEffect)(()=>()=>null==a?void 0:a.disconnect(),[a]),a}function Ne(e){return new ee(P(e),e)}function Oe(e,t,n){void 0===t&&(t=Ne);const[o,a]=(0,r.useReducer)(function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);if(JSON.stringify(r)===JSON.stringify(i))return r;return i},null),s=function(e){let{callback:t,disabled:n}=e;const o=(0,i.useEvent)(t),a=(0,r.useMemo)(()=>
1{if(n||"undefined"===typeof window||"undefined"===typeof window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)},[o,n]);return(0,r.useEffect)(()=>()=>null==a?void 0:a.disconnect(),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),l=Ie({callback:a});return(0,i.useIsomorphicLayoutEffect)(()=>{a(),e?(null==l||l.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==s||s.disconnect())},[e]),o}const Le=[];function Te(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{n.current=null},t),(0,r.useEffect)(()=>{const t=e!==m;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?(0,i.subtract)(e,n.current):m}function Ae(e){return(0,r.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const ke=[];function Be(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,i.isHTMLElement)(t)?t:e}const ze=[{sensor:ve,options:{}},{sensor:ce,options:{}}],Pe={current:{}},Ke={draggable:{measure:K},droppable:{measure:K,strategy:De.WhileDragging,frequency:Re.Optimized},dragOverlay:{measure:P}};class Ue extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Fe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ue,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:h},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ke,measureDroppableContainers:h,windowRect:null,measuringScheduled:!1},We={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:h,draggableNodes:new Map,over:null,measureDroppableContainers:h},je=(0,r.createContext)(We),Xe=(0,r.createContext)(Fe);function Ye(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ue}}}function _e(e,t){switch(t.type){case v.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case v.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case v.DragEnd:case v.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case v.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ue(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case v.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 Ue(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case v.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ue(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function He(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:a}=(0,r.useContext)(je),s=(0,i.usePrevious)(o),l=(0,i.usePrevious)(null==n?void 0:n.id);return(0,r.useEffect)(()=>{if(!t&&!o&&s&&null!=l){if(!(0,i.isKeyboardEvent)(s))return;if(document.activeElement===s.target)return;const e=a.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,i.findFirstFocusableNode)(e);if(t){t.focus();break}}})}},[o,t,a,l,s]),null}function Ve(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>
1t({transform:e,...r}),n):n}const qe=(0,r.createContext)({...m,scaleX:1,scaleY:1});var Je;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Je||(Je={}));const Ge=(0,r.memo)(function(e){var t,n,a,s;let{id:l,accessibility:u,autoScroll:d=!0,children:f,sensors:h=ze,collisionDetection:p=N,measuring:b,modifiers:y,...w}=e;const x=(0,r.useReducer)(_e,void 0,Ye),[C,E]=x,[R,S]=function(){const[e]=(0,r.useState)(()=>new Set),t=(0,r.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,r.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[M,I]=(0,r.useState)(Je.Uninitialized),O=M===Je.Initialized,{draggable:{active:L,nodes:A,translate:B},droppable:{containers:z}}=C,K=L?A.get(L):null,j=(0,r.useRef)({initial:null,translated:null}),X=(0,r.useMemo)(()=>{var e;return null!=L?{id:L,data:null!=(e=null==K?void 0:K.data)?e:Pe,rect:j}:null},[L,K]),_=(0,r.useRef)(null),[V,q]=(0,r.useState)(null),[J,G]=(0,r.useState)(null),Z=(0,i.useLatestValue)(w,Object.values(w)),$=(0,i.useUniqueId)("DndDescribedBy",l),te=(0,r.useMemo)(()=>z.getEnabled(),[z]),ne=(re=b,(0,r.useMemo)(()=>({draggable:{...Ke.draggable,...null==re?void 0:re.draggable},droppable:{...Ke.droppable,...null==re?void 0:re.droppable},dragOverlay:{...Ke.dragOverlay,...null==re?void 0:re.dragOverlay}}),[null==re?void 0:re.draggable,null==re?void 0:re.droppable,null==re?void 0:re.dragOverlay]));var re;const{droppableRects:oe,measureDroppableContainers:ie,measuringScheduled:ae}=function(e,t){let{dragging:n,dependencies:o,config:a}=t;const[s,l]=(0,r.useState)(null),{frequency:c,measure:u,strategy:d}=a,f=(0,r.useRef)(e),g=function(){switch(d){case De.Always:return!1;case De.BeforeDragging:return n;default:return!n}}(),v=(0,i.useLatestValue)(g),h=(0,r.useCallback)(function(e){void 0===e&&(e=[]),v.current||l(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[v]),p=(0,r.useRef)(null),b=(0,i.useLazyMemo)(t=>{if(g&&!n)return Se;if(!t||t===Se||f.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new ee(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,s,n,g,u]);return(0,r.useEffect)(()=>{f.current=e},[e]),(0,r.useEffect)(()=>{g||h()},[n,g]),(0,r.useEffect)(()=>{s&&s.length>0&&l(null)},[JSON.stringify(s)]),(0,r.useEffect)(()=>{g||"number"!==typeof c||null!==p.current||(p.current=setTimeout(()=>{h(),p.current=null},c))},[c,g,h,...o]),{droppableRects:b,measureDroppableContainers:h,measuringScheduled:null!=s}}(te,{dragging:O,dependencies:[B.x,B.y],config:ne.droppable}),se=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,i.useLazyMemo)(e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(A,L),le=(0,r.useMemo)(()=>J?(0,i.getEventCoordinates)(J):null,[J]),ce=function(){const e=!1===(null==V?void 0:V.autoScrollEnabled),t="object"===typeof d?!1===d.enabled:!1===d,n=O&&!e&&!t;if("object"===typeof d)return{...d,enabled:n};return{enabled:n}}(),ue=function(e,t){return Me(e,t)}(se,ne.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:a=!0}=e;const s=(0,r.useRef)(!1),{x:l,y:c}="boolean"===typeof a?{x:a,y:a}:a;(0,i.useIsomorphicLayoutEffect)(()=>{if(!l&&!c||!t)return void(s.current=!1);if(s.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=T(n(e),o);if(l||(r.x=0),c||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=F(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,l,c,o,n])}({activeNode:L?A.get(L):null,config:ce.layoutShiftCompensation,initialRect:ue,measure:ne.draggable.measure});const de=Oe(se,ne.draggable.measure,ue),fe=Oe(se?se.parentElement:null),ge=(0,r.useRef)({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:oe,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ve=z.getNodeFor(null==(t=ge.current.over)?void 0:t.id),he=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),a=Ie({callback:(0,r.useCallback)(e=>{for(const{target:n}of e)if((0,i.isHTMLElement)(n)){o(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),s=(0,r.useCallback)(e=>{const n=Be(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),o(n?t(n):null)},[t,a]),[l,c]=(0,i.useNodeRef)(s);return(0,r.useMemo)(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}({measure:ne.dragOverlay.measure}),pe=null!=(n=he.nodeRef.current)?n:se,be=O?null!=(a=he.rect)?a:de:null,me=
1Boolean(he.nodeRef.current&&he.rect),ye=T(we=me?null:de,Me(we));var we;const xe=Ae(pe?(0,i.getWindow)(pe):null),Ee=function(e){const t=(0,r.useRef)(e),n=(0,i.useLazyMemo)(n=>e?n&&n!==Le&&e&&t.current&&e.parentNode===t.current.parentNode?n:U(e):Le,[e]);return(0,r.useEffect)(()=>{t.current=e},[e]),n}(O?null!=ve?ve:se:null),Re=function(e,t){void 0===t&&(t=P);const[n]=e,o=Ae(n?(0,i.getWindow)(n):null),[a,s]=(0,r.useReducer)(function(){return e.length?e.map(e=>H(e)?o:new ee(t(e),e)):ke},ke),l=Ie({callback:s});return e.length>0&&a===ke&&s(),(0,i.useIsomorphicLayoutEffect)(()=>{e.length?e.forEach(e=>null==l?void 0:l.observe(e)):(null==l||l.disconnect(),s())},[e]),a}(Ee),Ne=Ve(y,{transform:{x:B.x-ye.x,y:B.y-ye.y,scaleX:1,scaleY:1},activatorEvent:J,active:X,activeNodeRect:de,containerNodeRect:fe,draggingNodeRect:be,over:ge.current.over,overlayNodeRect:he.rect,scrollableAncestors:Ee,scrollableAncestorRects:Re,windowRect:xe}),Ue=le?(0,i.add)(le,B):null,Fe=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),a=(0,r.useCallback)(e=>{const t=W(e.target);t&&n(e=>e?(e.set(t,Y(t)),new Map(e)):null)},[]);return(0,r.useEffect)(()=>{const t=o.current;if(e!==t){r(t);const i=e.map(e=>{const t=W(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,Y(t)]):null}).filter(e=>null!=e);n(i.length?new Map(i):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach(e=>{const t=W(e);null==t||t.removeEventListener("scroll",a)})}},[a,e]),(0,r.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>(0,i.add)(e,t),m):Q(e):m,[e,t])}(Ee),We=Te(Fe),Ge=Te(Fe,[de]),Qe=(0,i.add)(Ne,We),Ze=be?k(be,Ne):null,$e=X&&Ze?p({active:X,collisionRect:Ze,droppableRects:oe,droppableContainers:te,pointerCoordinates:Ue}):null,et=D($e,"id"),[tt,nt]=(0,r.useState)(null),rt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(me?Ne:(0,i.add)(Ne,Ge),null!=(s=null==tt?void 0:tt.rect)?s:null,de),ot=(0,r.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==_.current)return;const i=A.get(_.current);if(!i)return;const a=e.nativeEvent,s=new n({active:_.current,activeNode:i,event:a,options:r,context:ge,onStart(e){const t=_.current;if(null==t)return;const n=A.get(t);if(!n)return;const{onDragStart:r}=Z.current,i={active:{id:t,data:n.data,rect:j}};(0,o.unstable_batchedUpdates)(()=>{null==r||r(i),I(Je.Initializing),E({type:v.DragStart,initialCoordinates:e,active:t}),R({type:"onDragStart",event:i})})},onMove(e){E({type:v.DragMove,coordinates:e})},onEnd:l(v.DragEnd),onCancel:l(v.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ge.current;let s=null;if(t&&i){const{cancelDrop:o}=Z.current;if(s={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===v.DragEnd&&"function"===typeof o){await Promise.resolve(o(s))&&(e=v.DragCancel)}}_.current=null,(0,o.unstable_batchedUpdates)(()=>{E({type:e}),I(Je.Uninitialized),nt(null),q(null),G(null);const t=e===v.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=Z.current[t];null==e||e(s),R({type:t,event:s})}})}}(0,o.unstable_batchedUpdates)(()=>{q(s),G(e.nativeEvent)})},[A]),it=(0,r.useCallback)((e,t)=>(n,r)=>{const o=n.nativeEvent,i=A.get(r);if(null!==_.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},_.current=r,ot(n,t))},[A,ot]),at=function(e,t){return(0,r.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(h,it);!function(e){(0,r.useEffect)(()=>{if(!i.canUseDOM)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(h),(0,i.useIsomorphicLayoutEffect)(()=>{de&&M===Je.Initializing&&I(Je.Initialized)},[de,M]),(0,r.useEffect)(()=>{const{onDragMove:e}=Z.current,{active:t,activatorEvent:n,collisions:r,over:i}=ge.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:Qe.x,y:Qe.y},over:i};(0,o.unstable_batchedUpdates)(()=>{null==e||e(a),R({type:"onDragMove",event:a})})},[Qe.x,Qe.y]),(0,r.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ge.current;if(!e||null==_.current||!t||!i)return;const{onDragOver:a}=Z.current,s=r.get(et),l=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:l};(0,o.unstable_batchedUpdates)(()=>{nt(l),null==a||a(c),R({type:"onDragOver",event:c})})},[et]),(0,i.useIsomorphicLayoutEffect)(()=>{ge.current={activatorEvent:J,active:X,activeNode:se,collisionRect:Ze,collisions:$e,droppableRects:oe,draggableNodes:A,draggingNode:pe,draggingNodeRect:be,droppableContainers:z,over:tt,scrollableAncestors:Ee,scrollAdjustedTranslate:Qe},j.current={initial:be,translated:Ze}},[X,se,$e,Ze,A,pe,be,oe,z,tt,Ee,Qe]),Ce({...ce,delta:B,draggingRect:Ze,pointerCoordinates:Ue,scrollableAncestors:Ee,scrollableAncestorRects:Re});const st=(0,r.useMemo)(()=>({active:X,activeNode:se,activeNodeRect:de,activatorEvent:J,collisions:$e,containerNodeRect:fe,dragOverlay:he,draggableNodes:A,droppableContainers:z,droppableRects:oe,over:tt,measureDroppableContainers:ie,scrollableAncestors:Ee,scrollableAncestorRects:Re,measuringConfiguration:ne,measuringScheduled:ae,windowRect:xe}),[X,se,de,J,$e,fe,he,A,z,oe,tt,ie,Ee,Re,ne,ae,xe]),lt=(0,r.useMemo)(()=>({activatorEvent:J,activators:at,active:X,activeNodeRect:de,ariaDescribedById:{draggable:$},dispatch:E,draggableNodes:A,over:tt,measureDroppableContainers:ie}),[J,at,X,de,E,$,A,tt,ie]);return r.createElement(c.Provider,{value:S},r.createElement(je.Provider,{value:lt},r.createElement(Xe.Provider,{value:st},r.createElement(qe.Provider,{value:rt},f)),r.createElement(He,{disabled:!1===(null==u?void 0:u.restoreFocus)}
1)),r.createElement(g,{...u,hiddenTextDescribedById:$}))}),Qe=(0,r.createContext)(null),Ze="button",$e="Droppable";function et(e){let{id:t,data:n,disabled:o=!1,attributes:a}=e;const s=(0,i.useUniqueId)($e),{activators:l,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:g,over:v}=(0,r.useContext)(je),{role:h=Ze,roleDescription:p="draggable",tabIndex:b=0}=null!=a?a:{},m=(null==u?void 0:u.id)===t,y=(0,r.useContext)(m?qe:Qe),[w,x]=(0,i.useNodeRef)(),[C,E]=(0,i.useNodeRef)(),D=function(e,t){return(0,r.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(l,t),R=(0,i.useLatestValue)(n);(0,i.useIsomorphicLayoutEffect)(()=>(g.set(t,{id:t,key:s,node:w,activatorNode:C,data:R}),()=>{const e=g.get(t);e&&e.key===s&&g.delete(t)}),[g,t]);return{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)(()=>({role:h,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!m||h!==Ze)||void 0,"aria-roledescription":p,"aria-describedby":f.draggable}),[o,h,b,m,p,f.draggable]),isDragging:m,listeners:o?void 0:D,node:w,over:v,setNodeRef:x,setActivatorNodeRef:E,transform:y}}function tt(){return(0,r.useContext)(Xe)}const nt="Droppable",rt={timeout:25};function ot(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const s=(0,i.useUniqueId)(nt),{active:l,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(je),f=(0,r.useRef)({disabled:n}),g=(0,r.useRef)(!1),h=(0,r.useRef)(null),p=(0,r.useRef)(null),{disabled:b,updateMeasurementsFor:m,timeout:y}={...rt,...a},w=(0,i.useLatestValue)(null!=m?m:o),x=Ie({callback:(0,r.useCallback)(()=>{g.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{d(Array.isArray(w.current)?w.current:[w.current]),p.current=null},y)):g.current=!0},[y]),disabled:b||!l}),C=(0,r.useCallback)((e,t)=>{x&&(t&&(x.unobserve(t),g.current=!1),e&&x.observe(e))},[x]),[E,D]=(0,i.useNodeRef)(C),R=(0,i.useLatestValue)(t);return(0,r.useEffect)(()=>{x&&E.current&&(x.disconnect(),g.current=!1,x.observe(E.current))},[E,x]),(0,i.useIsomorphicLayoutEffect)(()=>(c({type:v.RegisterDroppable,element:{id:o,key:s,disabled:n,node:E,rect:h,data:R}}),()=>c({type:v.UnregisterDroppable,key:s,id:o})),[o]),(0,r.useEffect)(()=>{n!==f.current.disabled&&(c({type:v.SetDroppableDisabled,id:o,key:s,disabled:n}),f.current.disabled=n)},[o,s,n,c]),{active:l,rect:h,isOver:(null==u?void 0:u.id)===o,node:E,over:u,setNodeRef:D}}function it(e){let{animation:t,children:n}=e;const[o,a]=(0,r.useState)(null),[s,l]=(0,r.useState)(null),c=(0,i.usePrevious)(n);return n||o||!c||a(c),(0,i.useIsomorphicLayoutEffect)(()=>{if(!s)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,s)).then(()=>{a(null)}):a(null)},[t,o,s]),r.createElement(r.Fragment,null,n,o?(0,r.cloneElement)(o,{ref:l}):null)}const at={x:0,y:0,scaleX:1,scaleY:1};function st(e){let{children:t}=e;return r.createElement(je.Provider,{value:We},r.createElement(qe.Provider,{value:at},t))}const lt={position:"fixed",touchAction:"none"},ct=e=>(0,i.isKeyboardEvent)(e)?"transform 250ms ease":void 0,ut=(0,r.forwardRef)((e,t)=>{let{as:n,activatorEvent:o,adjustScale:a,children:s,className:l,rect:c,style:u,transform:d,transition:f=ct}=e;if(!c)return null;const g=a?d:{...d,scaleX:1,scaleY:1},v={...lt,width:c.width,height:c.height,top:c.top,left:c.left,transform:i.CSS.Transform.toString(g),transformOrigin:a&&o?w(o,c):void 0,transition:"function"===typeof f?f(o):f,...u};return r.createElement(n,{className:l,style:v,ref:t},s)}),dt=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,s]of Object.entries(i.active))void 0!==s&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,s));if(null!=i&&i.dragOverlay)for(const[e,s]of Object.entries(i.dragOverlay))void 0!==s&&r.node.style.setProperty(e,s);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},ft={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:i.CSS.Transform.toString(t)},{transform:i.CSS.Transform.toString(n)}]},sideEffects:dt({styles:{active:{opacity:"0"}}})};
1function gt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,i.useEvent)((e,a)=>{if(null===t)return;const s=n.get(e);if(!s)return;const l=s.node.current;if(!l)return;const c=Be(a);if(!c)return;const{transform:u}=(0,i.getWindow)(a).getComputedStyle(a),d=B(u);if(!d)return;const f="function"===typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...ft,...e};return e=>{let{active:i,dragOverlay:a,transform:s,...l}=e;if(!t)return;const c={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:1!==s.scaleX?i.rect.width*s.scaleX/a.rect.width:1,scaleY:1!==s.scaleY?i.rect.height*s.scaleY/a.rect.height:1},d={x:s.x-c.x,y:s.y-c.y,...u},f=o({...l,active:i,dragOverlay:a,transform:{initial:s,final:d}}),[g]=f,v=f[f.length-1];if(JSON.stringify(g)===JSON.stringify(v))return;const h=null==r?void 0:r({active:i,dragOverlay:a,...l}),p=a.node.animate(f,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{p.onfinish=()=>{null==h||h(),e()}})}}(t);return Z(l,o.draggable.measure),f({active:{id:e,data:s.data,node:l,rect:o.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})})}let vt=0;function ht(e){return(0,r.useMemo)(()=>{if(null!=e)return vt++,vt},[e])}const pt=r.memo(e=>
1{let{adjustScale:t=!1,children:n,dropAnimation:o,style:i,transition:a,modifiers:s,wrapperElement:l="div",className:c,zIndex:u=999}=e;const{activatorEvent:d,active:f,activeNodeRect:g,containerNodeRect:v,draggableNodes:h,droppableContainers:p,dragOverlay:b,over:m,measuringConfiguration:y,scrollableAncestors:w,scrollableAncestorRects:x,windowRect:C}=tt(),E=(0,r.useContext)(qe),D=ht(null==f?void 0:f.id),R=Ve(s,{activatorEvent:d,active:f,activeNodeRect:g,containerNodeRect:v,draggingNodeRect:b.rect,over:m,overlayNodeRect:b.rect,scrollableAncestors:w,scrollableAncestorRects:x,transform:E,windowRect:C}),S=Me(g),M=gt({config:o,draggableNodes:h,droppableContainers:p,measuringConfiguration:y}),I=S?b.setRef:void 0;return r.createElement(st,null,r.createElement(it,{animation:M},f&&D?r.createElement(ut,{key:D,id:f.id,ref:I,as:l,activatorEvent:d,adjustScale:t,className:c,transition:a,rect:S,style:{zIndex:u,...i},transform:R},n):null))})},7105:(e,t,n)=>{n.r(t),n.d(t,{SortableContext:()=>m,arrayMove:()=>a,arraySwap:()=>s,defaultAnimateLayoutChanges:()=>w,defaultNewIndexGetter:()=>y,hasSortableData:()=>S,horizontalListSortingStrategy:()=>d,rectSortingStrategy:()=>f,rectSwappingStrategy:()=>g,sortableKeyboardCoordinates:()=>I,useSortable:()=>R,verticalListSortingStrategy:()=>h});var r=n(83740),o=n(61544),i=n(84144);function a(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s(e,t,n){const r=e.slice();return r[t]=e[n],r[n]=e[t],r}function l(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function c(e){return null!==e&&e>=0}const u={scaleX:1,scaleY:1},d=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:i,index:a}=e;const s=null!=(t=n[o])?t:r;if(!s)return null;const l=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r||!o&&!i)return 0;if(n<t)return o?r.left-(o.left+o.width):i.left-(r.left+r.width);return i?i.left-(r.left+r.width):r.left-(o.left+o.width)}(n,a,o);if(a===o){const e=n[i];return e?{x:o<i?e.left+e.width-(s.left+s.width):e.left-s.left,y:0,...u}:null}return a>o&&a<=i?{x:-s.width-l,y:0,...u}:a<o&&a>=i?{x:s.width+l,y:0,...u}:{x:0,y:0,...u}};const f=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=a(t,r,n),s=t[o],l=i[o];return l&&s?{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}:null},g=e=>{let t,n,{activeIndex:r,index:o,rects:i,overIndex:a}=e;return o===r&&(t=i[o],n=i[a]),o===a&&(t=i[o],n=i[r]),n&&t?{x:n.left-t.left,y:n.top-t.top,scaleX:n.width/t.width,scaleY:n.height/t.height}:null},v={scaleX:1,scaleY:1},h=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const s=null!=(t=i[n])?t:r;if(!s)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(s.top+s.height):e.top-s.top,...v}:null}const l=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r)return 0;if(n<t)return o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0;return i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0}(i,o,n);return o>n&&o<=a?{x:0,y:-s.height-l,...v}:o<n&&o>=a?{x:0,y:s.height+l,...v}:{x:0,y:0,...v}};const p="Sortable",b=r.createContext({activeIndex:-1,containerId:p,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:f,disabled:{draggable:!1,droppable:!1}});function m(e){let{children:t,id:n,items:a,strategy:s=f,disabled:c=!1}=e;const{active:u,dragOverlay:d,droppableRects:g,over:v,measureDroppableContainers:h}=(0,o.useDndContext)(),m=(0,i.useUniqueId)(p,n),y=Boolean(null!==d.rect),w=(0,r.useMemo)(()=>a.map(e=>"object"===typeof e&&"id"in e?e.id:e),[a]),x=null!=u,C=u?w.indexOf(u.id):-1,E=v?w.indexOf(v.id):-1,D=(0,r.useRef)(w),R=!function(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}(w,D.current),S=-1!==E&&-1===C||R,M=function(e){return"boolean"===typeof e?{draggable:e,droppable:e}:e}(c);(0,i.useIsomorphicLayoutEffect)(()=>{R&&x&&h(w)},[R,w,x,h]),(0,r.useEffect)(()=>{D.current=w},[w]);const I=(0,r.useMemo)(()=>({activeIndex:C,containerId:m,disabled:M,disableTransforms:S,items:w,overIndex:E,useDragOverlay:y,sortedRects:l(w,g),strategy:s}),[C,m,M.draggable,M.droppable,S,w,E,g,y,s]);return r.createElement(b.Provider,{value:I},t)}const y=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return a(n,r,o).indexOf(t)},w=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r)&&((s===i||o!==a)&&(!!n||a!==o&&t===l))},x={duration:200,easing:"ease"},C="transform",E=i.CSS.Transition.toString({property:C,duration:0,easing:"linear"}),D={roleDescription:"sortable"};function R(e){let{animateLayoutChanges:t=w,attributes:n,disabled:a,data:s,getNewIndex:l=y,id:u,strategy:d,resizeObserverConfig:f,transition:g=x}=e;const{items:v,containerId:h,activeIndex:p,disabled:m,disableTransforms:R,sortedRects:S,overIndex:M,useDragOverlay:I,strategy:N}=(0,r.useContext)(b),O=function(e,t){var n,r;if("boolean"===typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(a,m),L=v.indexOf(u),T=(0,r.useMemo)(()=>({sortable:{containerId:h,index:L,items:v},...s}),[h,s,L,v]),A=(0,r.useMemo)(()=>v.slice(v.indexOf(u)),[v,u]),{rect:k,node:B,isOver:z,setNodeRef:P}=(0,o.useDroppable)({id:u,data:T,disabled:O.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...f}}),{active:K,activatorEvent:U,activeNodeRect:F,attributes:W,setNodeRef:j,listeners:X,isDragging:Y,over:_,setActivatorNodeRef:H,transform:V}=(0,o.useDraggable)({id:u,data:T,attributes:{...D,...n},disabled:O.draggable}),q=(0,i.useCombinedRefs)(P,j),J=Boolean(K),G=J&&!R&&c(p)&&c(M),Q=!I&&Y,Z=Q&&G?V:null,$=G?null!=Z?Z:(null!=d?d:N)({rects:S,activeNodeRect:F,activeIndex:p,overIndex:M,index:L}):null,ee=c(p)&&c(M)?l({id:u,items:v,activeIndex:p,overIndex:M}):L,te=null==K?void 0:K.id,ne=(0,r.useRef)({activeId:te,items:v,newIndex:ee,containerId:h}),re=v!==ne.current.items,oe=t({active:K,containerId:h,isDragging:Y,isSorting:J,id:u,index:L,items:v,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:g,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:a,rect:s}=e;const[l,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,i.useIsomorphicLayoutEffect)(()=>
1{if(!t&&n!==u.current&&a.current){const e=s.current;if(e){const t=(0,o.getClientRect)(a.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)},[t,n,a,s]),(0,r.useEffect)(()=>{l&&c(null)},[l]),l}({disabled:!oe,index:L,node:B,rect:k});return(0,r.useEffect)(()=>{J&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),h!==ne.current.containerId&&(ne.current.containerId=h),v!==ne.current.items&&(ne.current.items=v)},[J,ee,h,v]),(0,r.useEffect)(()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout(()=>{ne.current.activeId=te},50);return()=>clearTimeout(e)},[te]),{active:K,activeIndex:p,attributes:W,data:T,rect:k,index:L,newIndex:ee,items:v,isOver:z,isSorting:J,isDragging:Y,listeners:X,node:B,overIndex:M,over:_,setNodeRef:q,setActivatorNodeRef:H,setDroppableNodeRef:P,setDraggableNodeRef:j,transform:null!=ie?ie:$,transition:function(){if(ie||re&&ne.current.newIndex===L)return E;if(Q&&!(0,i.isKeyboardEvent)(U)||!g)return;if(J||oe)return i.CSS.Transition.toString({...g,property:C});return}()}}function S(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"===typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const M=[o.KeyboardCode.Down,o.KeyboardCode.Right,o.KeyboardCode.Up,o.KeyboardCode.Left],I=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:a,droppableContainers:s,over:l,scrollableAncestors:c}}=t;if(M.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];s.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;const i=a.get(n.id);if(i)switch(e.code){case o.KeyboardCode.Down:r.top<i.top&&t.push(n);break;case o.KeyboardCode.Up:r.top>i.top&&t.push(n);break;case o.KeyboardCode.Left:r.left>i.left&&t.push(n);break;case o.KeyboardCode.Right:r.left<i.left&&t.push(n)}});const u=(0,o.closestCorners)({active:n,collisionRect:r,droppableRects:a,droppableContainers:t,pointerCoordinates:null});let d=(0,o.getFirstCollision)(u,"id");if(d===(null==l?void 0:l.id)&&u.length>1&&(d=u[1].id),null!=d){const e=s.get(n.id),t=s.get(d),l=t?a.get(t.id):null,u=null==t?void 0:t.node.current;if(u&&l&&e&&t){const n=(0,o.getScrollableAncestors)(u).some((e,t)=>c[t]!==e),a=N(e,t),s=function(e,t){if(!S(e)||!S(t))return!1;if(!N(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,t),d=n||!a?{x:0,y:0}:{x:s?r.width-l.width:0,y:s?r.height-l.height:0},f={x:l.left,y:l.top};return d.x&&d.y?f:(0,i.subtract)(f,d)}}}};function N(e,t){return!(!S(e)||!S(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}},84144:(e,t,n)=>{n.r(t),n.d(t,{CSS:()=>N,add:()=>E,canUseDOM:()=>i,findFirstFocusableNode:()=>L,getEventCoordinates:()=>I,getOwnerDocument:()=>f,getWindow:()=>l,hasViewportRelativeCoordinates:()=>R,isDocument:()=>c,isHTMLElement:()=>u,isKeyboardEvent:()=>S,isNode:()=>s,isSVGElement:()=>d,isTouchEvent:()=>M,isWindow:()=>a,subtract:()=>D,useCombinedRefs:()=>o,useEvent:()=>v,useInterval:()=>h,useIsomorphicLayoutEffect:()=>g,useLatestValue:()=>p,useLazyMemo:()=>b,useNodeRef:()=>m,usePrevious:()=>y,useUniqueId:()=>x});var r=n(83740);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}const i="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function s(e){return"nodeType"in e}function l(e){var t,n;return e?a(e)?e:s(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=l(e);return e instanceof t}function u(e){return!a(e)&&e instanceof l(e).HTMLElement}function d(e){return e instanceof l(e).SVGElement}function f(e){return e?a(e)?e.document:s(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const g=i?r.useLayoutEffect:r.useEffect;function v(e){const t=(0,r.useRef)(e);return g(()=>{t.current=e}),(0,r.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function h(){const e=(0,r.useRef)(null);return[(0,r.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,r.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function p(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return g(()=>{n.current!==e&&(n.current=e)},t),n}function b(e,t){const n=(0,r.useRef)();return(0,r.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function m(e){const t=v(e),n=(0,r.useRef)(null),o=(0,r.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)(()=>
1{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n},[e,t])}function C(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((t,n)=>{const r=Object.entries(n);for(const[o,i]of r){const n=t[o];null!=n&&(t[o]=n+e*i)}return t},{...t})}}const E=C(1),D=C(-1);function R(e){return"clientX"in e&&"clientY"in e}function S(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function M(e){if(!e)return!1;const{TouchEvent:t}=l(e.target);return t&&e instanceof t}function I(e){if(M(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return R(e)?{x:e.clientX,y:e.clientY}:null}const N=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[N.Translate.toString(e),N.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),O="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function L(e){return e.matches(O)?e:e.querySelector(O)}}}]);
2//# sourceMappingURL=dnd-kit-core.3f59671a.chunk.js.map

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.