fluid-dnd 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +14 -15
  2. package/dist/{HandlerPublisher-BNn5KECH.cjs → HandlerPublisher-1MmlNkG3.cjs} +1 -1
  3. package/dist/{HandlerPublisher-xM3zyGAn.js → HandlerPublisher-DBjPMiyO.js} +1 -1
  4. package/dist/core/{configHandler.d.ts → config/configHandler.d.ts} +2 -2
  5. package/dist/core/{configHandler.js → config/configHandler.js} +7 -8
  6. package/dist/core/{utils → config}/droppableConfigurator.d.ts +5 -4
  7. package/dist/core/{utils → config}/droppableConfigurator.js +42 -29
  8. package/dist/core/dragAndDrop.d.ts +3 -3
  9. package/dist/core/dragAndDrop.js +53 -9
  10. package/dist/core/events/changeDraggableStyles.d.ts +4 -0
  11. package/dist/core/events/changeDraggableStyles.js +38 -0
  12. package/dist/core/events/dragAndDrop/dragAndDrop.d.ts +9 -0
  13. package/dist/core/events/dragAndDrop/dragAndDrop.js +202 -0
  14. package/dist/core/{utils/translate/GetTranslateBeforeDropping.d.ts → events/dragAndDrop/getTranslateBeforeDropping.d.ts} +2 -2
  15. package/dist/core/{utils/translate/GetTranslateBeforeDropping.js → events/dragAndDrop/getTranslateBeforeDropping.js} +33 -41
  16. package/dist/core/{utils/translate/GetTranslationByDraggingAndEvent.d.ts → events/dragAndDrop/getTranslationByDraggingAndEvent.d.ts} +2 -2
  17. package/dist/core/{utils/translate/GetTranslationByDraggingAndEvent.js → events/dragAndDrop/getTranslationByDraggingAndEvent.js} +12 -13
  18. package/dist/core/events/insert.d.ts +5 -0
  19. package/dist/core/events/insert.js +74 -0
  20. package/dist/core/events/remove.d.ts +4 -0
  21. package/dist/core/events/remove.js +66 -0
  22. package/dist/core/index.d.ts +6 -0
  23. package/dist/core/index.js +7 -0
  24. package/dist/core/{utils/scroll.d.ts → positioning/autoScroll.d.ts} +0 -2
  25. package/dist/core/{utils/scroll.js → positioning/autoScroll.js} +6 -9
  26. package/dist/core/{utils/SetTransform.d.ts → positioning/usePositioning.d.ts} +1 -1
  27. package/dist/core/{utils/SetTransform.js → positioning/usePositioning.js} +24 -27
  28. package/dist/core/{utils/tempChildren.d.ts → tempChildren.d.ts} +1 -2
  29. package/dist/core/{utils/tempChildren.js → tempChildren.js} +44 -47
  30. package/dist/core/useDraggable.js +50 -57
  31. package/dist/core/useDroppable.d.ts +2 -2
  32. package/dist/core/useDroppable.js +10 -16
  33. package/dist/core/utils/GetStyles.d.ts +24 -3
  34. package/dist/core/utils/GetStyles.js +53 -5
  35. package/dist/core/utils/ParseStyles.d.ts +3 -2
  36. package/dist/core/utils/ParseStyles.js +12 -12
  37. package/dist/core/utils/SetStyles.d.ts +6 -5
  38. package/dist/core/utils/SetStyles.js +30 -25
  39. package/dist/core/utils/index.d.ts +5 -1
  40. package/dist/core/utils/index.js +7 -6
  41. package/dist/core/utils/observer.d.ts +1 -0
  42. package/dist/core/utils/observer.js +8 -0
  43. package/dist/fluid-dnd-logo.png +0 -0
  44. package/dist/index-BdOAK6C7.cjs +1 -0
  45. package/dist/index-HczUoMBK.js +1131 -0
  46. package/dist/index.cjs +1 -1
  47. package/dist/index.mjs +2 -2
  48. package/dist/insert-Dd8savAS.js +51 -0
  49. package/dist/insert-T4Y6rI_j.cjs +1 -0
  50. package/dist/react/index.cjs +1 -1
  51. package/dist/react/index.mjs +32 -37
  52. package/dist/react/utils/ReactLilstConfig.d.ts +2 -2
  53. package/dist/react/utils/ReactLilstConfig.js +9 -18
  54. package/dist/remove-BC4sUY1o.cjs +1 -0
  55. package/dist/remove-M01dmTvo.js +48 -0
  56. package/dist/svelte/index.cjs +1 -1
  57. package/dist/svelte/index.mjs +18 -16
  58. package/dist/svelte/utils/SvelteListCondig.js +3 -2
  59. package/dist/vue/index.cjs +1 -1
  60. package/dist/vue/index.mjs +26 -24
  61. package/dist/vue/utils/VueListCondig.d.ts +3 -3
  62. package/dist/vue/utils/VueListCondig.js +4 -6
  63. package/package.json +1 -1
  64. package/dist/core/utils/config.d.ts +0 -5
  65. package/dist/core/utils/config.js +0 -57
  66. package/dist/core/utils/events/emitEvents.d.ts +0 -11
  67. package/dist/core/utils/events/emitEvents.js +0 -333
  68. package/dist/index-BYT3HBbe.cjs +0 -1
  69. package/dist/index-m7C-XuaH.js +0 -1275
  70. /package/dist/core/utils/{touchDevice.d.ts → typesCheckers.d.ts} +0 -0
  71. /package/dist/core/utils/{touchDevice.js → typesCheckers.js} +0 -0
@@ -1,15 +1,15 @@
1
- import { getPropByDirection, parseFloatEmpty } from "./GetStyles";
1
+ import { getPropByDirection, getRect, parseFloatEmpty } from './GetStyles';
2
2
  export const getNumberFromPixels = (pixels) => {
3
3
  if (!pixels || pixels.length == 0) {
4
4
  return 0;
5
5
  }
6
- return parseFloatEmpty(pixels.replace("px", ""));
6
+ return parseFloatEmpty(pixels.replace('px', ''));
7
7
  };
