Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dnd-kit/core

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dnd-kit/core - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

11

CHANGELOG.md
# @dnd-kit/core
## 2.1.2
### Patch Changes
- [`2833337`](https://github.com/clauderic/dnd-kit/commit/2833337043719853902c3989dfcd5b55ae9ddc73) [#186](https://github.com/clauderic/dnd-kit/pull/186) Thanks [@clauderic](https://github.com/clauderic)! - Simplify `useAnnouncement` hook to only return a single `announcement` rather than `entries`. Similarly, the `LiveRegion` component now only accepts a single `announcement` rather than `entries.
- The current strategy used in the useAnnouncement hook is needlessly complex. It's not actually necessary to render multiple announcements at once within the LiveRegion component. It's sufficient to render a single announcement at a time. It's also un-necessary to clean up the announcements after they have been announced, especially now that the role="status" attribute has been added to LiveRegion, keeping the last announcement rendered means users can refer to the last status.
- Updated dependencies [[`c24bdb3`](https://github.com/clauderic/dnd-kit/commit/c24bdb3723f1e3e4c474439f837a19c6d48059fb), [`2833337`](https://github.com/clauderic/dnd-kit/commit/2833337043719853902c3989dfcd5b55ae9ddc73)]:
- @dnd-kit/accessibility@2.0.0
## 2.1.1

@@ -4,0 +15,0 @@

2

dist/core.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r=require("react"),n=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,o=require("react-dom"),i=require("@dnd-kit/utilities"),a=require("@dnd-kit/accessibility"),c={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 "},u={onDragStart:function(e){return"Picked up draggable item "+e+"."},onDragOver:function(e,t){return t?"Draggable item "+e+" was moved over droppable area "+t+".":"Draggable item "+e+" is no longer over a droppable area."},onDragEnd:function(e,t){return t?"Draggable item "+e+" was dropped over droppable area "+t:"Draggable item "+e+" was dropped."},onDragCancel:function(e){return"Dragging was cancelled. Draggable item "+e+" was dropped."}};!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(t||(t={}));var l=function(e){return s(e,(function(e,t){return e<t}))};function s(e,t){if(0===e.length)return-1;for(var r=e[0],n=0,o=1;o<e.length;o++)t(e[o],r)&&(n=o,r=e[o]);return n}function d(){}function f(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function p(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t.indexOf(r=i[n])>=0||(o[r]=e[r]);return o}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return g(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function m(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var b=r.createContext({activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,activeNodeClientRect:null,activators:[],ariaDescribedById:{draggable:""},containerNodeRect:null,dispatch:d,draggableNodes:{},droppableRects:new Map,droppableContainers:{},over:null,overlayNode:{nodeRef:{current:null},rect:null,setRef:d},scrollableAncestors:[],scrollableAncestorRects:[],recomputeLayouts:d,windowRect:null,willRecomputeLayouts:!1}),x=Object.freeze({x:0,y:0});function w(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function E(e){if(function(e){var t;return(null==(t=window)?void 0:t.TouchEvent)&&e instanceof TouchEvent}(e)){if(e.touches&&e.touches.length){var t=e.touches[0];return{x:t.clientX,y:t.clientY}}if(e.changedTouches&&e.changedTouches.length){var r=e.changedTouches[0];return{x:r.clientX,y:r.clientY}}}return function(e){var t;return(null==(t=window)?void 0:t.MouseEvent)&&e instanceof MouseEvent||e.type.includes("mouse")}(e)?{x:e.clientX,y:e.clientY}:{x:0,y:0}}function R(e,t){if(e instanceof KeyboardEvent)return"0 0";var r=E(e);return(r.x-t.left)/t.width*100+"% "+(r.y-t.top)/t.height*100+"%"}function D(e,t,r){return void 0===t&&(t=e.offsetLeft),void 0===r&&(r=e.offsetTop),{x:t+.5*e.width,y:r+.5*e.height}}function C(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((function(t,r){return v({},t,{top:t.top+e*r.y,bottom:t.bottom+e*r.y,left:t.left+e*r.x,right:t.right+e*r.x,offsetLeft:t.offsetLeft+e*r.x,offsetTop:t.offsetTop+e*r.y})}),v({},t))}}var L,S=C(1);function M(e){var t=[];return e?function e(r){return r?r instanceof Document&&null!=r.scrollingElement?(t.push(r.scrollingElement),t):!(r instanceof HTMLElement)||r instanceof SVGElement?t:(function(e){var t=window.getComputedStyle(e),r=/(auto|scroll)/;return null!=["overflow","overflowX","overflowY"].find((function(e){var n=t[e];return"string"==typeof n&&r.test(n)}))}(r)&&t.push(r),e(r.parentNode)):t}(e.parentNode):t}function N(e){return i.canUseDOM?e===document.scrollingElement||e instanceof Document?window:e instanceof HTMLElement?e:null:null}function T(e){return e instanceof Window?{x:e.scrollX,y:e.scrollY}:{x:e.scrollLeft,y:e.scrollTop}}function A(e){var t={x:0,y:0},r={x:e.scrollWidth-e.clientWidth,y:e.scrollHeight-e.clientHeight};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"}(L||(L={}));var O={x:.2,y:.2};function I(e,t,r,n,o){var a=r.top,c=r.left,u=r.right,l=r.bottom;void 0===n&&(n=10),void 0===o&&(o=O);var s,d=e.clientHeight,f=e.clientWidth,v=(s=e,i.canUseDOM&&s&&s===document.scrollingElement?{top:0,left:0,right:f,bottom:d,width:f,height:d}:t),h=A(e),p=h.isBottom,g=h.isLeft,y=h.isRight,m={x:0,y:0},b={x:0,y:0},x=v.height*o.y,w=v.width*o.x;return!h.isTop&&a<=v.top+x?(m.y=L.Backward,b.y=n*Math.abs((v.top+x-a)/x)):!p&&l>=v.bottom-x&&(m.y=L.Forward,b.y=n*Math.abs((v.bottom-x-l)/x)),!y&&u>=v.right-w?(m.x=L.Forward,b.x=n*Math.abs((v.right-w-u)/w)):!g&&c<=v.left+w&&(m.x=L.Backward,b.x=n*Math.abs((v.left+w-c)/w)),{direction:m,speed:b}}function K(e){if(e===document.scrollingElement){var t=window,r=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:r,bottom:n,width:r,height:n}}var o=e.getBoundingClientRect();return{top:o.top,left:o.left,right:o.right,bottom:o.bottom,width:e.clientWidth,height:e.clientHeight}}function k(e){return e.reduce((function(e,t){return i.add(e,T(t))}),x)}function j(e){var t=e.offsetWidth,r=e.offsetHeight,n=function e(t,r,n){if(void 0===n&&(n=x),!(t&&t instanceof HTMLElement))return n;var o={x:n.x+t.offsetLeft,y:n.y+t.offsetTop};return t.offsetParent===r?o:e(t.offsetParent,r,o)}(e,null);return{width:t,height:r,offsetTop:n.y,offsetLeft:n.x}}function B(e){if(e instanceof Window){var t=window.innerWidth,r=window.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r,offsetTop:0,offsetLeft:0}}var n=j(e),o=n.offsetTop,i=n.offsetLeft,a=e.getBoundingClientRect();return{width:a.width,height:a.height,top:a.top,bottom:a.bottom,right:a.right,left:a.left,offsetTop:o,offsetLeft:i}}function P(e){var t=j(e),r=t.width,n=t.height,o=t.offsetTop,i=t.offsetLeft,a=k(M(e)),c=o-a.y,u=i-a.x;return{width:r,height:n,top:c,bottom:c+n,right:u+r,left:u,offsetTop:o,offsetLeft:i}}function _(e){return"top"in e}function F(e,t,r){return void 0===t&&(t=e.offsetLeft),void 0===r&&(r=e.offsetTop),[{x:t,y:r},{x:t+e.width,y:r},{x:t,y:r+e.height},{x:t+e.width,y:r+e.height}]}var q=function(e,t){var r=e.map((function(e){return function(e,t){var r=Math.max(t.top,e.offsetTop),n=Math.max(t.left,e.offsetLeft),o=Math.min(t.left+t.width,e.offsetLeft+e.width),i=Math.min(t.top+t.height,e.offsetTop+e.height);if(n<o&&r<i){var a=(o-n)*(i-r);return Number((a/(t.width*t.height+e.width*e.height-a)).toFixed(4))}return 0}(e[1],t)})),n=s(r,(function(e,t){return e>t}));return r[n]<=0?null:e[n]?e[n][0]:null};function H(e){return e instanceof HTMLElement?e.ownerDocument:document}function U(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},lastEvent:null,nodes:{},translate:{x:0,y:0}},droppable:{containers:{}}}}function z(e,r){switch(r.type){case t.DragStart:return v({},e,{draggable:v({},e.draggable,{initialCoordinates:r.initialCoordinates,active:r.active,lastEvent:t.DragStart})});case t.DragMove:return e.draggable.active?v({},e,{draggable:v({},e.draggable,{translate:{x:r.coordinates.x-e.draggable.initialCoordinates.x,y:r.coordinates.y-e.draggable.initialCoordinates.y}})}):e;case t.DragEnd:case t.DragCancel:return v({},e,{draggable:v({},e.draggable,{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0},lastEvent:r.type})});case t.RegisterDroppable:var n,o=r.element;return v({},e,{droppable:v({},e.droppable,{containers:v({},e.droppable.containers,(n={},n[o.id]=o,n))})});case t.SetDroppableDisabled:var i,a=r.id,c=e.droppable.containers[a];return c?v({},e,{droppable:v({},e.droppable,{containers:v({},e.droppable.containers,(i={},i[a]=v({},c,{disabled:r.disabled}),i))})}):e;case t.UnregisterDroppable:return v({},e,{droppable:v({},e.droppable,{containers:(u=r.id,l=e.droppable.containers,p(l,[u].map(m)))})});default:return e}var u,l}function W(e){var c=e.announcements,l=void 0===c?u:c,s=e.activeId,d=e.overId,f=e.lastEvent,v=e.hiddenTextDescribedById,h=e.screenReaderInstructions,p=a.useAnnouncement(),g=p.announce,y=p.entries,m=r.useRef({activeId:s,overId:d}),b=i.useUniqueId("DndLiveRegion");return r.useEffect((function(){var e,r=m.current,n=r.activeId,o=r.overId;!n&&s?e=l.onDragStart(s):!s&&n?f===t.DragEnd?e=l.onDragEnd(n,null!=o?o:void 0):f===t.DragCancel&&(e=l.onDragCancel(n)):s&&n&&d!==o&&(e=l.onDragOver(s,null!=d?d:void 0)),e&&g(e),m.current.overId===d&&m.current.activeId===s||(m.current={activeId:s,overId:d})}),[l,g,s,d,f]),i.canUseDOM?o.createPortal(n.createElement(n.Fragment,null,n.createElement(a.HiddenText,{id:v,value:h.draggable}),n.createElement(a.LiveRegion,{id:b,entries:y})),document.body):null}function Y(e,t){return e(t={exports:{}},t.exports),t.exports}var X,G,V,J=Y((function(e){var t=function(e){var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=Object.create((t&&t.prototype instanceof d?t:d).prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,i),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var s={};function d(){}function f(){}function v(){}var h={};h[o]=function(){return this};var p=Object.getPrototypeOf,g=p&&p(p(D([])));g&&g!==t&&r.call(g,o)&&(h=g);var y=v.prototype=d.prototype=Object.create(h);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,c){var u=l(e[o],e,i);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function D(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=y.constructor=v,v.constructor=f,f.displayName=c(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},m(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),c(y,a,"Generator"),y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=D,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),s},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:D(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));(X=exports.AutoScrollActivator||(exports.AutoScrollActivator={}))[X.Pointer=0]="Pointer",X[X.DraggableRect=1]="DraggableRect",(G=exports.TraversalOrder||(exports.TraversalOrder={}))[G.TreeOrder=0]="TreeOrder",G[G.ReversedTreeOrder=1]="ReversedTreeOrder",(V=exports.LayoutMeasuringStrategy||(exports.LayoutMeasuringStrategy={}))[V.Always=0]="Always",V[V.BeforeDragging=1]="BeforeDragging",V[V.WhileDragging=2]="WhileDragging",(exports.LayoutMeasuringFrequency||(exports.LayoutMeasuringFrequency={})).Optimized="optimized";var $=new Map,Q={strategy:exports.LayoutMeasuringStrategy.WhileDragging,frequency:exports.LayoutMeasuringFrequency.Optimized},Z=[],ee=ne(B),te=oe(B),re=ne(P);function ne(e){return function(t,n){var o=r.useRef(t);return i.useLazyMemo((function(r){return t?n||!r&&t||t!==o.current?t instanceof HTMLElement&&null==t.parentNode?null:e(t):null!=r?r:null:null}),[t,n])}}function oe(e){var t=[];return function(n,o){var a=r.useRef(n);return i.useLazyMemo((function(r){return n.length?o||!r&&n.length||n!==a.current?n.map((function(t){return e(t)})):null!=r?r:t:t}),[n,o])}}var ie,ae=function(){function e(e){this.target=e,this.listeners=[]}var t=e.prototype;return t.add=function(e,t,r){this.target.addEventListener(e,t,r),this.listeners.push({eventName:e,handler:t})},t.removeAll=function(){var e=this;this.listeners.forEach((function(t){return e.target.removeEventListener(t.eventName,t.handler)}))},e}();function ce(e,t){var r=Math.abs(e.x),n=Math.abs(e.y);return"number"==typeof t?Math.sqrt(Math.pow(r,2)+Math.pow(n,2))>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t&&n>t.y}(ie=exports.KeyboardCode||(exports.KeyboardCode={})).Space="Space",ie.Down="ArrowDown",ie.Right="ArrowRight",ie.Left="ArrowLeft",ie.Up="ArrowUp",ie.Esc="Escape",ie.Enter="Enter";var ue,le={start:[exports.KeyboardCode.Space,exports.KeyboardCode.Enter],cancel:[exports.KeyboardCode.Esc],end:[exports.KeyboardCode.Space,exports.KeyboardCode.Enter]},se=function(e,t){var r=t.currentCoordinates;switch(e.code){case exports.KeyboardCode.Right:return v({},r,{x:r.x+25});case exports.KeyboardCode.Left:return v({},r,{x:r.x-25});case exports.KeyboardCode.Down:return v({},r,{y:r.y+25});case exports.KeyboardCode.Up:return v({},r,{y:r.y-25})}},de=function(){function e(e){this.props=e,this.autoScrollEnabled=!1,this.coordinates=x;var t=e.event.target;this.props=e,this.listeners=new ae(H(t)),this.windowListeners=new ae(function(e){var t;return null!=(t=H(e).defaultView)?t:window}(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}var t=e.prototype;return t.attach=function(){var e=this;this.handleStart(),setTimeout((function(){e.listeners.add("keydown",e.handleKeyDown),e.windowListeners.add("resize",e.handleCancel)}))},t.handleStart=function(){var e=this.props,t=e.activeNode,r=e.onStart;if(!t.current)throw new Error("Active draggable node is undefined");var n=B(t.current),o={x:n.left,y:n.top};this.coordinates=o,r(o)},t.handleKeyDown=function(e){if(e instanceof KeyboardEvent){var t=this.coordinates,r=this.props,n=r.active,o=r.context,a=r.options,c=a.keyboardCodes,u=void 0===c?le:c,l=a.coordinateGetter,s=void 0===l?se:l,d=a.scrollBehavior,f=void 0===d?"smooth":d,v=e.code;if(u.end.includes(v))return void this.handleEnd(e);if(u.cancel.includes(v))return void this.handleCancel(e);var h=s(e,{active:n,context:o.current,currentCoordinates:t});if(h){for(var p,g={x:0,y:0},m=y(o.current.scrollableAncestors);!(p=m()).done;){var b=p.value,x=e.code,w=i.subtract(h,t),E=A(b),R=E.isTop,D=E.isRight,C=E.isLeft,L=E.isBottom,S=E.maxScroll,M=E.minScroll,N=K(b),T={x:Math.min(x===exports.KeyboardCode.Right?N.right-N.width/2:N.right,Math.max(x===exports.KeyboardCode.Right?N.left:N.left+N.width/2,h.x)),y:Math.min(x===exports.KeyboardCode.Down?N.bottom-N.height/2:N.bottom,Math.max(x===exports.KeyboardCode.Down?N.top:N.top+N.height/2,h.y))},O=x===exports.KeyboardCode.Right&&!D||x===exports.KeyboardCode.Left&&!C,I=x===exports.KeyboardCode.Down&&!L||x===exports.KeyboardCode.Up&&!R;if(O&&T.x!==h.x){if(x===exports.KeyboardCode.Right&&b.scrollLeft+w.x<=S.x||x===exports.KeyboardCode.Left&&b.scrollLeft+w.x>=M.x)return void b.scrollBy({left:w.x,behavior:f});g.x=x===exports.KeyboardCode.Right?b.scrollLeft-S.x:b.scrollLeft-M.x,b.scrollBy({left:-g.x,behavior:f});break}if(I&&T.y!==h.y){if(x===exports.KeyboardCode.Down&&b.scrollTop+w.y<=S.y||x===exports.KeyboardCode.Up&&b.scrollTop+w.y>=M.y)return void b.scrollBy({top:w.y,behavior:f});g.y=x===exports.KeyboardCode.Down?b.scrollTop-S.y:b.scrollTop-M.y,b.scrollBy({top:-g.y,behavior:f});break}}this.handleMove(e,i.add(h,g))}}},t.handleMove=function(e,t){var r=this.props.onMove;e.preventDefault(),r(t),this.coordinates=t},t.handleEnd=function(e){var t=this.props.onEnd;e.preventDefault(),this.detach(),t()},t.handleCancel=function(e){var t=this.props.onCancel;e.preventDefault(),this.detach(),t()},t.detach=function(){this.listeners.removeAll(),this.windowListeners.removeAll()},e}();function fe(e){return Boolean(e&&"distance"in e)}function ve(e){return Boolean(e&&"delay"in e)}de.activators=[{eventName:"onKeyDown",handler:function(e,t){var r=t.keyboardCodes,n=t.onActivation;return!!(void 0===r?le:r).start.includes(e.nativeEvent.code)&&(e.preventDefault(),null==n||n({event:e.nativeEvent}),!0)}}],function(e){e.Keydown="keydown"}(ue||(ue={}));var he=function(){function e(e,t,r){var n;void 0===r&&(r=(n=e.event.target)instanceof HTMLElement?n:H(n)),this.props=e,this.events=t,this.autoScrollEnabled=!0,this.activated=!1,this.timeoutId=null;var o=e.event;this.props=e,this.events=t,this.ownerDocument=H(o.target),this.listeners=new ae(r),this.initialCoordinates=E(o),this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.attach()}var t=e.prototype;return t.attach=function(){var e=this.events,t=this.props.options.activationConstraint;if(this.listeners.add(e.move.name,this.handleMove,!1),this.listeners.add(e.end.name,this.handleEnd),this.ownerDocument.addEventListener(ue.Keydown,this.handleKeydown),t){if(fe(t))return;if(ve(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()},t.detach=function(){this.listeners.removeAll(),this.ownerDocument.removeEventListener(ue.Keydown,this.handleKeydown),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)},t.handleStart=function(){var e=this.initialCoordinates,t=this.props.onStart;e&&(this.activated=!0,t(e))},t.handleMove=function(e){var t=this.activated,r=this.initialCoordinates,n=this.props,o=n.onMove,a=n.options.activationConstraint;if(r){var c=E(e),u=i.subtract(r,c);if(!t&&a){if(ve(a))return ce(u,a.tolerance)?this.handleCancel():void 0;if(fe(a))return ce(u,a.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),o(c)}},t.handleEnd=function(){var e=this.props.onEnd;this.detach(),e()},t.handleCancel=function(){var e=this.props.onCancel;this.detach(),e()},t.handleKeydown=function(e){e.code===exports.KeyboardCode.Esc&&this.handleCancel()},e}(),pe={move:{name:"pointermove"},end:{name:"pointerup"}},ge=function(e){function t(t){var r=H(t.event.target);return e.call(this,t,pe,r)||this}return h(t,e),t}(he);ge.activators=[{eventName:"onPointerDown",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return!(!r.isPrimary||0!==r.button||(null==n||n({event:r}),0))}}];var ye,me={move:{name:"mousemove"},end:{name:"mouseup"}};!function(e){e[e.RightClick=2]="RightClick"}(ye||(ye={}));var be=function(e){function t(t){return e.call(this,t,me,H(t.event.target))||this}return h(t,e),t}(he);be.activators=[{eventName:"onMouseDown",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return r.button!==ye.RightClick&&(null==n||n({event:r}),!0)}}];var xe={move:{name:"touchmove"},end:{name:"touchend"}},we=function(e){function t(t){return e.call(this,t,xe)||this}return h(t,e),t}(he);function Ee(e,t){var r=t.transform,n=p(t,["transform"]);return(null==e?void 0:e.length)?e.reduce((function(e,t){return t(v({transform:e},n))}),r):r}we.activators=[{eventName:"onTouchStart",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return!(r.touches.length>1||(null==n||n({event:r}),0))}}];var Re=[{sensor:ge,options:{}},{sensor:de,options:{}}],De=r.createContext(v({},x,{scaleX:1,scaleY:1})),Ce=r.memo((function(e){var o,a,u,l,s,d,h=e.autoScroll,g=void 0===h||h,m=e.announcements,w=e.children,R=e.sensors,D=void 0===R?Re:R,C=e.collisionDetection,L=void 0===C?q:C,A=e.layoutMeasuring,O=e.modifiers,K=e.screenReaderInstructions,B=void 0===K?c:K,P=p(e,["autoScroll","announcements","children","sensors","collisionDetection","layoutMeasuring","modifiers","screenReaderInstructions"]),_=r.useReducer(z,void 0,U),F=_[0],H=_[1],Y=F.draggable,X=Y.active,G=Y.lastEvent,V=Y.nodes,ne=Y.translate,oe=F.droppable.containers,ie=r.useRef(null),ae=r.useState(null),ce=ae[0],ue=ae[1],le=r.useState(null),se=le[0],de=le[1],fe=r.useRef(P),ve=i.useUniqueId("DndDescribedBy"),he=function(e,t){var n,o=t.dragging,a=t.dependencies,c=t.config,u=r.useState(!1),l=u[0],s=u[1],d=(n=c)?v({},Q,n):Q,f=d.frequency,h=d.strategy,p=r.useRef(e),g=r.useCallback((function(){return s(!0)}),[]),y=r.useRef(null),m=function(){switch(h){case exports.LayoutMeasuringStrategy.Always:return!1;case exports.LayoutMeasuringStrategy.BeforeDragging:return o;default:return!o}}(),b=i.useLazyMemo((function(t){if(m&&!o)return $;if(!t||t===$||p.current!==e||l){for(var r=0,n=Object.values(e);r<n.length;r++){var i=n[r];i&&(i.rect.current=i.node.current?j(i.node.current):null)}return function(e){var t=new Map;if(e)for(var r=0,n=Object.values(e);r<n.length;r++){var o=n[r];if(o){var i=o.rect;o.disabled||null==i.current||t.set(o.id,i.current)}}return t}(e)}return t}),[e,o,m,l]);return r.useEffect((function(){p.current=e}),[e]),r.useEffect((function(){l&&s(!1)}),[l]),r.useEffect((function(){m||requestAnimationFrame(g)}),[o,m]),r.useEffect((function(){m||"number"!=typeof f||null!==y.current||(y.current=setTimeout((function(){g(),y.current=null}),f))}),[f,m,g].concat(a)),{layoutRectMap:b,recomputeLayouts:g,willRecomputeLayouts:l}}(oe,{dragging:null!=X,dependencies:[ne.x,ne.y],config:A}),pe=he.layoutRectMap,ge=he.recomputeLayouts,ye=he.willRecomputeLayouts,me=function(e,t){return i.useLazyMemo((function(r){var n,o;return null===t?null:null!=(n=null!=(o=null==e?void 0:e.current)?o:r)?n:null}),[e,t])}(function(e,t){var r;return e&&null!=(r=t[e])?r:null}(X,V),X),be=se?E(se):null,xe=re(me),we=ee(me),Ce=r.useRef(null),Se=(a=Ce.current,(o=xe)&&a?{x:o.left-a.left,y:o.top-a.top}:x),Me=r.useRef({active:X,droppableRects:pe,overId:null,scrollAdjustedTransalte:x,translatedRect:null}),Ne=function(e,t){var r,n;return e&&null!=(r=null==(n=t[e])?void 0:n.node.current)?r:null}(Me.current.overId,oe),Te=ee(me?me.ownerDocument.defaultView:null),Ae=ee(me?me.parentElement:null),Oe=(l=r.useRef(u=X?null!=Ne?Ne:me:null),s=i.useLazyMemo((function(e){return u?e&&u&&l.current&&u.parentNode===l.current.parentNode?e:M(u):Z}),[u]),r.useEffect((function(){l.current=u}),[u]),s),Ie=te(Oe),Ke=i.useNodeRef(),ke=Ke[0],je=Ke[1],Be=ee(X?ke.current:null,ye),Pe=Ee(O,{transform:{x:ne.x-Se.x,y:ne.y-Se.y,scaleX:1,scaleY:1},activeNodeRect:we,draggingNodeRect:null!=Be?Be:we,containerNodeRect:Ae,overlayNodeRect:Be,scrollableAncestors:Oe,scrollableAncestorRects:Ie,windowRect:Te}),_e=be?i.add(be,ne):null,Fe=function(e){var t=r.useState(null),n=t[0],o=t[1],a=r.useRef(e),c=r.useCallback((function(e){var t=N(e.target);t&&o((function(e){return e?(e.set(t,T(t)),new Map(e)):null}))}),[]);return r.useEffect((function(){var t=a.current;if(e!==t){n(t);var r=e.map((function(e){var t=N(e);return t?(t.addEventListener("scroll",c,{passive:!0}),[t,T(t)]):null})).filter((function(e){return null!=e}));o(r.length?new Map(r):null),a.current=e}return function(){n(e),n(t)};function n(e){e.forEach((function(e){var t=N(e);null==t||t.removeEventListener("scroll",c)}))}}),[c,e]),r.useMemo((function(){return e.length?n?Array.from(n.values()).reduce((function(e,t){return i.add(e,t)}),x):k(e):x}),[e,n])}(Oe),qe=i.add(Pe,Fe),He=xe?S(xe,Pe):null,Ue=He?S(He,Fe):null,ze=X&&Ue?L(Array.from(pe.entries()),Ue):null,We=Le(ze,pe),Ye=r.useMemo((function(){return ze&&We?{id:ze,rect:We}:null}),[ze,We]),Xe=function(e,t,r){return v({},e,{scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1})}(Pe,We,xe),Ge=r.useRef({activeNode:me,collisionRect:Ue,droppableRects:pe,droppableContainers:oe,over:Ye,scrollableAncestors:Oe,translatedRect:He}),Ve=r.useCallback((function(e,r){if(ie.current){var n=V[ie.current];if(n){var o=new(0,r.sensor)({active:ie.current,activeNode:n,event:e.nativeEvent,options:r.options,context:Ge,onStart:function(e){var r=ie.current;if(r){var n=fe.current.onDragStart;H({type:t.DragStart,initialCoordinates:e,active:r}),null==n||n({active:{id:r}})}},onMove:function(e){H({type:t.DragMove,coordinates:e})},onEnd:i(t.DragEnd),onCancel:i(t.DragCancel)});ue(o),de(e.nativeEvent)}}function i(e){return function(){var r,n=(r=J.mark((function r(){var n,o,i,a,c,u,l,s,d;return J.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=ie.current){r.next=3;break}return r.abrupt("return");case 3:if(a=fe.current.cancelDrop,c={active:{id:n},delta:(o=Me.current).scrollAdjustedTransalte,over:(i=o.overId)?{id:i}:null},ie.current=null,e!==t.DragEnd||"function"!=typeof a){r.next=12;break}return r.next=10,Promise.resolve(a(c));case 10:r.sent&&(e=t.DragCancel);case 12:H({type:e}),ue(null),de(null),l=(u=fe.current).onDragCancel,s=u.onDragEnd,d=e===t.DragEnd?s:l,n&&(null==d||d(c));case 18:case"end":return r.stop()}}),r)})),function(){var e=this,t=arguments;return new Promise((function(n,o){var i=r.apply(e,t);function a(e){f(i,n,o,a,c,"next",e)}function c(e){f(i,n,o,a,c,"throw",e)}a(void 0)}))});return function(){return n.apply(this,arguments)}}()}}),[H,V]),Je=function(e,t){return r.useMemo((function(){return e.reduce((function(e,r){var n=r.sensor.activators.map((function(e){return{eventName:e.eventName,handler:t(e.handler,r)}}));return[].concat(e,n)}),[])}),[e,t])}(D,r.useCallback((function(e,t){return function(r,n){var o=r.nativeEvent;null!==ie.current||o.dndKit||o.defaultPrevented||!0===e(r,t.options)&&(o.dndKit={capturedBy:t.sensor},ie.current=n,Ve(r,t))}}),[Ve]));i.useIsomorphicLayoutEffect((function(){fe.current=P}),Object.values(P)),r.useEffect((function(){X||(Ce.current=null),X&&xe&&!Ce.current&&(Ce.current=xe)}),[xe,X]),r.useEffect((function(){var e=ie.current;if(e){var t=fe.current.onDragMove,r=Me.current,n=r.overId,o=r.droppableRects,i=r.translatedRect;if(t&&i){var a=Le(n,o);t({active:{id:e},draggingRect:i,droppableRects:o,delta:{x:qe.x,y:qe.y},over:n&&a?{id:n,rect:a}:null})}}}),[qe.x,qe.y]),r.useEffect((function(){if(ie.current){var e=Me.current,t=e.active,r=e.translatedRect;if(t&&r){var n=fe.current.onDragOver,o=Le(ze,e.droppableRects);null==n||n({active:{id:t},droppableRects:Me.current.droppableRects,draggingRect:r,over:ze&&o?{id:ze,rect:o}:null})}}}),[ze]),r.useEffect((function(){Me.current={active:X,droppableRects:pe,overId:ze,translatedRect:He,scrollAdjustedTransalte:qe}}),[X,pe,ze,He,qe]),i.useIsomorphicLayoutEffect((function(){Ge.current={activeNode:me,collisionRect:Ue,droppableRects:pe,droppableContainers:oe,over:Ye,scrollableAncestors:Oe,translatedRect:He}}),[me,Ue,pe,oe,Ye,Oe,He]),function(e){var t=e.acceleration,n=e.activator,o=void 0===n?exports.AutoScrollActivator.Pointer:n,a=e.canScroll,c=e.draggingRect,u=e.enabled,l=e.interval,s=void 0===l?5:l,d=e.order,f=void 0===d?exports.TraversalOrder.TreeOrder:d,v=e.pointerCoordinates,h=e.scrollableAncestors,p=e.scrollableAncestorRects,g=e.threshold,m=i.useInterval(),b=m[0],w=m[1],E=r.useRef({x:1,y:1}),R=r.useMemo((function(){switch(o){case exports.AutoScrollActivator.Pointer:return v?{top:v.y,bottom:v.y,left:v.x,right:v.x}:null;case exports.AutoScrollActivator.DraggableRect:return c}return null}),[o,c,v]),D=r.useRef(x),C=r.useRef(null),L=r.useCallback((function(){var e=C.current;e&&e.scrollBy(E.current.x*D.current.x,E.current.y*D.current.y)}),[]),S=r.useMemo((function(){return f===exports.TraversalOrder.TreeOrder?[].concat(h).reverse():h}),[f,h]);r.useEffect((function(){if(u&&h.length&&R){for(var e,r=y(S);!(e=r()).done;){var n=e.value;if(!1!==(null==a?void 0:a(n))){var o=h.indexOf(n),i=p[o];if(i){var c=I(n,i,R,t,g),l=c.direction,d=c.speed;if(d.x>0||d.y>0)return w(),C.current=n,b(L,s),E.current=d,void(D.current=l)}}}E.current={x:0,y:0},D.current={x:0,y:0},w()}else w()}),[t,L,a,w,u,s,JSON.stringify(R),b,h,S,p,JSON.stringify(g)])}(v({},(d=!(!1===(null==ce?void 0:ce.autoScrollEnabled)||("object"==typeof g?!1===g.enabled:!1===g)),"object"==typeof g?v({},g,{enabled:d}):{enabled:d}),{draggingRect:He,pointerCoordinates:_e,scrollableAncestors:Oe,scrollableAncestorRects:Ie}));var $e=r.useMemo((function(){return{active:X,activeNode:me,activeNodeRect:xe,activeNodeClientRect:we,activatorEvent:se,activators:Je,ariaDescribedById:{draggable:ve},overlayNode:{nodeRef:ke,rect:Be,setRef:je},containerNodeRect:Ae,dispatch:H,draggableNodes:V,droppableContainers:oe,droppableRects:pe,over:Ye,recomputeLayouts:ge,scrollableAncestors:Oe,scrollableAncestorRects:Ie,willRecomputeLayouts:ye,windowRect:Te}}),[X,me,we,xe,se,Je,Ae,Be,ke,H,V,ve,oe,pe,Ye,ge,Oe,Ie,je,ye,Te]);return n.createElement(n.Fragment,null,n.createElement(b.Provider,{value:$e},n.createElement(De.Provider,{value:Xe},w)),n.createElement(W,{announcements:m,activeId:X,overId:ze,lastEvent:G,hiddenTextDescribedById:ve,screenReaderInstructions:B}))}));function Le(e,t){var r;return e&&null!=(r=t.get(e))?r:null}var Se=r.createContext(null);function Me(){return r.useContext(b)}var Ne={},Te=function(e){return e instanceof KeyboardEvent?"transform 250ms ease":void 0},Ae={duration:250,easing:"ease",dragSourceOpacity:0},Oe=n.memo((function(e){var t,o=e.adjustScale,a=void 0!==o&&o,c=e.children,u=e.dropAnimation,l=void 0===u?Ae:u,s=e.transition,d=void 0===s?Te:s,f=e.modifiers,h=e.wrapperElement,g=void 0===h?"div":h,y=e.className,m=e.zIndex,b=void 0===m?999:m,x=Me(),w=x.active,E=x.activeNodeRect,D=x.activeNodeClientRect,C=x.containerNodeRect,L=x.draggableNodes,S=x.activatorEvent,M=x.overlayNode,N=x.scrollableAncestors,T=x.scrollableAncestorRects,A=x.windowRect,O=Ee(f,{transform:r.useContext(De),activeNodeRect:D,overlayNodeRect:M.rect,draggingNodeRect:M.rect,containerNodeRect:C,scrollableAncestors:N,scrollableAncestorRects:T,windowRect:A}),I=function(e,t,n){var o=r.useRef(t);return i.useLazyMemo((function(r){var i=o.current;if(t!==i){if(t&&i&&(i.left!==t.left||i.top!==t.top)&&!r){var a=null==n?void 0:n.getBoundingClientRect();if(a)return v({},e,{x:a.left-t.left,y:a.top-t.top})}o.current=t}}),[t,e,n])}(O,E,M.nodeRef.current),K=null!==w,k=null!=I?I:O,j=a?k:v({},k,{scaleX:1,scaleY:1}),B=E?{position:"fixed",width:E.width,height:E.height,top:E.top,left:E.left,zIndex:b,transform:i.CSS.Transform.toString(j),touchAction:"none",transformOrigin:a&&S?R(S,E):void 0,transition:I?void 0:"function"==typeof d?d(S):d}:void 0,_=K?{style:B,children:c,className:y,transform:j}:void 0,F=r.useRef(_),q=null!=_?_:F.current,H=null!=q?q:{},U=H.children,z=p(H,["children","transform"]),W=r.useRef(w),Y=function(e){var t=e.animate,n=e.adjustScale,o=e.activeId,a=e.draggableNodes,c=e.duration,u=e.easing,l=e.dragSourceOpacity,s=e.node,d=e.transform,f=r.useState(!1),h=f[0],p=f[1];return r.useEffect((function(){t&&o&&u&&c?requestAnimationFrame((function(){var e,t=null==(e=a[o])?void 0:e.current;if(d&&s&&t&&null!==t.parentNode){var r=s.children.length>1?s:s.children[0];if(r){var f=r.getBoundingClientRect(),h=P(t),g={x:f.left-h.left,y:f.top-h.top};if(Math.abs(g.x)||Math.abs(g.y)){var y=i.CSS.Transform.toString(v({x:d.x-g.x,y:d.y-g.y},{scaleX:n?h.width*d.scaleX/f.width:1,scaleY:n?h.height*d.scaleY/f.height:1})),m=t.style.opacity;return null!=l&&(t.style.opacity=""+l),void(s.animate([{transform:i.CSS.Transform.toString(d)},{transform:y}],{easing:u,duration:c}).onfinish=function(){p(!0),t&&null!=l&&(t.style.opacity=m)})}}}p(!0)})):t&&p(!0)}),[t,o,n,a,c,u,l,s,d]),i.useIsomorphicLayoutEffect((function(){h&&p(!1)}),[h]),h}({animate:Boolean(l&&W.current&&!w),adjustScale:a,activeId:W.current,draggableNodes:L,duration:null==l?void 0:l.duration,easing:null==l?void 0:l.easing,dragSourceOpacity:null==l?void 0:l.dragSourceOpacity,node:M.nodeRef.current,transform:null==(t=F.current)?void 0:t.transform}),X=Boolean(U&&(c||l&&!Y));return r.useEffect((function(){W.current!==w&&(W.current=w),w&&F.current!==_&&(F.current=_)}),[w,_]),r.useEffect((function(){Y&&(F.current=void 0)}),[Y]),X?n.createElement(g,v({},z,{ref:M.setRef}),U):null}));exports.DndContext=Ce,exports.DragOverlay=Oe,exports.KeyboardSensor=de,exports.MouseSensor=be,exports.PointerSensor=ge,exports.TouchSensor=we,exports.applyModifiers=Ee,exports.closestCenter=function(e,t){var r=D(t,t.left,t.top),n=e.map((function(e){return w(D(e[1]),r)})),o=l(n);return e[o]?e[o][0]:null},exports.closestCorners=function(e,t){var r=F(t,t.left,t.top),n=e.map((function(e){var t=e[1],n=F(t,_(t)?t.left:void 0,_(t)?t.top:void 0),o=r.reduce((function(e,t,r){return e+w(n[r],t)}),0);return Number((o/4).toFixed(4))})),o=l(n);return e[o]?e[o][0]:null},exports.defaultAnnouncements=u,exports.defaultCoordinates=x,exports.defaultDropAnimation=Ae,exports.getBoundingClientRect=B,exports.getScrollableAncestors=M,exports.getViewRect=P,exports.rectIntersection=q,exports.useDndContext=Me,exports.useDraggable=function(e){var t=e.id,n=e.disabled,o=void 0!==n&&n,a=e.attributes,c=r.useContext(b),u=c.active,l=c.activeNodeRect,s=c.activatorEvent,d=c.ariaDescribedById,f=c.draggableNodes,v=c.droppableRects,h=c.activators,p=c.over,g=null!=a?a:{},y=g.role,m=void 0===y?"button":y,x=g.roleDescription,w=void 0===x?"draggable":x,E=g.tabIndex,R=void 0===E?0:E,D=Boolean(u===t),C=r.useContext(D?De:Se),L=i.useNodeRef(),S=L[0],M=L[1],N=function(e,t){return r.useMemo((function(){return e.reduce((function(e,r){var n=r.handler;return e[r.eventName]=function(e){n(e,t)},e}),{})}),[e,t])}(h,t);return r.useEffect((function(){return f[t]=S,function(){delete f[t]}}),[f,t]),{active:u,activeNodeRect:l,activatorEvent:s,attributes:r.useMemo((function(){return{role:m,tabIndex:R,"aria-pressed":!(!D||"button"!==m)||void 0,"aria-roledescription":w,"aria-describedby":d.draggable}}),[m,R,D,w,d.draggable]),droppableRects:v,isDragging:D,listeners:o?void 0:N,node:S,over:p,setNodeRef:M,transform:C}},exports.useDroppable=function(e){var n=e.data,o=void 0===n?Ne:n,a=e.disabled,c=void 0!==a&&a,u=e.id,l=r.useContext(b),s=l.dispatch,d=l.over,f=r.useRef(null),v=i.useNodeRef(),h=v[0],p=v[1],g=r.useRef(o);return i.useIsomorphicLayoutEffect((function(){g.current!==o&&(g.current=o)}),[o]),i.useIsomorphicLayoutEffect((function(){return s({type:t.RegisterDroppable,element:{id:u,disabled:c,node:h,rect:f,data:g}}),function(){return s({type:t.UnregisterDroppable,id:u})}}),[u]),r.useEffect((function(){s({type:t.SetDroppableDisabled,id:u,disabled:c})}),[c]),{rect:f,isOver:(null==d?void 0:d.id)===u,node:h,over:d,setNodeRef:p}},exports.useSensor=function(e,t){return r.useMemo((function(){return{sensor:e,options:null!=t?t:{}}}),[e,t])},exports.useSensors=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((function(){return[].concat(t).filter((function(e){return null!=e}))}),[].concat(t))};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r=require("react"),n=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,o=require("react-dom"),i=require("@dnd-kit/utilities"),a=require("@dnd-kit/accessibility"),c={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 "},u={onDragStart:function(e){return"Picked up draggable item "+e+"."},onDragOver:function(e,t){return t?"Draggable item "+e+" was moved over droppable area "+t+".":"Draggable item "+e+" is no longer over a droppable area."},onDragEnd:function(e,t){return t?"Draggable item "+e+" was dropped over droppable area "+t:"Draggable item "+e+" was dropped."},onDragCancel:function(e){return"Dragging was cancelled. Draggable item "+e+" was dropped."}};!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(t||(t={}));var l=function(e){return s(e,(function(e,t){return e<t}))};function s(e,t){if(0===e.length)return-1;for(var r=e[0],n=0,o=1;o<e.length;o++)t(e[o],r)&&(n=o,r=e[o]);return n}function d(){}function f(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function p(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t.indexOf(r=i[n])>=0||(o[r]=e[r]);return o}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return g(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function m(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var b=r.createContext({activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,activeNodeClientRect:null,activators:[],ariaDescribedById:{draggable:""},containerNodeRect:null,dispatch:d,draggableNodes:{},droppableRects:new Map,droppableContainers:{},over:null,overlayNode:{nodeRef:{current:null},rect:null,setRef:d},scrollableAncestors:[],scrollableAncestorRects:[],recomputeLayouts:d,windowRect:null,willRecomputeLayouts:!1}),x=Object.freeze({x:0,y:0});function w(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function E(e){if(function(e){var t;return(null==(t=window)?void 0:t.TouchEvent)&&e instanceof TouchEvent}(e)){if(e.touches&&e.touches.length){var t=e.touches[0];return{x:t.clientX,y:t.clientY}}if(e.changedTouches&&e.changedTouches.length){var r=e.changedTouches[0];return{x:r.clientX,y:r.clientY}}}return function(e){var t;return(null==(t=window)?void 0:t.MouseEvent)&&e instanceof MouseEvent||e.type.includes("mouse")}(e)?{x:e.clientX,y:e.clientY}:{x:0,y:0}}function R(e,t){if(e instanceof KeyboardEvent)return"0 0";var r=E(e);return(r.x-t.left)/t.width*100+"% "+(r.y-t.top)/t.height*100+"%"}function D(e,t,r){return void 0===t&&(t=e.offsetLeft),void 0===r&&(r=e.offsetTop),{x:t+.5*e.width,y:r+.5*e.height}}function C(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((function(t,r){return v({},t,{top:t.top+e*r.y,bottom:t.bottom+e*r.y,left:t.left+e*r.x,right:t.right+e*r.x,offsetLeft:t.offsetLeft+e*r.x,offsetTop:t.offsetTop+e*r.y})}),v({},t))}}var L,S=C(1);function M(e){var t=[];return e?function e(r){return r?r instanceof Document&&null!=r.scrollingElement?(t.push(r.scrollingElement),t):!(r instanceof HTMLElement)||r instanceof SVGElement?t:(function(e){var t=window.getComputedStyle(e),r=/(auto|scroll)/;return null!=["overflow","overflowX","overflowY"].find((function(e){var n=t[e];return"string"==typeof n&&r.test(n)}))}(r)&&t.push(r),e(r.parentNode)):t}(e.parentNode):t}function N(e){return i.canUseDOM?e===document.scrollingElement||e instanceof Document?window:e instanceof HTMLElement?e:null:null}function T(e){return e instanceof Window?{x:e.scrollX,y:e.scrollY}:{x:e.scrollLeft,y:e.scrollTop}}function A(e){var t={x:0,y:0},r={x:e.scrollWidth-e.clientWidth,y:e.scrollHeight-e.clientHeight};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"}(L||(L={}));var O={x:.2,y:.2};function I(e,t,r,n,o){var a=r.top,c=r.left,u=r.right,l=r.bottom;void 0===n&&(n=10),void 0===o&&(o=O);var s,d=e.clientHeight,f=e.clientWidth,v=(s=e,i.canUseDOM&&s&&s===document.scrollingElement?{top:0,left:0,right:f,bottom:d,width:f,height:d}:t),h=A(e),p=h.isBottom,g=h.isLeft,y=h.isRight,m={x:0,y:0},b={x:0,y:0},x=v.height*o.y,w=v.width*o.x;return!h.isTop&&a<=v.top+x?(m.y=L.Backward,b.y=n*Math.abs((v.top+x-a)/x)):!p&&l>=v.bottom-x&&(m.y=L.Forward,b.y=n*Math.abs((v.bottom-x-l)/x)),!y&&u>=v.right-w?(m.x=L.Forward,b.x=n*Math.abs((v.right-w-u)/w)):!g&&c<=v.left+w&&(m.x=L.Backward,b.x=n*Math.abs((v.left+w-c)/w)),{direction:m,speed:b}}function K(e){if(e===document.scrollingElement){var t=window,r=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:r,bottom:n,width:r,height:n}}var o=e.getBoundingClientRect();return{top:o.top,left:o.left,right:o.right,bottom:o.bottom,width:e.clientWidth,height:e.clientHeight}}function k(e){return e.reduce((function(e,t){return i.add(e,T(t))}),x)}function j(e){var t=e.offsetWidth,r=e.offsetHeight,n=function e(t,r,n){if(void 0===n&&(n=x),!(t&&t instanceof HTMLElement))return n;var o={x:n.x+t.offsetLeft,y:n.y+t.offsetTop};return t.offsetParent===r?o:e(t.offsetParent,r,o)}(e,null);return{width:t,height:r,offsetTop:n.y,offsetLeft:n.x}}function B(e){if(e instanceof Window){var t=window.innerWidth,r=window.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r,offsetTop:0,offsetLeft:0}}var n=j(e),o=n.offsetTop,i=n.offsetLeft,a=e.getBoundingClientRect();return{width:a.width,height:a.height,top:a.top,bottom:a.bottom,right:a.right,left:a.left,offsetTop:o,offsetLeft:i}}function P(e){var t=j(e),r=t.width,n=t.height,o=t.offsetTop,i=t.offsetLeft,a=k(M(e)),c=o-a.y,u=i-a.x;return{width:r,height:n,top:c,bottom:c+n,right:u+r,left:u,offsetTop:o,offsetLeft:i}}function _(e){return"top"in e}function F(e,t,r){return void 0===t&&(t=e.offsetLeft),void 0===r&&(r=e.offsetTop),[{x:t,y:r},{x:t+e.width,y:r},{x:t,y:r+e.height},{x:t+e.width,y:r+e.height}]}var q=function(e,t){var r=e.map((function(e){return function(e,t){var r=Math.max(t.top,e.offsetTop),n=Math.max(t.left,e.offsetLeft),o=Math.min(t.left+t.width,e.offsetLeft+e.width),i=Math.min(t.top+t.height,e.offsetTop+e.height);if(n<o&&r<i){var a=(o-n)*(i-r);return Number((a/(t.width*t.height+e.width*e.height-a)).toFixed(4))}return 0}(e[1],t)})),n=s(r,(function(e,t){return e>t}));return r[n]<=0?null:e[n]?e[n][0]:null};function H(e){return e instanceof HTMLElement?e.ownerDocument:document}function U(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},lastEvent:null,nodes:{},translate:{x:0,y:0}},droppable:{containers:{}}}}function z(e,r){switch(r.type){case t.DragStart:return v({},e,{draggable:v({},e.draggable,{initialCoordinates:r.initialCoordinates,active:r.active,lastEvent:t.DragStart})});case t.DragMove:return e.draggable.active?v({},e,{draggable:v({},e.draggable,{translate:{x:r.coordinates.x-e.draggable.initialCoordinates.x,y:r.coordinates.y-e.draggable.initialCoordinates.y}})}):e;case t.DragEnd:case t.DragCancel:return v({},e,{draggable:v({},e.draggable,{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0},lastEvent:r.type})});case t.RegisterDroppable:var n,o=r.element;return v({},e,{droppable:v({},e.droppable,{containers:v({},e.droppable.containers,(n={},n[o.id]=o,n))})});case t.SetDroppableDisabled:var i,a=r.id,c=e.droppable.containers[a];return c?v({},e,{droppable:v({},e.droppable,{containers:v({},e.droppable.containers,(i={},i[a]=v({},c,{disabled:r.disabled}),i))})}):e;case t.UnregisterDroppable:return v({},e,{droppable:v({},e.droppable,{containers:(u=r.id,l=e.droppable.containers,p(l,[u].map(m)))})});default:return e}var u,l}function W(e){var c=e.announcements,l=void 0===c?u:c,s=e.activeId,d=e.overId,f=e.lastEvent,v=e.hiddenTextDescribedById,h=e.screenReaderInstructions,p=a.useAnnouncement(),g=p.announce,y=p.announcement,m=r.useRef({activeId:s,overId:d}),b=i.useUniqueId("DndLiveRegion");return r.useEffect((function(){var e,r=m.current,n=r.activeId,o=r.overId;!n&&s?e=l.onDragStart(s):!s&&n?f===t.DragEnd?e=l.onDragEnd(n,null!=o?o:void 0):f===t.DragCancel&&(e=l.onDragCancel(n)):s&&n&&d!==o&&(e=l.onDragOver(s,null!=d?d:void 0)),e&&g(e),m.current.overId===d&&m.current.activeId===s||(m.current={activeId:s,overId:d})}),[l,g,s,d,f]),i.canUseDOM?o.createPortal(n.createElement(n.Fragment,null,n.createElement(a.HiddenText,{id:v,value:h.draggable}),n.createElement(a.LiveRegion,{id:b,announcement:y})),document.body):null}function Y(e,t){return e(t={exports:{}},t.exports),t.exports}var X,G,V,J=Y((function(e){var t=function(e){var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=Object.create((t&&t.prototype instanceof d?t:d).prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,i),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var s={};function d(){}function f(){}function v(){}var h={};h[o]=function(){return this};var p=Object.getPrototypeOf,g=p&&p(p(D([])));g&&g!==t&&r.call(g,o)&&(h=g);var y=v.prototype=d.prototype=Object.create(h);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,c){var u=l(e[o],e,i);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function D(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=y.constructor=v,v.constructor=f,f.displayName=c(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},m(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),c(y,a,"Generator"),y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=D,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),s},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:D(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));(X=exports.AutoScrollActivator||(exports.AutoScrollActivator={}))[X.Pointer=0]="Pointer",X[X.DraggableRect=1]="DraggableRect",(G=exports.TraversalOrder||(exports.TraversalOrder={}))[G.TreeOrder=0]="TreeOrder",G[G.ReversedTreeOrder=1]="ReversedTreeOrder",(V=exports.LayoutMeasuringStrategy||(exports.LayoutMeasuringStrategy={}))[V.Always=0]="Always",V[V.BeforeDragging=1]="BeforeDragging",V[V.WhileDragging=2]="WhileDragging",(exports.LayoutMeasuringFrequency||(exports.LayoutMeasuringFrequency={})).Optimized="optimized";var $=new Map,Q={strategy:exports.LayoutMeasuringStrategy.WhileDragging,frequency:exports.LayoutMeasuringFrequency.Optimized},Z=[],ee=ne(B),te=oe(B),re=ne(P);function ne(e){return function(t,n){var o=r.useRef(t);return i.useLazyMemo((function(r){return t?n||!r&&t||t!==o.current?t instanceof HTMLElement&&null==t.parentNode?null:e(t):null!=r?r:null:null}),[t,n])}}function oe(e){var t=[];return function(n,o){var a=r.useRef(n);return i.useLazyMemo((function(r){return n.length?o||!r&&n.length||n!==a.current?n.map((function(t){return e(t)})):null!=r?r:t:t}),[n,o])}}var ie,ae=function(){function e(e){this.target=e,this.listeners=[]}var t=e.prototype;return t.add=function(e,t,r){this.target.addEventListener(e,t,r),this.listeners.push({eventName:e,handler:t})},t.removeAll=function(){var e=this;this.listeners.forEach((function(t){return e.target.removeEventListener(t.eventName,t.handler)}))},e}();function ce(e,t){var r=Math.abs(e.x),n=Math.abs(e.y);return"number"==typeof t?Math.sqrt(Math.pow(r,2)+Math.pow(n,2))>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t&&n>t.y}(ie=exports.KeyboardCode||(exports.KeyboardCode={})).Space="Space",ie.Down="ArrowDown",ie.Right="ArrowRight",ie.Left="ArrowLeft",ie.Up="ArrowUp",ie.Esc="Escape",ie.Enter="Enter";var ue,le={start:[exports.KeyboardCode.Space,exports.KeyboardCode.Enter],cancel:[exports.KeyboardCode.Esc],end:[exports.KeyboardCode.Space,exports.KeyboardCode.Enter]},se=function(e,t){var r=t.currentCoordinates;switch(e.code){case exports.KeyboardCode.Right:return v({},r,{x:r.x+25});case exports.KeyboardCode.Left:return v({},r,{x:r.x-25});case exports.KeyboardCode.Down:return v({},r,{y:r.y+25});case exports.KeyboardCode.Up:return v({},r,{y:r.y-25})}},de=function(){function e(e){this.props=e,this.autoScrollEnabled=!1,this.coordinates=x;var t=e.event.target;this.props=e,this.listeners=new ae(H(t)),this.windowListeners=new ae(function(e){var t;return null!=(t=H(e).defaultView)?t:window}(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}var t=e.prototype;return t.attach=function(){var e=this;this.handleStart(),setTimeout((function(){e.listeners.add("keydown",e.handleKeyDown),e.windowListeners.add("resize",e.handleCancel)}))},t.handleStart=function(){var e=this.props,t=e.activeNode,r=e.onStart;if(!t.current)throw new Error("Active draggable node is undefined");var n=B(t.current),o={x:n.left,y:n.top};this.coordinates=o,r(o)},t.handleKeyDown=function(e){if(e instanceof KeyboardEvent){var t=this.coordinates,r=this.props,n=r.active,o=r.context,a=r.options,c=a.keyboardCodes,u=void 0===c?le:c,l=a.coordinateGetter,s=void 0===l?se:l,d=a.scrollBehavior,f=void 0===d?"smooth":d,v=e.code;if(u.end.includes(v))return void this.handleEnd(e);if(u.cancel.includes(v))return void this.handleCancel(e);var h=s(e,{active:n,context:o.current,currentCoordinates:t});if(h){for(var p,g={x:0,y:0},m=y(o.current.scrollableAncestors);!(p=m()).done;){var b=p.value,x=e.code,w=i.subtract(h,t),E=A(b),R=E.isTop,D=E.isRight,C=E.isLeft,L=E.isBottom,S=E.maxScroll,M=E.minScroll,N=K(b),T={x:Math.min(x===exports.KeyboardCode.Right?N.right-N.width/2:N.right,Math.max(x===exports.KeyboardCode.Right?N.left:N.left+N.width/2,h.x)),y:Math.min(x===exports.KeyboardCode.Down?N.bottom-N.height/2:N.bottom,Math.max(x===exports.KeyboardCode.Down?N.top:N.top+N.height/2,h.y))},O=x===exports.KeyboardCode.Right&&!D||x===exports.KeyboardCode.Left&&!C,I=x===exports.KeyboardCode.Down&&!L||x===exports.KeyboardCode.Up&&!R;if(O&&T.x!==h.x){if(x===exports.KeyboardCode.Right&&b.scrollLeft+w.x<=S.x||x===exports.KeyboardCode.Left&&b.scrollLeft+w.x>=M.x)return void b.scrollBy({left:w.x,behavior:f});g.x=x===exports.KeyboardCode.Right?b.scrollLeft-S.x:b.scrollLeft-M.x,b.scrollBy({left:-g.x,behavior:f});break}if(I&&T.y!==h.y){if(x===exports.KeyboardCode.Down&&b.scrollTop+w.y<=S.y||x===exports.KeyboardCode.Up&&b.scrollTop+w.y>=M.y)return void b.scrollBy({top:w.y,behavior:f});g.y=x===exports.KeyboardCode.Down?b.scrollTop-S.y:b.scrollTop-M.y,b.scrollBy({top:-g.y,behavior:f});break}}this.handleMove(e,i.add(h,g))}}},t.handleMove=function(e,t){var r=this.props.onMove;e.preventDefault(),r(t),this.coordinates=t},t.handleEnd=function(e){var t=this.props.onEnd;e.preventDefault(),this.detach(),t()},t.handleCancel=function(e){var t=this.props.onCancel;e.preventDefault(),this.detach(),t()},t.detach=function(){this.listeners.removeAll(),this.windowListeners.removeAll()},e}();function fe(e){return Boolean(e&&"distance"in e)}function ve(e){return Boolean(e&&"delay"in e)}de.activators=[{eventName:"onKeyDown",handler:function(e,t){var r=t.keyboardCodes,n=t.onActivation;return!!(void 0===r?le:r).start.includes(e.nativeEvent.code)&&(e.preventDefault(),null==n||n({event:e.nativeEvent}),!0)}}],function(e){e.Keydown="keydown"}(ue||(ue={}));var he=function(){function e(e,t,r){var n;void 0===r&&(r=(n=e.event.target)instanceof HTMLElement?n:H(n)),this.props=e,this.events=t,this.autoScrollEnabled=!0,this.activated=!1,this.timeoutId=null;var o=e.event;this.props=e,this.events=t,this.ownerDocument=H(o.target),this.listeners=new ae(r),this.initialCoordinates=E(o),this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.attach()}var t=e.prototype;return t.attach=function(){var e=this.events,t=this.props.options.activationConstraint;if(this.listeners.add(e.move.name,this.handleMove,!1),this.listeners.add(e.end.name,this.handleEnd),this.ownerDocument.addEventListener(ue.Keydown,this.handleKeydown),t){if(fe(t))return;if(ve(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()},t.detach=function(){this.listeners.removeAll(),this.ownerDocument.removeEventListener(ue.Keydown,this.handleKeydown),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)},t.handleStart=function(){var e=this.initialCoordinates,t=this.props.onStart;e&&(this.activated=!0,t(e))},t.handleMove=function(e){var t=this.activated,r=this.initialCoordinates,n=this.props,o=n.onMove,a=n.options.activationConstraint;if(r){var c=E(e),u=i.subtract(r,c);if(!t&&a){if(ve(a))return ce(u,a.tolerance)?this.handleCancel():void 0;if(fe(a))return ce(u,a.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),o(c)}},t.handleEnd=function(){var e=this.props.onEnd;this.detach(),e()},t.handleCancel=function(){var e=this.props.onCancel;this.detach(),e()},t.handleKeydown=function(e){e.code===exports.KeyboardCode.Esc&&this.handleCancel()},e}(),pe={move:{name:"pointermove"},end:{name:"pointerup"}},ge=function(e){function t(t){var r=H(t.event.target);return e.call(this,t,pe,r)||this}return h(t,e),t}(he);ge.activators=[{eventName:"onPointerDown",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return!(!r.isPrimary||0!==r.button||(null==n||n({event:r}),0))}}];var ye,me={move:{name:"mousemove"},end:{name:"mouseup"}};!function(e){e[e.RightClick=2]="RightClick"}(ye||(ye={}));var be=function(e){function t(t){return e.call(this,t,me,H(t.event.target))||this}return h(t,e),t}(he);be.activators=[{eventName:"onMouseDown",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return r.button!==ye.RightClick&&(null==n||n({event:r}),!0)}}];var xe={move:{name:"touchmove"},end:{name:"touchend"}},we=function(e){function t(t){return e.call(this,t,xe)||this}return h(t,e),t}(he);function Ee(e,t){var r=t.transform,n=p(t,["transform"]);return(null==e?void 0:e.length)?e.reduce((function(e,t){return t(v({transform:e},n))}),r):r}we.activators=[{eventName:"onTouchStart",handler:function(e,t){var r=e.nativeEvent,n=t.onActivation;return!(r.touches.length>1||(null==n||n({event:r}),0))}}];var Re=[{sensor:ge,options:{}},{sensor:de,options:{}}],De=r.createContext(v({},x,{scaleX:1,scaleY:1})),Ce=r.memo((function(e){var o,a,u,l,s,d,h=e.autoScroll,g=void 0===h||h,m=e.announcements,w=e.children,R=e.sensors,D=void 0===R?Re:R,C=e.collisionDetection,L=void 0===C?q:C,A=e.layoutMeasuring,O=e.modifiers,K=e.screenReaderInstructions,B=void 0===K?c:K,P=p(e,["autoScroll","announcements","children","sensors","collisionDetection","layoutMeasuring","modifiers","screenReaderInstructions"]),_=r.useReducer(z,void 0,U),F=_[0],H=_[1],Y=F.draggable,X=Y.active,G=Y.lastEvent,V=Y.nodes,ne=Y.translate,oe=F.droppable.containers,ie=r.useRef(null),ae=r.useState(null),ce=ae[0],ue=ae[1],le=r.useState(null),se=le[0],de=le[1],fe=r.useRef(P),ve=i.useUniqueId("DndDescribedBy"),he=function(e,t){var n,o=t.dragging,a=t.dependencies,c=t.config,u=r.useState(!1),l=u[0],s=u[1],d=(n=c)?v({},Q,n):Q,f=d.frequency,h=d.strategy,p=r.useRef(e),g=r.useCallback((function(){return s(!0)}),[]),y=r.useRef(null),m=function(){switch(h){case exports.LayoutMeasuringStrategy.Always:return!1;case exports.LayoutMeasuringStrategy.BeforeDragging:return o;default:return!o}}(),b=i.useLazyMemo((function(t){if(m&&!o)return $;if(!t||t===$||p.current!==e||l){for(var r=0,n=Object.values(e);r<n.length;r++){var i=n[r];i&&(i.rect.current=i.node.current?j(i.node.current):null)}return function(e){var t=new Map;if(e)for(var r=0,n=Object.values(e);r<n.length;r++){var o=n[r];if(o){var i=o.rect;o.disabled||null==i.current||t.set(o.id,i.current)}}return t}(e)}return t}),[e,o,m,l]);return r.useEffect((function(){p.current=e}),[e]),r.useEffect((function(){l&&s(!1)}),[l]),r.useEffect((function(){m||requestAnimationFrame(g)}),[o,m]),r.useEffect((function(){m||"number"!=typeof f||null!==y.current||(y.current=setTimeout((function(){g(),y.current=null}),f))}),[f,m,g].concat(a)),{layoutRectMap:b,recomputeLayouts:g,willRecomputeLayouts:l}}(oe,{dragging:null!=X,dependencies:[ne.x,ne.y],config:A}),pe=he.layoutRectMap,ge=he.recomputeLayouts,ye=he.willRecomputeLayouts,me=function(e,t){return i.useLazyMemo((function(r){var n,o;return null===t?null:null!=(n=null!=(o=null==e?void 0:e.current)?o:r)?n:null}),[e,t])}(function(e,t){var r;return e&&null!=(r=t[e])?r:null}(X,V),X),be=se?E(se):null,xe=re(me),we=ee(me),Ce=r.useRef(null),Se=(a=Ce.current,(o=xe)&&a?{x:o.left-a.left,y:o.top-a.top}:x),Me=r.useRef({active:X,droppableRects:pe,overId:null,scrollAdjustedTransalte:x,translatedRect:null}),Ne=function(e,t){var r,n;return e&&null!=(r=null==(n=t[e])?void 0:n.node.current)?r:null}(Me.current.overId,oe),Te=ee(me?me.ownerDocument.defaultView:null),Ae=ee(me?me.parentElement:null),Oe=(l=r.useRef(u=X?null!=Ne?Ne:me:null),s=i.useLazyMemo((function(e){return u?e&&u&&l.current&&u.parentNode===l.current.parentNode?e:M(u):Z}),[u]),r.useEffect((function(){l.current=u}),[u]),s),Ie=te(Oe),Ke=i.useNodeRef(),ke=Ke[0],je=Ke[1],Be=ee(X?ke.current:null,ye),Pe=Ee(O,{transform:{x:ne.x-Se.x,y:ne.y-Se.y,scaleX:1,scaleY:1},activeNodeRect:we,draggingNodeRect:null!=Be?Be:we,containerNodeRect:Ae,overlayNodeRect:Be,scrollableAncestors:Oe,scrollableAncestorRects:Ie,windowRect:Te}),_e=be?i.add(be,ne):null,Fe=function(e){var t=r.useState(null),n=t[0],o=t[1],a=r.useRef(e),c=r.useCallback((function(e){var t=N(e.target);t&&o((function(e){return e?(e.set(t,T(t)),new Map(e)):null}))}),[]);return r.useEffect((function(){var t=a.current;if(e!==t){n(t);var r=e.map((function(e){var t=N(e);return t?(t.addEventListener("scroll",c,{passive:!0}),[t,T(t)]):null})).filter((function(e){return null!=e}));o(r.length?new Map(r):null),a.current=e}return function(){n(e),n(t)};function n(e){e.forEach((function(e){var t=N(e);null==t||t.removeEventListener("scroll",c)}))}}),[c,e]),r.useMemo((function(){return e.length?n?Array.from(n.values()).reduce((function(e,t){return i.add(e,t)}),x):k(e):x}),[e,n])}(Oe),qe=i.add(Pe,Fe),He=xe?S(xe,Pe):null,Ue=He?S(He,Fe):null,ze=X&&Ue?L(Array.from(pe.entries()),Ue):null,We=Le(ze,pe),Ye=r.useMemo((function(){return ze&&We?{id:ze,rect:We}:null}),[ze,We]),Xe=function(e,t,r){return v({},e,{scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1})}(Pe,We,xe),Ge=r.useRef({activeNode:me,collisionRect:Ue,droppableRects:pe,droppableContainers:oe,over:Ye,scrollableAncestors:Oe,translatedRect:He}),Ve=r.useCallback((function(e,r){if(ie.current){var n=V[ie.current];if(n){var o=new(0,r.sensor)({active:ie.current,activeNode:n,event:e.nativeEvent,options:r.options,context:Ge,onStart:function(e){var r=ie.current;if(r){var n=fe.current.onDragStart;H({type:t.DragStart,initialCoordinates:e,active:r}),null==n||n({active:{id:r}})}},onMove:function(e){H({type:t.DragMove,coordinates:e})},onEnd:i(t.DragEnd),onCancel:i(t.DragCancel)});ue(o),de(e.nativeEvent)}}function i(e){return function(){var r,n=(r=J.mark((function r(){var n,o,i,a,c,u,l,s,d;return J.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=ie.current){r.next=3;break}return r.abrupt("return");case 3:if(a=fe.current.cancelDrop,c={active:{id:n},delta:(o=Me.current).scrollAdjustedTransalte,over:(i=o.overId)?{id:i}:null},ie.current=null,e!==t.DragEnd||"function"!=typeof a){r.next=12;break}return r.next=10,Promise.resolve(a(c));case 10:r.sent&&(e=t.DragCancel);case 12:H({type:e}),ue(null),de(null),l=(u=fe.current).onDragCancel,s=u.onDragEnd,d=e===t.DragEnd?s:l,n&&(null==d||d(c));case 18:case"end":return r.stop()}}),r)})),function(){var e=this,t=arguments;return new Promise((function(n,o){var i=r.apply(e,t);function a(e){f(i,n,o,a,c,"next",e)}function c(e){f(i,n,o,a,c,"throw",e)}a(void 0)}))});return function(){return n.apply(this,arguments)}}()}}),[H,V]),Je=function(e,t){return r.useMemo((function(){return e.reduce((function(e,r){var n=r.sensor.activators.map((function(e){return{eventName:e.eventName,handler:t(e.handler,r)}}));return[].concat(e,n)}),[])}),[e,t])}(D,r.useCallback((function(e,t){return function(r,n){var o=r.nativeEvent;null!==ie.current||o.dndKit||o.defaultPrevented||!0===e(r,t.options)&&(o.dndKit={capturedBy:t.sensor},ie.current=n,Ve(r,t))}}),[Ve]));i.useIsomorphicLayoutEffect((function(){fe.current=P}),Object.values(P)),r.useEffect((function(){X||(Ce.current=null),X&&xe&&!Ce.current&&(Ce.current=xe)}),[xe,X]),r.useEffect((function(){var e=ie.current;if(e){var t=fe.current.onDragMove,r=Me.current,n=r.overId,o=r.droppableRects,i=r.translatedRect;if(t&&i){var a=Le(n,o);t({active:{id:e},draggingRect:i,droppableRects:o,delta:{x:qe.x,y:qe.y},over:n&&a?{id:n,rect:a}:null})}}}),[qe.x,qe.y]),r.useEffect((function(){if(ie.current){var e=Me.current,t=e.active,r=e.translatedRect;if(t&&r){var n=fe.current.onDragOver,o=Le(ze,e.droppableRects);null==n||n({active:{id:t},droppableRects:Me.current.droppableRects,draggingRect:r,over:ze&&o?{id:ze,rect:o}:null})}}}),[ze]),r.useEffect((function(){Me.current={active:X,droppableRects:pe,overId:ze,translatedRect:He,scrollAdjustedTransalte:qe}}),[X,pe,ze,He,qe]),i.useIsomorphicLayoutEffect((function(){Ge.current={activeNode:me,collisionRect:Ue,droppableRects:pe,droppableContainers:oe,over:Ye,scrollableAncestors:Oe,translatedRect:He}}),[me,Ue,pe,oe,Ye,Oe,He]),function(e){var t=e.acceleration,n=e.activator,o=void 0===n?exports.AutoScrollActivator.Pointer:n,a=e.canScroll,c=e.draggingRect,u=e.enabled,l=e.interval,s=void 0===l?5:l,d=e.order,f=void 0===d?exports.TraversalOrder.TreeOrder:d,v=e.pointerCoordinates,h=e.scrollableAncestors,p=e.scrollableAncestorRects,g=e.threshold,m=i.useInterval(),b=m[0],w=m[1],E=r.useRef({x:1,y:1}),R=r.useMemo((function(){switch(o){case exports.AutoScrollActivator.Pointer:return v?{top:v.y,bottom:v.y,left:v.x,right:v.x}:null;case exports.AutoScrollActivator.DraggableRect:return c}return null}),[o,c,v]),D=r.useRef(x),C=r.useRef(null),L=r.useCallback((function(){var e=C.current;e&&e.scrollBy(E.current.x*D.current.x,E.current.y*D.current.y)}),[]),S=r.useMemo((function(){return f===exports.TraversalOrder.TreeOrder?[].concat(h).reverse():h}),[f,h]);r.useEffect((function(){if(u&&h.length&&R){for(var e,r=y(S);!(e=r()).done;){var n=e.value;if(!1!==(null==a?void 0:a(n))){var o=h.indexOf(n),i=p[o];if(i){var c=I(n,i,R,t,g),l=c.direction,d=c.speed;if(d.x>0||d.y>0)return w(),C.current=n,b(L,s),E.current=d,void(D.current=l)}}}E.current={x:0,y:0},D.current={x:0,y:0},w()}else w()}),[t,L,a,w,u,s,JSON.stringify(R),b,h,S,p,JSON.stringify(g)])}(v({},(d=!(!1===(null==ce?void 0:ce.autoScrollEnabled)||("object"==typeof g?!1===g.enabled:!1===g)),"object"==typeof g?v({},g,{enabled:d}):{enabled:d}),{draggingRect:He,pointerCoordinates:_e,scrollableAncestors:Oe,scrollableAncestorRects:Ie}));var $e=r.useMemo((function(){return{active:X,activeNode:me,activeNodeRect:xe,activeNodeClientRect:we,activatorEvent:se,activators:Je,ariaDescribedById:{draggable:ve},overlayNode:{nodeRef:ke,rect:Be,setRef:je},containerNodeRect:Ae,dispatch:H,draggableNodes:V,droppableContainers:oe,droppableRects:pe,over:Ye,recomputeLayouts:ge,scrollableAncestors:Oe,scrollableAncestorRects:Ie,willRecomputeLayouts:ye,windowRect:Te}}),[X,me,we,xe,se,Je,Ae,Be,ke,H,V,ve,oe,pe,Ye,ge,Oe,Ie,je,ye,Te]);return n.createElement(n.Fragment,null,n.createElement(b.Provider,{value:$e},n.createElement(De.Provider,{value:Xe},w)),n.createElement(W,{announcements:m,activeId:X,overId:ze,lastEvent:G,hiddenTextDescribedById:ve,screenReaderInstructions:B}))}));function Le(e,t){var r;return e&&null!=(r=t.get(e))?r:null}var Se=r.createContext(null);function Me(){return r.useContext(b)}var Ne={},Te=function(e){return e instanceof KeyboardEvent?"transform 250ms ease":void 0},Ae={duration:250,easing:"ease",dragSourceOpacity:0},Oe=n.memo((function(e){var t,o=e.adjustScale,a=void 0!==o&&o,c=e.children,u=e.dropAnimation,l=void 0===u?Ae:u,s=e.transition,d=void 0===s?Te:s,f=e.modifiers,h=e.wrapperElement,g=void 0===h?"div":h,y=e.className,m=e.zIndex,b=void 0===m?999:m,x=Me(),w=x.active,E=x.activeNodeRect,D=x.activeNodeClientRect,C=x.containerNodeRect,L=x.draggableNodes,S=x.activatorEvent,M=x.overlayNode,N=x.scrollableAncestors,T=x.scrollableAncestorRects,A=x.windowRect,O=Ee(f,{transform:r.useContext(De),activeNodeRect:D,overlayNodeRect:M.rect,draggingNodeRect:M.rect,containerNodeRect:C,scrollableAncestors:N,scrollableAncestorRects:T,windowRect:A}),I=function(e,t,n){var o=r.useRef(t);return i.useLazyMemo((function(r){var i=o.current;if(t!==i){if(t&&i&&(i.left!==t.left||i.top!==t.top)&&!r){var a=null==n?void 0:n.getBoundingClientRect();if(a)return v({},e,{x:a.left-t.left,y:a.top-t.top})}o.current=t}}),[t,e,n])}(O,E,M.nodeRef.current),K=null!==w,k=null!=I?I:O,j=a?k:v({},k,{scaleX:1,scaleY:1}),B=E?{position:"fixed",width:E.width,height:E.height,top:E.top,left:E.left,zIndex:b,transform:i.CSS.Transform.toString(j),touchAction:"none",transformOrigin:a&&S?R(S,E):void 0,transition:I?void 0:"function"==typeof d?d(S):d}:void 0,_=K?{style:B,children:c,className:y,transform:j}:void 0,F=r.useRef(_),q=null!=_?_:F.current,H=null!=q?q:{},U=H.children,z=p(H,["children","transform"]),W=r.useRef(w),Y=function(e){var t=e.animate,n=e.adjustScale,o=e.activeId,a=e.draggableNodes,c=e.duration,u=e.easing,l=e.dragSourceOpacity,s=e.node,d=e.transform,f=r.useState(!1),h=f[0],p=f[1];return r.useEffect((function(){t&&o&&u&&c?requestAnimationFrame((function(){var e,t=null==(e=a[o])?void 0:e.current;if(d&&s&&t&&null!==t.parentNode){var r=s.children.length>1?s:s.children[0];if(r){var f=r.getBoundingClientRect(),h=P(t),g={x:f.left-h.left,y:f.top-h.top};if(Math.abs(g.x)||Math.abs(g.y)){var y=i.CSS.Transform.toString(v({x:d.x-g.x,y:d.y-g.y},{scaleX:n?h.width*d.scaleX/f.width:1,scaleY:n?h.height*d.scaleY/f.height:1})),m=t.style.opacity;return null!=l&&(t.style.opacity=""+l),void(s.animate([{transform:i.CSS.Transform.toString(d)},{transform:y}],{easing:u,duration:c}).onfinish=function(){p(!0),t&&null!=l&&(t.style.opacity=m)})}}}p(!0)})):t&&p(!0)}),[t,o,n,a,c,u,l,s,d]),i.useIsomorphicLayoutEffect((function(){h&&p(!1)}),[h]),h}({animate:Boolean(l&&W.current&&!w),adjustScale:a,activeId:W.current,draggableNodes:L,duration:null==l?void 0:l.duration,easing:null==l?void 0:l.easing,dragSourceOpacity:null==l?void 0:l.dragSourceOpacity,node:M.nodeRef.current,transform:null==(t=F.current)?void 0:t.transform}),X=Boolean(U&&(c||l&&!Y));return r.useEffect((function(){W.current!==w&&(W.current=w),w&&F.current!==_&&(F.current=_)}),[w,_]),r.useEffect((function(){Y&&(F.current=void 0)}),[Y]),X?n.createElement(g,v({},z,{ref:M.setRef}),U):null}));exports.DndContext=Ce,exports.DragOverlay=Oe,exports.KeyboardSensor=de,exports.MouseSensor=be,exports.PointerSensor=ge,exports.TouchSensor=we,exports.applyModifiers=Ee,exports.closestCenter=function(e,t){var r=D(t,t.left,t.top),n=e.map((function(e){return w(D(e[1]),r)})),o=l(n);return e[o]?e[o][0]:null},exports.closestCorners=function(e,t){var r=F(t,t.left,t.top),n=e.map((function(e){var t=e[1],n=F(t,_(t)?t.left:void 0,_(t)?t.top:void 0),o=r.reduce((function(e,t,r){return e+w(n[r],t)}),0);return Number((o/4).toFixed(4))})),o=l(n);return e[o]?e[o][0]:null},exports.defaultAnnouncements=u,exports.defaultCoordinates=x,exports.defaultDropAnimation=Ae,exports.getBoundingClientRect=B,exports.getScrollableAncestors=M,exports.getViewRect=P,exports.rectIntersection=q,exports.useDndContext=Me,exports.useDraggable=function(e){var t=e.id,n=e.disabled,o=void 0!==n&&n,a=e.attributes,c=r.useContext(b),u=c.active,l=c.activeNodeRect,s=c.activatorEvent,d=c.ariaDescribedById,f=c.draggableNodes,v=c.droppableRects,h=c.activators,p=c.over,g=null!=a?a:{},y=g.role,m=void 0===y?"button":y,x=g.roleDescription,w=void 0===x?"draggable":x,E=g.tabIndex,R=void 0===E?0:E,D=Boolean(u===t),C=r.useContext(D?De:Se),L=i.useNodeRef(),S=L[0],M=L[1],N=function(e,t){return r.useMemo((function(){return e.reduce((function(e,r){var n=r.handler;return e[r.eventName]=function(e){n(e,t)},e}),{})}),[e,t])}(h,t);return r.useEffect((function(){return f[t]=S,function(){delete f[t]}}),[f,t]),{active:u,activeNodeRect:l,activatorEvent:s,attributes:r.useMemo((function(){return{role:m,tabIndex:R,"aria-pressed":!(!D||"button"!==m)||void 0,"aria-roledescription":w,"aria-describedby":d.draggable}}),[m,R,D,w,d.draggable]),droppableRects:v,isDragging:D,listeners:o?void 0:N,node:S,over:p,setNodeRef:M,transform:C}},exports.useDroppable=function(e){var n=e.data,o=void 0===n?Ne:n,a=e.disabled,c=void 0!==a&&a,u=e.id,l=r.useContext(b),s=l.dispatch,d=l.over,f=r.useRef(null),v=i.useNodeRef(),h=v[0],p=v[1],g=r.useRef(o);return i.useIsomorphicLayoutEffect((function(){g.current!==o&&(g.current=o)}),[o]),i.useIsomorphicLayoutEffect((function(){return s({type:t.RegisterDroppable,element:{id:u,disabled:c,node:h,rect:f,data:g}}),function(){return s({type:t.UnregisterDroppable,id:u})}}),[u]),r.useEffect((function(){s({type:t.SetDroppableDisabled,id:u,disabled:c})}),[c]),{rect:f,isOver:(null==d?void 0:d.id)===u,node:h,over:d,setNodeRef:p}},exports.useSensor=function(e,t){return r.useMemo((function(){return{sensor:e,options:null!=t?t:{}}}),[e,t])},exports.useSensors=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((function(){return[].concat(t).filter((function(e){return null!=e}))}),[].concat(t))};
//# sourceMappingURL=core.cjs.production.min.js.map
{
"name": "@dnd-kit/core",
"version": "2.1.1",
"version": "2.1.2",
"description": "dnd kit – a lightweight React library for building performant and accessible drag and drop experiences",

@@ -34,3 +34,3 @@ "author": "Claudéric Demers",

"tslib": "^2.0.0",
"@dnd-kit/accessibility": "^1.0.2",
"@dnd-kit/accessibility": "^2.0.0",
"@dnd-kit/utilities": "^1.0.2"

@@ -37,0 +37,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc