import{c as qn}from"./button-CZmOQP7j.js";import{e as Yn,r as v,U as N,R as jn,c as Br}from"./app-BBZbvTSO.js";import{_ as Tr}from"./Select-BSWSW26d.js";/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jn=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ga=qn("GripVertical",Jn);function F(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Xn=typeof Symbol=="function"&&Symbol.observable||"@@observable",Yt=Xn,jt=()=>Math.random().toString(36).substring(7).split("").join("."),Kn={INIT:`@@redux/INIT${jt()}`,REPLACE:`@@redux/REPLACE${jt()}`},Jt=Kn;function Zn(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Lr(e,t,r){if(typeof e!="function")throw new Error(F(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(F(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(F(1));return r(Lr)(e,t)}let n=e,o=t,i=new Map,s=i,c=0,l=!1;function u(){s===i&&(s=new Map,i.forEach((m,y)=>{s.set(y,m)}))}function p(){if(l)throw new Error(F(3));return o}function a(m){if(typeof m!="function")throw new Error(F(4));if(l)throw new Error(F(5));let y=!0;u();const D=c++;return s.set(D,m),function(){if(y){if(l)throw new Error(F(6));y=!1,u(),s.delete(D),i=null}}}function d(m){if(!Zn(m))throw new Error(F(7));if(typeof m.type>"u")throw new Error(F(8));if(typeof m.type!="string")throw new Error(F(17));if(l)throw new Error(F(9));try{l=!0,o=n(o,m)}finally{l=!1}return(i=s).forEach(D=>{D()}),m}function f(m){if(typeof m!="function")throw new Error(F(10));n=m,d({type:Jt.REPLACE})}function g(){const m=a;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(F(11));function D(){const I=y;I.next&&I.next(p())}return D(),{unsubscribe:m(D)}},[Yt](){return this}}}return d({type:Jt.INIT}),{dispatch:d,subscribe:a,getState:p,replaceReducer:f,[Yt]:g}}function Xt(e,t){return function(...r){return t(e.apply(this,r))}}function Kt(e,t){if(typeof e=="function")return Xt(e,t);if(typeof e!="object"||e===null)throw new Error(F(16));const r={};for(const n in e){const o=e[n];typeof o=="function"&&(r[n]=Xt(o,t))}return r}function Mr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Qn(...e){return t=>(r,n)=>{const o=t(r,n);let i=()=>{throw new Error(F(15))};const s={getState:o.getState,dispatch:(l,...u)=>i(l,...u)},c=e.map(l=>l(s));return i=Mr(...c)(o.dispatch),{...o,dispatch:i}}}var Ze={exports:{}},Qe={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Zt;function eo(){if(Zt)return Qe;Zt=1;var e=Yn();function t(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,c=e.useDebugValue;return Qe.useSyncExternalStoreWithSelector=function(l,u,p,a,d){var f=o(null);if(f.current===null){var g={hasValue:!1,value:null};f.current=g}else g=f.current;f=s(function(){function m(S){if(!y){if(y=!0,D=S,S=a(S),d!==void 0&&g.hasValue){var C=g.value;if(d(C,S))return E=C}return E=S}if(C=E,r(D,S))return C;var R=a(S);return d!==void 0&&d(C,R)?(D=S,C):(D=S,E=R)}var y=!1,D,E,I=p===void 0?null:p;return[function(){return m(u())},I===null?void 0:function(){return m(I())}]},[u,p,a,d]);var b=n(l,f[0],f[1]);return i(function(){g.hasValue=!0,g.value=b},[b]),c(b),b},Qe}var Qt;function to(){return Qt||(Qt=1,Ze.exports=eo()),Ze.exports}to();var ro=v.version.startsWith("19"),no=Symbol.for(ro?"react.transitional.element":"react.element"),oo=Symbol.for("react.portal"),io=Symbol.for("react.fragment"),so=Symbol.for("react.strict_mode"),co=Symbol.for("react.profiler"),lo=Symbol.for("react.consumer"),ao=Symbol.for("react.context"),Gr=Symbol.for("react.forward_ref"),uo=Symbol.for("react.suspense"),po=Symbol.for("react.suspense_list"),Dt=Symbol.for("react.memo"),fo=Symbol.for("react.lazy"),go=Gr,mo=Dt;function bo(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case no:switch(e=e.type,e){case io:case co:case so:case uo:case po:return e;default:switch(e=e&&e.$$typeof,e){case ao:case Gr:case fo:case Dt:return e;case lo:return e;default:return t}}case oo:return t}}}function ho(e){return bo(e)===Dt}function vo(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let c=!1,l,u,p,a,d;function f(D,E){return l=D,u=E,p=e(l,u),a=t(n,u),d=r(p,a,u),c=!0,d}function g(){return p=e(l,u),t.dependsOnOwnProps&&(a=t(n,u)),d=r(p,a,u),d}function b(){return e.dependsOnOwnProps&&(p=e(l,u)),t.dependsOnOwnProps&&(a=t(n,u)),d=r(p,a,u),d}function m(){const D=e(l,u),E=!s(D,p);return p=D,E&&(d=r(p,a,u)),d}function y(D,E){const I=!i(E,u),S=!o(D,l,E,u);return l=D,u=E,I&&S?g():I?b():S?m():d}return function(E,I){return c?y(E,I):f(E,I)}}function yo(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:n,...o}){const i=t(e,o),s=r(e,o),c=n(e,o);return vo(i,s,c,e,o)}function Do(e,t){const r={};for(const n in e){const o=e[n];typeof o=="function"&&(r[n]=(...i)=>t(o(...i)))}return r}function pt(e){return function(r){const n=e(r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function er(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Fr(e,t){return function(n,{displayName:o}){const i=function(c,l){return i.dependsOnOwnProps?i.mapToProps(c,l):i.mapToProps(c,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(c,l){i.mapToProps=e,i.dependsOnOwnProps=er(e);let u=i(c,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=er(u),u=i(c,l)),u},i}}function xt(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function xo(e){return e&&typeof e=="object"?pt(t=>Do(e,t)):e?typeof e=="function"?Fr(e):xt(e,"mapDispatchToProps"):pt(t=>({dispatch:t}))}function Io(e){return e?typeof e=="function"?Fr(e):xt(e,"mapStateToProps"):pt(()=>({}))}function So(e,t,r){return{...r,...e,...t}}function Eo(e){return function(r,{displayName:n,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,p){const a=e(l,u,p);return i?o(a,s)||(s=a):(i=!0,s=a),s}}}function Co(e){return e?typeof e=="function"?Eo(e):xt(e,"mergeProps"):()=>So}function wo(e){e()}function Ao(){let e=null,t=null;return{clear(){e=null,t=null},notify(){wo(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var tr={notify(){},get:()=>[]};function _r(e,t){let r,n=tr,o=0,i=!1;function s(b){p();const m=n.subscribe(b);let y=!1;return()=>{y||(y=!0,m(),a())}}function c(){n.notify()}function l(){g.onStateChange&&g.onStateChange()}function u(){return i}function p(){o++,r||(r=t?t.addNestedSub(l):e.subscribe(l),n=Ao())}function a(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=tr)}function d(){i||(i=!0,p())}function f(){i&&(i=!1,a())}const g={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:l,isSubscribed:u,trySubscribe:d,tryUnsubscribe:f,getListeners:()=>n};return g}var Ro=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Po=Ro(),Oo=()=>typeof navigator<"u"&&navigator.product==="ReactNative",No=Oo(),Bo=()=>Po||No?v.useLayoutEffect:v.useEffect,Oe=Bo();function rr(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function et(e,t){if(rr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!rr(e[r[o]],t[r[o]]))return!1;return!0}var To={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Lo={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Mo={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Wr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Go={[go]:Mo,[mo]:Wr};function nr(e){return ho(e)?Wr:Go[e.$$typeof]||To}var Fo=Object.defineProperty,_o=Object.getOwnPropertyNames,or=Object.getOwnPropertySymbols,Wo=Object.getOwnPropertyDescriptor,$o=Object.getPrototypeOf,ir=Object.prototype;function ft(e,t){if(typeof t!="string"){if(ir){const i=$o(t);i&&i!==ir&&ft(e,i)}let r=_o(t);or&&(r=r.concat(or(t)));const n=nr(e),o=nr(t);for(let i=0;i<r.length;++i){const s=r[i];if(!Lo[s]&&!(o&&o[s])&&!(n&&n[s])){const c=Wo(t,s);try{Fo(e,s,c)}catch{}}}}return e}var tt=Symbol.for("react-redux-context"),rt=typeof globalThis<"u"?globalThis:{};function ko(){if(!v.createContext)return{};const e=rt[tt]??(rt[tt]=new Map);let t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var $r=ko(),Uo=[null,null];function Vo(e,t,r){Oe(()=>e(...t),r)}function Ho(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function zo(e,t,r,n,o,i,s,c,l,u,p){if(!e)return()=>{};let a=!1,d=null;const f=()=>{if(a||!c.current)return;const b=t.getState();let m,y;try{m=n(b,o.current)}catch(D){y=D,d=D}y||(d=null),m===i.current?s.current||u():(i.current=m,l.current=m,s.current=!0,p())};return r.onStateChange=f,r.trySubscribe(),f(),()=>{if(a=!0,r.tryUnsubscribe(),r.onStateChange=null,d)throw d}}function qo(e,t){return e===t}function Yo(e,t,r,{pure:n,areStatesEqual:o=qo,areOwnPropsEqual:i=et,areStatePropsEqual:s=et,areMergedPropsEqual:c=et,forwardRef:l=!1,context:u=$r}={}){const p=u,a=Io(e),d=xo(t),f=Co(r),g=!!e;return m=>{const y=m.displayName||m.name||"Component",D=`Connect(${y})`,E={shouldHandleStateChanges:g,displayName:D,wrappedComponentName:y,WrappedComponent:m,initMapStateToProps:a,initMapDispatchToProps:d,initMergeProps:f,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:c};function I(R){const[P,U,O]=v.useMemo(()=>{const{reactReduxForwardedRef:V,...ue}=R;return[R.context,V,ue]},[R]),B=v.useMemo(()=>{let V=p;return P!=null&&P.Consumer,V},[P,p]),_=v.useContext(B),J=!!R.store&&!!R.store.getState&&!!R.store.dispatch,ze=!!_&&!!_.store,j=J?R.store:_.store,Ut=ze?_.getServerState:j.getState,qe=v.useMemo(()=>yo(j.dispatch,E),[j]),[le,Vt]=v.useMemo(()=>{if(!g)return Uo;const V=_r(j,J?void 0:_.subscription),ue=V.notifyNestedSubs.bind(V);return[V,ue]},[j,J,_]),Ht=v.useMemo(()=>J?_:{..._,subscription:le},[J,_,le]),Ye=v.useRef(void 0),je=v.useRef(O),ae=v.useRef(void 0),zt=v.useRef(!1),Je=v.useRef(!1),Xe=v.useRef(void 0);Oe(()=>(Je.current=!0,()=>{Je.current=!1}),[]);const qt=v.useMemo(()=>()=>ae.current&&O===je.current?ae.current:qe(j.getState(),O),[j,O]),zn=v.useMemo(()=>ue=>le?zo(g,j,le,qe,je,Ye,zt,Je,ae,Vt,ue):()=>{},[le]);Vo(Ho,[je,Ye,zt,O,ae,Vt]);let Ce;try{Ce=v.useSyncExternalStore(zn,qt,Ut?()=>qe(Ut(),O):qt)}catch(V){throw Xe.current&&(V.message+=`
The error may be correlated with this previous error:
${Xe.current.stack}

`),V}Oe(()=>{Xe.current=void 0,ae.current=void 0,Ye.current=Ce});const Ke=v.useMemo(()=>v.createElement(m,{...Ce,ref:U}),[U,m,Ce]);return v.useMemo(()=>g?v.createElement(B.Provider,{value:Ht},Ke):Ke,[B,Ke,Ht])}const C=v.memo(I);if(C.WrappedComponent=m,C.displayName=I.displayName=D,l){const P=v.forwardRef(function(O,B){return v.createElement(C,{...O,reactReduxForwardedRef:B})});return P.displayName=D,P.WrappedComponent=m,ft(P,m)}return ft(C,m)}}var kr=Yo;function jo(e){const{children:t,context:r,serverState:n,store:o}=e,i=v.useMemo(()=>{const l=_r(o);return{store:o,subscription:l,getServerState:n?()=>n:void 0}},[o,n]),s=v.useMemo(()=>o.getState(),[o]);Oe(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]);const c=r||$r;return v.createElement(c.Provider,{value:i},t)}var Jo=jo,Xo="Invariant failed";function Ko(e,t){throw new Error(Xo)}var Y=function(t){var r=t.top,n=t.right,o=t.bottom,i=t.left,s=n-i,c=o-r,l={top:r,right:n,bottom:o,left:i,width:s,height:c,x:i,y:r,center:{x:(n+i)/2,y:(o+r)/2}};return l},It=function(t,r){return{top:t.top-r.top,left:t.left-r.left,bottom:t.bottom+r.bottom,right:t.right+r.right}},sr=function(t,r){return{top:t.top+r.top,left:t.left+r.left,bottom:t.bottom-r.bottom,right:t.right-r.right}},Zo=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},nt={top:0,right:0,bottom:0,left:0},St=function(t){var r=t.borderBox,n=t.margin,o=n===void 0?nt:n,i=t.border,s=i===void 0?nt:i,c=t.padding,l=c===void 0?nt:c,u=Y(It(r,o)),p=Y(sr(r,s)),a=Y(sr(p,l));return{marginBox:u,borderBox:Y(r),paddingBox:p,contentBox:a,margin:o,border:s,padding:l}},H=function(t){var r=t.slice(0,-2),n=t.slice(-2);if(n!=="px")return 0;var o=Number(r);return isNaN(o)&&Ko(),o},Qo=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Ne=function(t,r){var n=t.borderBox,o=t.border,i=t.margin,s=t.padding,c=Zo(n,r);return St({borderBox:c,border:o,margin:i,padding:s})},Be=function(t,r){return r===void 0&&(r=Qo()),Ne(t,r)},Ur=function(t,r){var n={top:H(r.marginTop),right:H(r.marginRight),bottom:H(r.marginBottom),left:H(r.marginLeft)},o={top:H(r.paddingTop),right:H(r.paddingRight),bottom:H(r.paddingBottom),left:H(r.paddingLeft)},i={top:H(r.borderTopWidth),right:H(r.borderRightWidth),bottom:H(r.borderBottomWidth),left:H(r.borderLeftWidth)};return St({borderBox:t,margin:n,padding:o,border:i})},Vr=function(t){var r=t.getBoundingClientRect(),n=window.getComputedStyle(t);return Ur(r,n)},be=function(t){var r=[],n=null,o=function(){for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];r=c,!n&&(n=requestAnimationFrame(function(){n=null,t.apply(void 0,r)}))};return o.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},o};function Hr(e,t){}Hr.bind(null,"warn");Hr.bind(null,"error");function X(){}function ei(e,t){return{...e,...t}}function z(e,t,r){const n=t.map(o=>{const i=ei(r,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){n.forEach(i=>{i()})}}const ti="Invariant failed";class Te extends Error{}Te.prototype.toString=function(){return this.message};function h(e,t){throw new Te(ti)}class ri extends N.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=X,this.onWindowError=r=>{const n=this.getCallbacks();n.isDragging()&&n.tryAbort(),r.error instanceof Te&&r.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=r=>{this.callbacks=r}}componentDidMount(){this.unbind=z(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof Te){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const ni=`
  Press space bar to start a drag.
  When dragging you can use the arrow keys to move the item around and escape to cancel.
  Some screen readers may require you to be in focus mode or to use your pass through key
`,Le=e=>e+1,oi=e=>`
  You have lifted an item in position ${Le(e.source.index)}
`,zr=(e,t)=>{const r=e.droppableId===t.droppableId,n=Le(e.index),o=Le(t.index);return r?`
      You have moved the item from position ${n}
      to position ${o}
    `:`
    You have moved the item from position ${n}
    in list ${e.droppableId}
    to list ${t.droppableId}
    in position ${o}
  `},qr=(e,t,r)=>t.droppableId===r.droppableId?`
      The item ${e}
      has been combined with ${r.draggableId}`:`
      The item ${e}
      in list ${t.droppableId}
      has been combined with ${r.draggableId}
      in list ${r.droppableId}
    `,ii=e=>{const t=e.destination;if(t)return zr(e.source,t);const r=e.combine;return r?qr(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},cr=e=>`
  The item has returned to its starting position
  of ${Le(e.index)}
`,si=e=>{if(e.reason==="CANCEL")return`
      Movement cancelled.
      ${cr(e.source)}
    `;const t=e.destination,r=e.combine;return t?`
      You have dropped the item.
      ${zr(e.source,t)}
    `:r?`
      You have dropped the item.
      ${qr(e.draggableId,e.source,r)}
    `:`
    The item has been dropped while not over a drop area.
    ${cr(e.source)}
  `},Pe={dragHandleUsageInstructions:ni,onDragStart:oi,onDragUpdate:ii,onDragEnd:si};function ci(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function Yr(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ci(e[r],t[r]))return!1;return!0}function w(e,t){const r=v.useState(()=>({inputs:t,result:e()}))[0],n=v.useRef(!0),o=v.useRef(r),s=n.current||!!(t&&o.current.inputs&&Yr(t,o.current.inputs))?o.current:{inputs:t,result:e()};return v.useEffect(()=>{n.current=!1,o.current=s},[s]),s.result}function x(e,t){return w(()=>e,t)}const L={x:0,y:0},M=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),W=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),K=(e,t)=>e.x===t.x&&e.y===t.y,ie=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),te=(e,t,r=0)=>e==="x"?{x:t,y:r}:{x:r,y:t},he=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),lr=(e,t)=>Math.min(...t.map(r=>he(e,r))),jr=e=>t=>({x:e(t.x),y:e(t.y)});var li=(e,t)=>{const r=Y({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r};const Se=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),ar=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],ai={top:0,right:0,bottom:0,left:0},ui=(e,t)=>t?Se(e,t.scroll.diff.displacement):e,di=(e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e,pi=(e,t)=>t&&t.shouldClipSubject?li(t.pageMarginBox,e):Y(e);var re=({page:e,withPlaceholder:t,axis:r,frame:n})=>{const o=ui(e.marginBox,n),i=di(o,r,t),s=pi(i,n);return{page:e,withPlaceholder:t,active:s}},Et=(e,t)=>{e.frame||h();const r=e.frame,n=W(t,r.scroll.initial),o=ie(n),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}},s=re({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:s}};function T(e,t=Yr){let r=null;function n(...o){if(r&&r.lastThis===this&&t(o,r.lastArgs))return r.lastResult;const i=e.apply(this,o);return r={lastResult:i,lastArgs:o,lastThis:this},i}return n.clear=function(){r=null},n}const Jr=T(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),Xr=T(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),_e=T(e=>Object.values(e)),fi=T(e=>Object.values(e));var se=T((e,t)=>fi(t).filter(n=>e===n.descriptor.droppableId).sort((n,o)=>n.descriptor.index-o.descriptor.index));function Ct(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function We(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var $e=T((e,t)=>t.filter(r=>r.descriptor.id!==e.descriptor.id)),gi=({isMovingForward:e,draggable:t,destination:r,insideDestination:n,previousImpact:o})=>{if(!r.isCombineEnabled||!Ct(o))return null;function s(f){const g={type:"COMBINE",combine:{draggableId:f,droppableId:r.descriptor.id}};return{...o,at:g}}const c=o.displaced.all,l=c.length?c[0]:null;if(e)return l?s(l):null;const u=$e(t,n);if(!l){if(!u.length)return null;const f=u[u.length-1];return s(f.descriptor.id)}const p=u.findIndex(f=>f.descriptor.id===l);p===-1&&h();const a=p-1;if(a<0)return null;const d=u[a];return s(d.descriptor.id)},ce=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Kr={point:L,value:0},ve={invisible:{},visible:{},all:[]},mi={displaced:ve,displacedBy:Kr,at:null};var q=(e,t)=>r=>e<=r&&r<=t,Zr=e=>{const t=q(e.top,e.bottom),r=q(e.left,e.right);return n=>{if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;const i=t(n.top)||t(n.bottom),s=r(n.left)||r(n.right);if(i&&s)return!0;const l=n.top<e.top&&n.bottom>e.bottom,u=n.left<e.left&&n.right>e.right;return l&&u?!0:l&&s||u&&i}},bi=e=>{const t=q(e.top,e.bottom),r=q(e.left,e.right);return n=>t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right)};const wt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Qr={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var hi=e=>t=>{const r=q(t.top,t.bottom),n=q(t.left,t.right);return o=>e===wt?r(o.top)&&r(o.bottom):n(o.left)&&n(o.right)};const vi=(e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:L;return Se(e,r)},yi=(e,t,r)=>t.subject.active?r(t.subject.active)(e):!1,Di=(e,t,r)=>r(t)(e),At=({target:e,destination:t,viewport:r,withDroppableDisplacement:n,isVisibleThroughFrameFn:o})=>{const i=n?vi(e,t):e;return yi(i,t,o)&&Di(i,r,o)},xi=e=>At({...e,isVisibleThroughFrameFn:Zr}),en=e=>At({...e,isVisibleThroughFrameFn:bi}),Ii=e=>At({...e,isVisibleThroughFrameFn:hi(e.destination.axis)}),Si=(e,t,r)=>{if(typeof r=="boolean")return r;if(!t)return!0;const{invisible:n,visible:o}=t;if(n[e])return!1;const i=o[e];return i?i.shouldAnimate:!0};function Ei(e,t){const r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Y(It(r,n))}function ye({afterDragging:e,destination:t,displacedBy:r,viewport:n,forceShouldAnimate:o,last:i}){return e.reduce(function(c,l){const u=Ei(l,r),p=l.descriptor.id;if(c.all.push(p),!xi({target:u,destination:t,viewport:n,withDroppableDisplacement:!0}))return c.invisible[l.descriptor.id]=!0,c;const d=Si(p,i,o),f={draggableId:p,shouldAnimate:d};return c.visible[p]=f,c},{all:[],visible:{},invisible:{}})}function Ci(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function ur({insideDestination:e,inHomeList:t,displacedBy:r,destination:n}){const o=Ci(e,{inHomeList:t});return{displaced:ve,displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function Me({draggable:e,insideDestination:t,destination:r,viewport:n,displacedBy:o,last:i,index:s,forceShouldAnimate:c}){const l=ce(e,r);if(s==null)return ur({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const u=t.find(g=>g.descriptor.index===s);if(!u)return ur({insideDestination:t,inHomeList:l,displacedBy:o,destination:r});const p=$e(e,t),a=t.indexOf(u),d=p.slice(a);return{displaced:ye({afterDragging:d,destination:r,displacedBy:o,last:i,viewport:n.frame,forceShouldAnimate:c}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function Z(e,t){return!!t.effected[e]}var wi=({isMovingForward:e,destination:t,draggables:r,combine:n,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=n.draggableId,c=r[i].descriptor.index;return Z(i,o)?e?c:c-1:e?c+1:c},Ai=({isMovingForward:e,isInHomeList:t,insideDestination:r,location:n})=>{if(!r.length)return null;const o=n.index,i=e?o+1:o-1,s=r[0].descriptor.index,c=r[r.length-1].descriptor.index,l=t?c:c+1;return i<s||i>l?null:i},Ri=({isMovingForward:e,isInHomeList:t,draggable:r,draggables:n,destination:o,insideDestination:i,previousImpact:s,viewport:c,afterCritical:l})=>{const u=s.at;if(u||h(),u.type==="REORDER"){const a=Ai({isMovingForward:e,isInHomeList:t,location:u.destination,insideDestination:i});return a==null?null:Me({draggable:r,insideDestination:i,destination:o,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:a})}const p=wi({isMovingForward:e,destination:o,displaced:s.displaced,draggables:n,combine:u.combine,afterCritical:l});return p==null?null:Me({draggable:r,insideDestination:i,destination:o,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:p})},Pi=({displaced:e,afterCritical:t,combineWith:r,displacedBy:n})=>{const o=!!(e.visible[r]||e.invisible[r]);return Z(r,t)?o?L:ie(n.point):o?n.point:L},Oi=({afterCritical:e,impact:t,draggables:r})=>{const n=We(t);n||h();const o=n.draggableId,i=r[o].page.borderBox.center,s=Pi({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return M(i,s)};const tn=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Ni=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,Rt=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,dr=({axis:e,moveRelativeTo:t,isMoving:r})=>te(e.line,t.marginBox[e.end]+tn(e,r),Rt(e,t.marginBox,r)),pr=({axis:e,moveRelativeTo:t,isMoving:r})=>te(e.line,t.marginBox[e.start]-Ni(e,r),Rt(e,t.marginBox,r)),Bi=({axis:e,moveInto:t,isMoving:r})=>te(e.line,t.contentBox[e.start]+tn(e,r),Rt(e,t.contentBox,r));var Ti=({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o})=>{const i=se(n.descriptor.id,r),s=t.page,c=n.axis;if(!i.length)return Bi({axis:c,moveInto:n.page,isMoving:s});const{displaced:l,displacedBy:u}=e,p=l.all[0];if(p){const d=r[p];if(Z(p,o))return pr({axis:c,moveRelativeTo:d.page,isMoving:s});const f=Ne(d.page,u.point);return pr({axis:c,moveRelativeTo:f,isMoving:s})}const a=i[i.length-1];if(a.descriptor.id===t.descriptor.id)return s.borderBox.center;if(Z(a.descriptor.id,o)){const d=Ne(a.page,ie(o.displacedBy.point));return dr({axis:c,moveRelativeTo:d,isMoving:s})}return dr({axis:c,moveRelativeTo:a.page,isMoving:s})},gt=(e,t)=>{const r=e.frame;return r?M(t,r.scroll.diff.displacement):t};const Li=({impact:e,draggable:t,droppable:r,draggables:n,afterCritical:o})=>{const i=t.page.borderBox.center,s=e.at;return!r||!s?i:s.type==="REORDER"?Ti({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o}):Oi({impact:e,draggables:n,afterCritical:o})};var ke=e=>{const t=Li(e),r=e.droppable;return r?gt(r,t):t},rn=(e,t)=>{const r=W(t,e.scroll.initial),n=ie(r);return{frame:Y({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}}};function fr(e,t){return e.map(r=>t[r])}function Mi(e,t){for(let r=0;r<t.length;r++){const n=t[r].visible[e];if(n)return n}return null}var Gi=({impact:e,viewport:t,destination:r,draggables:n,maxScrollChange:o})=>{const i=rn(t,M(t.scroll.current,o)),s=r.frame?Et(r,M(r.frame.scroll.current,o)):r,c=e.displaced,l=ye({afterDragging:fr(c.all,n),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:c,forceShouldAnimate:!1}),u=ye({afterDragging:fr(c.all,n),destination:s,displacedBy:e.displacedBy,viewport:t.frame,last:c,forceShouldAnimate:!1}),p={},a={},d=[c,l,u];return c.all.forEach(g=>{const b=Mi(g,d);if(b){a[g]=b;return}p[g]=!0}),{...e,displaced:{all:c.all,invisible:p,visible:a}}},Fi=(e,t)=>M(e.scroll.diff.displacement,t),Pt=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const n=Fi(r,e),o=W(n,t.page.borderBox.center);return M(t.client.borderBox.center,o)},nn=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:n,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const s=W(r,e.page.borderBox.center),l={target:Se(e.page.borderBox,s),destination:t,withDroppableDisplacement:o,viewport:n};return i?Ii(l):en(l)},_i=({isMovingForward:e,draggable:t,destination:r,draggables:n,previousImpact:o,viewport:i,previousPageBorderBoxCenter:s,previousClientSelection:c,afterCritical:l})=>{if(!r.isEnabled)return null;const u=se(r.descriptor.id,n),p=ce(t,r),a=gi({isMovingForward:e,draggable:t,destination:r,insideDestination:u,previousImpact:o})||Ri({isMovingForward:e,isInHomeList:p,draggable:t,draggables:n,destination:r,insideDestination:u,previousImpact:o,viewport:i,afterCritical:l});if(!a)return null;const d=ke({impact:a,draggable:t,droppable:r,draggables:n,afterCritical:l});if(nn({draggable:t,destination:r,newPageBorderBoxCenter:d,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Pt({pageBorderBoxCenter:d,draggable:t,viewport:i}),impact:a,scrollJumpRequest:null};const g=W(d,s),b=Gi({impact:a,viewport:i,destination:r,draggables:n,maxScrollChange:g});return{clientSelection:c,impact:b,scrollJumpRequest:g}};const G=e=>{const t=e.subject.active;return t||h(),t};var Wi=({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:n,viewport:o})=>{const i=r.subject.active;if(!i)return null;const s=r.axis,c=q(i[s.start],i[s.end]),l=_e(n).filter(p=>p!==r).filter(p=>p.isEnabled).filter(p=>!!p.subject.active).filter(p=>Zr(o.frame)(G(p))).filter(p=>{const a=G(p);return e?i[s.crossAxisEnd]<a[s.crossAxisEnd]:a[s.crossAxisStart]<i[s.crossAxisStart]}).filter(p=>{const a=G(p),d=q(a[s.start],a[s.end]);return c(a[s.start])||c(a[s.end])||d(i[s.start])||d(i[s.end])}).sort((p,a)=>{const d=G(p)[s.crossAxisStart],f=G(a)[s.crossAxisStart];return e?d-f:f-d}).filter((p,a,d)=>G(p)[s.crossAxisStart]===G(d[0])[s.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const u=l.filter(p=>q(G(p)[s.start],G(p)[s.end])(t[s.line]));return u.length===1?u[0]:u.length>1?u.sort((p,a)=>G(p)[s.start]-G(a)[s.start])[0]:l.sort((p,a)=>{const d=lr(t,ar(G(p))),f=lr(t,ar(G(a)));return d!==f?d-f:G(p)[s.start]-G(a)[s.start]})[0]};const gr=(e,t)=>{const r=e.page.borderBox.center;return Z(e.descriptor.id,t)?W(r,t.displacedBy.point):r},$i=(e,t)=>{const r=e.page.borderBox;return Z(e.descriptor.id,t)?Se(r,ie(t.displacedBy.point)):r};var ki=({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:n,afterCritical:o})=>n.filter(s=>en({target:$i(s,o),destination:r,viewport:t.frame,withDroppableDisplacement:!0})).sort((s,c)=>{const l=he(e,gt(r,gr(s,o))),u=he(e,gt(r,gr(c,o)));return l<u?-1:u<l?1:s.descriptor.index-c.descriptor.index})[0]||null,Ee=T(function(t,r){const n=r[t.line];return{value:n,point:te(t.line,n)}});const Ui=(e,t,r)=>{const n=e.axis;if(e.descriptor.mode==="virtual")return te(n.line,t[n.line]);const o=e.subject.page.contentBox[n.size],l=se(e.descriptor.id,r).reduce((u,p)=>u+p.client.marginBox[n.size],0)+t[n.line]-o;return l<=0?null:te(n.line,l)},on=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),sn=(e,t,r)=>{const n=e.frame;ce(t,e)&&h(),e.subject.withPlaceholder&&h();const o=Ee(e.axis,t.displaceBy).point,i=Ui(e,o,r),s={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n){const p=re({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame});return{...e,subject:p}}const c=i?M(n.scroll.max,i):n.scroll.max,l=on(n,c),u=re({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:l});return{...e,subject:u,frame:l}},Vi=e=>{const t=e.subject.withPlaceholder;t||h();const r=e.frame;if(!r){const s=re({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:s}}const n=t.oldFrameMaxScroll;n||h();const o=on(r,n),i=re({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var Hi=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:r,draggable:n,draggables:o,destination:i,viewport:s,afterCritical:c})=>{if(!t){if(r.length)return null;const a={displaced:ve,displacedBy:Kr,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},d=ke({impact:a,draggable:n,droppable:i,draggables:o,afterCritical:c}),f=ce(n,i)?i:sn(i,n,o);return nn({draggable:n,destination:f,newPageBorderBoxCenter:d,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?a:null}const l=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],u=(()=>{const a=t.descriptor.index;return t.descriptor.id===n.descriptor.id||l?a:a+1})(),p=Ee(i.axis,n.displaceBy);return Me({draggable:n,insideDestination:r,destination:i,viewport:s,displacedBy:p,last:ve,index:u})},zi=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:n,draggables:o,droppables:i,viewport:s,afterCritical:c})=>{const l=Wi({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:i,viewport:s});if(!l)return null;const u=se(l.descriptor.id,o),p=ki({pageBorderBoxCenter:t,viewport:s,destination:l,insideDestination:u,afterCritical:c}),a=Hi({previousPageBorderBoxCenter:t,destination:l,draggable:r,draggables:o,moveRelativeTo:p,insideDestination:u,viewport:s,afterCritical:c});if(!a)return null;const d=ke({impact:a,draggable:r,droppable:l,draggables:o,afterCritical:c});return{clientSelection:Pt({pageBorderBoxCenter:d,draggable:r,viewport:s}),impact:a,scrollJumpRequest:null}},$=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const qi=(e,t)=>{const r=$(e);return r?t[r]:null};var Yi=({state:e,type:t})=>{const r=qi(e.impact,e.dimensions.droppables),n=!!r,o=e.dimensions.droppables[e.critical.droppable.id],i=r||o,s=i.axis.direction,c=s==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||s==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(c&&!n)return null;const l=t==="MOVE_DOWN"||t==="MOVE_RIGHT",u=e.dimensions.draggables[e.critical.draggable.id],p=e.current.page.borderBoxCenter,{draggables:a,droppables:d}=e.dimensions;return c?_i({isMovingForward:l,previousPageBorderBoxCenter:p,draggable:u,destination:i,draggables:a,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):zi({isMovingForward:l,previousPageBorderBoxCenter:p,draggable:u,isOver:i,draggables:a,droppables:d,viewport:e.viewport,afterCritical:e.afterCritical})};function ee(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function cn(e){const t=q(e.top,e.bottom),r=q(e.left,e.right);return function(o){return t(o.y)&&r(o.x)}}function ji(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Ji({pageBorderBox:e,draggable:t,candidates:r}){const n=t.page.borderBox.center,o=r.map(i=>{const s=i.axis,c=te(i.axis.line,e.center[s.line],i.page.borderBox.center[s.crossAxisLine]);return{id:i.descriptor.id,distance:he(n,c)}}).sort((i,s)=>s.distance-i.distance);return o[0]?o[0].id:null}function Xi({pageBorderBox:e,draggable:t,droppables:r}){const n=_e(r).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!ji(e,i))return!1;if(cn(i)(e.center))return!0;const s=o.axis,c=i.center[s.crossAxisLine],l=e[s.crossAxisStart],u=e[s.crossAxisEnd],p=q(i[s.crossAxisStart],i[s.crossAxisEnd]),a=p(l),d=p(u);return!a&&!d?!0:a?l<c:u>c});return n.length?n.length===1?n[0].descriptor.id:Ji({pageBorderBox:e,draggable:t,candidates:n}):null}const ln=(e,t)=>Y(Se(e,t));var Ki=(e,t)=>{const r=e.frame;return r?ln(t,r.scroll.diff.value):t};function an({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function Zi({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var Qi=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:n,last:o,viewport:i,afterCritical:s})=>{const c=r.axis,l=Ee(r.axis,t.displaceBy),u=l.value,p=e[c.start],a=e[c.end],f=$e(t,n).find(b=>{const m=b.descriptor.id,y=b.page.borderBox.center[c.line],D=Z(m,s),E=an({displaced:o,id:m});return D?E?a<=y:p<y-u:E?a<=y+u:p<y})||null,g=Zi({draggable:t,closest:f,inHomeList:ce(t,r)});return Me({draggable:t,insideDestination:n,destination:r,viewport:i,last:o,displacedBy:l,index:g})};const es=4;var ts=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:r,destination:n,insideDestination:o,afterCritical:i})=>{if(!n.isCombineEnabled)return null;const s=n.axis,c=Ee(n.axis,e.displaceBy),l=c.value,u=t[s.start],p=t[s.end],d=$e(e,o).find(g=>{const b=g.descriptor.id,m=g.page.borderBox,D=m[s.size]/es,E=Z(b,i),I=an({displaced:r.displaced,id:b});return E?I?p>m[s.start]+D&&p<m[s.end]-D:u>m[s.start]-l+D&&u<m[s.end]-l-D:I?p>m[s.start]+l+D&&p<m[s.end]+l-D:u>m[s.start]+D&&u<m[s.end]-D});return d?{displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:d.descriptor.id,droppableId:n.descriptor.id}}}:null},un=({pageOffset:e,draggable:t,draggables:r,droppables:n,previousImpact:o,viewport:i,afterCritical:s})=>{const c=ln(t.page.borderBox,e),l=Xi({pageBorderBox:c,draggable:t,droppables:n});if(!l)return mi;const u=n[l],p=se(u.descriptor.id,r),a=Ki(u,c);return ts({pageBorderBoxWithDroppableScroll:a,draggable:t,previousImpact:o,destination:u,insideDestination:p,afterCritical:s})||Qi({pageBorderBoxWithDroppableScroll:a,draggable:t,destination:u,insideDestination:p,last:o.displaced,viewport:i,afterCritical:s})},Ot=(e,t)=>({...e,[t.descriptor.id]:t});const rs=({previousImpact:e,impact:t,droppables:r})=>{const n=$(e),o=$(t);if(!n||n===o)return r;const i=r[n];if(!i.subject.withPlaceholder)return r;const s=Vi(i);return Ot(r,s)};var ns=({draggable:e,draggables:t,droppables:r,previousImpact:n,impact:o})=>{const i=rs({previousImpact:n,impact:o,droppables:r}),s=$(o);if(!s)return i;const c=r[s];if(ce(e,c)||c.subject.withPlaceholder)return i;const l=sn(c,e,t);return Ot(i,l)},ge=({state:e,clientSelection:t,dimensions:r,viewport:n,impact:o,scrollJumpRequest:i})=>{const s=n||e.viewport,c=r||e.dimensions,l=t||e.current.client.selection,u=W(l,e.initial.client.selection),p={offset:u,selection:l,borderBoxCenter:M(e.initial.client.borderBoxCenter,u)},a={selection:M(p.selection,s.scroll.current),borderBoxCenter:M(p.borderBoxCenter,s.scroll.current),offset:M(p.offset,s.scroll.diff.value)},d={client:p,page:a};if(e.phase==="COLLECTING")return{...e,dimensions:c,viewport:s,current:d};const f=c.draggables[e.critical.draggable.id],g=o||un({pageOffset:a.offset,draggable:f,draggables:c.draggables,droppables:c.droppables,previousImpact:e.impact,viewport:s,afterCritical:e.afterCritical}),b=ns({draggable:f,impact:g,previousImpact:e.impact,draggables:c.draggables,droppables:c.droppables});return{...e,current:d,dimensions:{draggables:c.draggables,droppables:b},impact:g,viewport:s,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function os(e,t){return e.map(r=>t[r])}var dn=({impact:e,viewport:t,draggables:r,destination:n,forceShouldAnimate:o})=>{const i=e.displaced,s=os(i.all,r),c=ye({afterDragging:s,destination:n,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:c}},pn=({impact:e,draggable:t,droppable:r,draggables:n,viewport:o,afterCritical:i})=>{const s=ke({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i});return Pt({pageBorderBoxCenter:s,draggable:t,viewport:o})},fn=({state:e,dimensions:t,viewport:r})=>{e.movementMode!=="SNAP"&&h();const n=e.impact,o=r||e.viewport,i=t||e.dimensions,{draggables:s,droppables:c}=i,l=s[e.critical.draggable.id],u=$(n);u||h();const p=c[u],a=dn({impact:n,viewport:o,destination:p,draggables:s}),d=pn({impact:a,draggable:l,droppable:p,draggables:s,viewport:o,afterCritical:e.afterCritical});return ge({impact:a,clientSelection:d,state:e,dimensions:i,viewport:o})},is=e=>({index:e.index,droppableId:e.droppableId}),gn=({draggable:e,home:t,draggables:r,viewport:n})=>{const o=Ee(t.axis,e.displaceBy),i=se(t.descriptor.id,r),s=i.indexOf(e);s===-1&&h();const c=i.slice(s+1),l=c.reduce((d,f)=>(d[f.descriptor.id]=!0,d),{}),u={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:l};return{impact:{displaced:ye({afterDragging:c,destination:t,displacedBy:o,last:null,viewport:n.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:is(e.descriptor)}},afterCritical:u}},ss=(e,t)=>({draggables:e.draggables,droppables:Ot(e.droppables,t)}),cs=({draggable:e,offset:t,initialWindowScroll:r})=>{const n=Ne(e.client,t),o=Be(n,r);return{...e,placeholder:{...e.placeholder,client:n},client:n,page:o}},ls=e=>{const t=e.frame;return t||h(),t},as=({additions:e,updatedDroppables:t,viewport:r})=>{const n=r.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,s=t[i],l=ls(s).scroll.diff.value,u=M(n,l);return cs({draggable:o,offset:u,initialWindowScroll:r.scroll.initial})})},us=({state:e,published:t})=>{const r=t.modified.map(y=>{const D=e.dimensions.droppables[y.droppableId];return Et(D,y.scroll)}),n={...e.dimensions.droppables,...Jr(r)},o=Xr(as({additions:t.additions,updatedDroppables:n,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(y=>{delete i[y]});const s={droppables:n,draggables:i},c=$(e.impact),l=c?s.droppables[c]:null,u=s.draggables[e.critical.draggable.id],p=s.droppables[e.critical.droppable.id],{impact:a,afterCritical:d}=gn({draggable:u,home:p,draggables:i,viewport:e.viewport}),f=l&&l.isCombineEnabled?e.impact:a,g=un({pageOffset:e.current.page.offset,draggable:s.draggables[e.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:f,viewport:e.viewport,afterCritical:d}),b={...e,phase:"DRAGGING",impact:g,onLiftImpact:a,dimensions:s,afterCritical:d,forceShouldAnimate:!1};return e.phase==="COLLECTING"?b:{...b,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const mt=e=>e.movementMode==="SNAP",ot=(e,t,r)=>{const n=ss(e.dimensions,t);return!mt(e)||r?ge({state:e,dimensions:n}):fn({state:e,dimensions:n})};function it(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const mr={phase:"IDLE",completed:null,shouldFlush:!1};var ds=(e=mr,t)=>{if(t.type==="FLUSH")return{...mr,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&h();const{critical:r,clientSelection:n,viewport:o,dimensions:i,movementMode:s}=t.payload,c=i.draggables[r.draggable.id],l=i.droppables[r.droppable.id],u={selection:n,borderBoxCenter:c.client.borderBox.center,offset:L},p={client:u,page:{selection:M(u.selection,o.scroll.initial),borderBoxCenter:M(u.selection,o.scroll.initial),offset:M(u.selection,o.scroll.diff.value)}},a=_e(i.droppables).every(b=>!b.isFixedOnPage),{impact:d,afterCritical:f}=gn({draggable:c,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:s,dimensions:i,initial:p,current:p,isWindowScrollAllowed:a,impact:d,afterCritical:f,onLiftImpact:d,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&h(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||h(),us({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;ee(e)||h();const{client:r}=t.payload;return K(r,e.current.client.selection)?e:ge({state:e,clientSelection:r,impact:mt(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return it(e);ee(e)||h();const{id:r,newScroll:n}=t.payload,o=e.dimensions.droppables[r];if(!o)return e;const i=Et(o,n);return ot(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;ee(e)||h();const{id:r,isEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||h(),o.isEnabled===n&&h();const i={...o,isEnabled:n};return ot(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;ee(e)||h();const{id:r,isCombineEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||h(),o.isCombineEnabled===n&&h();const i={...o,isCombineEnabled:n};return ot(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;ee(e)||h(),e.isWindowScrollAllowed||h();const r=t.payload.newScroll;if(K(e.viewport.scroll.current,r))return it(e);const n=rn(e.viewport,r);return mt(e)?fn({state:e,viewport:n}):ge({state:e,viewport:n})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!ee(e))return e;const r=t.payload.maxScroll;if(K(r,e.viewport.scroll.max))return e;const n={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:n}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&h();const r=Yi({state:e,type:t.type});return r?ge({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const r=t.payload.reason;return e.phase!=="COLLECTING"&&h(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if(t.type==="DROP_ANIMATE"){const{completed:r,dropDuration:n,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||h(),{phase:"DROP_ANIMATING",completed:r,dropDuration:n,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:r}=t.payload;return{phase:"IDLE",completed:r,shouldFlush:!1}}return e};function A(e,t){return e instanceof Object&&"type"in e&&e.type===t}const ps=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),fs=e=>({type:"LIFT",payload:e}),gs=e=>({type:"INITIAL_PUBLISH",payload:e}),ms=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),bs=()=>({type:"COLLECTION_STARTING",payload:null}),hs=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),vs=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),ys=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),mn=e=>({type:"MOVE",payload:e}),Ds=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),xs=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),Is=()=>({type:"MOVE_UP",payload:null}),Ss=()=>({type:"MOVE_DOWN",payload:null}),Es=()=>({type:"MOVE_RIGHT",payload:null}),Cs=()=>({type:"MOVE_LEFT",payload:null}),Nt=()=>({type:"FLUSH",payload:null}),ws=e=>({type:"DROP_ANIMATE",payload:e}),Bt=e=>({type:"DROP_COMPLETE",payload:e}),bn=e=>({type:"DROP",payload:e}),As=e=>({type:"DROP_PENDING",payload:e}),hn=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var Rs=e=>({getState:t,dispatch:r})=>n=>o=>{if(!A(o,"LIFT")){n(o);return}const{id:i,clientSelection:s,movementMode:c}=o.payload,l=t();l.phase==="DROP_ANIMATING"&&r(Bt({completed:l.completed})),t().phase!=="IDLE"&&h(),r(Nt()),r(ps({draggableId:i,movementMode:c}));const p={draggableId:i,scrollOptions:{shouldPublishImmediately:c==="SNAP"}},{critical:a,dimensions:d,viewport:f}=e.startPublishing(p);r(gs({critical:a,dimensions:d,clientSelection:s,movementMode:c,viewport:f}))},Ps=e=>()=>t=>r=>{A(r,"INITIAL_PUBLISH")&&e.dragging(),A(r,"DROP_ANIMATE")&&e.dropping(r.payload.completed.result.reason),(A(r,"FLUSH")||A(r,"DROP_COMPLETE"))&&e.resting(),t(r)};const Tt={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},De={opacity:{drop:0,combining:.7},scale:{drop:.75}},vn={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Q=`${vn.outOfTheWay}s ${Tt.outOfTheWay}`,me={fluid:`opacity ${Q}`,snap:`transform ${Q}, opacity ${Q}`,drop:e=>{const t=`${e}s ${Tt.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Q}`,placeholder:`height ${Q}, width ${Q}, margin ${Q}`},br=e=>K(e,L)?void 0:`translate(${e.x}px, ${e.y}px)`,bt={moveTo:br,drop:(e,t)=>{const r=br(e);if(r)return t?`${r} scale(${De.scale.drop})`:r}},{minDropTime:ht,maxDropTime:yn}=vn,Os=yn-ht,hr=1500,Ns=.6;var Bs=({current:e,destination:t,reason:r})=>{const n=he(e,t);if(n<=0)return ht;if(n>=hr)return yn;const o=n/hr,i=ht+Os*o,s=r==="CANCEL"?i*Ns:i;return Number(s.toFixed(2))},Ts=({impact:e,draggable:t,dimensions:r,viewport:n,afterCritical:o})=>{const{draggables:i,droppables:s}=r,c=$(e),l=c?s[c]:null,u=s[t.descriptor.droppableId],p=pn({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:l||u,viewport:n});return W(p,t.client.borderBox.center)},Ls=({draggables:e,reason:t,lastImpact:r,home:n,viewport:o,onLiftImpact:i})=>!r.at||t!=="DROP"?{impact:dn({draggables:e,impact:i,destination:n,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:r.at.type==="REORDER"?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:ve},didDropInsideDroppable:!0};const Ms=({getState:e,dispatch:t})=>r=>n=>{if(!A(n,"DROP")){r(n);return}const o=e(),i=n.payload.reason;if(o.phase==="COLLECTING"){t(As({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&h(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||h();const c=o.critical,l=o.dimensions,u=l.draggables[o.critical.draggable.id],{impact:p,didDropInsideDroppable:a}=Ls({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),d=a?Ct(p):null,f=a?We(p):null,g={index:c.draggable.index,droppableId:c.droppable.id},b={draggableId:u.descriptor.id,type:u.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:d,combine:f},m=Ts({impact:p,draggable:u,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),y={critical:o.critical,afterCritical:o.afterCritical,result:b,impact:p};if(!(!K(o.current.client.offset,m)||!!b.combine)){t(Bt({completed:y}));return}const E=Bs({current:o.current.client.offset,destination:m,reason:i});t(ws({newHomeClientOffset:m,dropDuration:E,completed:y}))};var Dn=()=>({x:window.pageXOffset,y:window.pageYOffset});function Gs(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function Fs({onWindowScroll:e}){function t(){e(Dn())}const r=be(t),n=Gs(r);let o=X;function i(){return o!==X}function s(){i()&&h(),o=z(window,[n])}function c(){i()||h(),r.cancel(),o(),o=X}return{start:s,stop:c,isActive:i}}const _s=e=>A(e,"DROP_COMPLETE")||A(e,"DROP_ANIMATE")||A(e,"FLUSH"),Ws=e=>{const t=Fs({onWindowScroll:r=>{e.dispatch(Ds({newScroll:r}))}});return r=>n=>{!t.isActive()&&A(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&_s(n)&&t.stop(),r(n)}};var $s=e=>{let t=!1,r=!1;const n=setTimeout(()=>{r=!0}),o=i=>{t||r||(t=!0,e(i),clearTimeout(n))};return o.wasCalled=()=>t,o},ks=()=>{const e=[],t=o=>{const i=e.findIndex(c=>c.timerId===o);i===-1&&h();const[s]=e.splice(i,1);s.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),s={timerId:i,callback:o};e.push(s)},flush:()=>{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const Us=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,Vs=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,Hs=(e,t)=>{if(e===t)return!0;const r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&n},de=(e,t)=>{t()},we=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function st(e,t,r,n){if(!e){r(n(t));return}const o=$s(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}var zs=(e,t)=>{const r=ks();let n=null;const o=(a,d)=>{n&&h(),de("onBeforeCapture",()=>{const f=e().onBeforeCapture;f&&f({draggableId:a,mode:d})})},i=(a,d)=>{n&&h(),de("onBeforeDragStart",()=>{const f=e().onBeforeDragStart;f&&f(we(a,d))})},s=(a,d)=>{n&&h();const f=we(a,d);n={mode:d,lastCritical:a,lastLocation:f.source,lastCombine:null},r.add(()=>{de("onDragStart",()=>st(e().onDragStart,f,t,Pe.onDragStart))})},c=(a,d)=>{const f=Ct(d),g=We(d);n||h();const b=!Hs(a,n.lastCritical);b&&(n.lastCritical=a);const m=!Us(n.lastLocation,f);m&&(n.lastLocation=f);const y=!Vs(n.lastCombine,g);if(y&&(n.lastCombine=g),!b&&!m&&!y)return;const D={...we(a,n.mode),combine:g,destination:f};r.add(()=>{de("onDragUpdate",()=>st(e().onDragUpdate,D,t,Pe.onDragUpdate))})},l=()=>{n||h(),r.flush()},u=a=>{n||h(),n=null,de("onDragEnd",()=>st(e().onDragEnd,a,t,Pe.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:s,update:c,flush:l,drop:u,abort:()=>{if(!n)return;const a={...we(n.lastCritical,n.mode),combine:null,destination:null,reason:"CANCEL"};u(a)}}},qs=(e,t)=>{const r=zs(e,t);return n=>o=>i=>{if(A(i,"BEFORE_INITIAL_CAPTURE")){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(A(i,"INITIAL_PUBLISH")){const c=i.payload.critical;r.beforeStart(c,i.payload.movementMode),o(i),r.start(c,i.payload.movementMode);return}if(A(i,"DROP_COMPLETE")){const c=i.payload.completed.result;r.flush(),o(i),r.drop(c);return}if(o(i),A(i,"FLUSH")){r.abort();return}const s=n.getState();s.phase==="DRAGGING"&&r.update(s.critical,s.impact)}};const Ys=e=>t=>r=>{if(!A(r,"DROP_ANIMATION_FINISHED")){t(r);return}const n=e.getState();n.phase!=="DROP_ANIMATING"&&h(),e.dispatch(Bt({completed:n.completed}))},js=e=>{let t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return o=>i=>{if((A(i,"FLUSH")||A(i,"DROP_COMPLETE")||A(i,"DROP_ANIMATION_FINISHED"))&&n(),o(i),!A(i,"DROP_ANIMATE"))return;const s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(hn())}};r=requestAnimationFrame(()=>{r=null,t=z(window,[s])})}};var Js=e=>()=>t=>r=>{(A(r,"DROP_COMPLETE")||A(r,"FLUSH")||A(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)},Xs=e=>{let t=!1;return()=>r=>n=>{if(A(n,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(A(n,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(A(n,"DROP_COMPLETE")){t=!1;const o=n.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const Ks=e=>A(e,"DROP_COMPLETE")||A(e,"DROP_ANIMATE")||A(e,"FLUSH");var Zs=e=>t=>r=>n=>{if(Ks(n)){e.stop(),r(n);return}if(A(n,"INITIAL_PUBLISH")){r(n);const o=t.getState();o.phase!=="DRAGGING"&&h(),e.start(o);return}r(n),e.scroll(t.getState())};const Qs=e=>t=>r=>{if(t(r),!A(r,"PUBLISH_WHILE_DRAGGING"))return;const n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(bn({reason:n.reason})))},ec=Mr;var tc=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:n,announce:o,autoScroller:i})=>Lr(ds,ec(Qn(Ps(r),Js(e),Rs(e),Ms,Ys,js,Qs,Zs(i),Ws,Xs(t),qs(n,o))));const ct=()=>({additions:{},removals:{},modified:{}});function rc({registry:e,callbacks:t}){let r=ct(),n=null;const o=()=>{n||(t.collectionStarting(),n=requestAnimationFrame(()=>{n=null;const{additions:l,removals:u,modified:p}=r,a=Object.keys(l).map(g=>e.draggable.getById(g).getDimension(L)).sort((g,b)=>g.descriptor.index-b.descriptor.index),d=Object.keys(p).map(g=>{const m=e.droppable.getById(g).callbacks.getScrollWhileDragging();return{droppableId:g,scroll:m}}),f={additions:a,removals:Object.keys(u),modified:d};r=ct(),t.publish(f)}))};return{add:l=>{const u=l.descriptor.id;r.additions[u]=l,r.modified[l.descriptor.droppableId]=!0,r.removals[u]&&delete r.removals[u],o()},remove:l=>{const u=l.descriptor;r.removals[u.id]=!0,r.modified[u.droppableId]=!0,r.additions[u.id]&&delete r.additions[u.id],o()},stop:()=>{n&&(cancelAnimationFrame(n),n=null,r=ct())}}}var xn=({scrollHeight:e,scrollWidth:t,height:r,width:n})=>{const o=W({x:t,y:e},{x:n,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},In=()=>{const e=document.documentElement;return e||h(),e},Sn=()=>{const e=In();return xn({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},nc=()=>{const e=Dn(),t=Sn(),r=e.y,n=e.x,o=In(),i=o.clientWidth,s=o.clientHeight,c=n+i,l=r+s;return{frame:Y({top:r,left:n,right:c,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:L,displacement:L}}}},oc=({critical:e,scrollOptions:t,registry:r})=>{const n=nc(),o=n.scroll.current,i=e.droppable,s=r.droppable.getAllByType(i.type).map(p=>p.callbacks.getDimensionAndWatchScroll(o,t)),c=r.draggable.getAllByType(e.draggable.type).map(p=>p.getDimension(o));return{dimensions:{draggables:Xr(c),droppables:Jr(s)},critical:e,viewport:n}};function vr(e,t,r){return!(r.descriptor.id===t.id||r.descriptor.type!==t.type||e.droppable.getById(r.descriptor.droppableId).descriptor.mode!=="virtual")}var ic=(e,t)=>{let r=null;const n=rc({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(d,f)=>{e.droppable.exists(d)||h(),r&&t.updateDroppableIsEnabled({id:d,isEnabled:f})},i=(d,f)=>{r&&(e.droppable.exists(d)||h(),t.updateDroppableIsCombineEnabled({id:d,isCombineEnabled:f}))},s=(d,f)=>{r&&(e.droppable.exists(d)||h(),t.updateDroppableScroll({id:d,newScroll:f}))},c=(d,f)=>{r&&e.droppable.getById(d).callbacks.scroll(f)},l=()=>{if(!r)return;n.stop();const d=r.critical.droppable;e.droppable.getAllByType(d.type).forEach(f=>f.callbacks.dragStopped()),r.unsubscribe(),r=null},u=d=>{r||h();const f=r.critical.draggable;d.type==="ADDITION"&&vr(e,f,d.value)&&n.add(d.value),d.type==="REMOVAL"&&vr(e,f,d.value)&&n.remove(d.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:c,updateDroppableScroll:s,startPublishing:d=>{r&&h();const f=e.draggable.getById(d.draggableId),g=e.droppable.getById(f.descriptor.droppableId),b={draggable:f.descriptor,droppable:g.descriptor},m=e.subscribe(u);return r={critical:b,unsubscribe:m},oc({critical:b,registry:e,scrollOptions:d.scrollOptions})},stopPublishing:l}},En=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",sc=e=>{window.scrollBy(e.x,e.y)};const cc=T(e=>_e(e).filter(t=>!(!t.isEnabled||!t.frame))),lc=(e,t)=>cc(t).find(n=>(n.frame||h(),cn(n.frame.pageMarginBox)(e)))||null;var ac=({center:e,destination:t,droppables:r})=>{if(t){const o=r[t];return o.frame?o:null}return lc(e,r)};const xe={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var uc=(e,t,r=()=>xe)=>{const n=r(),o=e[t.size]*n.startFromPercentage,i=e[t.size]*n.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},Cn=({startOfRange:e,endOfRange:t,current:r})=>{const n=t-e;return n===0?0:(r-e)/n},Lt=1,dc=(e,t,r=()=>xe)=>{const n=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return n.maxPixelScroll;if(e===t.startScrollingFrom)return Lt;const i=1-Cn({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),s=n.maxPixelScroll*n.ease(i);return Math.ceil(s)},pc=(e,t,r)=>{const n=r(),o=n.durationDampening.accelerateAt,i=n.durationDampening.stopDampeningAt,s=t,c=i,u=Date.now()-s;if(u>=i)return e;if(u<o)return Lt;const p=Cn({startOfRange:o,endOfRange:c,current:u}),a=e*n.ease(p);return Math.ceil(a)},yr=({distanceToEdge:e,thresholds:t,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:o})=>{const i=dc(e,t,o);return i===0?0:n?Math.max(pc(i,r,o),Lt):i},Dr=({container:e,distanceToEdges:t,dragStartTime:r,axis:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=uc(e,n,i);return t[n.end]<t[n.start]?yr({distanceToEdge:t[n.end],thresholds:s,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*yr({distanceToEdge:t[n.start],thresholds:s,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})},fc=({container:e,subject:t,proposedScroll:r})=>{const n=t.height>e.height,o=t.width>e.width;return!o&&!n?r:o&&n?null:{x:o?0:r.x,y:n?0:r.y}};const gc=jr(e=>e===0?0:e);var wn=({dragStartTime:e,container:t,subject:r,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s={top:n.y-t.top,right:t.right-n.x,bottom:t.bottom-n.y,left:n.x-t.left},c=Dr({container:t,distanceToEdges:s,dragStartTime:e,axis:wt,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=Dr({container:t,distanceToEdges:s,dragStartTime:e,axis:Qr,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),u=gc({x:l,y:c});if(K(u,L))return null;const p=fc({container:t,subject:r,proposedScroll:u});return p?K(p,L)?null:p:null};const mc=jr(e=>e===0?0:e>0?1:-1),Mt=(()=>{const e=(t,r)=>t<0?t:t>r?t-r:0;return({current:t,max:r,change:n})=>{const o=M(t,n),i={x:e(o.x,r.x),y:e(o.y,r.y)};return K(i,L)?null:i}})(),An=({max:e,current:t,change:r})=>{const n={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=mc(r),i=Mt({max:n,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},Gt=(e,t)=>An({current:e.scroll.current,max:e.scroll.max,change:t}),bc=(e,t)=>{if(!Gt(e,t))return null;const r=e.scroll.max,n=e.scroll.current;return Mt({current:n,max:r,change:t})},Ft=(e,t)=>{const r=e.frame;return r?An({current:r.scroll.current,max:r.scroll.max,change:t}):!1},hc=(e,t)=>{const r=e.frame;return!r||!Ft(e,t)?null:Mt({current:r.scroll.current,max:r.scroll.max,change:t})};var vc=({viewport:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=wn({dragStartTime:n,container:e.frame,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Gt(e,s)?s:null},yc=({droppable:e,subject:t,center:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=e.frame;if(!s)return null;const c=wn({dragStartTime:n,container:s.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return c&&Ft(e,c)?c:null},xr=({state:e,dragStartTime:t,shouldUseTimeDampening:r,scrollWindow:n,scrollDroppable:o,getAutoScrollerOptions:i})=>{const s=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const a=e.viewport,d=vc({dragStartTime:t,viewport:a,subject:l,center:s,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(d){n(d);return}}const u=ac({center:s,destination:$(e.impact),droppables:e.dimensions.droppables});if(!u)return;const p=yc({dragStartTime:t,droppable:u,subject:l,center:s,shouldUseTimeDampening:r,getAutoScrollerOptions:i});p&&o(u.descriptor.id,p)},Dc=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>xe})=>{const n=be(e),o=be(t);let i=null;const s=u=>{i||h();const{shouldUseTimeDampening:p,dragStartTime:a}=i;xr({state:u,scrollWindow:n,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:p,getAutoScrollerOptions:r})};return{start:u=>{i&&h();const p=Date.now();let a=!1;const d=()=>{a=!0};xr({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:d,scrollDroppable:d,getAutoScrollerOptions:r}),i={dragStartTime:p,shouldUseTimeDampening:a},a&&s(u)},stop:()=>{i&&(n.cancel(),o.cancel(),i=null)},scroll:s}},xc=({move:e,scrollDroppable:t,scrollWindow:r})=>{const n=(c,l)=>{const u=M(c.current.client.selection,l);e({client:u})},o=(c,l)=>{if(!Ft(c,l))return l;const u=hc(c,l);if(!u)return t(c.descriptor.id,l),null;const p=W(l,u);return t(c.descriptor.id,p),W(l,p)},i=(c,l,u)=>{if(!c||!Gt(l,u))return u;const p=bc(l,u);if(!p)return r(u),null;const a=W(u,p);return r(a),W(u,a)};return c=>{const l=c.scrollJumpRequest;if(!l)return;const u=$(c.impact);u||h();const p=o(c.dimensions.droppables[u],l);if(!p)return;const a=c.viewport,d=i(c.isWindowScrollAllowed,a,p);d&&n(c,d)}},Ic=({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:n})=>{const o=Dc({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n}),i=xc({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:l=>{if(!(n().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){o.scroll(l);return}l.scrollJumpRequest&&i(l)}},start:o.start,stop:o.stop}};const ne="data-rfd",oe=(()=>{const e=`${ne}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),vt=(()=>{const e=`${ne}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Sc=(()=>{const e=`${ne}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Ir={contextId:`${ne}-scroll-container-context-id`},Ec=e=>t=>`[${t}="${e}"]`,pe=(e,t)=>e.map(r=>{const n=r.styles[t];return n?`${r.selector} { ${n} }`:""}).join(" "),Cc="pointer-events: none;";var wc=e=>{const t=Ec(e),r=(()=>{const c=`
      cursor: -webkit-grab;
      cursor: grab;
    `;return{selector:t(oe.contextId),styles:{always:`
          -webkit-touch-callout: none;
          -webkit-tap-highlight-color: rgba(0,0,0,0);
          touch-action: manipulation;
        `,resting:c,dragging:Cc,dropAnimating:c}}})(),n=(()=>{const c=`
      transition: ${me.outOfTheWay};
    `;return{selector:t(vt.contextId),styles:{dragging:c,dropAnimating:c,userCancel:c}}})(),o={selector:t(Sc.contextId),styles:{always:"overflow-anchor: none;"}},s=[n,r,o,{selector:"body",styles:{dragging:`
        cursor: grabbing;
        cursor: -webkit-grabbing;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        overflow-anchor: none;
      `}}];return{always:pe(s,"always"),resting:pe(s,"resting"),dragging:pe(s,"dragging"),dropAnimating:pe(s,"dropAnimating"),userCancel:pe(s,"userCancel")}};const k=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect,lt=()=>{const e=document.querySelector("head");return e||h(),e},Sr=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Ac(e,t){const r=w(()=>wc(e),[e]),n=v.useRef(null),o=v.useRef(null),i=x(T(a=>{const d=o.current;d||h(),d.textContent=a}),[]),s=x(a=>{const d=n.current;d||h(),d.textContent=a},[]);k(()=>{!n.current&&!o.current||h();const a=Sr(t),d=Sr(t);return n.current=a,o.current=d,a.setAttribute(`${ne}-always`,e),d.setAttribute(`${ne}-dynamic`,e),lt().appendChild(a),lt().appendChild(d),s(r.always),i(r.resting),()=>{const f=g=>{const b=g.current;b||h(),lt().removeChild(b),g.current=null};f(n),f(o)}},[t,s,i,r.always,r.resting,e]);const c=x(()=>i(r.dragging),[i,r.dragging]),l=x(a=>{if(a==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),u=x(()=>{o.current&&i(r.resting)},[i,r.resting]);return w(()=>({dragging:c,dropping:l,resting:u}),[c,l,u])}function Rn(e,t){return Array.from(e.querySelectorAll(t))}var Pn=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Ue(e){return e instanceof Pn(e).HTMLElement}function Rc(e,t){const r=`[${oe.contextId}="${e}"]`,n=Rn(document,r);if(!n.length)return null;const o=n.find(i=>i.getAttribute(oe.draggableId)===t);return!o||!Ue(o)?null:o}function Pc(e){const t=v.useRef({}),r=v.useRef(null),n=v.useRef(null),o=v.useRef(!1),i=x(function(d,f){const g={id:d,focus:f};return t.current[d]=g,function(){const m=t.current;m[d]!==g&&delete m[d]}},[]),s=x(function(d){const f=Rc(e,d);f&&f!==document.activeElement&&f.focus()},[e]),c=x(function(d,f){r.current===d&&(r.current=f)},[]),l=x(function(){n.current||o.current&&(n.current=requestAnimationFrame(()=>{n.current=null;const d=r.current;d&&s(d)}))},[s]),u=x(function(d){r.current=null;const f=document.activeElement;f&&f.getAttribute(oe.draggableId)===d&&(r.current=d)},[]);return k(()=>(o.current=!0,function(){o.current=!1;const d=n.current;d&&cancelAnimationFrame(d)}),[]),w(()=>({register:i,tryRecordFocus:u,tryRestoreFocusRecorded:l,tryShiftRecord:c}),[i,u,l,c])}function Oc(){const e={draggables:{},droppables:{}},t=[];function r(a){return t.push(a),function(){const f=t.indexOf(a);f!==-1&&t.splice(f,1)}}function n(a){t.length&&t.forEach(d=>d(a))}function o(a){return e.draggables[a]||null}function i(a){const d=o(a);return d||h(),d}const s={register:a=>{e.draggables[a.descriptor.id]=a,n({type:"ADDITION",value:a})},update:(a,d)=>{const f=e.draggables[d.descriptor.id];f&&f.uniqueId===a.uniqueId&&(delete e.draggables[d.descriptor.id],e.draggables[a.descriptor.id]=a)},unregister:a=>{const d=a.descriptor.id,f=o(d);f&&a.uniqueId===f.uniqueId&&(delete e.draggables[d],e.droppables[a.descriptor.droppableId]&&n({type:"REMOVAL",value:a}))},getById:i,findById:o,exists:a=>!!o(a),getAllByType:a=>Object.values(e.draggables).filter(d=>d.descriptor.type===a)};function c(a){return e.droppables[a]||null}function l(a){const d=c(a);return d||h(),d}const u={register:a=>{e.droppables[a.descriptor.id]=a},unregister:a=>{const d=c(a.descriptor.id);d&&a.uniqueId===d.uniqueId&&delete e.droppables[a.descriptor.id]},getById:l,findById:c,exists:a=>!!c(a),getAllByType:a=>Object.values(e.droppables).filter(d=>d.descriptor.type===a)};function p(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:u,subscribe:r,clean:p}}function Nc(){const e=w(Oc,[]);return v.useEffect(()=>function(){e.clean()},[e]),e}var _t=N.createContext(null),Ge=()=>{const e=document.body;return e||h(),e};const Bc={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Tc=e=>`rfd-announcement-${e}`;function Lc(e){const t=w(()=>Tc(e),[e]),r=v.useRef(null);return v.useEffect(function(){const i=document.createElement("div");return r.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),Tr(i.style,Bc),Ge().appendChild(i),function(){setTimeout(function(){const l=Ge();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[t]),x(o=>{const i=r.current;if(i){i.textContent=o;return}},[])}const Mc={separator:"::"};function Wt(e,t=Mc){const r=N.useId();return w(()=>`${e}${t.separator}${r}`,[t.separator,e,r])}function Gc({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Fc({contextId:e,text:t}){const r=Wt("hidden-text",{separator:"-"}),n=w(()=>Gc({contextId:e,uniqueId:r}),[r,e]);return v.useEffect(function(){const i=document.createElement("div");return i.id=n,i.textContent=t,i.style.display="none",Ge().appendChild(i),function(){const c=Ge();c.contains(i)&&c.removeChild(i)}},[n,t]),n}var Ve=N.createContext(null);function On(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),t}function _c(){let e=null;function t(){return!!e}function r(s){return s===e}function n(s){e&&h();const c={abandon:s};return e=c,c}function o(){e||h(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:r,claim:n,release:o,tryAbandon:i}}function Ie(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const Wc=9,$c=13,$t=27,Nn=32,kc=33,Uc=34,Vc=35,Hc=36,zc=37,qc=38,Yc=39,jc=40,Jc={[$c]:!0,[Wc]:!0};var Bn=e=>{Jc[e.keyCode]&&e.preventDefault()};const He=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(n=>`on${n}`in document)||e})(),Tn=0,Er=5;function Xc(e,t){return Math.abs(t.x-e.x)>=Er||Math.abs(t.y-e.y)>=Er}const Cr={type:"IDLE"};function Kc({cancel:e,completed:t,getPhase:r,setPhase:n}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:s,clientY:c}=o;if(i!==Tn)return;const l={x:s,y:c},u=r();if(u.type==="DRAGGING"){o.preventDefault(),u.actions.move(l);return}u.type!=="PENDING"&&h();const p=u.point;if(!Xc(p,l))return;o.preventDefault();const a=u.actions.fluidLift(l);n({type:"DRAGGING",actions:a})}},{eventName:"mouseup",fn:o=>{const i=r();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{r().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>{if(r().type==="PENDING"){e();return}if(o.keyCode===$t){o.preventDefault(),e();return}Bn(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{r().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=r();if(i.type==="IDLE"&&h(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:He,fn:e}]}function Zc(e){const t=v.useRef(Cr),r=v.useRef(X),n=w(()=>({eventName:"mousedown",fn:function(a){if(a.defaultPrevented||a.button!==Tn||a.ctrlKey||a.metaKey||a.shiftKey||a.altKey)return;const d=e.findClosestDraggableId(a);if(!d)return;const f=e.tryGetLock(d,s,{sourceEvent:a});if(!f)return;a.preventDefault();const g={x:a.clientX,y:a.clientY};r.current(),u(f,g)}}),[e]),o=w(()=>({eventName:"webkitmouseforcewillbegin",fn:p=>{if(p.defaultPrevented)return;const a=e.findClosestDraggableId(p);if(!a)return;const d=e.findOptionsForDraggable(a);d&&(d.shouldRespectForcePress||e.canGetLock(a)&&p.preventDefault())}}),[e]),i=x(function(){const a={passive:!1,capture:!0};r.current=z(window,[o,n],a)},[o,n]),s=x(()=>{t.current.type!=="IDLE"&&(t.current=Cr,r.current(),i())},[i]),c=x(()=>{const p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),l=x(function(){const a={capture:!0,passive:!1},d=Kc({cancel:c,completed:s,getPhase:()=>t.current,setPhase:f=>{t.current=f}});r.current=z(window,d,a)},[c,s]),u=x(function(a,d){t.current.type!=="IDLE"&&h(),t.current={type:"PENDING",point:d,actions:a},l()},[l]);k(function(){return i(),function(){r.current()}},[i])}function Qc(){}const el={[Uc]:!0,[kc]:!0,[Hc]:!0,[Vc]:!0};function tl(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===$t){o.preventDefault(),r();return}if(o.keyCode===Nn){o.preventDefault(),n();return}if(o.keyCode===jc){o.preventDefault(),e.moveDown();return}if(o.keyCode===qc){o.preventDefault(),e.moveUp();return}if(o.keyCode===Yc){o.preventDefault(),e.moveRight();return}if(o.keyCode===zc){o.preventDefault(),e.moveLeft();return}if(el[o.keyCode]){o.preventDefault();return}Bn(o)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:He,fn:r}]}function rl(e){const t=v.useRef(Qc),r=w(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Nn)return;const s=e.findClosestDraggableId(i);if(!s)return;const c=e.tryGetLock(s,p,{sourceEvent:i});if(!c)return;i.preventDefault();let l=!0;const u=c.snapLift();t.current();function p(){l||h(),l=!1,t.current(),n()}t.current=z(window,tl(u,p),{capture:!0,passive:!1})}}),[e]),n=x(function(){const i={passive:!1,capture:!0};t.current=z(window,[r],i)},[r]);k(function(){return n(),function(){t.current()}},[n])}const at={type:"IDLE"},nl=120,ol=.15;function il({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:r=>{r.preventDefault()}},{eventName:"keydown",fn:r=>{if(t().type!=="DRAGGING"){e();return}r.keyCode===$t&&r.preventDefault(),e()}},{eventName:He,fn:e}]}function sl({cancel:e,completed:t,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:n=>{const o=r();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:s}=n.touches[0],c={x:i,y:s};n.preventDefault(),o.actions.move(c)}},{eventName:"touchend",fn:n=>{const o=r();if(o.type!=="DRAGGING"){e();return}n.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:n=>{if(r().type!=="DRAGGING"){e();return}n.preventDefault(),e()}},{eventName:"touchforcechange",fn:n=>{const o=r();o.type==="IDLE"&&h();const i=n.touches[0];if(!i||!(i.force>=ol))return;const c=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){c&&e();return}if(c){if(o.hasMoved){n.preventDefault();return}e();return}n.preventDefault()}},{eventName:He,fn:e}]}function cl(e){const t=v.useRef(at),r=v.useRef(X),n=x(function(){return t.current},[]),o=x(function(f){t.current=f},[]),i=w(()=>({eventName:"touchstart",fn:function(f){if(f.defaultPrevented)return;const g=e.findClosestDraggableId(f);if(!g)return;const b=e.tryGetLock(g,c,{sourceEvent:f});if(!b)return;const m=f.touches[0],{clientX:y,clientY:D}=m,E={x:y,y:D};r.current(),a(b,E)}}),[e]),s=x(function(){const f={capture:!0,passive:!1};r.current=z(window,[i],f)},[i]),c=x(()=>{const d=t.current;d.type!=="IDLE"&&(d.type==="PENDING"&&clearTimeout(d.longPressTimerId),o(at),r.current(),s())},[s,o]),l=x(()=>{const d=t.current;c(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[c]),u=x(function(){const f={capture:!0,passive:!1},g={cancel:l,completed:c,getPhase:n},b=z(window,sl(g),f),m=z(window,il(g),f);r.current=function(){b(),m()}},[l,n,c]),p=x(function(){const f=n();f.type!=="PENDING"&&h();const g=f.actions.fluidLift(f.point);o({type:"DRAGGING",actions:g,hasMoved:!1})},[n,o]),a=x(function(f,g){n().type!=="IDLE"&&h();const b=setTimeout(p,nl);o({type:"PENDING",point:g,actions:f,longPressTimerId:b}),u()},[u,n,o,p]);k(function(){return s(),function(){r.current();const g=n();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),o(at))}},[n,s,o]),k(function(){return z(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const ll=["input","button","textarea","select","option","optgroup","video","audio"];function Ln(e,t){if(t==null)return!1;if(ll.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:Ln(e,t.parentElement)}function al(e,t){const r=t.target;return Ue(r)?Ln(e,r):!1}var ul=e=>Y(e.getBoundingClientRect()).center;function dl(e){return e instanceof Pn(e).Element}const pl=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(n=>n in Element.prototype)||e})();function Mn(e,t){return e==null?null:e[pl](t)?e:Mn(e.parentElement,t)}function fl(e,t){return e.closest?e.closest(t):Mn(e,t)}function gl(e){return`[${oe.contextId}="${e}"]`}function ml(e,t){const r=t.target;if(!dl(r))return null;const n=gl(e),o=fl(r,n);return!o||!Ue(o)?null:o}function bl(e,t){const r=ml(e,t);return r?r.getAttribute(oe.draggableId):null}function hl(e,t){const r=`[${vt.contextId}="${e}"]`,o=Rn(document,r).find(i=>i.getAttribute(vt.id)===t);return!o||!Ue(o)?null:o}function vl(e){e.preventDefault()}function Ae({expected:e,phase:t,isLockActive:r,shouldWarn:n}){return!(!r()||e!==t)}function Gn({lockAPI:e,store:t,registry:r,draggableId:n}){if(e.isClaimed())return!1;const o=r.draggable.findById(n);return!(!o||!o.options.isEnabled||!En(t.getState(),n))}function yl({lockAPI:e,contextId:t,store:r,registry:n,draggableId:o,forceSensorStop:i,sourceEvent:s}){if(!Gn({lockAPI:e,store:r,registry:n,draggableId:o}))return null;const l=n.draggable.getById(o),u=hl(t,l.descriptor.id);if(!u||s&&!l.options.canDragInteractiveElements&&al(u,s))return null;const p=e.claim(i||X);let a="PRE_DRAG";function d(){return l.options.shouldRespectForcePress}function f(){return e.isActive(p)}function g(S,C){Ae({expected:S,phase:a,isLockActive:f,shouldWarn:!0})&&r.dispatch(C())}const b=g.bind(null,"DRAGGING");function m(S){function C(){e.release(),a="COMPLETED"}a!=="PRE_DRAG"&&(C(),h()),r.dispatch(fs(S.liftActionArgs)),a="DRAGGING";function R(P,U={shouldBlockNextClick:!1}){if(S.cleanup(),U.shouldBlockNextClick){const O=z(window,[{eventName:"click",fn:vl,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}C(),r.dispatch(bn({reason:P}))}return{isActive:()=>Ae({expected:"DRAGGING",phase:a,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:d,drop:P=>R("DROP",P),cancel:P=>R("CANCEL",P),...S.actions}}function y(S){const C=be(P=>{b(()=>mn({client:P}))});return{...m({liftActionArgs:{id:o,clientSelection:S,movementMode:"FLUID"},cleanup:()=>C.cancel(),actions:{move:C}}),move:C}}function D(){const S={moveUp:()=>b(Is),moveRight:()=>b(Es),moveDown:()=>b(Ss),moveLeft:()=>b(Cs)};return m({liftActionArgs:{id:o,clientSelection:ul(u),movementMode:"SNAP"},cleanup:X,actions:S})}function E(){Ae({expected:"PRE_DRAG",phase:a,isLockActive:f,shouldWarn:!0})&&e.release()}return{isActive:()=>Ae({expected:"PRE_DRAG",phase:a,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:d,fluidLift:y,snapLift:D,abort:E}}const Dl=[Zc,rl,cl];function xl({contextId:e,store:t,registry:r,customSensors:n,enableDefaultSensors:o}){const i=[...o?Dl:[],...n||[]],s=v.useState(()=>_c())[0],c=x(function(m,y){Ie(m)&&!Ie(y)&&s.tryAbandon()},[s]);k(function(){let m=t.getState();return t.subscribe(()=>{const D=t.getState();c(m,D),m=D})},[s,t,c]),k(()=>s.tryAbandon,[s.tryAbandon]);const l=x(b=>Gn({lockAPI:s,registry:r,store:t,draggableId:b}),[s,r,t]),u=x((b,m,y)=>yl({lockAPI:s,registry:r,contextId:e,store:t,draggableId:b,forceSensorStop:m||null,sourceEvent:y&&y.sourceEvent?y.sourceEvent:null}),[e,s,r,t]),p=x(b=>bl(e,b),[e]),a=x(b=>{const m=r.draggable.findById(b);return m?m.options:null},[r.draggable]),d=x(function(){s.isClaimed()&&(s.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(Nt()))},[s,t]),f=x(()=>s.isClaimed(),[s]),g=w(()=>({canGetLock:l,tryGetLock:u,findClosestDraggableId:p,findOptionsForDraggable:a,tryReleaseLock:d,isLockClaimed:f}),[l,u,p,a,d,f]);for(let b=0;b<i.length;b++)i[b](g)}const Il=e=>({onBeforeCapture:t=>{const r=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Br.flushSync(r)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),Sl=e=>({...xe,...e.autoScrollerOptions,durationDampening:{...xe.durationDampening,...e.autoScrollerOptions}});function fe(e){return e.current||h(),e.current}function El(e){const{contextId:t,setCallbacks:r,sensors:n,nonce:o,dragHandleUsageInstructions:i}=e,s=v.useRef(null),c=On(e),l=x(()=>Il(c.current),[c]),u=x(()=>Sl(c.current),[c]),p=Lc(t),a=Fc({contextId:t,text:i}),d=Ac(t,o),f=x(O=>{fe(s).dispatch(O)},[]),g=w(()=>Kt({publishWhileDragging:ms,updateDroppableScroll:hs,updateDroppableIsEnabled:vs,updateDroppableIsCombineEnabled:ys,collectionStarting:bs},f),[f]),b=Nc(),m=w(()=>ic(b,g),[b,g]),y=w(()=>Ic({scrollWindow:sc,scrollDroppable:m.scrollDroppable,getAutoScrollerOptions:u,...Kt({move:mn},f)}),[m.scrollDroppable,f,u]),D=Pc(t),E=w(()=>tc({announce:p,autoScroller:y,dimensionMarshal:m,focusMarshal:D,getResponders:l,styleMarshal:d}),[p,y,m,D,l,d]);s.current=E;const I=x(()=>{const O=fe(s);O.getState().phase!=="IDLE"&&O.dispatch(Nt())},[]),S=x(()=>{const O=fe(s).getState();return O.phase==="DROP_ANIMATING"?!0:O.phase==="IDLE"?!1:O.isDragging},[]),C=w(()=>({isDragging:S,tryAbort:I}),[S,I]);r(C);const R=x(O=>En(fe(s).getState(),O),[]),P=x(()=>ee(fe(s).getState()),[]),U=w(()=>({marshal:m,focus:D,contextId:t,canLift:R,isMovementAllowed:P,dragHandleUsageInstructionsId:a,registry:b}),[t,m,a,D,R,P,b]);return xl({contextId:t,store:E,registry:b,customSensors:n||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),v.useEffect(()=>I,[I]),N.createElement(Ve.Provider,{value:U},N.createElement(Jo,{context:_t,store:E},e.children))}function Cl(){return N.useId()}function ma(e){const t=Cl(),r=e.dragHandleUsageInstructions||Pe.dragHandleUsageInstructions;return N.createElement(ri,null,n=>N.createElement(El,{nonce:e.nonce,contextId:t,setCallbacks:n,dragHandleUsageInstructions:r,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const wr={dragging:5e3,dropAnimating:4500},wl=(e,t)=>t?me.drop(t.duration):e?me.snap:me.fluid,Al=(e,t)=>{if(e)return t?De.opacity.drop:De.opacity.combining},Rl=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function Pl(e){const r=e.dimension.client,{offset:n,combineWith:o,dropping:i}=e,s=!!o,c=Rl(e),l=!!i,u=l?bt.drop(n,s):bt.moveTo(n);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:wl(c,i),transform:u,opacity:Al(s,l),zIndex:l?wr.dropAnimating:wr.dragging,pointerEvents:"none"}}function Ol(e){return{transform:bt.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function Nl(e){return e.type==="DRAGGING"?Pl(e):Ol(e)}function Bl(e,t,r=L){const n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=Ur(o,n),s=Be(i,r),c={client:i,tagName:t.tagName.toLowerCase(),display:n.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:c,displaceBy:l,client:i,page:s}}function Tl(e){const t=Wt("draggable"),{descriptor:r,registry:n,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:c}=e,l=w(()=>({canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:c}),[i,c,s]),u=x(f=>{const g=o();return g||h(),Bl(r,g,f)},[r,o]),p=w(()=>({uniqueId:t,descriptor:r,options:l,getDimension:u}),[r,u,l,t]),a=v.useRef(p),d=v.useRef(!0);k(()=>(n.draggable.register(a.current),()=>n.draggable.unregister(a.current)),[n.draggable]),k(()=>{if(d.current){d.current=!1;return}const f=a.current;a.current=p,n.draggable.update(p,f)},[p,n.draggable])}var kt=N.createContext(null);function Fe(e){const t=v.useContext(e);return t||h(),t}function Ll(e){e.preventDefault()}const Ml=e=>{const t=v.useRef(null),r=x((C=null)=>{t.current=C},[]),n=x(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:s}=Fe(Ve),{type:c,droppableId:l}=Fe(kt),u=w(()=>({id:e.draggableId,index:e.index,type:c,droppableId:l}),[e.draggableId,e.index,c,l]),{children:p,draggableId:a,isEnabled:d,shouldRespectForcePress:f,canDragInteractiveElements:g,isClone:b,mapped:m,dropAnimationFinished:y}=e;if(!b){const C=w(()=>({descriptor:u,registry:s,getDraggableRef:n,canDragInteractiveElements:g,shouldRespectForcePress:f,isEnabled:d}),[u,s,n,g,f,d]);Tl(C)}const D=w(()=>d?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":a,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:Ll}:null,[o,i,a,d]),E=x(C=>{m.type==="DRAGGING"&&m.dropping&&C.propertyName==="transform"&&Br.flushSync(y)},[y,m]),I=w(()=>{const C=Nl(m),R=m.type==="DRAGGING"&&m.dropping?E:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":a,style:C,onTransitionEnd:R},dragHandleProps:D}},[o,D,a,m,E,r]),S=w(()=>({draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}),[u.droppableId,u.id,u.index,u.type]);return N.createElement(N.Fragment,null,p(I,m.snapshot,S))};var Fn=(e,t)=>e===t,_n=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};const Gl=e=>e.combine?e.combine.draggableId:null,Fl=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function _l(){const e=T((o,i)=>({x:o,y:i})),t=T((o,i,s=null,c=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:o,draggingOver:s,combineWith:c,combineTargetFor:null})),r=T((o,i,s,c,l=null,u=null,p=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:u,mode:i,offset:o,dimension:s,forceShouldAnimate:p,snapshot:t(i,c,l,u,null)}}));return(o,i)=>{if(Ie(o)){if(o.critical.draggable.id!==i.draggableId)return null;const s=o.current.client.offset,c=o.dimensions.draggables[i.draggableId],l=$(o.impact),u=Fl(o.impact),p=o.forceShouldAnimate;return r(e(s.x,s.y),o.movementMode,c,i.isClone,l,u,p)}if(o.phase==="DROP_ANIMATING"){const s=o.completed;if(s.result.draggableId!==i.draggableId)return null;const c=i.isClone,l=o.dimensions.draggables[i.draggableId],u=s.result,p=u.mode,a=_n(u),d=Gl(u),g={duration:o.dropDuration,curve:Tt.drop,moveTo:o.newHomeClientOffset,opacity:d?De.opacity.drop:null,scale:d?De.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:l,dropping:g,draggingOver:a,combineWith:d,mode:p,forceShouldAnimate:null,snapshot:t(p,c,a,d,g)}}}return null}}function Wn(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Wl={mapped:{type:"SECONDARY",offset:L,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Wn(null)}};function $l(){const e=T((s,c)=>({x:s,y:c})),t=T(Wn),r=T((s,c=null,l)=>({mapped:{type:"SECONDARY",offset:s,combineTargetFor:c,shouldAnimateDisplacement:l,snapshot:t(c)}})),n=s=>s?r(L,s,!0):null,o=(s,c,l,u)=>{const p=l.displaced.visible[s],a=!!(u.inVirtualList&&u.effected[s]),d=We(l),f=d&&d.draggableId===s?c:null;if(!p){if(!a)return n(f);if(l.displaced.invisible[s])return null;const m=ie(u.displacedBy.point),y=e(m.x,m.y);return r(y,f,!0)}if(a)return n(f);const g=l.displacedBy.point,b=e(g.x,g.y);return r(b,f,p.shouldAnimate)};return(s,c)=>{if(Ie(s))return s.critical.draggable.id===c.draggableId?null:o(c.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){const l=s.completed;return l.result.draggableId===c.draggableId?null:o(c.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const kl=()=>{const e=_l(),t=$l();return(n,o)=>e(n,o)||t(n,o)||Wl},Ul={dropAnimationFinished:hn},Vl=kr(kl,Ul,null,{context:_t,areStatePropsEqual:Fn})(Ml);function $n(e){return Fe(kt).isUsingCloneFor===e.draggableId&&!e.isClone?null:N.createElement(Vl,e)}function ba(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,r=!!e.disableInteractiveElementBlocking,n=!!e.shouldRespectForcePress;return N.createElement($n,Tr({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))}const kn=e=>t=>e===t,Hl=kn("scroll"),zl=kn("auto"),Ar=(e,t)=>t(e.overflowX)||t(e.overflowY),ql=e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return Ar(r,Hl)||Ar(r,zl)},Yl=()=>!1,Un=e=>e==null?null:e===document.body?Yl()?e:null:e===document.documentElement?null:ql(e)?e:Un(e.parentElement);var yt=e=>({x:e.scrollLeft,y:e.scrollTop});const Vn=e=>e?window.getComputedStyle(e).position==="fixed"?!0:Vn(e.parentElement):!1;var jl=e=>{const t=Un(e),r=Vn(e);return{closestScrollable:t,isFixedOnPage:r}},Jl=({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:n,direction:o,client:i,page:s,closest:c})=>{const l=(()=>{if(!c)return null;const{scrollSize:d,client:f}=c,g=xn({scrollHeight:d.scrollHeight,scrollWidth:d.scrollWidth,height:f.paddingBox.height,width:f.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:f,scrollSize:d,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:g,diff:{value:L,displacement:L}}}})(),u=o==="vertical"?wt:Qr,p=re({page:s,withPlaceholder:null,axis:u,frame:l});return{descriptor:e,isCombineEnabled:r,isFixedOnPage:n,axis:u,isEnabled:t,client:i,page:s,frame:l,subject:p}};const Xl=(e,t)=>{const r=Vr(e);if(!t||e!==t)return r;const n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,s=o+t.scrollWidth,l=It({top:n,right:s,bottom:i,left:o},r.border);return St({borderBox:l,margin:r.margin,border:r.border,padding:r.padding})};var Kl=({ref:e,descriptor:t,env:r,windowScroll:n,direction:o,isDropDisabled:i,isCombineEnabled:s,shouldClipSubject:c})=>{const l=r.closestScrollable,u=Xl(e,l),p=Be(u,n),a=(()=>{if(!l)return null;const f=Vr(l),g={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:f,page:Be(f,n),scroll:yt(l),scrollSize:g,shouldClipSubject:c}})();return Jl({descriptor:t,isEnabled:!i,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:o,client:u,page:p,closest:a})};const Zl={passive:!1},Ql={passive:!0};var Rr=e=>e.shouldPublishImmediately?Zl:Ql;const Re=e=>e&&e.env.closestScrollable||null;function ea(e){const t=v.useRef(null),r=Fe(Ve),n=Wt("droppable"),{registry:o,marshal:i}=r,s=On(e),c=w(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=v.useRef(c),u=w(()=>T((I,S)=>{t.current||h();const C={x:I,y:S};i.updateDroppableScroll(c.id,C)}),[c.id,i]),p=x(()=>{const I=t.current;return!I||!I.env.closestScrollable?L:yt(I.env.closestScrollable)},[]),a=x(()=>{const I=p();u(I.x,I.y)},[p,u]),d=w(()=>be(a),[a]),f=x(()=>{const I=t.current,S=Re(I);if(I&&S||h(),I.scrollOptions.shouldPublishImmediately){a();return}d()},[d,a]),g=x((I,S)=>{t.current&&h();const C=s.current,R=C.getDroppableRef();R||h();const P=jl(R),U={ref:R,descriptor:c,env:P,scrollOptions:S};t.current=U;const O=Kl({ref:R,descriptor:c,env:P,windowScroll:I,direction:C.direction,isDropDisabled:C.isDropDisabled,isCombineEnabled:C.isCombineEnabled,shouldClipSubject:!C.ignoreContainerClipping}),B=P.closestScrollable;return B&&(B.setAttribute(Ir.contextId,r.contextId),B.addEventListener("scroll",f,Rr(U.scrollOptions))),O},[r.contextId,c,f,s]),b=x(()=>{const I=t.current,S=Re(I);return I&&S||h(),yt(S)},[]),m=x(()=>{const I=t.current;I||h();const S=Re(I);t.current=null,S&&(d.cancel(),S.removeAttribute(Ir.contextId),S.removeEventListener("scroll",f,Rr(I.scrollOptions)))},[f,d]),y=x(I=>{const S=t.current;S||h();const C=Re(S);C||h(),C.scrollTop+=I.y,C.scrollLeft+=I.x},[]),D=w(()=>({getDimensionAndWatchScroll:g,getScrollWhileDragging:b,dragStopped:m,scroll:y}),[m,g,b,y]),E=w(()=>({uniqueId:n,descriptor:c,callbacks:D}),[D,c,n]);k(()=>(l.current=E.descriptor,o.droppable.register(E),()=>{t.current&&m(),o.droppable.unregister(E)}),[D,c,m,E,i,o.droppable]),k(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),k(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function ut(){}const Pr={width:0,height:0,margin:ai},ta=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||r==="close"?Pr:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},ra=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const n=ta({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:r!=="none"?me.placeholder:null}},na=e=>{const t=v.useRef(null),r=x(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:o,onClose:i,contextId:s}=e,[c,l]=v.useState(e.animate==="open");v.useEffect(()=>c?n!=="open"?(r(),l(!1),ut):t.current?ut:(t.current=setTimeout(()=>{t.current=null,l(!1)}),r):ut,[n,c,r]);const u=x(a=>{a.propertyName==="height"&&(o(),n==="close"&&i())},[n,i,o]),p=ra({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return N.createElement(e.placeholder.tagName,{style:p,"data-rfd-placeholder-context-id":s,onTransitionEnd:u,ref:e.innerRef})};var oa=N.memo(na);class ia extends N.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,r){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const sa=e=>{const t=v.useContext(Ve);t||h();const{contextId:r,isMovementAllowed:n}=t,o=v.useRef(null),i=v.useRef(null),{children:s,droppableId:c,type:l,mode:u,direction:p,ignoreContainerClipping:a,isDropDisabled:d,isCombineEnabled:f,snapshot:g,useClone:b,updateViewportMaxScroll:m,getContainerForClone:y}=e,D=x(()=>o.current,[]),E=x((B=null)=>{o.current=B},[]);x(()=>i.current,[]);const I=x((B=null)=>{i.current=B},[]),S=x(()=>{n()&&m({maxScroll:Sn()})},[n,m]);ea({droppableId:c,type:l,mode:u,direction:p,isDropDisabled:d,isCombineEnabled:f,ignoreContainerClipping:a,getDroppableRef:D});const C=w(()=>N.createElement(ia,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:B,data:_,animate:J})=>N.createElement(oa,{placeholder:_,onClose:B,innerRef:I,animate:J,contextId:r,onTransitionEnd:S})),[r,S,e.placeholder,e.shouldAnimatePlaceholder,I]),R=w(()=>({innerRef:E,placeholder:C,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":r}}),[r,c,C,E]),P=b?b.dragging.draggableId:null,U=w(()=>({droppableId:c,type:l,isUsingCloneFor:P}),[c,P,l]);function O(){if(!b)return null;const{dragging:B,render:_}=b,J=N.createElement($n,{draggableId:B.draggableId,index:B.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(ze,j)=>_(ze,j,B));return jn.createPortal(J,y())}return N.createElement(kt.Provider,{value:U},s(R,g),O())};function ca(){return document.body||h(),document.body}const Or={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ca},Hn=e=>{let t={...e},r;for(r in Or)e[r]===void 0&&(t={...t,[r]:Or[r]});return t},dt=(e,t)=>e===t.droppable.type,Nr=(e,t)=>t.draggables[e.draggable.id],la=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=T(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),n=T((i,s,c,l,u,p)=>{const a=u.descriptor.id;if(u.descriptor.droppableId===i){const g=p?{render:p,dragging:r(u.descriptor)}:null,b={isDraggingOver:c,draggingOverWith:c?a:null,draggingFromThisWith:a,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:b,useClone:g}}if(!s)return t;if(!l)return e;const f={isDraggingOver:c,draggingOverWith:a,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:f,useClone:null}});return(i,s)=>{const c=Hn(s),l=c.droppableId,u=c.type,p=!c.isDropDisabled,a=c.renderClone;if(Ie(i)){const d=i.critical;if(!dt(u,d))return t;const f=Nr(d,i.dimensions),g=$(i.impact)===l;return n(l,p,g,g,f,a)}if(i.phase==="DROP_ANIMATING"){const d=i.completed;if(!dt(u,d.critical))return t;const f=Nr(d.critical,i.dimensions);return n(l,p,_n(d.result)===l,$(d.impact)===l,f,a)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const d=i.completed;if(!dt(u,d.critical))return t;const f=$(d.impact)===l,g=!!(d.impact.at&&d.impact.at.type==="COMBINE"),b=d.critical.droppable.id===l;return f?g?e:t:b?e:t}return t}},aa={updateViewportMaxScroll:xs},ha=kr(la,aa,(e,t,r)=>({...Hn(r),...e,...t}),{context:_t,areStatePropsEqual:Fn})(sa);export{ha as C,ma as D,ga as G,ba as P};
