UNPKG

flood

Version:

A modern Web UI for various torrent clients with multi-user and multi-client support

1 lines 175 kB
(globalThis.webpackChunkflood=globalThis.webpackChunkflood||[]).push([[996],{3375:(e,t,n)=>{"use strict";n.d(t,{Mp:()=>_e,vL:()=>Y,uN:()=>J,cA:()=>ie,IG:()=>ae,Sj:()=>E,fF:()=>Ve,PM:()=>He,zM:()=>Ye,MS:()=>g});var r=n(6540),o=n(961),i=n(4979);const l={display:"none"};function a(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:l},n)}function s(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const u=(0,r.createContext)(null);const 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 "},f={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function d(e){let{announcements:t=f,container:n,hiddenTextDescribedById:l,screenReaderInstructions:d=c}=e;const{announce:p,announcement:h}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),g=(0,i.YG)("DndLiveRegion"),[m,v]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{v(!0)}),[]),function(e){const t=(0,r.useContext)(u);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;p(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&p(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;p(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;p(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;p(t.onDragCancel({active:n,over:r}))}})),[p,t])),!m)return null;const y=r.createElement(r.Fragment,null,r.createElement(a,{id:l,value:d.draggable}),r.createElement(s,{id:g,announcement:h}));return n?(0,o.createPortal)(y,n):y}var p;function h(){}function g(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(p||(p={}));const m=Object.freeze({x:0,y:0});function v(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function y(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),l=o-r,a=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=l*a;return Number((o/(n+r-o)).toFixed(4))}return 0}const b=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=y(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(v)};function x(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:m}function k(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const w=k(1);function S(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const C={ignoreTransform:!1};function E(e,t){void 0===t&&(t=C);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,i.zk)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=S(t);if(!r)return e;const{scaleX:o,scaleY:i,x:l,y:a}=r,s=e.left-l-(1-o)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:c,height:f,top:u,right:s+c,bottom:u+f,left:s}}(n,t,r))}const{top:r,left:o,width:l,height:a,bottom:s,right:u}=n;return{top:r,left:o,width:l,height:a,bottom:s,right:u}}function I(e){return E(e,{ignoreTransform:!0})}function D(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,i.wz)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,i.sb)(o)||(0,i.xZ)(o))return n;if(n.includes(o))return n;const l=(0,i.zk)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,i.zk)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,l)&&n.push(o),function(e,t){return void 0===t&&(t=(0,i.zk)(e).getComputedStyle(e)),"fixed"===t.position}(o,l)?n:r(o.parentNode)}(e):n}function T(e){const[t]=D(e,1);return null!=t?t:null}function A(e){return i.Sw&&e?(0,i.l6)(e)?e:(0,i.Ll)(e)?(0,i.wz)(e)||e===(0,i.TW)(e).scrollingElement?window:(0,i.sb)(e)?e:null:null:null}function R(e){return(0,i.l6)(e)?e.scrollX:e.scrollLeft}function M(e){return(0,i.l6)(e)?e.scrollY:e.scrollTop}function P(e){return{x:R(e),y:M(e)}}var N;function O(e){return!(!i.Sw||!e)&&e===document.scrollingElement}function L(e){const t={x:0,y:0},n=O(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(N||(N={}));const F={x:.2,y:.2};function z(e,t,n,r,o){let{top:i,left:l,right:a,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=F);const{isTop:u,isBottom:c,isLeft:f,isRight:d}=L(e),p={x:0,y:0},h={x:0,y:0},g=t.height*o.y,m=t.width*o.x;return!u&&i<=t.top+g?(p.y=N.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!c&&s>=t.bottom-g&&(p.y=N.Forward,h.y=r*Math.abs((t.bottom-g-s)/g)),!d&&a>=t.right-m?(p.x=N.Forward,h.x=r*Math.abs((t.right-m-a)/m)):!f&&l<=t.left+m&&(p.x=N.Backward,h.x=r*Math.abs((t.left+m-l)/m)),{direction:p,speed:h}}function _(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function B(e){return e.reduce(((e,t)=>(0,i.WQ)(e,P(t))),m)}function j(e,t){if(void 0===t&&(t=E),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);T(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const U=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+R(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+M(t)),0)}]];class H{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=D(t),r=B(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of U)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),l=r[e]-t;return this.rect[i]+l},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class V{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function q(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var W,Y;function K(e){e.preventDefault()}function X(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(W||(W={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Y||(Y={}));const $={start:[Y.Space,Y.Enter],cancel:[Y.Esc],end:[Y.Space,Y.Enter,Y.Tab]},Q=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Y.Right:return{...n,x:n.x+25};case Y.Left:return{...n,x:n.x-25};case Y.Down:return{...n,y:n.y+25};case Y.Up:return{...n,y:n.y-25}}};class J{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new V((0,i.TW)(t)),this.windowListeners=new V((0,i.zk)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(W.Resize,this.handleCancel),this.windowListeners.add(W.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(W.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&j(n),t(m)}handleKeyDown(e){if((0,i.kx)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=$,coordinateGetter:l=Q,scrollBehavior:a="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:u}=n.current,c=u?{x:u.left,y:u.top}:m;this.referenceCoordinates||(this.referenceCoordinates=c);const f=l(e,{active:t,context:n.current,currentCoordinates:c});if(f){const t=(0,i.Re)(f,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:l,isLeft:s,isBottom:u,maxScroll:c,minScroll:d}=L(n),p=_(n),h={x:Math.min(o===Y.Right?p.right-p.width/2:p.right,Math.max(o===Y.Right?p.left:p.left+p.width/2,f.x)),y:Math.min(o===Y.Down?p.bottom-p.height/2:p.bottom,Math.max(o===Y.Down?p.top:p.top+p.height/2,f.y))},g=o===Y.Right&&!l||o===Y.Left&&!s,m=o===Y.Down&&!u||o===Y.Up&&!i;if(g&&h.x!==f.x){const e=n.scrollLeft+t.x,i=o===Y.Right&&e<=c.x||o===Y.Left&&e>=d.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Y.Right?n.scrollLeft-c.x:n.scrollLeft-d.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(m&&h.y!==f.y){const e=n.scrollTop+t.y,i=o===Y.Down&&e<=c.y||o===Y.Up&&e>=d.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Y.Down?n.scrollTop-c.y:n.scrollTop-d.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,(0,i.WQ)((0,i.Re)(f,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function G(e){return Boolean(e&&"distance"in e)}function Z(e){return Boolean(e&&"delay"in e)}J.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=$,onActivation:o}=t,{active:i}=n;const{code:l}=e.nativeEvent;if(r.start.includes(l)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class ee{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,i.zk)(e);return e instanceof t?e:(0,i.TW)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:l}=o;this.props=e,this.events=t,this.document=(0,i.TW)(l),this.documentListeners=new V(this.document),this.listeners=new V(n),this.windowListeners=new V((0,i.zk)(l)),this.initialCoordinates=null!=(r=(0,i.e_)(o))?r:m,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(W.Resize,this.handleCancel),this.windowListeners.add(W.DragStart,K),this.windowListeners.add(W.VisibilityChange,this.handleCancel),this.windowListeners.add(W.ContextMenu,K),this.documentListeners.add(W.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Z(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(G(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(W.Click,X,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(W.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:l,options:{activationConstraint:a}}=o;if(!r)return;const s=null!=(t=(0,i.e_)(e))?t:m,u=(0,i.Re)(r,s);if(!n&&a){if(G(a)){if(null!=a.tolerance&&q(u,a.tolerance))return this.handleCancel();if(q(u,a.distance))return this.handleStart()}return Z(a)&&q(u,a.tolerance)?this.handleCancel():void this.handlePending(a,u)}e.cancelable&&e.preventDefault(),l(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Y.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const te={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ne extends ee{constructor(e){const{event:t}=e,n=(0,i.TW)(t.target);super(e,te,n)}}ne.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const re={move:{name:"mousemove"},end:{name:"mouseup"}};var oe;!function(e){e[e.RightClick=2]="RightClick"}(oe||(oe={}));class ie extends ee{constructor(e){super(e,re,(0,i.TW)(e.event.target))}}ie.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==oe.RightClick&&(null==r||r({event:n}),!0)}}];const le={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ae extends ee{constructor(e){super(e,le)}static setup(){return window.addEventListener(le.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(le.move.name,e)};function e(){}}}var se,ue;function ce(e){let{acceleration:t,activator:n=se.Pointer,canScroll:o,draggingRect:l,enabled:a,interval:s=5,order:u=ue.TreeOrder,pointerCoordinates:c,scrollableAncestors:f,scrollableAncestorRects:d,delta:p,threshold:h}=e;const g=function(e){let{delta:t,disabled:n}=e;const r=(0,i.ZC)(t);return(0,i.KG)((e=>{if(n||!r||!e)return fe;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[N.Backward]:e.x[N.Backward]||-1===o.x,[N.Forward]:e.x[N.Forward]||1===o.x},y:{[N.Backward]:e.y[N.Backward]||-1===o.y,[N.Forward]:e.y[N.Forward]||1===o.y}}}),[n,t,r])}({delta:p,disabled:!a}),[m,v]=(0,i.$$)(),y=(0,r.useRef)({x:0,y:0}),b=(0,r.useRef)({x:0,y:0}),x=(0,r.useMemo)((()=>{switch(n){case se.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case se.DraggableRect:return l}}),[n,l,c]),k=(0,r.useRef)(null),w=(0,r.useCallback)((()=>{const e=k.current;if(!e)return;const t=y.current.x*b.current.x,n=y.current.y*b.current.y;e.scrollBy(t,n)}),[]),S=(0,r.useMemo)((()=>u===ue.TreeOrder?[...f].reverse():f),[u,f]);(0,r.useEffect)((()=>{if(a&&f.length&&x){for(const e of S){if(!1===(null==o?void 0:o(e)))continue;const n=f.indexOf(e),r=d[n];if(!r)continue;const{direction:i,speed:l}=z(e,r,x,t,h);for(const e of["x","y"])g[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return v(),k.current=e,m(w,s),y.current=l,void(b.current=i)}y.current={x:0,y:0},b.current={x:0,y:0},v()}else v()}),[t,w,o,v,a,s,JSON.stringify(x),JSON.stringify(g),m,f,S,d,JSON.stringify(h)])}ae.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(se||(se={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ue||(ue={}));const fe={x:{[N.Backward]:!1,[N.Forward]:!1},y:{[N.Backward]:!1,[N.Forward]:!1}};var de,pe;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(de||(de={})),function(e){e.Optimized="optimized"}(pe||(pe={}));const he=new Map;function ge(e,t){return(0,i.KG)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function me(e){let{callback:t,disabled:n}=e;const o=(0,i._q)(t),l=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,r.useEffect)((()=>()=>null==l?void 0:l.disconnect()),[l]),l}function ve(e){return new H(E(e),e)}function ye(e,t,n){void 0===t&&(t=ve);const[o,l]=(0,r.useState)(null);function a(){l((r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}))}const s=function(e){let{callback:t,disabled:n}=e;const o=(0,i._q)(t),l=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,r.useEffect)((()=>()=>null==l?void 0:l.disconnect()),[l]),l}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),u=me({callback:a});return(0,i.Es)((()=>{a(),e?(null==u||u.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==s||s.disconnect())}),[e]),o}const be=[];function xe(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==m;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,i.Re)(e,n.current):m}function ke(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const we=[];function Se(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,i.sb)(t)?t:e}const Ce=[{sensor:ne,options:{}},{sensor:J,options:{}}],Ee={current:{}},Ie={draggable:{measure:I},droppable:{measure:I,strategy:de.WhileDragging,frequency:pe.Optimized},dragOverlay:{measure:E}};class De extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Te={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new De,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:h},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ie,measureDroppableContainers:h,windowRect:null,measuringScheduled:!1},Ae={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:h,draggableNodes:new Map,over:null,measureDroppableContainers:h},Re=(0,r.createContext)(Ae),Me=(0,r.createContext)(Te);function Pe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new De}}}function Ne(e,t){switch(t.type){case p.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case p.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case p.DragEnd:case p.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case p.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new De(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case p.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const l=new De(e.droppable.containers);return l.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:l}}}case p.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new De(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Oe(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:l}=(0,r.useContext)(Re),a=(0,i.ZC)(o),s=(0,i.ZC)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&a&&null!=s){if(!(0,i.kx)(a))return;if(document.activeElement===a.target)return;const e=l.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,i.ag)(e);if(t){t.focus();break}}}))}}),[o,t,l,s,a]),null}function Le(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Fe=(0,r.createContext)({...m,scaleX:1,scaleY:1});var ze;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(ze||(ze={}));const _e=(0,r.memo)((function(e){var t,n,l,a;let{id:s,accessibility:c,autoScroll:f=!0,children:h,sensors:g=Ce,collisionDetection:v=b,measuring:y,modifiers:k,...S}=e;const C=(0,r.useReducer)(Ne,void 0,Pe),[I,R]=C,[M,N]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[L,F]=(0,r.useState)(ze.Uninitialized),z=L===ze.Initialized,{draggable:{active:_,nodes:j,translate:U},droppable:{containers:V}}=I,q=null!=_?j.get(_):null,W=(0,r.useRef)({initial:null,translated:null}),Y=(0,r.useMemo)((()=>{var e;return null!=_?{id:_,data:null!=(e=null==q?void 0:q.data)?e:Ee,rect:W}:null}),[_,q]),K=(0,r.useRef)(null),[X,$]=(0,r.useState)(null),[Q,J]=(0,r.useState)(null),G=(0,i.YN)(S,Object.values(S)),Z=(0,i.YG)("DndDescribedBy",s),ee=(0,r.useMemo)((()=>V.getEnabled()),[V]),te=(ne=y,(0,r.useMemo)((()=>({draggable:{...Ie.draggable,...null==ne?void 0:ne.draggable},droppable:{...Ie.droppable,...null==ne?void 0:ne.droppable},dragOverlay:{...Ie.dragOverlay,...null==ne?void 0:ne.dragOverlay}})),[null==ne?void 0:ne.draggable,null==ne?void 0:ne.droppable,null==ne?void 0:ne.dragOverlay]));var ne;const{droppableRects:re,measureDroppableContainers:oe,measuringScheduled:ie}=function(e,t){let{dragging:n,dependencies:o,config:l}=t;const[a,s]=(0,r.useState)(null),{frequency:u,measure:c,strategy:f}=l,d=(0,r.useRef)(e),p=function(){switch(f){case de.Always:return!1;case de.BeforeDragging:return n;default:return!n}}(),h=(0,i.YN)(p),g=(0,r.useCallback)((function(e){void 0===e&&(e=[]),h.current||s((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[h]),m=(0,r.useRef)(null),v=(0,i.KG)((t=>{if(p&&!n)return he;if(!t||t===he||d.current!==e||null!=a){const t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new H(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,a,n,p,c]);return(0,r.useEffect)((()=>{d.current=e}),[e]),(0,r.useEffect)((()=>{p||g()}),[n,p]),(0,r.useEffect)((()=>{a&&a.length>0&&s(null)}),[JSON.stringify(a)]),(0,r.useEffect)((()=>{p||"number"!=typeof u||null!==m.current||(m.current=setTimeout((()=>{g(),m.current=null}),u))}),[u,p,g,...o]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:null!=a}}(ee,{dragging:z,dependencies:[U.x,U.y],config:te.droppable}),le=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return(0,i.KG)((e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(j,_),ae=(0,r.useMemo)((()=>Q?(0,i.e_)(Q):null),[Q]),se=function(){const e=!1===(null==X?void 0:X.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=z&&!e&&!t;if("object"==typeof f)return{...f,enabled:n};return{enabled:n}}(),ue=function(e,t){return ge(e,t)}(le,te.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:l=!0}=e;const a=(0,r.useRef)(!1),{x:s,y:u}="boolean"==typeof l?{x:l,y:l}:l;(0,i.Es)((()=>{if(!s&&!u||!t)return void(a.current=!1);if(a.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=x(n(e),o);if(s||(r.x=0),u||(r.y=0),a.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=T(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,s,u,o,n])}({activeNode:null!=_?j.get(_):null,config:se.layoutShiftCompensation,initialRect:ue,measure:te.draggable.measure});const fe=ye(le,te.draggable.measure,ue),pe=ye(le?le.parentElement:null),ve=(0,r.useRef)({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:re,draggableNodes:j,draggingNode:null,draggingNodeRect:null,droppableContainers:V,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),De=V.getNodeFor(null==(t=ve.current.over)?void 0:t.id),Te=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),l=me({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,i.sb)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),a=(0,r.useCallback)((e=>{const n=Se(e);null==l||l.disconnect(),n&&(null==l||l.observe(n)),o(n?t(n):null)}),[t,l]),[s,u]=(0,i.lk)(a);return(0,r.useMemo)((()=>({nodeRef:s,rect:n,setRef:u})),[n,s,u])}({measure:te.dragOverlay.measure}),Ae=null!=(n=Te.nodeRef.current)?n:le,_e=z?null!=(l=Te.rect)?l:fe:null,Be=Boolean(Te.nodeRef.current&&Te.rect),je=x(Ue=Be?null:fe,ge(Ue));var Ue;const He=ke(Ae?(0,i.zk)(Ae):null),Ve=function(e){const t=(0,r.useRef)(e),n=(0,i.KG)((n=>e?n&&n!==be&&e&&t.current&&e.parentNode===t.current.parentNode?n:D(e):be),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(z?null!=De?De:le:null),qe=function(e,t){void 0===t&&(t=E);const[n]=e,o=ke(n?(0,i.zk)(n):null),[l,a]=(0,r.useState)(we);function s(){a((()=>e.length?e.map((e=>O(e)?o:new H(t(e),e))):we))}const u=me({callback:s});return(0,i.Es)((()=>{null==u||u.disconnect(),s(),e.forEach((e=>null==u?void 0:u.observe(e)))}),[e]),l}(Ve),We=Le(k,{transform:{x:U.x-je.x,y:U.y-je.y,scaleX:1,scaleY:1},activatorEvent:Q,active:Y,activeNodeRect:fe,containerNodeRect:pe,draggingNodeRect:_e,over:ve.current.over,overlayNodeRect:Te.rect,scrollableAncestors:Ve,scrollableAncestorRects:qe,windowRect:He}),Ye=ae?(0,i.WQ)(ae,U):null,Ke=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),l=(0,r.useCallback)((e=>{const t=A(e.target);t&&n((e=>e?(e.set(t,P(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const i=e.map((e=>{const t=A(e);return t?(t.addEventListener("scroll",l,{passive:!0}),[t,P(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=A(e);null==t||t.removeEventListener("scroll",l)}))}}),[l,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,i.WQ)(e,t)),m):B(e):m),[e,t])}(Ve),Xe=xe(Ke),$e=xe(Ke,[fe]),Qe=(0,i.WQ)(We,Xe),Je=_e?w(_e,We):null,Ge=Y&&Je?v({active:Y,collisionRect:Je,droppableRects:re,droppableContainers:ee,pointerCoordinates:Ye}):null,Ze=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(Ge,"id"),[et,tt]=(0,r.useState)(null),nt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Be?We:(0,i.WQ)(We,$e),null!=(a=null==et?void 0:et.rect)?a:null,fe),rt=(0,r.useRef)(null),ot=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==K.current)return;const i=j.get(K.current);if(!i)return;const l=e.nativeEvent,a=new n({active:K.current,activeNode:i,event:l,options:r,context:ve,onAbort(e){if(!j.get(e))return;const{onDragAbort:t}=G.current,n={id:e};null==t||t(n),M({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!j.get(e))return;const{onDragPending:o}=G.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),M({type:"onDragPending",event:i})},onStart(e){const t=K.current;if(null==t)return;const n=j.get(t);if(!n)return;const{onDragStart:r}=G.current,i={activatorEvent:l,active:{id:t,data:n.data,rect:W}};(0,o.unstable_batchedUpdates)((()=>{null==r||r(i),F(ze.Initializing),R({type:p.DragStart,initialCoordinates:e,active:t}),M({type:"onDragStart",event:i}),$(rt.current),J(l)}))},onMove(e){R({type:p.DragMove,coordinates:e})},onEnd:s(p.DragEnd),onCancel:s(p.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ve.current;let a=null;if(t&&i){const{cancelDrop:o}=G.current;if(a={activatorEvent:l,active:t,collisions:n,delta:i,over:r},e===p.DragEnd&&"function"==typeof o){await Promise.resolve(o(a))&&(e=p.DragCancel)}}K.current=null,(0,o.unstable_batchedUpdates)((()=>{R({type:e}),F(ze.Uninitialized),tt(null),$(null),J(null),rt.current=null;const t=e===p.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=G.current[t];null==e||e(a),M({type:t,event:a})}}))}}rt.current=a}),[j]),it=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=j.get(r);if(null!==K.current||!i||o.dndKit||o.defaultPrevented)return;const l={active:i};!0===e(n,t.options,l)&&(o.dndKit={capturedBy:t.sensor},K.current=r,ot(n,t))}),[j,ot]),lt=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(g,it);!function(e){(0,r.useEffect)((()=>{if(!i.Sw)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(g),(0,i.Es)((()=>{fe&&L===ze.Initializing&&F(ze.Initialized)}),[fe,L]),(0,r.useEffect)((()=>{const{onDragMove:e}=G.current,{active:t,activatorEvent:n,collisions:r,over:i}=ve.current;if(!t||!n)return;const l={active:t,activatorEvent:n,collisions:r,delta:{x:Qe.x,y:Qe.y},over:i};(0,o.unstable_batchedUpdates)((()=>{null==e||e(l),M({type:"onDragMove",event:l})}))}),[Qe.x,Qe.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ve.current;if(!e||null==K.current||!t||!i)return;const{onDragOver:l}=G.current,a=r.get(Ze),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,u={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,o.unstable_batchedUpdates)((()=>{tt(s),null==l||l(u),M({type:"onDragOver",event:u})}))}),[Ze]),(0,i.Es)((()=>{ve.current={activatorEvent:Q,active:Y,activeNode:le,collisionRect:Je,collisions:Ge,droppableRects:re,draggableNodes:j,draggingNode:Ae,draggingNodeRect:_e,droppableContainers:V,over:et,scrollableAncestors:Ve,scrollAdjustedTranslate:Qe},W.current={initial:_e,translated:Je}}),[Y,le,Ge,Je,j,Ae,_e,re,V,et,Ve,Qe]),ce({...se,delta:U,draggingRect:Je,pointerCoordinates:Ye,scrollableAncestors:Ve,scrollableAncestorRects:qe});const at=(0,r.useMemo)((()=>({active:Y,activeNode:le,activeNodeRect:fe,activatorEvent:Q,collisions:Ge,containerNodeRect:pe,dragOverlay:Te,draggableNodes:j,droppableContainers:V,droppableRects:re,over:et,measureDroppableContainers:oe,scrollableAncestors:Ve,scrollableAncestorRects:qe,measuringConfiguration:te,measuringScheduled:ie,windowRect:He})),[Y,le,fe,Q,Ge,pe,Te,j,V,re,et,oe,Ve,qe,te,ie,He]),st=(0,r.useMemo)((()=>({activatorEvent:Q,activators:lt,active:Y,activeNodeRect:fe,ariaDescribedById:{draggable:Z},dispatch:R,draggableNodes:j,over:et,measureDroppableContainers:oe})),[Q,lt,Y,fe,R,Z,j,et,oe]);return r.createElement(u.Provider,{value:N},r.createElement(Re.Provider,{value:st},r.createElement(Me.Provider,{value:at},r.createElement(Fe.Provider,{value:nt},h)),r.createElement(Oe,{disabled:!1===(null==c?void 0:c.restoreFocus)})),r.createElement(d,{...c,hiddenTextDescribedById:Z}))})),Be=(0,r.createContext)(null),je="button",Ue="Draggable";function He(e){let{id:t,data:n,disabled:o=!1,attributes:l}=e;const a=(0,i.YG)(Ue),{activators:s,activatorEvent:u,active:c,activeNodeRect:f,ariaDescribedById:d,draggableNodes:p,over:h}=(0,r.useContext)(Re),{role:g=je,roleDescription:m="draggable",tabIndex:v=0}=null!=l?l:{},y=(null==c?void 0:c.id)===t,b=(0,r.useContext)(y?Fe:Be),[x,k]=(0,i.lk)(),[w,S]=(0,i.lk)(),C=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),E=(0,i.YN)(n);(0,i.Es)((()=>(p.set(t,{id:t,key:a,node:x,activatorNode:w,data:E}),()=>{const e=p.get(t);e&&e.key===a&&p.delete(t)})),[p,t]);return{active:c,activatorEvent:u,activeNodeRect:f,attributes:(0,r.useMemo)((()=>({role:g,tabIndex:v,"aria-disabled":o,"aria-pressed":!(!y||g!==je)||void 0,"aria-roledescription":m,"aria-describedby":d.draggable})),[o,g,v,y,m,d.draggable]),isDragging:y,listeners:o?void 0:C,node:x,over:h,setNodeRef:k,setActivatorNodeRef:S,transform:b}}function Ve(){return(0,r.useContext)(Me)}const qe="Droppable",We={timeout:25};function Ye(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:l}=e;const a=(0,i.YG)(qe),{active:s,dispatch:u,over:c,measureDroppableContainers:f}=(0,r.useContext)(Re),d=(0,r.useRef)({disabled:n}),h=(0,r.useRef)(!1),g=(0,r.useRef)(null),m=(0,r.useRef)(null),{disabled:v,updateMeasurementsFor:y,timeout:b}={...We,...l},x=(0,i.YN)(null!=y?y:o),k=me({callback:(0,r.useCallback)((()=>{h.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout((()=>{f(Array.isArray(x.current)?x.current:[x.current]),m.current=null}),b)):h.current=!0}),[b]),disabled:v||!s}),w=(0,r.useCallback)(((e,t)=>{k&&(t&&(k.unobserve(t),h.current=!1),e&&k.observe(e))}),[k]),[S,C]=(0,i.lk)(w),E=(0,i.YN)(t);return(0,r.useEffect)((()=>{k&&S.current&&(k.disconnect(),h.current=!1,k.observe(S.current))}),[S,k]),(0,r.useEffect)((()=>(u({type:p.RegisterDroppable,element:{id:o,key:a,disabled:n,node:S,rect:g,data:E}}),()=>u({type:p.UnregisterDroppable,key:a,id:o}))),[o]),(0,r.useEffect)((()=>{n!==d.current.disabled&&(u({type:p.SetDroppableDisabled,id:o,key:a,disabled:n}),d.current.disabled=n)}),[o,a,n,u]),{active:s,rect:g,isOver:(null==c?void 0:c.id)===o,node:S,over:c,setNodeRef:C}}},8831:(e,t,n)=>{"use strict";n.d(t,{FN:()=>i,gj:()=>o});n(4979);function r(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const o=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:o}=e;return n&&t?r(o,n,t):o},i=e=>{let{transform:t}=e;return{...t,x:0}}},3627:(e,t,n)=>{"use strict";n.d(t,{_G:()=>f,be:()=>l,gB:()=>h,gl:()=>k});var r=n(6540),o=n(3375),i=n(4979);function l(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function a(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function s(e){return null!==e&&e>=0}const u=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=l(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},c={scaleX:1,scaleY:1},f=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:l}=e;const a=null!=(t=i[n])?t:r;if(!a)return null;if(o===n){const e=i[l];return e?{x:0,y:n<l?e.top+e.height-(a.top+a.height):e.top-a.top,...c}:null}const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r)return 0;if(n<t)return o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0;return i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0}(i,o,n);return o>n&&o<=l?{x:0,y:-a.height-s,...c}:o<n&&o>=l?{x:0,y:a.height+s,...c}:{x:0,y:0,...c}};const d="Sortable",p=r.createContext({activeIndex:-1,containerId:d,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:u,disabled:{draggable:!1,droppable:!1}});function h(e){let{children:t,id:n,items:l,strategy:s=u,disabled:c=!1}=e;const{active:f,dragOverlay:h,droppableRects:g,over:m,measureDroppableContainers:v}=(0,o.fF)(),y=(0,i.YG)(d,n),b=Boolean(null!==h.rect),x=(0,r.useMemo)((()=>l.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[l]),k=null!=f,w=f?x.indexOf(f.id):-1,S=m?x.indexOf(m.id):-1,C=(0,r.useRef)(x),E=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(x,C.current),I=-1!==S&&-1===w||E,D=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);(0,i.Es)((()=>{E&&k&&v(x)}),[E,x,k,v]),(0,r.useEffect)((()=>{C.current=x}),[x]);const T=(0,r.useMemo)((()=>({activeIndex:w,containerId:y,disabled:D,disableTransforms:I,items:x,overIndex:S,useDragOverlay:b,sortedRects:a(x,g),strategy:s})),[w,y,D.draggable,D.droppable,I,x,S,g,b,s]);return r.createElement(p.Provider,{value:T},t)}const g=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return l(n,r,o).indexOf(t)},m=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:l,previousItems:a,previousContainerId:s,transition:u}=e;return!(!u||!r)&&((a===i||o!==l)&&(!!n||l!==o&&t===s))},v={duration:200,easing:"ease"},y="transform",b=i.Ks.Transition.toString({property:y,duration:0,easing:"linear"}),x={roleDescription:"sortable"};function k(e){let{animateLayoutChanges:t=m,attributes:n,disabled:l,data:a,getNewIndex:u=g,id:c,strategy:f,resizeObserverConfig:d,transition:h=v}=e;const{items:k,containerId:w,activeIndex:S,disabled:C,disableTransforms:E,sortedRects:I,overIndex:D,useDragOverlay:T,strategy:A}=(0,r.useContext)(p),R=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(l,C),M=k.indexOf(c),P=(0,r.useMemo)((()=>({sortable:{containerId:w,index:M,items:k},...a})),[w,a,M,k]),N=(0,r.useMemo)((()=>k.slice(k.indexOf(c))),[k,c]),{rect:O,node:L,isOver:F,setNodeRef:z}=(0,o.zM)({id:c,data:P,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...d}}),{active:_,activatorEvent:B,activeNodeRect:j,attributes:U,setNodeRef:H,listeners:V,isDragging:q,over:W,setActivatorNodeRef:Y,transform:K}=(0,o.PM)({id:c,data:P,attributes:{...x,...n},disabled:R.draggable}),X=(0,i.jn)(z,H),$=Boolean(_),Q=$&&!E&&s(S)&&s(D),J=!T&&q,G=J&&Q?K:null,Z=Q?null!=G?G:(null!=f?f:A)({rects:I,activeNodeRect:j,activeIndex:S,overIndex:D,index:M}):null,ee=s(S)&&s(D)?u({id:c,items:k,activeIndex:S,overIndex:D}):M,te=null==_?void 0:_.id,ne=(0,r.useRef)({activeId:te,items:k,newIndex:ee,containerId:w}),re=k!==ne.current.items,oe=t({active:_,containerId:w,isDragging:q,isSorting:$,id:c,index:M,items:k,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:h,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:l,rect:a}=e;const[s,u]=(0,r.useState)(null),c=(0,r.useRef)(n);return(0,i.Es)((()=>{if(!t&&n!==c.current&&l.current){const e=a.current;if(e){const t=(0,o.Sj)(l.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&u(n)}}n!==c.current&&(c.current=n)}),[t,n,l,a]),(0,r.useEffect)((()=>{s&&u(null)}),[s]),s}({disabled:!oe,index:M,node:L,rect:O});return(0,r.useEffect)((()=>{$&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),w!==ne.current.containerId&&(ne.current.containerId=w),k!==ne.current.items&&(ne.current.items=k)}),[$,ee,w,k]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:_,activeIndex:S,attributes:U,data:P,rect:O,index:M,newIndex:ee,items:k,isOver:F,isSorting:$,isDragging:q,listeners:V,node:L,overIndex:D,over:W,setNodeRef:X,setActivatorNodeRef:Y,setDroppableNodeRef:z,setDraggableNodeRef:H,transform:null!=ie?ie:Z,transition:function(){if(ie||re&&ne.current.newIndex===M)return b;if(J&&!(0,i.kx)(B)||!h)return;if($||oe)return i.Ks.Transition.toString({...h,property:y});return}()}}o.vL.Down,o.vL.Right,o.vL.Up,o.vL.Left},4979:(e,t,n)=>{"use strict";n.d(t,{$$:()=>g,Es:()=>p,KG:()=>v,Ks:()=>D,Ll:()=>a,Re:()=>C,Sw:()=>i,TW:()=>d,WQ:()=>S,YG:()=>k,YN:()=>m,ZC:()=>b,_q:()=>h,ag:()=>A,e_:()=>I,jn:()=>o,kx:()=>E,l6:()=>l,lk:()=>y,sb:()=>c,wz:()=>u,xZ:()=>f,zk:()=>s});var r=n(6540);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function l(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function a(e){return"nodeType"in e}function s(e){var t,n;return e?l(e)?e:a(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function u(e){const{Document:t}=s(e);return e instanceof t}function c(e){return!l(e)&&e instanceof s(e).HTMLElement}function f(e){return e instanceof s(e).SVGElement}function d(e){return e?l(e)?e.document:a(e)?u(e)?e:c(e)||f(e)?e.ownerDocument:document:document:document}const p=i?r.useLayoutEffect:r.useEffect;function h(e){const t=(0,r.useRef)(e);return p((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function g(){const e=(0,r.useRef)(null);return[(0,r.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function m(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return p((()=>{n.current!==e&&(n.current=e)}),t),n}function v(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function y(e){const t=h(e),n=(0,r.useRef)(null),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function b(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let x={};function k(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==x[e]?0:x[e]+1;return x[e]=n,e+"-"+n}),[e,t])}function w(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const S=w(1),C=w(-1);function E(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function I(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const D=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[D.Translate.toString(e),D.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),T="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function A(e){return e.matches(T)?e:e.querySelector(T)}},7437:(e,t,n)=>{"use strict";n.d(t,{AH:()=>u});var r,o,i=n(4684),l=n(6540),a=(n(1287),n(7448)),s=(n(5655),n(4146),function(e,t){var n=arguments;if(null==t||!i.h.call(t,"css"))return l.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=i.E,o[1]=(0,i.c)(e,t);for(var a=2;a<r;a++)o[a]=n[a];return l.createElement.apply(null,o)});r=s||(s={}),o||(o=r.JSX||(r.JSX={}));function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.J)(t)}},2849:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},l=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,u,c,f=arguments[0],d=1,p=arguments.length,h=!1;for("boolean"==typeof f&&(h=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=s(f,n),f!==(o=s(t,n))&&(h&&o&&(l(o)||(u=i(o)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&l(r)?r:{},a(f,{name:n,newValue:e(h,c,o)})):void 0!==o&&a(f,{name:n,newValue:o}));return f}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,u="";function c(e){return e?e.replace(s,u):u}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var f=1,d=1;function p(e){var t=e.match(n);t&&(f+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function h(){var e={line:f,column:d};return function(t){return t.position=new g(e),b(),t}}function g(e){this.start=e,this.end={line:f,column:d},this.source=s.source}g.prototype.content=e;var m=[];function v(t){var n=new Error(s.source+":"+f+":"+d+": "+t);if(n.reason=t,n.filename=s.source,n.line=f,n.column=d,n.source=e,!s.silent)throw n;m.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){y(r)}function x(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return d+=2,p(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function w(){var e=h(),n=y(o);if(n){if(k(),!y(i))return v("property missing ':'");var r=y(l),s=e({type:"declaration",property:c(n[0].replace(t,u)),value:r?c(r[0].replace(t,u)):u});return y(a),s}}return b(),function(){var e,t=[];for(x(t);e=w();)!1!==e&&(t.push(e),x(t));return t}()}},4128:(e,t,n)=>{var r=n(1800),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},1800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},8221:(e,t,n)=>{var r=n(3805),o=n(124),i=n(9374),l=Math.max,a=Math.min;e.exports=function(e,t,n){var s,u,c,f,d,p,h=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,h=t,f=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-h>=c}function x(){var e=o();if(b(e))return k(e);d=setTimeout(x,function(e){var n=t-(e-p);return m?a(n,c-(e-h)):n}(e))}function k(e){return d=void 0,v&&s?y(e):(s=u=void 0,f)}function w(){var e=o(),n=b(e);if(s=arguments,u=this,p=e,n){if(void 0===d)return function(e){return h=e,d=setTimeout(x,t),g?y(e):f}(p);if(m)return clearTimeout(d),d=setTimeout(x,t),y(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?l(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),w.cancel=function(){void 0!==d&&clearTimeout(d),h=0,s=p=u=d=void 0},w.flush=function(){return void 0===d?f:k(o())},w}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},9374:(e,t,n)=>{var r=n(4128),o=n(3805),i=n(4394),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"