8
8
  export const computeGapPixels = (element, gapType) => {
9
9
  const gap = getComputedStyle(element)[gapType];
10
- if (gap.match("%")) {
11
- const gap_percent = parseFloatEmpty(gap.replace("%", ""));
12
- const { width } = element.getBoundingClientRect();
10
+ if (gap.match('%')) {
11
+ const gap_percent = parseFloatEmpty(gap.replace('%', ''));
12
+ const { width } = getRect(element);
13
13
  return width * (gap_percent / 100);
14
14
  }
15
15
  const gap_px = getNumberFromPixels(gap);
@@ -17,22 +17,22 @@ export const computeGapPixels = (element, gapType) => {
17
17
  };
18
18
  export const gapAndDisplayInformation = (element, gapStyle) => {
19
19
  if (!(element instanceof Element))
20
- return [
21
- 0,
22
- false,
23
- ];
20
+ return [0, false];
24
21
  const gap = computeGapPixels(element, gapStyle);
25
22
  const display = getComputedStyle(element).display;
26
- const hasGaps = gap > 0 || display === "flex";
23
+ const hasGaps = gap > 0 || display === 'flex';
27
24
  return [gap, hasGaps];
28
25
  };
29
26
  export const getBeforeStyles = (element) => {
30
27
  const { top, left } = getComputedStyle(element);
31
28
  return [getNumberFromPixels(top), getNumberFromPixels(left)];
32
29
  };
33
- export const getGapPixels = (element, direction) => {
30
+ export const getGapInfo = (element, direction) => {
34
31
  const { gap: gapStyle } = getPropByDirection(direction);
35
- const [gap, hasGaps] = gapAndDisplayInformation(element, gapStyle);
32
+ return gapAndDisplayInformation(element, gapStyle);
33
+ };
34
+ export const getGapPixels = (element, direction) => {
35
+ const [gap, hasGaps] = getGapInfo(element, direction);
36
36
  if (hasGaps) {
37
37
  return gap;
38
38
  }
@@ -1,15 +1,15 @@
1
- import { DragMouseTouchEvent, fixedSize } from "../../../index";
2
- type onTouchEvent = "ontouchstart" | "ontouchmove" | "ontouchend";
1
+ import { DragMouseTouchEvent, fixedSize, Translate } from '../../../index';
2
+ type onTouchEvent = 'ontouchstart' | 'ontouchmove' | 'ontouchend';
3
3
  declare const onMouseEvents: readonly ["onmouseup", "onmousedown", "onmousemove"];
4
4
  type onMouseEvent = (typeof onMouseEvents)[number];
5
- type TouchEventType = "touchstart" | "touchmove" | "touchend";
5
+ type TouchEventType = 'touchstart' | 'touchmove' | 'touchend';
6
6
  declare const mouseEvents: readonly ["mouseup", "mousedown", "mousemove"];
7
7
  type MouseEventType = (typeof mouseEvents)[number];
8
8
  type DragEventCallback = (event: DragMouseTouchEvent) => void;
9
9
  type TouchEventCallback = (event: TouchEvent) => void;
10
- export declare const setSizeStyles: (element: HTMLElement | undefined | null, height: number, width: number) => void;
10
+ export declare const setSizeStyles: (element: HTMLElement | undefined | null, translate: Translate) => void;
11
11
  export declare const fixSizeStyle: (element: HTMLElement | undefined | null) => void;
12
- export declare const moveTranslate: (element: Element | undefined | null, height: number, width: number) => void;
12
+ export declare const moveTranslate: (element: Element | undefined | null, translation?: Translate) => void;
13
13
  export declare const assignDraggingEvent: (element: HTMLElement, onEvent: onMouseEvent | onTouchEvent, callback: DragEventCallback | null, touchCallback?: TouchEventCallback) => void;
14
14
  export declare const addDragMouseToucEventListener: (event: TouchEventType | MouseEventType, callback: DragEventCallback | null) => void;
15
15
  export declare const convetEventToDragMouseTouchEvent: (event: MouseEvent | TouchEvent) => DragMouseTouchEvent;
@@ -17,4 +17,5 @@ export declare const setTranistion: (element: Element | undefined, duration: num
17
17
  export declare const setEventWithInterval: (element: Element | undefined, eventName: "onscroll", callback: () => void) => void;
18
18
  export declare const AddCssStylesToElement: (node: ParentNode, cssCodes: string[]) => void;
19
19
  export declare const setCustomFixedSize: (element: HTMLElement | undefined, fixedProps?: fixedSize) => void;
20
+ export declare const removeTranslateWhitoutTransition: (element?: Element) => void;
20
21
  export {};
@@ -1,31 +1,31 @@
1
- import { HORIZONTAL, VERTICAL } from "..";
2
- import { getPropByDirection, getValueFromProperty } from "./GetStyles";
3
- import { IsHTMLElement, IsMouseEvent, isTouchEvent } from "./touchDevice";
4
- const onMouseEvents = ["onmouseup", "onmousedown", "onmousemove"];
5
- const mouseEvents = ["mouseup", "mousedown", "mousemove"];
6
- export const setSizeStyles = (element, height, width) => {
1
+ import { NONE_TRANSLATE } from '.';
2
+ import { HORIZONTAL, VERTICAL } from '..';
3
+ import { getBefore, getBorderBeforeWidthValue, getPageValue, getRect, getScrollValue } from './GetStyles';
4
+ import { IsHTMLElement, IsMouseEvent, isTouchEvent } from './typesCheckers';
5
+ const onMouseEvents = ['onmouseup', 'onmousedown', 'onmousemove'];
6
+ const mouseEvents = ['mouseup', 'mousedown', 'mousemove'];
7
+ export const setSizeStyles = (element, translate) => {
7
8
  if (!element) {
8
9
  return;
9
10
  }
10
- element.style.height = `${height}px`;
11
- element.style.width = `${width}px`;
11
+ element.style.height = `${translate.height}px`;
12
+ element.style.width = `${translate.width}px`;
12
13
  };
13
14
  export const fixSizeStyle = (element) => {
14
15
  if (!element) {
15
16
  return;
16
17
  }
17
- const { height, width } = element.getBoundingClientRect();
18
- setSizeStyles(element, height, width);
18
+ setSizeStyles(element, getRect(element));
19
19
  };
20
- export const moveTranslate = (element, height, width) => {
20
+ export const moveTranslate = (element, translation = NONE_TRANSLATE) => {
21
21
  if (!element || !IsHTMLElement(element)) {
22
22
  return;
23
23
  }
24
- if (width == 0 && height == 0) {
25
- element.style.transform = "";
24
+ if (translation.width == 0 && translation.height == 0) {
25
+ element.style.transform = '';
26
26
  }
27
27
  else {
28
- element.style.transform = `translate(${width}px,${height}px)`;
28
+ element.style.transform = `translate(${translation.width}px,${translation.height}px)`;
29
29
  }
30
30
  };
31
31
  const assignDraggingTouchEvent = (element, onEvent, callback, touchCallback) => {
@@ -76,7 +76,7 @@ const getDefaultEvent = (event) => {
76
76
  screenY: 0,
77
77
  target,
78
78
  offsetX: 0,
79
- offsetY: 0,
79
+ offsetY: 0
80
80
  };
81
81
  };
82
82
  const getOffsetFromEvent = (event, tempEvent) => {
@@ -91,7 +91,7 @@ const getOffsetFromEvent = (event, tempEvent) => {
91
91
  const element = event.target;
92
92
  return [
93
93
  getTouchEventOffset(element, HORIZONTAL),
94
- getTouchEventOffset(element, VERTICAL),
94
+ getTouchEventOffset(element, VERTICAL)
95
95
  ];
96
96
  }
97
97
  };
@@ -111,7 +111,7 @@ export const convetEventToDragMouseTouchEvent = (event) => {
111
111
  screenY,
112
112
  target,
113
113
  offsetX,
114
- offsetY,
114
+ offsetY
115
115
  };
116
116
  };
117
117
  const getEvent = (event) => {
@@ -123,14 +123,13 @@ const getEvent = (event) => {
123
123
  }
124
124
  };
125
125
  const getOffset = (event, window, direction, element) => {
126
- const { page, scroll, before, borderBeforeWidth, getRect } = getPropByDirection(direction);
127
126
  const boundingClientRect = getRect(element);
128
- return (event[page] -
129
- window[scroll] -
130
- boundingClientRect[before] -
131
- getValueFromProperty(element, borderBeforeWidth));
127
+ return (getPageValue(direction, event) -
128
+ getScrollValue(direction, window) -
129
+ getBefore(direction, boundingClientRect) -
130
+ getBorderBeforeWidthValue(direction, element));
132
131
  };
133
- export const setTranistion = (element, duration, timingFunction = "ease-out", types = "transform") => {
132
+ export const setTranistion = (element, duration, timingFunction = 'ease-out', types = 'transform') => {
134
133
  if (IsHTMLElement(element)) {
135
134
  element.style.transitionDuration = `${duration}ms`;
136
135
  element.style.transitionTimingFunction = `${timingFunction}`;
@@ -146,9 +145,9 @@ export const setEventWithInterval = (element, eventName, callback) => {
146
145
  };
147
146
  };
148
147
  const getStyles = (node) => {
149
- var style = node.querySelector("style");
148
+ var style = node.querySelector('style');
150
149
  if (!style) {
151
- var newStyle = document.createElement("style");
150
+ var newStyle = document.createElement('style');
152
151
  node.appendChild(newStyle);
153
152
  return newStyle;
154
153
  }
@@ -190,3 +189,9 @@ export const setCustomFixedSize = (element, fixedProps = {}) => {
190
189
  const setCustomProperty = (element, fixedProp, newFixedSize) => {
191
190
  return element && element.style.setProperty(fixedProp, newFixedSize);
192
191
  };
192
+ export const removeTranslateWhitoutTransition = (element) => {
193
+ if (IsHTMLElement(element)) {
194
+ element.style.transition = '';
195
+ element.style.transform = '';
196
+ }
197
+ };
@@ -6,5 +6,9 @@ export declare const TEMP_CHILD_CLASS = "temp-child";
6
6
  export declare const draggableTargetTimingFunction = "cubic-bezier(0.2, 0, 0, 1)";
7
7
  export type DraggingEvent = typeof DRAG_EVENT | typeof START_DRAG_EVENT;
8
8
  export type DropEvent = typeof DROP_EVENT | typeof START_DROP_EVENT;
9
- export type DragAndDropEvent = DraggingEvent | DropEvent | "remove" | "insert";
9
+ export type DragAndDropEvent = DraggingEvent | DropEvent | 'remove' | 'insert';
10
10
  export declare const IsDropEvent: (event: DragAndDropEvent) => event is DropEvent;
11
+ export declare const NONE_TRANSLATE: {
12
+ height: number;
13
+ width: number;
14
+ };
@@ -1,9 +1,10 @@
1
- export const START_DRAG_EVENT = "startDrag";
2
- export const DRAG_EVENT = "drag";
3
- export const START_DROP_EVENT = "startDrop";
4
- export const DROP_EVENT = "drop";
5
- export const TEMP_CHILD_CLASS = "temp-child";
6
- export const draggableTargetTimingFunction = "cubic-bezier(0.2, 0, 0, 1)";
1
+ export const START_DRAG_EVENT = 'startDrag';
2
+ export const DRAG_EVENT = 'drag';
3
+ export const START_DROP_EVENT = 'startDrop';
4
+ export const DROP_EVENT = 'drop';
5
+ export const TEMP_CHILD_CLASS = 'temp-child';
6
+ export const draggableTargetTimingFunction = 'cubic-bezier(0.2, 0, 0, 1)';
7
7
  export const IsDropEvent = (event) => {
8
8
  return event === DROP_EVENT || event === START_DROP_EVENT;
9
9
  };
10
+ export const NONE_TRANSLATE = { height: 0, width: 0 };
@@ -1 +1,2 @@
1
1
  export declare const observeMutation: (callback: (observer: MutationObserver, mutation: MutationRecord) => void, element: Element, options?: MutationObserverInit, mutationFilter?: (mutation: MutationRecord) => boolean) => MutationObserver;
2
+ export declare const isTempElement: (element: Node) => boolean;
@@ -1,3 +1,5 @@
1
+ import { TEMP_CHILD_CLASS } from '.';
2
+ import { IsHTMLElement } from './typesCheckers';
1
3
  export const observeMutation = (callback, element, options, mutationFilter = () => true) => {
2
4
  const observe = new MutationObserver((mutations) => {
3
5
  mutations = mutations.filter(mutationFilter);
@@ -9,3 +11,9 @@ export const observeMutation = (callback, element, options, mutationFilter = ()
9
11
  observe.observe(element, options);
10
12
  return observe;
11
13
  };
14
+ export const isTempElement = (element) => {
15
+ if (!IsHTMLElement(element)) {
16
+ return false;
17
+ }
18
+ return element.classList.contains(TEMP_CHILD_CLASS);
19
+ };
Binary file
@@ -0,0 +1 @@
1
+ "use strict";var _e=Object.defineProperty;var $e=(t,e,n)=>e in t?_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var X=(t,e,n)=>$e(t,typeof e!="symbol"?e+"":e,n);const Y="horizontal",z="vertical";var L=(t=>(t[t.NOT_DRAGGING=0]="NOT_DRAGGING",t[t.START_DRAGGING=1]="START_DRAGGING",t[t.DRAGING=2]="DRAGING",t[t.END_DRAGGING=3]="END_DRAGGING",t))(L||{});const W="draggable",Yt="droppable",Mt="handler-class",Lt="dragging",Xt="dragging-handler-class",Wt="dropping",le="grabbing",ue="grab",Ve="disable-transition",U=(t,e)=>t.classList.contains(e),at=(t,e,n=!1)=>{t.classList.toggle(e,n)},ot=(t,e)=>{t.classList.add(e)},qt=(t,e)=>{t.classList.remove(e)},Ye=(t,e)=>vt(e).every(n=>U(t,n)),ut=t=>t?`.${vt(t).join(".")}`:"",Xe=(t,e)=>{if(!e)return;const n=vt(e);t.classList.add(...n)},vt=t=>t?t.split(" ").filter(e=>e):[],We=()=>{const{scrollX:t,scrollY:e}=window;return{scrollX:t,scrollY:e}},kt=t=>!t||t.trim().length==0||t=="normal"?0:parseFloat(t),qe=t=>t?parseInt(t):-1,He=t=>{const e=getComputedStyle(t),n=new DOMMatrixReadOnly(e.transform);return{x:n.m41,y:n.m42}},ge=(t,e)=>t.x1>e.x1?ge(e,t):t.x2<e.x1?0:t.x2>=e.x2?t.x2-t.x1:t.x2-e.x1,Tt=(t,e)=>!ze(t,e),ze=(t,e)=>{const{intersectionX:n,intersectionY:s,rect1:o,rect2:r}=fe(t,e);return s>=Math.min(o.height,r.height)/2&&n>=Math.min(o.width,r.width)/2},je=(t,e)=>!Ze(t,e),Ze=(t,e)=>{const{intersectionX:n,intersectionY:s}=fe(t,e);return s>=0&&n>=0},fe=(t,e)=>{const n=B(t),s=B(e),o=ne(n,s,z),r=ne(n,s,Y);return{rect1:n,rect2:s,intersectionX:r,intersectionY:o}},ne=(t,e,n)=>{const{before:s,distance:o}=P(n);return ge({x1:t[s],x2:t[s]+t[o]},{x1:e[s],x2:e[s]+e[o]})},Et=(t,e)=>t?kt(getComputedStyle(t)[e]):0,se=t=>{const{scrollLeft:e,scrollTop:n}=t;return{scrollLeft:e,scrollTop:n}},B=t=>t.getBoundingClientRect(),j=(t,e)=>{const{distance:n}=P(t);return[e[n],n]},Pt=(t,e)=>{const{axis:n}=P(t);return e[n]},gt=(t,e)=>{const{borderBeforeWidth:n}=P(t);return Et(e,n)},Nt=(t,e)=>{const{beforeMargin:n}=P(t);return Et(e,n)},pe=(t,e)=>{const{beforeMargin:n}=P(t);return Et(e,n)},St=(t,e)=>{const{afterMargin:n}=P(t);return Et(e,n)},J=(t,e)=>{const{before:n}=P(t);return e[n]},At=(t,e)=>{const{scrollElement:n}=P(t);return[e[n],n]},lt=(t,e)=>{const{scroll:n}=P(t);return e[n]},ke=(t,e)=>{const{inner:n}=P(t);return e[n]},Ut=(t,e)=>{const{page:n}=P(t);return e[n]},de=(t,e)=>{const{offset:n}=P(t);return e[n]},P=t=>{const e=t==Y;return{beforeMargin:e?"marginLeft":"marginTop",afterMargin:e?"marginRight":"marginBottom",borderBeforeWidth:e?"borderLeftWidth":"borderTopWidth",before:e?"left":"top",gap:e?"columnGap":"rowGap",distance:e?"width":"height",axis:e?"x":"y",offset:e?"offsetX":"offsetY",scroll:e?"scrollX":"scrollY",scrollElement:e?"scrollLeft":"scrollTop",page:e?"pageX":"pageY",inner:e?"innerWidth":"innerHeight",scrollDistance:e?"scrollWidth":"scrollHeight",clientDistance:e?"clientWidth":"clientHeight",paddingBefore:e?"paddingLeft":"paddingTop",getRect:B}},Rt=(t,e)=>Je(t,e),Ue=t=>[...t.children].filter(n=>U(n,W)),Je=(t,e)=>{const n=[...e.children].filter(o=>U(o,W)&&!o.isEqualNode(t)).toReversed(),s=[...e.children].findLastIndex(o=>o.isEqualNode(t));return[n,s,e]},Ke=t=>{let e=t.parentElement;for(;e;){if(window.getComputedStyle(e).position==="fixed")return e;e=e.parentElement}return null},he=(t,e)=>{const n=Ke(t);return n?J(e,B(n))+gt(e,n):0},N=(t,e)=>t==null?void 0:t.isSameNode(e),me="startDrag",Bt="drag",De="startDrop",ct="temp-child",Jt="cubic-bezier(0.2, 0, 0, 1)",It={height:0,width:0},mt=t=>window.TouchEvent&&t instanceof TouchEvent,Q=t=>t instanceof HTMLElement,Te=t=>t instanceof MouseEvent,Qe=["onmouseup","onmousedown","onmousemove"],tn=(t,e)=>{t&&(t.style.height=`${e.height}px`,t.style.width=`${e.width}px`)},rt=(t,e=It)=>{!t||!Q(t)||(e.width==0&&e.height==0?t.style.transform="":t.style.transform=`translate(${e.width}px,${e.height}px)`)},en=(t,e,n,s)=>{t[e]=o=>{if(o.defaultPrevented)return;s&&s(o);const r=Ht(o);n(r)}},Vt=(t,e,n,s)=>{n&&(nn(e)?t[e]=n:en(t,e,n,s))},nn=t=>Qe.includes(t),sn=t=>{const{target:e}=t;return{clientX:0,clientY:0,pageX:0,pageY:0,screenX:0,screenY:0,target:e,offsetX:0,offsetY:0}},on=(t,e)=>{const n=(s,o)=>cn(e,window,o,s);if(Te(t)){const{offsetX:s,offsetY:o}=t;return[s,o]}else{const s=t.target;return[n(s,Y),n(s,z)]}},Ht=t=>{const e=rn(t);if(!e)return sn(t);const[n,s]=on(t,e),{clientX:o,clientY:r,pageX:i,pageY:a,screenX:f,screenY:l,target:h}=e;return{clientX:o,clientY:r,pageX:i,pageY:a,screenX:f,screenY:l,target:h,offsetX:n,offsetY:s}},rn=t=>{if(mt(t))return t.touches[0]??t.changedTouches[0];if(Te(t))return t},cn=(t,e,n,s)=>{const o=B(s);return Ut(n,t)-lt(n,e)-J(n,o)-gt(n,s)},Ct=(t,e,n="ease-out",s="transform")=>{Q(t)&&(t.style.transitionDuration=`${e}ms`,t.style.transitionTimingFunction=`${n}`,t.style.transitionProperty=`${s}`)},Se=(t,e,n)=>{!t||!Q(t)||(t[e]=()=>{n()})},an=t=>{var e=t.querySelector("style");if(!e){var n=document.createElement("style");return t.appendChild(n),n}return e},ln=(t,e)=>{const n=/\.-?[_a-zA-Z0-9-*\s<>():]+/g,[s]=e.match(n)||[];for(const o of t.cssRules){const[r]=o.cssText.match(n)||[];if(s===r)return!0}return!1},un=(t,e)=>{e.forEach(n=>{gn(t,n)})},gn=(t,e)=>{var s;var n=an(t);n.sheet&&(ln(n.sheet,e)||(s=n.sheet)==null||s.insertRule(e,n.sheet.cssRules.length))},Ae=(t,e={})=>{for(const n of Object.keys(e)){const s=e[n];s!=null&&fn(t,`--${n}`,s)}},fn=(t,e,n)=>t&&t.style.setProperty(e,n),wt=t=>{Q(t)&&(t.style.transition="",t.style.transform="")},pn=(t,e,n)=>{n!=0&&(e==="vertical"?t.scrollBy(0,n):t.scrollBy(n,0))},dn=t=>{let e=.5;const n=.03,s=(i,a,f,l)=>{const[h]=j(i,B(t)),p=B(a),R=J(i,f)-J(i,p)+Pt(i,l),[I]=j(i,p),y=I-h,A=R/y,D=h/y,b=.25,v=.2,G=.8;let F=0;const q=je(t,a);!q&&A<v&&A>-D?F=o(A<0?0:A,v):!q&&A>G&&A<1+D&&(F=r(A,G));const _=b*h*F;e=Math.sign(_)*Math.min(Math.abs(_),Math.abs(e)+n),pn(a,i,e)},o=(i,a)=>Math.pow(i/a,1/3)-1,r=(i,a)=>Math.pow(1/(1-a)*(i-a),3);return[s]},hn=(t,e)=>{let n={offsetX:0,offsetY:0},s={top:0,left:0},o={x:0,y:0};const[r]=dn(t),i=p=>{t.style.transform=`translate( ${p.x}px, ${p.y}px)`},a=p=>{t.style.top=`${p.top}px`,t.style.left=`${p.left}px`},f=(p,R,I,y)=>{const A=v=>{const G=Ut(v,I),F=lt(v,window),q=ke(v,window),[_]=j(v,B(p)),Z=gt(v,p),K=Nt(v,p),k=G-de(v,n),tt=he(p,v);if(k>=F-_/2&&k<=F+q){const u=k-J(v,s)-Z-K-F-tt;return D(v),u}return Pt(v,o)},D=v=>{p&&U(p,Lt)&&v===y&&r(y,R,s,o)},b=v=>{const{axis:G}=P(v);o[G]=A(v),i(l())};b(Y),b(z)},l=()=>{let p=o;for(const R of e)p=R(p,t);return p};return[f,(p,R)=>{const[I,y,A,D]=Tn(p,R,t);s={top:I,left:y},a(s),n={offsetX:A,offsetY:D}}]},xt=(t,e,n)=>J(t,B(e))-J(t,B(n))-gt(t,n),mn=(t,e)=>{let{offsetX:n,offsetY:s,target:o}=t,r=Dn(o,e);const i=o;return i&&r&&!N(i,r)&&(n+=xt(Y,i,r),s+=xt(z,i,r)),r&&e!=o&&(n+=xt(Y,r,e),s+=xt(z,r,e)),[n,s]},Dn=(t,e)=>{const n=t==null?void 0:t.closest(`.${Mt}`);return n&&N(e,n)?t:n},oe=(t,e,n,s)=>{const o=he(n,t);return Ut(t,e)-de(t,s)-Nt(t,n)-gt(t,n)-lt(t,window)-o},Tn=(t,e,n)=>{const[s,o]=mn(t,n);return[oe(z,t,e,{offsetX:s,offsetY:o}),oe(Y,t,e,{offsetX:s,offsetY:o}),s,o]},H=class H{static addConfig(e,n){const s=H.configs.filter(r=>!N(r.droppable,e)),o=se(e);s.push({droppable:e,config:n,scroll:o}),H.configs=s}static updateScrolls(e,n){for(const s of H.configs){const{droppable:o}=s;(n&&Ye(o,n)||N(e,o))&&(s.scroll=se(o))}}static getConfig(e){return H.configs.find(({droppable:s})=>N(e,s))}};X(H,"configs",[]),X(H,"removeObsoleteConfigs",()=>{const e=H.configs.filter(({droppable:n})=>document.contains(n));H.configs=e});let it=H;const zt=t=>!t||t.length==0?0:kt(t.replace("px","")),Sn=(t,e)=>{const n=getComputedStyle(t)[e];if(n.match("%")){const o=kt(n.replace("%","")),{width:r}=B(t);return r*(o/100)}return zt(n)},An=(t,e)=>{if(!(t instanceof Element))return[0,!1];const n=Sn(t,e),s=getComputedStyle(t).display,o=n>0||s==="flex";return[n,o]},vn=t=>{const{top:e,left:n}=getComputedStyle(t);return[zt(e),zt(n)]},Kt=(t,e)=>{const{gap:n}=P(e);return An(t,n)},En=(t,e)=>{const[n,s]=Kt(t,e);return s?n:0},Qt=(t,e,n,s=()=>!0)=>{const o=new MutationObserver(r=>{if(r=r.filter(s),r.length>0){const i=r[0];t(o,i)}});return o.observe(e,n),o},jt=t=>Q(t)?t.classList.contains(ct):!1;function Dt(t,e,n,s,o=t.previousElementSibling,r=t.nextElementSibling){let{height:i,width:a}=Cn(n,t,o,r);return Tt(t,s)&&e==Bt&&(i=0,a=0),{height:i,width:a}}const Cn=(t,e,n,s)=>{const o=St(t,e),r=Nt(t,e),i=Nt(t,s),[a,f]=Kt(e.parentElement,t),[l]=j(t,B(e));if(f)return re(l,r,o,a,0,t);const[h,p,R]=yn(n,i,o,r,t);return re(l,p,h,0,R,t)},yn=(t,e,n,s,o)=>{const r=Math.max(e,n);let i=s,a=e;if(t){const f=St(o,t);i=Math.max(f,s),a=Math.max(a,f)}return[r,i,a]},re=(t,e,n,s,o,r)=>bn(r,t+e+n+s-o),bn=(t,e)=>t==Y?{width:e,height:0}:{width:0,height:e},Gn="startDrag",ve="cubic-bezier(0.2, 0, 0, 1)",Ee=50,Ce="width, min-width, height",xn=(t,e,n)=>{let s=Dt(e,Gn,n,t);const o=En(t,n),[,r]=j(n,s);s[r]-=o;const[i,a]=Rn(n,e);return s[a]=i,s},Rn=(t,e)=>{const n=t==Y?z:Y;return j(n,B(e))},ft=(t,e=It)=>{tn(t,e),t.style.minWidth=`${e.width}px`},On=(t,e,n)=>s=>{e.contains(t)&&(ft(t,n),s.disconnect())},ye=(t,e)=>{const{scrollDistance:n,clientDistance:s}=P(e);return t[n]-t[s]},Mn=(t,e,n)=>{const[s]=At(t,n);return s/ye(e,t)},Nn=(t,e,n,s)=>{if(!s)return;const{direction:o}=e,r=Mn(o,t,n)>.99,[,i]=At(o,t);r&&(t[i]=ye(t,o))},be=(t,e,n,s)=>{if(!n)return;const{droppable:o,config:r,scroll:i}=n,{direction:a,animationDuration:f}=r;if(Nn(o,r,i,e),o.querySelector(`.${ct}`)||!t)return;var l=t.tagName=="LI"?"DIV":t.tagName,h=document.createElement(l);ot(h,ct),ft(h);const p=xn(o,t,a);return Ct(h,f,ve,Ce),[h,p,o]},Zt=(t,e,n,s,o)=>{const r=be(t,n,s);if(!r)return;const[i,a,f]=r;N(e,f)&&ft(i,a),Qt(On(i,f,a),f,{childList:!0,subtree:!0}),f.appendChild(i)},Bn=(t,e,n)=>{const s=be(t,e,n);if(!s)return;const[o,r,i]=s;i.appendChild(o),In(o,r)},In=(t,e)=>requestAnimationFrame(()=>{ft(t,e),requestAnimationFrame(()=>{Ct(t,0,ve,Ce)})}),wn=(t,e,n,s,o=!0)=>{if(n){var r=document.querySelectorAll(`${ut(n)} > .${ct}`);r.forEach(i=>{const a=i.parentElement;if(N(e,a)||!o&&N(t,a))return;ft(i),setTimeout(()=>{var l;(l=i.parentNode)==null||l.removeChild(i)},s+Ee)})}},Ot=(t,e,n=!1)=>{var s=t.querySelectorAll(`.${ct}`);s.forEach(o=>{const r=o;n?(ft(r),setTimeout(()=>{t.contains(r)&&t.removeChild(r)},e+Ee)):t.removeChild(o)})},Ln=(t,e)=>{const{config:n,droppable:s}=t,{onInsertEvent:o,onDragEnd:r}=n;return{...n,onDragEnd:f=>{const{index:l,value:h}=f;r({index:l,value:e(h,s)})},onInsertEvent:(f,l)=>o(f,e(l,s),!0)}};class Pn{constructor(e,n,s,o,r,i){X(this,"initial");X(this,"current");X(this,"parent");X(this,"draggableElement");X(this,"groupClass");X(this,"dragEvent");X(this,"changeDroppable");X(this,"mapFrom");this.parent=s,this.draggableElement=e,this.groupClass=n,this.dragEvent=o,this.mapFrom=i,this.initial=it.getConfig(s),this.changeDroppable=r}getDraggableAncestor(e,n,s){return document.elementsFromPoint(e,n).filter(o=>!N(s,o))}getElementBelow(e,n){return(o=>{const[r]=o.getDraggableAncestor(n.clientX,n.clientY,e);return r})(this)}getCurrent(e,n){const s=this.getElementBelow(e,n);return!this.groupClass||!s?void 0:s.closest(ut(this.groupClass))}isOutsideOfAllDroppables(e){return(this.groupClass?Array.from(document.querySelectorAll(ut(this.groupClass))):[this.parent]).every(s=>Tt(e,s))}isNotInsideAnotherDroppable(e,n){return!Tt(e,n)||this.isOutsideOfAllDroppables(e)}onScrollEvent(){this.dragEvent()}setOnScroll(e){Se(e,"onscroll",()=>{this.onScrollEvent()})}getConfigFrom(e){const n=it.getConfig(e);if(n)return N(this.parent,e)?n:{...n,config:Ln(n,this.mapFrom)}}droppableIfInsideCurrent(e,n){return e&&!N(n,e)&&n.contains(e)}getCurrentConfig(e){var o,r;const n=this.draggableElement,s=this.getCurrent(n,e);return this.current&&this.isNotInsideAnotherDroppable(n,(o=this.current)==null?void 0:o.droppable)&&!this.droppableIfInsideCurrent(s,(r=this.current)==null?void 0:r.droppable)?this.current:s?(Q(s)&&!s.onscroll&&this.setOnScroll(s),this.getConfigFrom(s)):this.getConfigFrom(this.parent)}updateConfig(e){const n=this.current;this.current=this.getCurrentConfig(e),this.changeDroppable(this.current,n)}isOutside(e){const n=this.draggableElement;return!this.getCurrent(n,e)}}const ce=(t,e)=>{const{paddingBefore:n}=P(t),s=gt(t,e),o=Et(e,n),r=Pt(t,B(e));return s+o+r},Fn=(t,e)=>{const[n,s]=vn(e),o=ce(z,t);return[ce(Y,t)-s,o-n]};function _n(t,e,n,s,o,r,i,a,f){let l=0,h=0;const p=!!(n<0&&f);if(n===s&&!p)return ie({height:l,width:h},t,o,i,p);const[R,I,y,A]=Yn(e,n,s,f);if(p){const[d,m]=Fn(a,f);l+=m,h+=d}const[D,b]=Kt(a,t),[v,G,F]=Wn(R,I==null?void 0:I.previousElementSibling,A,b,p,t),[q,_,Z]=Xn(y,D,b,t),K=Vn(_,q,Z,G,v,D),[k]=At(t,a),tt=p?k:$n(a,r,t),u=(A?K-F:F-K)-tt;return t===z?l+=u:t===Y&&(h+=u),ie({height:l,width:h},t,o,i,p)}const $n=(t,e,n)=>{const[s]=At(n,t),[o]=At(n,e);return s-o},Vn=(t,e,n,s,o,r)=>{const i=Math.max(e,o);return Math.max(n,s)+t+i+r},Yn=(t,e,n,s)=>{const o=e<n,[r,i]=[e,n].toSorted((h,p)=>h-p),a=t[e]??s,f=t[n];let l=o?t.slice(r+1,i+1):t.slice(r,i);return r<0&&s&&(l=t.slice(r+1,i)),[a,f,l,o]},Xn=(t,e,n,s)=>{if(t.length==0)return[0,0,0];const o=St(s,t[0]);let r=0,i=-o;for(const[a,f]of t.entries()){const[l]=j(s,B(f)),h=pe(s,f);n&&(r+=h),n&&a>0?r+=e:r=Math.max(r,h),i+=r+l,r=St(s,f)}return[o,i,r]},ie=(t,e,n,s,o)=>{const r=lt(e,window),i=lt(e,n),a=o?0:i-2*r+lt(e,s),[,f]=j(e,t);return t[f]+=a,t},Wn=(t,e,n,s,o,r)=>{const i=n?t.previousElementSibling:e;return qn(i,t,s,o,r)},qn=(t,e,n,s,o)=>{if(n)return[0,0,0];const r=St(o,s?null:t),i=pe(o,e);let a=Math.max(r,i);return[r,i,a]},Ge=(t,e,n)=>{const{handlerSelector:s,animationDuration:o}=t,r=l=>{n(),i(l,!1),wt(l),l.style.top="",l.style.left="",Ae(l,{fixedHeight:"",fixedWidth:""})},i=(l,h)=>{at(l,Lt,h),a(h,l),e.toggleGrabClass(!h)},a=(l,h)=>{const p=h.querySelector(s);at(document.body,le,l),at(p||h,Xt,l)};return[r,i,(l,h)=>{Ct(l,o,Jt),rt(l,h)}]},Hn=50;function zn(t,e,n,s,o,r){let i=e;const{onRemoveAtEvent:a,animationDuration:f,draggingClass:l}=t,[h,p,R]=Ge(t,o,r),I=(u,d,m)=>{if(!m)return;const{droppable:C,config:x}=m,E=Dt(u,d,x.direction,C);A(u,d,E,C,x)},y=(u,d,m,C,x)=>{if(!m)return;const{droppable:E,scroll:O,config:M}=m,S=Dt(u,d,M.direction,E);v(u,d,S,C,E,O,M,x)},A=(u,d,m,C,x)=>{const[E]=Rt(u,C),O=Tt(u,C),{direction:M}=x;E.length==0&&b(m,1,M,E);for(const[S,w]of E.entries()){if(!U(w,W))continue;const $=D(M,u,w,m);if(!O&&$)m=$;else if(!O)continue;const nt=E.length-S;b(m,nt,M,E),d===me?rt(w,m):d===Bt&&R(w,m)}},D=(u,d,m,C)=>{const x=B(d),E=B(m),O=J(u,x),M=J(u,E),[S]=j(u,E),w=M+S/2,$=Pt(u,He(m)),nt=w-$;return O>nt?It:C},b=(u,d,m,C)=>{const x=C.filter(O=>U(O,W)).length,[E]=j(m,u);E==0?i=Math.max(i,d):i=Math.min(i,d-1),i=Math.min(i,x)},v=(u,d,m,C,x,E,O,M)=>{const[S,w]=Rt(u,x),$=S.toReversed(),nt=w===-1?$.length:w;$.splice(nt,0,u);const[Ft,yt,pt]=G(u,w,$,x);m=Dt(u,d,O.direction,n,Ft,yt);const _t=We(),bt=_n(O.direction,$,w,pt,_t,E,C,x,u);S.length==0&&F(void 0,m,u,bt);for(const[$t,dt]of S.toReversed().entries()){let Gt=m;pt-1>=$t&&(Gt=It),d===De&&!U(dt,ct)&&F(dt,Gt,u,bt)}q(pt,u,O,x,M)},G=(u,d,m,C)=>{const E=Tt(u,C)?d:i,O=()=>d<E?[E,E+1]:d>E?[E-1,E]:[E-1,E+1],[M,S]=O(),w=m[M]??null,$=m[S]??null;return[w,$,E]},F=(u,d,m,C)=>{rt(u,d),rt(m,C)},q=(u,d,m,C,x)=>{const{onInsertEvent:E,onDragEnd:O}=m;ot(d,Wt),K(d,n,C,()=>{if(qt(d,Wt),x!=null){const M=a(x,!0);M!=null&&(E(u,M,!0),O({value:M,index:u})),Z(d),_()}})},_=()=>{if(s){var u=document.querySelectorAll(`${ut(s)} > .${W}`);for(const d of u)wt(d)}},Z=u=>{setTimeout(()=>{qt(u,l)},Hn)},K=(u,d,m,C)=>{setTimeout(()=>{C&&C(),k(d,m),tt(m),h(u),et(u,d),et(u,m)},f)},k=(u,d)=>{N(u,d)?Ot(u,f):(Ot(u,f,!0),Ot(d,f))},tt=u=>{if(!N(n,u)){var[d]=n.querySelectorAll(`.${ct}`);d&&Q(d)&&(d.style.height="0px",d.style.width="0px")}},et=(u,d)=>{const[m]=Rt(u,d);for(const C of[...m,u])wt(C)};return[I,y,p]}const ae="onmousedown";function jn(t,e,n,s,o){const{handlerSelector:r,isDraggable:i,droppableGroup:a,animationDuration:f,draggingClass:l,droppableClass:h,onDragStart:p,delayBeforeTouchMoveEvent:R,coordinateTransform:I}=n,y=vt(a).map(c=>`droppable-group-${c}`).join(" ");let A=L.NOT_DRAGGING,D={scrollX:0,scrollY:0},b={pageX:0,pageY:0},v,G;const[F,q]=hn(t,I),_=()=>{A=L.NOT_DRAGGING},[Z,K,k]=zn(n,e,s,y,o,_),tt=()=>{ot(t,W)},et=c=>{ot(c,Mt),o.addSubscriber(c)},u=()=>{if(i(t)){const c=t.querySelector(r);et(c||t)}},d=()=>{u(),tt()},m=c=>{const g=c==null?void 0:c.querySelector(`.${Mt}`),T=g==null?void 0:g.parentElement;return g&&T&&U(T,Yt)&&!N(s,T)?null:g},C=c=>{const g=m(c)??c;g&&i(c)&&(Vt(g,ae,dt("mousemove","mouseup")),Vt(g,"ontouchstart",dt("touchmove","touchend"),T=>{const V=T.touches[0];G={x:V.clientX,y:V.clientY}}),x(g)),N(c,g)||Vt(c,ae,Gt),ot(s,Yt)},x=c=>{const g=c.querySelectorAll("img");Array.from(g).forEach(T=>{T.onmousedown=()=>!1})},E=()=>{if(b.pageX==0&&b.pageY==0||!S.current)return;const{droppable:c,config:g}=S.current;F(t,c,b,g.direction),Z(t,Bt,S.current)},O=c=>{const g=c.querySelectorAll(`.${W}`);for(const T of g)rt(T)},M=(c,g)=>{g&&A==L.DRAGING&&!N(c==null?void 0:c.droppable,g.droppable)&&(Z(t,Bt,g),O(g.droppable))},S=new Pn(t,y,s,E,M,n.mapFrom),w=c=>{if(!S.current)return;const g=y?Array.from(document.querySelectorAll(ut(y))):[s];for(const T of g)T.classList.toggle(h,!c&&N(T,S.current.droppable))},$=(c,g=!1)=>{S.updateConfig(c);const T=S.isOutside(c);w(T),A===L.START_DRAGGING&&!g?ee(c):A===L.DRAGING&&(nt(T),Me(c))},nt=(c=!0)=>{if(!S.current)return;const{droppable:g}=S.current;wn(g,s,y,f,c),!c&&Zt(t,s,A==L.START_DRAGGING,S.current)},Ft=c=>{if(mt(c)&&G&&A==L.START_DRAGGING){const g=c.touches[0],T=Math.abs(g.clientX-G.x),V=Math.abs(g.clientY-G.y);if(Math.abs(T)>5&&Math.abs(V)>5)return clearTimeout(v),!1}return!0},yt=c=>{clearTimeout(v);const g=Ht(c);if(mt(c)&&c.cancelable&&A==L.DRAGING&&c.preventDefault(),mt(c)&&!c.cancelable||!Ft(c)){te("touchmove",c);return}$(g,mt(c))},pt=(c,g)=>{c=="touchmove"?v=setTimeout(()=>{g()},R):g()},_t=(c,g)=>{const{clientX:T,clientY:V}=c,st=document.elementFromPoint(T,V),ht=st==null?void 0:st.closest(`.${W}`);return ht&&N(g,ht)},bt=c=>{const g=n.onGetValue(e);return{index:e,element:c,value:g}},$t=c=>{S.updateConfig(c),w(S.isOutside(c)),ee(c)},dt=(c,g)=>T=>{if(!_t(T,t))return;it.updateScrolls(s,y);const{scrollX:V,scrollY:st}=window;if(D={scrollX:V,scrollY:st},A===L.NOT_DRAGGING){A=L.START_DRAGGING;const ht=bt(t);ht&&p(ht),pt(c,()=>{c=="touchmove"&&$t(T)}),document.addEventListener(c,yt,{passive:!1}),Ne(s),document.addEventListener(g,xe(c),{once:!0})}},Gt=c=>S.updateConfig(c),xe=c=>g=>{te(c,g)},te=(c,g)=>{w(!0);const T=Ht(g);Ie(S.isOutside(T)),clearTimeout(v),document.removeEventListener(c,yt),S.updateConfig(T);const V=S.getCurrentConfig(T);if(V){const{droppable:st}=V;Re(st)}s.onscroll=null,_()},Re=c=>{if(c.onscroll=null,!y)return;const g=Array.from(document.querySelectorAll(ut(y)));for(const T of g)Q(T)&&(T.onscroll=null)},ee=c=>{Zt(t,s,A==L.START_DRAGGING,S.current),Oe(),Z(t,me,S.current),Le(t),q(c,t)},Oe=()=>{A=L.DRAGING},Me=c=>{const{pageX:g,pageY:T}=c;b={pageX:g,pageY:T},E()},Ne=c=>Se(c,"onscroll",Be),Be=()=>E(),Ie=c=>{if(A!==L.DRAGING&&A!==L.START_DRAGGING){_();return}A=L.END_DRAGGING,we(t),t.classList.contains(Lt)&&K(t,De,c?S.initial:S.current,D,e)},we=c=>{Ct(c,f,Jt),rt(c)},Le=c=>{const{height:g,width:T}=B(c);Ae(c,{fixedHeight:`${g}px`,fixedWidth:`${T}px`}),k(c,!0),at(c,l,!0),c.style.transition=""},Pe=c=>{Promise.resolve().then(()=>require("./remove-BC4sUY1o.cjs")).then(g=>{const[T]=g.default(n,s,o,_);S.initial&&T(e,c,t,A,S.initial)})},Fe=(c,g)=>{(c===e||c===n.onGetLegth()&&e===c-1)&&Promise.resolve().then(()=>require("./insert-T4Y6rI_j.cjs")).then(T=>{const[V]=T.default(n,s,o,_);V(c,t,s,g,S.initial)})};return d(),C(t),[Pe,Fe]}const Zn=(t,e)=>{t&&Xe(e,t)},kn=()=>{un(document.body,[`.${W}{touch-action:manipulation;user-select:none;box-sizing:border-box!important;-webkit-user-select:none;}`,`.${Mt}{pointer-events:auto!important;}`,`.${ue}{cursor:grab;}`,".temp-child{touch-action:none;pointer-events:none;box-sizing:border-box!important;}",".droppable{box-sizing:border-box!important;}",`.${Lt}{position:fixed;z-index:5000;width:var(--fixedWidth)!important;height:var(--fixedHeight)!important;}`,`.${Xt}{pointer-events:none!important;}`,`.${Wt}{pointer-events:none!important;}`,`.${le}{cursor:grabbing;}`,".disable-transition{transition:none!important;}"])};function Un(t,e,n,s="index"){const o=s;let r=[],i=[];const{droppableGroup:a}=t;if(!n)return[r,i];const f=vt(a).map(l=>`droppable-group-${l}`).join(" ");kn(),Zn(f,n);for(const l of n.children){const h=l.getAttribute(o),p=qe(h),R=l;if(R&&p>=0){const[I,y]=jn(R,p,t,n,e);r.push(I),i.push(y)}}return[r,i]}const Jn=(t,e)=>{const n=(a,f)=>t.removeAtEvent(a,f),s=(a,f,l)=>t.insertEvent(a,f,l),o=()=>t.getLength(),r=a=>t.getValue(a),i=a=>a;return{direction:(e==null?void 0:e.direction)??z,handlerSelector:(e==null?void 0:e.handlerSelector)??W,draggingClass:(e==null?void 0:e.draggingClass)??"dragging",droppableClass:(e==null?void 0:e.droppableClass)??"droppable-hover",isDraggable:(e==null?void 0:e.isDraggable)??(()=>!0),onDragStart:(e==null?void 0:e.onDragStart)??(()=>{}),onDragEnd:(e==null?void 0:e.onDragEnd)??(()=>{}),droppableGroup:e==null?void 0:e.droppableGroup,onRemoveAtEvent:n,onInsertEvent:s,onGetLegth:o,onGetValue:r,animationDuration:(e==null?void 0:e.animationDuration)??200,removingClass:(e==null?void 0:e.removingClass)??"removing",insertingFromClass:(e==null?void 0:e.insertingFromClass)??"from-inserting",delayBeforeRemove:(e==null?void 0:e.delayBeforeRemove)??200,delayBeforeInsert:(e==null?void 0:e.delayBeforeInsert)??200,mapFrom:(e==null?void 0:e.mapFrom)??i,delayBeforeTouchMoveEvent:(e==null?void 0:e.delayBeforeTouchMoveEvent)??150,coordinateTransform:(e==null?void 0:e.coordinateTransform)??[a=>a]}};function Kn(t,e,n,s="index"){let o=[],r=[],i;const a=Jn(t,n),f=D=>{for(const b of o)b(D)},l=(D,b)=>{if(a.onGetLegth()===0)t.insertToListEmpty(a,D,b);else for(const G of r)G(D,b)},h=D=>{const[b,v]=Un(a,e,D,s);o=b,r=v},p=D=>{const b=D.addedNodes.values().filter(G=>!jt(G)).toArray(),v=D.removedNodes.values().filter(G=>!jt(G)).toArray();return b.length>0||v.length>0},R=D=>{i=Qt(()=>{h(D)},D,{childList:!0},p)},I=D=>{ot(D,Yt)},y=D=>{it.addConfig(D,a)};return[f,l,D=>{if(D)return I(D),y(D),R(D),h(D),it.removeObsoleteConfigs(),i}]}exports.DISABLE_TRANSITION=Ve;exports.DRAGGABLE_CLASS=W;exports.DraggingState=L;exports.GRAB_CLASS=ue;exports.addClass=ot;exports.addTempChild=Zt;exports.addTempChildOnInsert=Bn;exports.containClass=U;exports.dragAndDrop=Kn;exports.draggableTargetTimingFunction=Jt;exports.getParentDraggableChildren=Ue;exports.getSiblings=Rt;exports.getTranslationByDraggingAndEvent=Dt;exports.isTempElement=jt;exports.moveTranslate=rt;exports.observeMutation=Qt;exports.removeClass=qt;exports.removeTempChild=Ot;exports.removeTranslateWhitoutTransition=wt;exports.setTranistion=Ct;exports.toggleClass=at;exports.useChangeDraggableStyles=Ge;