@zoom/meetingsdk
Version:
Zoom MeetingSDK-Web Client
2 lines • 5.38 MB
JavaScript
/*! For license information please see zoomus-websdk-main-client.umd.min.js.LICENSE.txt */
(self.webpackChunk_zoom_webclientjs=self.webpackChunk_zoom_webclientjs||[]).push([[2640],{19251:(e,t,n)=>{"use strict";n.d(t,{Aw:()=>s,L4:()=>a,bO:()=>l});var o=n(31099),r=n.n(o);const i={display:"none"};function s(e){let{id:t,value:n}=e;return r().createElement("div",{id:t,style:i},n)}function a(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)}function l(){const[e,t]=(0,o.useState)("");return{announce:(0,o.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}},15871:(e,t,n)=>{"use strict";n.d(t,{AN:()=>oe,FR:()=>g,Hd:()=>rt,IG:()=>ae,MS:()=>m,Mp:()=>$e,PM:()=>He,Sj:()=>E,fF:()=>Ve,vL:()=>G,zM:()=>qe});var o=n(31099),r=n.n(o),i=n(40961),s=n(74979),a=n(19251);const l=(0,o.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 "},d={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 u(e){let{announcements:t=d,container:n,hiddenTextDescribedById:u,screenReaderInstructions:p=c}=e;const{announce:h,announcement:m}=(0,a.bO)(),g=(0,s.YG)("DndLiveRegion"),[f,v]=(0,o.useState)(!1);if((0,o.useEffect)((()=>{v(!0)}),[]),function(e){const t=(0,o.useContext)(l);(0,o.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,o.useMemo)((()=>({onDragStart(e){let{active:n}=e;h(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:o}=e;t.onDragMove&&h(t.onDragMove({active:n,over:o}))},onDragOver(e){let{active:n,over:o}=e;h(t.onDragOver({active:n,over:o}))},onDragEnd(e){let{active:n,over:o}=e;h(t.onDragEnd({active:n,over:o}))},onDragCancel(e){let{active:n,over:o}=e;h(t.onDragCancel({active:n,over:o}))}})),[h,t])),!f)return null;const b=r().createElement(r().Fragment,null,r().createElement(a.Aw,{id:u,value:p.draggable}),r().createElement(a.L4,{id:g,announcement:m}));return n?(0,i.createPortal)(b,n):b}var p;function h(){}function m(e,t){return(0,o.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(p||(p={}));const f=Object.freeze({x:0,y:0});function v(e,t){const n=(0,s.e_)(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function b(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function y(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=r-o,a=i-n;if(o<r&&n<i){const n=t.width*t.height,o=e.width*e.height,r=s*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const w=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const i of o){const{id:e}=i,o=n.get(e);if(o){const n=y(o,t);n>0&&r.push({id:e,data:{droppableContainer:i,value:n}})}}return r.sort(b)};function S(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:f}function C(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.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 _=C(1);function A(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 x={ignoreTransform:!1};function E(e,t){void 0===t&&(t=x);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=(0,s.zk)(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=A(t);if(!o)return e;const{scaleX:r,scaleY:i,x:s,y:a}=o,l=e.left-s-(1-r)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}(n,t,o))}const{top:o,left:r,width:i,height:a,bottom:l,right:c}=n;return{top:o,left:r,width:i,height:a,bottom:l,right:c}}function T(e){return E(e,{ignoreTransform:!0})}function I(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if((0,s.wz)(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!(0,s.sb)(r)||(0,s.xZ)(r))return n;if(n.includes(r))return n;const i=(0,s.zk)(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=(0,s.zk)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"===typeof o&&n.test(o)}))}(r,i)&&n.push(r),function(e,t){return void 0===t&&(t=(0,s.zk)(e).getComputedStyle(e)),"fixed"===t.position}(r,i)?n:o(r.parentNode)}(e):n}function O(e){const[t]=I(e,1);return null!=t?t:null}function N(e){return s.Sw&&e?(0,s.l6)(e)?e:(0,s.Ll)(e)?(0,s.wz)(e)||e===(0,s.TW)(e).scrollingElement?window:(0,s.sb)(e)?e:null:null:null}function R(e){return(0,s.l6)(e)?e.scrollX:e.scrollLeft}function P(e){return(0,s.l6)(e)?e.scrollY:e.scrollTop}function j(e){return{x:R(e),y:P(e)}}var k;function M(e){return!(!s.Sw||!e)&&e===document.scrollingElement}function L(e){const t={x:0,y:0},n=M(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(k||(k={}));const D={x:.2,y:.2};function $(e,t,n,o,r){let{top:i,left:s,right:a,bottom:l}=n;void 0===o&&(o=10),void 0===r&&(r=D);const{isTop:c,isBottom:d,isLeft:u,isRight:p}=L(e),h={x:0,y:0},m={x:0,y:0},g=t.height*r.y,f=t.width*r.x;return!c&&i<=t.top+g?(h.y=k.Backward,m.y=o*Math.abs((t.top+g-i)/g)):!d&&l>=t.bottom-g&&(h.y=k.Forward,m.y=o*Math.abs((t.bottom-g-l)/g)),!p&&a>=t.right-f?(h.x=k.Forward,m.x=o*Math.abs((t.right-f-a)/f)):!u&&s<=t.left+f&&(h.x=k.Backward,m.x=o*Math.abs((t.left+f-s)/f)),{direction:h,speed:m}}function U(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:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function F(e){return e.reduce(((e,t)=>(0,s.WQ)(e,j(t))),f)}function B(e,t){if(void 0===t&&(t=E),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);O(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const H=[["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+P(t)),0)}]];class V{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=I(t),o=F(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[r,i,s]of H)for(const e of i)Object.defineProperty(this,e,{get:()=>{const t=s(n),i=o[r]-t;return this.rect[e]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class z{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 o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function W(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"===typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var q,G;function Z(e){e.preventDefault()}function K(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"}(q||(q={})),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"}(G||(G={}));const Y={start:[G.Space,G.Enter],cancel:[G.Esc],end:[G.Space,G.Enter,G.Tab]},Q=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case G.Right:return{...n,x:n.x+25};case G.Left:return{...n,x:n.x-25};case G.Down:return{...n,y:n.y+25};case G.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 z((0,s.TW)(t)),this.windowListeners=new z((0,s.zk)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(q.Resize,this.handleCancel),this.windowListeners.add(q.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(q.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&B(n),t(f)}handleKeyDown(e){if((0,s.kx)(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=Y,coordinateGetter:i=Q,scrollBehavior:a="smooth"}=o,{code:l}=e;if(r.end.includes(l))return void this.handleEnd(e);if(r.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:f;this.referenceCoordinates||(this.referenceCoordinates=d);const u=i(e,{active:t,context:n.current,currentCoordinates:d});if(u){const t=(0,s.Re)(u,d),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:p}=L(n),h=U(n),m={x:Math.min(r===G.Right?h.right-h.width/2:h.right,Math.max(r===G.Right?h.left:h.left+h.width/2,u.x)),y:Math.min(r===G.Down?h.bottom-h.height/2:h.bottom,Math.max(r===G.Down?h.top:h.top+h.height/2,u.y))},g=r===G.Right&&!s||r===G.Left&&!l,f=r===G.Down&&!c||r===G.Up&&!i;if(g&&m.x!==u.x){const e=n.scrollLeft+t.x,i=r===G.Right&&e<=d.x||r===G.Left&&e>=p.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});o.x=i?n.scrollLeft-e:r===G.Right?n.scrollLeft-d.x:n.scrollLeft-p.x,o.x&&n.scrollBy({left:-o.x,behavior:a});break}if(f&&m.y!==u.y){const e=n.scrollTop+t.y,i=r===G.Down&&e<=d.y||r===G.Up&&e>=p.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});o.y=i?n.scrollTop-e:r===G.Down?n.scrollTop-d.y:n.scrollTop-p.y,o.y&&n.scrollBy({top:-o.y,behavior:a});break}}this.handleMove(e,(0,s.WQ)((0,s.Re)(u,this.referenceCoordinates),o))}}}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 X(e){return Boolean(e&&"distance"in e)}function ee(e){return Boolean(e&&"delay"in e)}J.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Y,onActivation:r}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(o.start.includes(s)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class te{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=(0,s.zk)(e);return e instanceof t?e:(0,s.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:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=(0,s.TW)(i),this.documentListeners=new z(this.document),this.listeners=new z(n),this.windowListeners=new z((0,s.zk)(i)),this.initialCoordinates=null!=(o=(0,s.e_)(r))?o:f,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(q.Resize,this.handleCancel),this.windowListeners.add(q.DragStart,Z),this.windowListeners.add(q.VisibilityChange,this.handleCancel),this.windowListeners.add(q.ContextMenu,Z),this.documentListeners.add(q.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ee(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(X(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:o}=this.props;o(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(q.Click,K,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(q.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!o)return;const l=null!=(t=(0,s.e_)(e))?t:f,c=(0,s.Re)(o,l);if(!n&&a){if(X(a)){if(null!=a.tolerance&&W(c,a.tolerance))return this.handleCancel();if(W(c,a.distance))return this.handleStart()}return ee(a)&&W(c,a.tolerance)?this.handleCancel():void this.handlePending(a,c)}e.cancelable&&e.preventDefault(),i(l)}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===G.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ne={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class oe extends te{constructor(e){const{event:t}=e,n=(0,s.TW)(t.target);super(e,ne,n)}}oe.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const re={move:{name:"mousemove"},end:{name:"mouseup"}};var ie;!function(e){e[e.RightClick=2]="RightClick"}(ie||(ie={}));(class extends te{constructor(e){super(e,re,(0,s.TW)(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==ie.RightClick&&(null==o||o({event:n}),!0)}}];const se={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ae extends te{constructor(e){super(e,se)}static setup(){return window.addEventListener(se.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(se.move.name,e)};function e(){}}}var le,ce;function de(e){let{acceleration:t,activator:n=le.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:l=5,order:c=ce.TreeOrder,pointerCoordinates:d,scrollableAncestors:u,scrollableAncestorRects:p,delta:h,threshold:m}=e;const g=function(e){let{delta:t,disabled:n}=e;const o=(0,s.ZC)(t);return(0,s.KG)((e=>{if(n||!o||!e)return ue;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[k.Backward]:e.x[k.Backward]||-1===r.x,[k.Forward]:e.x[k.Forward]||1===r.x},y:{[k.Backward]:e.y[k.Backward]||-1===r.y,[k.Forward]:e.y[k.Forward]||1===r.y}}}),[n,t,o])}({delta:h,disabled:!a}),[f,v]=(0,s.$$)(),b=(0,o.useRef)({x:0,y:0}),y=(0,o.useRef)({x:0,y:0}),w=(0,o.useMemo)((()=>{switch(n){case le.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case le.DraggableRect:return i}}),[n,i,d]),S=(0,o.useRef)(null),C=(0,o.useCallback)((()=>{const e=S.current;if(!e)return;const t=b.current.x*y.current.x,n=b.current.y*y.current.y;e.scrollBy(t,n)}),[]),_=(0,o.useMemo)((()=>c===ce.TreeOrder?[...u].reverse():u),[c,u]);(0,o.useEffect)((()=>{if(a&&u.length&&w){for(const e of _){if(!1===(null==r?void 0:r(e)))continue;const n=u.indexOf(e),o=p[n];if(!o)continue;const{direction:i,speed:s}=$(e,o,w,t,m);for(const e of["x","y"])g[e][i[e]]||(s[e]=0,i[e]=0);if(s.x>0||s.y>0)return v(),S.current=e,f(C,l),b.current=s,void(y.current=i)}b.current={x:0,y:0},y.current={x:0,y:0},v()}else v()}),[t,C,r,v,a,l,JSON.stringify(w),JSON.stringify(g),f,u,_,p,JSON.stringify(m)])}ae.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(le||(le={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ce||(ce={}));const ue={x:{[k.Backward]:!1,[k.Forward]:!1},y:{[k.Backward]:!1,[k.Forward]:!1}};var pe,he;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(pe||(pe={})),function(e){e.Optimized="optimized"}(he||(he={}));const me=new Map;function ge(e,t){return(0,s.KG)((n=>e?n||("function"===typeof t?t(e):e):null),[t,e])}function fe(e){let{callback:t,disabled:n}=e;const r=(0,s._q)(t),i=(0,o.useMemo)((()=>{if(n||"undefined"===typeof window||"undefined"===typeof window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function ve(e){return new V(E(e),e)}function be(e,t,n){void 0===t&&(t=ve);const[r,i]=(0,o.useState)(null);function a(){i((o=>{if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=o?o:n)?r:null;const i=t(e);return JSON.stringify(o)===JSON.stringify(i)?o:i}))}const l=function(e){let{callback:t,disabled:n}=e;const r=(0,s._q)(t),i=(0,o.useMemo)((()=>{if(n||"undefined"===typeof window||"undefined"===typeof window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,o.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){a();break}}}}),c=fe({callback:a});return(0,s.Es)((()=>{a(),e?(null==c||c.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==l||l.disconnect())}),[e]),r}const ye=[];function we(e,t){void 0===t&&(t=[]);const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>{n.current=null}),t),(0,o.useEffect)((()=>{const t=e!==f;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,s.Re)(e,n.current):f}function Se(e){return(0,o.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 Ce=[];function _e(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,s.sb)(t)?t:e}const Ae=[{sensor:oe,options:{}},{sensor:J,options:{}}],xe={current:{}},Ee={draggable:{measure:T},droppable:{measure:T,strategy:pe.WhileDragging,frequency:he.Optimized},dragOverlay:{measure:E}};class Te 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 Ie={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Te,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:h},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ee,measureDroppableContainers:h,windowRect:null,measuringScheduled:!1},Oe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:h,draggableNodes:new Map,over:null,measureDroppableContainers:h},Ne=(0,o.createContext)(Oe),Re=(0,o.createContext)(Ie);function Pe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Te}}}function je(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:o}=n,r=new Te(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case p.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const s=new Te(e.droppable.containers);return s.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:s}}}case p.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new Te(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function ke(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=(0,o.useContext)(Ne),a=(0,s.ZC)(r),l=(0,s.ZC)(null==n?void 0:n.id);return(0,o.useEffect)((()=>{if(!t&&!r&&a&&null!=l){if(!(0,s.kx)(a))return;if(document.activeElement===a.target)return;const e=i.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,s.ag)(e);if(t){t.focus();break}}}))}}),[r,t,i,l,a]),null}function Me(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}const Le=(0,o.createContext)({...f,scaleX:1,scaleY:1});var De;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(De||(De={}));const $e=(0,o.memo)((function(e){var t,n,a,c;let{id:d,accessibility:h,autoScroll:m=!0,children:g,sensors:v=Ae,collisionDetection:b=w,measuring:y,modifiers:C,...A}=e;const x=(0,o.useReducer)(je,void 0,Pe),[T,R]=x,[P,k]=function(){const[e]=(0,o.useState)((()=>new Set)),t=(0,o.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,o.useCallback)((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]),t]}(),[L,D]=(0,o.useState)(De.Uninitialized),$=L===De.Initialized,{draggable:{active:U,nodes:B,translate:H},droppable:{containers:z}}=T,W=null!=U?B.get(U):null,q=(0,o.useRef)({initial:null,translated:null}),G=(0,o.useMemo)((()=>{var e;return null!=U?{id:U,data:null!=(e=null==W?void 0:W.data)?e:xe,rect:q}:null}),[U,W]),Z=(0,o.useRef)(null),[K,Y]=(0,o.useState)(null),[Q,J]=(0,o.useState)(null),X=(0,s.YN)(A,Object.values(A)),ee=(0,s.YG)("DndDescribedBy",d),te=(0,o.useMemo)((()=>z.getEnabled()),[z]),ne=(oe=y,(0,o.useMemo)((()=>({draggable:{...Ee.draggable,...null==oe?void 0:oe.draggable},droppable:{...Ee.droppable,...null==oe?void 0:oe.droppable},dragOverlay:{...Ee.dragOverlay,...null==oe?void 0:oe.dragOverlay}})),[null==oe?void 0:oe.draggable,null==oe?void 0:oe.droppable,null==oe?void 0:oe.dragOverlay]));var oe;const{droppableRects:re,measureDroppableContainers:ie,measuringScheduled:se}=function(e,t){let{dragging:n,dependencies:r,config:i}=t;const[a,l]=(0,o.useState)(null),{frequency:c,measure:d,strategy:u}=i,p=(0,o.useRef)(e),h=function(){switch(u){case pe.Always:return!1;case pe.BeforeDragging:return n;default:return!n}}(),m=(0,s.YN)(h),g=(0,o.useCallback)((function(e){void 0===e&&(e=[]),m.current||l((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[m]),f=(0,o.useRef)(null),v=(0,s.KG)((t=>{if(h&&!n)return me;if(!t||t===me||p.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,o=e?new V(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,a,n,h,d]);return(0,o.useEffect)((()=>{p.current=e}),[e]),(0,o.useEffect)((()=>{h||g()}),[n,h]),(0,o.useEffect)((()=>{a&&a.length>0&&l(null)}),[JSON.stringify(a)]),(0,o.useEffect)((()=>{h||"number"!==typeof c||null!==f.current||(f.current=setTimeout((()=>{g(),f.current=null}),c))}),[c,h,g,...r]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:null!=a}}(te,{dragging:$,dependencies:[H.x,H.y],config:ne.droppable}),ae=function(e,t){const n=null!=t?e.get(t):void 0,o=n?n.node.current:null;return(0,s.KG)((e=>{var n;return null==t?null:null!=(n=null!=o?o:e)?n:null}),[o,t])}(B,U),le=(0,o.useMemo)((()=>Q?(0,s.e_)(Q):null),[Q]),ce=function(){const e=!1===(null==K?void 0:K.autoScrollEnabled),t="object"===typeof m?!1===m.enabled:!1===m,n=$&&!e&&!t;if("object"===typeof m)return{...m,enabled:n};return{enabled:n}}(),ue=function(e,t){return ge(e,t)}(ae,ne.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const a=(0,o.useRef)(!1),{x:l,y:c}="boolean"===typeof i?{x:i,y:i}:i;(0,s.Es)((()=>{if(!l&&!c||!t)return void(a.current=!1);if(a.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=S(n(e),r);if(l||(o.x=0),c||(o.y=0),a.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=O(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,l,c,r,n])}({activeNode:null!=U?B.get(U):null,config:ce.layoutShiftCompensation,initialRect:ue,measure:ne.draggable.measure});const he=be(ae,ne.draggable.measure,ue),ve=be(ae?ae.parentElement:null),Te=(0,o.useRef)({activatorEvent:null,active:null,activeNode:ae,collisionRect:null,collisions:null,droppableRects:re,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ie=z.getNodeFor(null==(t=Te.current.over)?void 0:t.id),Oe=function(e){let{measure:t}=e;const[n,r]=(0,o.useState)(null),i=fe({callback:(0,o.useCallback)((e=>{for(const{target:n}of e)if((0,s.sb)(n)){r((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t])}),a=(0,o.useCallback)((e=>{const n=_e(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[l,c]=(0,s.lk)(a);return(0,o.useMemo)((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}({measure:ne.dragOverlay.measure}),$e=null!=(n=Oe.nodeRef.current)?n:ae,Ue=$?null!=(a=Oe.rect)?a:he:null,Fe=Boolean(Oe.nodeRef.current&&Oe.rect),Be=S(He=Fe?null:he,ge(He));var He;const Ve=Se($e?(0,s.zk)($e):null),ze=function(e){const t=(0,o.useRef)(e),n=(0,s.KG)((n=>e?n&&n!==ye&&e&&t.current&&e.parentNode===t.current.parentNode?n:I(e):ye),[e]);return(0,o.useEffect)((()=>{t.current=e}),[e]),n}($?null!=Ie?Ie:ae:null),We=function(e,t){void 0===t&&(t=E);const[n]=e,r=Se(n?(0,s.zk)(n):null),[i,a]=(0,o.useState)(Ce);function l(){a((()=>e.length?e.map((e=>M(e)?r:new V(t(e),e))):Ce))}const c=fe({callback:l});return(0,s.Es)((()=>{null==c||c.disconnect(),l(),e.forEach((e=>null==c?void 0:c.observe(e)))}),[e]),i}(ze),qe=Me(C,{transform:{x:H.x-Be.x,y:H.y-Be.y,scaleX:1,scaleY:1},activatorEvent:Q,active:G,activeNodeRect:he,containerNodeRect:ve,draggingNodeRect:Ue,over:Te.current.over,overlayNodeRect:Oe.rect,scrollableAncestors:ze,scrollableAncestorRects:We,windowRect:Ve}),Ge=le?(0,s.WQ)(le,H):null,Ze=function(e){const[t,n]=(0,o.useState)(null),r=(0,o.useRef)(e),i=(0,o.useCallback)((e=>{const t=N(e.target);t&&n((e=>e?(e.set(t,j(t)),new Map(e)):null))}),[]);return(0,o.useEffect)((()=>{const t=r.current;if(e!==t){o(t);const s=e.map((e=>{const t=N(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,j(t)]):null})).filter((e=>null!=e));n(s.length?new Map(s):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach((e=>{const t=N(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,o.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,s.WQ)(e,t)),f):F(e):f),[e,t])}(ze),Ke=we(Ze),Ye=we(Ze,[he]),Qe=(0,s.WQ)(qe,Ke),Je=Ue?_(Ue,qe):null,Xe=G&&Je?b({active:G,collisionRect:Je,droppableRects:re,droppableContainers:te,pointerCoordinates:Ge}):null,et=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(Xe,"id"),[tt,nt]=(0,o.useState)(null),ot=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Fe?qe:(0,s.WQ)(qe,Ye),null!=(c=null==tt?void 0:tt.rect)?c:null,he),rt=(0,o.useRef)(null),it=(0,o.useCallback)(((e,t)=>{let{sensor:n,options:o}=t;if(null==Z.current)return;const r=B.get(Z.current);if(!r)return;const s=e.nativeEvent,a=new n({active:Z.current,activeNode:r,event:s,options:o,context:Te,onAbort(e){if(!B.get(e))return;const{onDragAbort:t}=X.current,n={id:e};null==t||t(n),P({type:"onDragAbort",event:n})},onPending(e,t,n,o){if(!B.get(e))return;const{onDragPending:r}=X.current,i={id:e,constraint:t,initialCoordinates:n,offset:o};null==r||r(i),P({type:"onDragPending",event:i})},onStart(e){const t=Z.current;if(null==t)return;const n=B.get(t);if(!n)return;const{onDragStart:o}=X.current,r={activatorEvent:s,active:{id:t,data:n.data,rect:q}};(0,i.unstable_batchedUpdates)((()=>{null==o||o(r),D(De.Initializing),R({type:p.DragStart,initialCoordinates:e,active:t}),P({type:"onDragStart",event:r}),Y(rt.current),J(s)}))},onMove(e){R({type:p.DragMove,coordinates:e})},onEnd:l(p.DragEnd),onCancel:l(p.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=Te.current;let a=null;if(t&&r){const{cancelDrop:i}=X.current;if(a={activatorEvent:s,active:t,collisions:n,delta:r,over:o},e===p.DragEnd&&"function"===typeof i){await Promise.resolve(i(a))&&(e=p.DragCancel)}}Z.current=null,(0,i.unstable_batchedUpdates)((()=>{R({type:e}),D(De.Uninitialized),nt(null),Y(null),J(null),rt.current=null;const t=e===p.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=X.current[t];null==e||e(a),P({type:t,event:a})}}))}}rt.current=a}),[B]),st=(0,o.useCallback)(((e,t)=>(n,o)=>{const r=n.nativeEvent,i=B.get(o);if(null!==Z.current||!i||r.dndKit||r.defaultPrevented)return;const s={active:i};!0===e(n,t.options,s)&&(r.dndKit={capturedBy:t.sensor},Z.current=o,it(n,t))}),[B,it]),at=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(v,st);!function(e){(0,o.useEffect)((()=>{if(!s.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})))}(v),(0,s.Es)((()=>{he&&L===De.Initializing&&D(De.Initialized)}),[he,L]),(0,o.useEffect)((()=>{const{onDragMove:e}=X.current,{active:t,activatorEvent:n,collisions:o,over:r}=Te.current;if(!t||!n)return;const s={active:t,activatorEvent:n,collisions:o,delta:{x:Qe.x,y:Qe.y},over:r};(0,i.unstable_batchedUpdates)((()=>{null==e||e(s),P({type:"onDragMove",event:s})}))}),[Qe.x,Qe.y]),(0,o.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=Te.current;if(!e||null==Z.current||!t||!r)return;const{onDragOver:s}=X.current,a=o.get(et),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:l};(0,i.unstable_batchedUpdates)((()=>{nt(l),null==s||s(c),P({type:"onDragOver",event:c})}))}),[et]),(0,s.Es)((()=>{Te.current={activatorEvent:Q,active:G,activeNode:ae,collisionRect:Je,collisions:Xe,droppableRects:re,draggableNodes:B,draggingNode:$e,draggingNodeRect:Ue,droppableContainers:z,over:tt,scrollableAncestors:ze,scrollAdjustedTranslate:Qe},q.current={initial:Ue,translated:Je}}),[G,ae,Xe,Je,B,$e,Ue,re,z,tt,ze,Qe]),de({...ce,delta:H,draggingRect:Je,pointerCoordinates:Ge,scrollableAncestors:ze,scrollableAncestorRects:We});const lt=(0,o.useMemo)((()=>({active:G,activeNode:ae,activeNodeRect:he,activatorEvent:Q,collisions:Xe,containerNodeRect:ve,dragOverlay:Oe,draggableNodes:B,droppableContainers:z,droppableRects:re,over:tt,measureDroppableContainers:ie,scrollableAncestors:ze,scrollableAncestorRects:We,measuringConfiguration:ne,measuringScheduled:se,windowRect:Ve})),[G,ae,he,Q,Xe,ve,Oe,B,z,re,tt,ie,ze,We,ne,se,Ve]),ct=(0,o.useMemo)((()=>({activatorEvent:Q,activators:at,active:G,activeNodeRect:he,ariaDescribedById:{draggable:ee},dispatch:R,draggableNodes:B,over:tt,measureDroppableContainers:ie})),[Q,at,G,he,R,ee,B,tt,ie]);return r().createElement(l.Provider,{value:k},r().createElement(Ne.Provider,{value:ct},r().createElement(Re.Provider,{value:lt},r().createElement(Le.Provider,{value:ot},g)),r().createElement(ke,{disabled:!1===(null==h?void 0:h.restoreFocus)})),r().createElement(u,{...h,hiddenTextDescribedById:ee}))})),Ue=(0,o.createContext)(null),Fe="button",Be="Draggable";function He(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const a=(0,s.YG)(Be),{activators:l,activatorEvent:c,active:d,activeNodeRect:u,ariaDescribedById:p,draggableNodes:h,over:m}=(0,o.useContext)(Ne),{role:g=Fe,roleDescription:f="draggable",tabIndex:v=0}=null!=i?i:{},b=(null==d?void 0:d.id)===t,y=(0,o.useContext)(b?Le:Ue),[w,S]=(0,s.lk)(),[C,_]=(0,s.lk)(),A=function(e,t){return(0,o.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e}),{})),[e,t])}(l,t),x=(0,s.YN)(n);(0,s.Es)((()=>(h.set(t,{id:t,key:a,node:w,activatorNode:C,data:x}),()=>{const e=h.get(t);e&&e.key===a&&h.delete(t)})),[h,t]);return{active:d,activatorEvent:c,activeNodeRect:u,attributes:(0,o.useMemo)((()=>({role:g,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||g!==Fe)||void 0,"aria-roledescription":f,"aria-describedby":p.draggable})),[r,g,v,b,f,p.draggable]),isDragging:b,listeners:r?void 0:A,node:w,over:m,setNodeRef:S,setActivatorNodeRef:_,transform:y}}function Ve(){return(0,o.useContext)(Re)}const ze="Droppable",We={timeout:25};function qe(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const a=(0,s.YG)(ze),{active:l,dispatch:c,over:d,measureDroppableContainers:u}=(0,o.useContext)(Ne),h=(0,o.useRef)({disabled:n}),m=(0,o.useRef)(!1),g=(0,o.useRef)(null),f=(0,o.useRef)(null),{disabled:v,updateMeasurementsFor:b,timeout:y}={...We,...i},w=(0,s.YN)(null!=b?b:r),S=fe({callback:(0,o.useCallback)((()=>{m.current?(null!=f.current&&clearTimeout(f.current),f.current=setTimeout((()=>{u(Array.isArray(w.current)?w.current:[w.current]),f.current=null}),y)):m.current=!0}),[y]),disabled:v||!l}),C=(0,o.useCallback)(((e,t)=>{S&&(t&&(S.unobserve(t),m.current=!1),e&&S.observe(e))}),[S]),[_,A]=(0,s.lk)(C),x=(0,s.YN)(t);return(0,o.useEffect)((()=>{S&&_.current&&(S.disconnect(),m.current=!1,S.observe(_.current))}),[_,S]),(0,o.useEffect)((()=>(c({type:p.RegisterDroppable,element:{id:r,key:a,disabled:n,node:_,rect:g,data:x}}),()=>c({type:p.UnregisterDroppable,key:a,id:r}))),[r]),(0,o.useEffect)((()=>{n!==h.current.disabled&&(c({type:p.SetDroppableDisabled,id:r,key:a,disabled:n}),h.current.disabled=n)}),[r,a,n,c]),{active:l,rect:g,isOver:(null==d?void 0:d.id)===r,node:_,over:d,setNodeRef:A}}function Ge(e){let{animation:t,children:n}=e;const[i,a]=(0,o.useState)(null),[l,c]=(0,o.useState)(null),d=(0,s.ZC)(n);return n||i||!d||a(d),(0,s.Es)((()=>{if(!l)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,l)).then((()=>{a(null)})):a(null)}),[t,i,l]),r().createElement(r().Fragment,null,n,i?(0,o.cloneElement)(i,{ref:c}):null)}const Ze={x:0,y:0,scaleX:1,scaleY:1};function Ke(e){let{children:t}=e;return r().createElement(Ne.Provider,{value:Oe},r().createElement(Le.Provider,{value:Ze},t))}const Ye={position:"fixed",touchAction:"none"},Qe=e=>(0,s.kx)(e)?"transform 250ms ease":void 0,Je=(0,o.forwardRef)(((e,t)=>{let{as:n,activatorEvent:o,adjustScale:i,children:a,className:l,rect:c,style:d,transform:u,transition:p=Qe}=e;if(!c)return null;const h=i?u:{...u,scaleX:1,scaleY:1},m={...Ye,width:c.width,height:c.height,top:c.top,left:c.left,transform:s.Ks.Transform.toString(h),transformOrigin:i&&o?v(o,c):void 0,transition:"function"===typeof p?p(o):p,...d};return r().createElement(n,{className:l,style:m,ref:t},a)})),Xe=e=>t=>{let{active:n,dragOverlay:o}=t;const r={},{styles:i,className:s}=e;if(null!=i&&i.active)for(const[e,a]of Object.entries(i.active))void 0!==a&&(r[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,a));if(null!=i&&i.dragOverlay)for(const[e,a]of Object.entries(i.dragOverlay))void 0!==a&&o.node.style.setProperty(e,a);return null!=s&&s.active&&n.node.classList.add(s.active),null!=s&&s.dragOverlay&&o.node.classList.add(s.dragOverlay),function(){for(const[e,t]of Object.entries(r))n.node.style.setProperty(e,t);null!=s&&s.active&&n.node.classList.remove(s.active)}},et={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:s.Ks.Transform.toString(t)},{transform:s.Ks.Transform.toString(n)}]},sideEffects:Xe({styles:{active:{opacity:"0"}}})};function tt(e){let{config:t,draggableNodes:n,droppableContainers:o,measuringConfiguration:r}=e;return(0,s._q)(((e,i)=>{if(null===t)return;const a=n.get(e);if(!a)return;const l=a.node.current;if(!l)return;const c=_e(i);if(!c)return;const{transform:d}=(0,s.zk)(i).getComputedStyle(i),u=A(d);if(!u)return;const p="function"===typeof t?t:function(e){const{duration:t,easing:n,sideEffects:o,keyframes:r}={...et,...e};return e=>{let{active:i,dragOverlay:s,transform:a,...l}=e;if(!t)return;const c={x:s.rect.left-i.rect.left,y:s.rect.top-i.rect.top},d={scaleX:1!==a.scaleX?i.rect.width*a.scaleX/s.rect.width:1,scaleY:1!==a.scaleY?i.rect.height*a.scaleY/s.rect.height:1},u={x:a.x-c.x,y:a.y-c.y,...d},p=r({...l,active:i,dragOverlay:s,transform:{initial:a,final:u}}),[h]=p,m=p[p.length-1];if(JSON.stringify(h)===JSON.stringify(m))return;const g=null==o?void 0:o({active:i,dragOverlay:s,...l}),f=s.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{f.onfinish=()=>{null==g||g(),e()}}))}}(t);return B(l,r.draggable.measure),p({active:{id:e,data:a.data,node:l,rect:r.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:i,rect:r.dragOverlay.measure(c)},droppableContainers:o,measuringConfiguration:r,transform:u})}))}let nt=0;function ot(e){return(0,o.useMemo)((()=>{if(null!=e)return nt++,nt}),[e])}const rt=r().memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:s,transition:a,modifiers:l,wrapperElement:c="div",className:d,zIndex:u=999}=e;const{activatorEvent:p,active:h,activeNodeRect:m,containerNodeRect:g,draggableNodes:f,droppableContainers:v,dragOverlay:b,over:y,measuringConfiguration:w,scrollableAncestors:S,scrollableAncestorRects:C,windowRect:_}=Ve(),A=(0,o.useContext)(Le),x=ot(null==h?void 0:h.id),E=Me(l,{activatorEvent:p,active:h,activeNodeRect:m,containerNodeRect:g,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:S,scrollableAncestorRects:C,transform:A,windowRect:_}),T=ge(m),I=tt({config:i,draggableNodes:f,droppableContainers:v,measuringConfiguration:w}),O=T?b.setRef:void 0;return r().createElement(Ke,null,r().createElement(Ge,{animation:I},h&&x?r().createElement(Je,{key:x,id:h.id,ref:O,as:c,activatorEvent:p,adjustScale:t,className:d,transition:a,rect:T,style:{zIndex:u,...s},transform:E},n):null))}))},43627:(e,t,n)=>{"use strict";n.d(t,{be:()=>a,gB:()=>g,gl:()=>C,m$:()=>u});var o=n(31099),r=n.n(o),i=n(15871),s=n(74979);function a(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function l(e,t){return e.reduce(((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e}),Array(e.length))}function c(e){return null!==e&&e>=0}const d={scaleX:1,scaleY:1},u=e=>{var t;let{rects:n,activeNodeRect:o,activeIndex:r,overIndex:i,index:s}=e;const a=null!=(t=n[r])?t:o;if(!a)return null;const l=function(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];if(!o||!r&&!i)return 0;if(n<t)return r?o.left-(r.left+r.width):i.left-(o.left+o.width);return i?i.left-(o.left+o.width):o.left-(r.left+r.width)}(n,s,r);if(s===r){const e=n[i];return e?{x:r<i?e.left+e.width-(a.left+a.width):e.left-a.left,y:0,...d}:null}return s>r&&s<=i?{x:-a.width-l,y:0,...d}:s<r&&s>=i?{x:a.width+l,y:0,...d}:{x:0,y:0,...d}};const p=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=a(t,o,n),s=t[r],l=i[r];return l&&s?{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}:null};const h="Sortable",m=r().createContext({activeIndex:-1,containerId:h,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:p,disabled:{draggable:!1,droppable:!1}});function g(e){let{children:t,id:n,items:a,strategy:c=p,disabled:d=!1}=e;const{active:u,dragOverlay:g,droppableRects:f,over:v,measureDroppableContainers:b}=(0,i.fF)(),y=(0,s.YG)(h,n),w=Boolean(null!==g.rect),S=(0,o.useMemo)((()=>a.map((e=>"object"===typeof e&&"id"in e?e.id:e))),[a]),C=null!=u,_=u?S.indexOf(u.id):-1,A=v?S.indexOf(v.id):-1,x=(0,o.useRef)(S),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}(S,x.current),T=-1!==A&&-1===_||E,I=function(e){return"boolean"===typeof e?{draggable:e,droppable:e}:e}(d);(0,s.Es)((()=>{E&&C&&b(S)}),[E,S,C,b]),(0,o.useEffect)((()=>{x.current=S}),[S]);const O=(0,o.useMemo)((()=>({activeIndex:_,containerId:y,disabled:I,disableTransforms:T,items:S,overIndex:A,useDragOverlay:w,sortedRects:l(S,f),strategy:c})),[_,y,I.draggable,I.droppable,T,S,A,f,w,c]);return r().createElement(m.Provider,{value:O},t)}const f=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return a(n,o,r).indexOf(t)},v=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!(!c||!o)&&((a===i||r!==s)&&(!!n||s!==r&&t===l))},b={duration:200,easing:"ease"},y="transform",w=s.Ks.Transition.toString({property:y,duration:0,easing:"linear"}),S={roleDescription:"sortable"};function C(e){let{animateLayoutChanges:t=v,attributes:n,disabled:r,data:a,getNewIndex:l=f,id:d,strategy:u,resizeObserverConfig:p,transition:h=b}=e;const{items:g,containerId:C,activeIndex:_,disabled:A,disableTransforms:x,sortedRects:E,overIndex:T,useDragOverlay:I,strategy:O}=(0,o.useContext)(m),N=function(e,t){var n,o;if("boolean"===typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(r,A),R=g.indexOf(d),P=(0,o.useMemo)((()=>({sortable:{containerId:C,index:R,items:g},...a})),[C,a,R,g]),j=(0,o.useMemo)((()=>g.slice(g.indexOf(d))),[g,d]),{rect:k,node:M,isOver:L,setNodeRef:D}=(0,i.zM)({id:d,data:P,disabled:N.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...p}}),{active:$,activatorEvent:U,activeNodeRect:F,attributes:B,setNodeRef:H,listeners:V,isDragging:z,over:W,setActivatorNodeRef:q,transform:G}=(0,i.PM)({id:d,data:P,attributes:{...S,...n},disabled:N.draggable}),Z=(0,s.jn)(D,H),K=Boolean($),Y=K&&!x&&c(_)&&c(T),Q=!I&&z,J=Q&&Y?G:null,X=Y?null!=J?J:(null!=u?u:O)({rects:E,activeNodeRect:F,activeIndex:_,overIndex:T,index:R}):null,ee=c(_)&&c(T)?l({id:d,items:g,activeIndex:_,overIndex:T}):R,te=null==$?void 0:$.id,ne=(0,o.useRef)({activeId:te,items:g,newIndex:ee,containerId:C}),oe=g!==ne.current.items,re=t({active:$,containerId:C,isDragging:z,isSorting:K,id:d,index:R,items:g,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:r,rect:a}=e;const[l,c]=(0,o.useState)(null),d=(0,o.useRef)(n);return(0,s.Es)((()=>{if(!t&&n!==d.current&&r.current){const e=a.current;if(e){const t=(0,i.Sj)(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==d.current&&(d.current=n)}),[t,n,r,a]),(0,o.useEffect)((()=>{l&&c(null)}),[l]),l}({disabled:!re,index:R,node:M,rect:k});return(0,o.useEffect)((()=>{K&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),C!==ne.current.containerId&&(ne.current.containerId=C),g!==ne.current.items&&(ne.current.items=g)}),[K,ee,C,g]),(0,o.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:_,attributes:B,data:P,rect:k,index:R,newIndex:ee,items:g,isOver:L,isSorting:K,isDragging:z,listeners:V,node:M,overIndex:T,over:W,setNodeRef:Z,setActivatorNodeRef:q,setDroppableNodeRef:D,setDraggableNodeRef:H,transform:null!=ie?ie:X,transition:function(){if(ie||oe&&ne.current.newIndex===R)return w;if(Q&&!(0,s.kx)(U)||!h)return;if(K||re)return s.Ks.Transition.toString({...h,property:y});return}()}}i.vL.Down,i.vL.Right,i.vL.Up,i.vL.Left},74979:(e,t,n)=>{"use strict";n.d(t,{$$:()=>g,Es:()=>h,KG:()=>v,Ks:()=>T,Ll:()=>a,Re:()=>A,Sw:()=>i,TW:()=>p,WQ:()=>_,YG:()=>S,YN:()=>f,ZC:()=>y,_q:()=>m,ag:()=>O,e_:()=>E,jn:()=>r,kx:()=>x,l6:()=>s,lk:()=>b,sb:()=>d,wz:()=>c,xZ:()=>u,zk:()=>l});var o=n(31099);function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function s(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function a(e){return"nodeType"in e}function l(e){var t,n;return e?s(e)?e:a(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=l(e);return e instanceof t}function d(e){return!s(e)&&e instanceof l(e).HTMLElement}function u(e){return e instanceof l(e).SVGElement}function p(e){return e?s(e)?e.document:a(e)?c(e)?e:d(e)||u(e)?e.ownerDocument:document:document:document}const h=i?o.useLayoutEffect:o.useEffect;function m(e){const t=(0,o.useRef)(e);return h((()=>{t.current=e})),(0,o.useCallback)((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function g(){const e=(0,o.useRef)(null);return[(0,o.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,o.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function f(e,t){void 0===t&&(t=[e]);const n=(0,o.useRef)(e);return h((()=>{n.current!==e&&(n.current=e)}),t),n}function v(e,t){const n=(0,o.useRef)();return(0,o.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function b(e){const t=m(e),n=(0,o.useRef)(null),r=(0,o.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function y(e){const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function S(e,t){return(0,o.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function C(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[r,i]of o){const n=t[r];null!=n&&(t[r]=n+e*i)}return t}),{...t})}}const _=C(1),A=C(-1);function x(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function E(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=l(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 T=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[T.Translate.toString(e),T.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),I="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function O(e){return e.matches(I)?e:e.querySelector(I)}},25815:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var o=n(65047),r=n(40390),i=n(19735),s=n(24534),a=n(50483),l=n(49503),c=n(73716),d=function(e,t,n){for(var o=0,i=0;o=i,i=(0,r.se)(),38===o&&12===i&&(t[n]=1),!(0,r.Sh)(i);)(0,r.K2)();return(0,r.di)(e,r.G1)},u=function(e,t){return(0,r.VF)(function(e,t){var n=-1,o=44;do{switch((0,r.Sh)(o)){case 0:38===o&&12===(0,r.se)()&&(t[n]=1),e[n]+=d(r.G1-1,t,n);break;case 2:e[