You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
100 KiB
2 lines
100 KiB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("use-sync-external-store/shim"),require("use-sync-external-store/shim/with-selector")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","use-sync-external-store/shim","use-sync-external-store/shim/with-selector"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactBeautifulDnd={},e.React,e.ReactDOM,e.shim)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(t),a=o(r);function s(){}function l(e,t,r){const n=t.map((t=>{const n=(o=r,i=t.options,{...o,...i});var o,i;return e.addEventListener(t.eventName,t.fn,n),function(){e.removeEventListener(t.eventName,t.fn,n)}}));return function(){n.forEach((e=>{e()}))}}const c="Invariant failed";class d extends Error{}function u(e,t){if(!e)throw new d(c)}d.prototype.toString=function(){return this.message};class p extends i.default.Component{constructor(){super(...arguments),this.callbacks=null,this.unbind=s,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof d&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=l(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof d))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const f=e=>e+1,g=(e,t)=>{const r=e.droppableId===t.droppableId,n=f(e.index),o=f(t.index);return r?`\n You have moved the item from position ${n}\n to position ${o}\n `:`\n You have moved the item from position ${n}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},m=(e,t,r)=>t.droppableId===r.droppableId?`\n The item ${e}\n has been combined with ${r.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${r.draggableId}\n in list ${r.droppableId}\n `,b=e=>`\n The item has returned to its starting position\n of ${f(e.index)}\n`,h={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${f(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return g(e.source,t);const r=e.combine;return r?m(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${b(e.source)}\n `;const t=e.destination,r=e.combine;return t?`\n You have dropped the item.\n ${g(e.source,t)}\n `:r?`\n You have dropped the item.\n ${m(e.draggableId,e.source,r)}\n `:`\n The item has been dropped while not over a drop area.\n ${b(e.source)}\n `}};var y=h;function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function D(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 w="function"==typeof Symbol&&Symbol.observable||"@@observable",E=function(){return Math.random().toString(36).substring(7).split("").join(".")},S={INIT:"@@redux/INIT"+E(),REPLACE:"@@redux/REPLACE"+E(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+E()}};function C(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function O(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(D(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(D(1));return r(O)(e,t)}if("function"!=typeof e)throw new Error(D(2));var o=e,i=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(D(3));return i}function u(e){if("function"!=typeof e)throw new Error(D(4));if(l)throw new Error(D(5));var t=!0;return c(),s.push(e),function(){if(t){if(l)throw new Error(D(6));t=!1,c();var r=s.indexOf(e);s.splice(r,1),a=null}}}function p(e){if(!C(e))throw new Error(D(7));if(void 0===e.type)throw new Error(D(8));if(l)throw new Error(D(9));try{l=!0,i=o(i,e)}finally{l=!1}for(var t=a=s,r=0;r<t.length;r++){(0,t[r])()}return e}function f(e){if("function"!=typeof e)throw new Error(D(10));o=e,p({type:S.REPLACE})}function g(){var e,t=u;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(D(11));function r(){e.next&&e.next(d())}return r(),{unsubscribe:t(r)}}})[w]=function(){return this},e}return p({type:S.INIT}),(n={dispatch:p,subscribe:u,getState:d,replaceReducer:f})[w]=g,n}function A(e,t){return function(){return t(e.apply(this,arguments))}}function P(e,t){if("function"==typeof e)return A(e,t);if("object"!=typeof e||null===e)throw new Error(D(16));var r={};for(var n in e){var o=e[n];"function"==typeof o&&(r[n]=A(o,t))}return r}function R(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}let N=function(e){e()};const B=()=>N,T=t.createContext(null);function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(this,arguments)}function M(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var G,_={exports:{}},F={};!function(e){e.exports=function(){if(G)return F;G=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case n:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case s:case d:case g:case f:case a:return e;default:return p}}case r:return p}}}function x(e){return v(e)===c}return F.AsyncMode=l,F.ConcurrentMode=c,F.ContextConsumer=s,F.ContextProvider=a,F.Element=t,F.ForwardRef=d,F.Fragment=n,F.Lazy=g,F.Memo=f,F.Portal=r,F.Profiler=i,F.StrictMode=o,F.Suspense=u,F.isAsyncMode=function(e){return x(e)||v(e)===l},F.isConcurrentMode=x,F.isContextConsumer=function(e){return v(e)===s},F.isContextProvider=function(e){return v(e)===a},F.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},F.isForwardRef=function(e){return v(e)===d},F.isFragment=function(e){return v(e)===n},F.isLazy=function(e){return v(e)===g},F.isMemo=function(e){return v(e)===f},F.isPortal=function(e){return v(e)===r},F.isProfiler=function(e){return v(e)===i},F.isStrictMode=function(e){return v(e)===o},F.isSuspense=function(e){return v(e)===u},F.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===d||e.$$typeof===b||e.$$typeof===h||e.$$typeof===y||e.$$typeof===m)},F.typeOf=v,F}()}(_);var $=_.exports,W={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},k={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},j={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},U={};function H(e){return $.isMemo(e)?j:U[e.$$typeof]||W}U[$.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},U[$.Memo]=j;var q=Object.defineProperty,V=Object.getOwnPropertyNames,z=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,J=Object.getPrototypeOf,X=Object.prototype;var K,Q=function e(t,r,n){if("string"!=typeof r){if(X){var o=J(r);o&&o!==X&&e(t,o,n)}var i=V(r);z&&(i=i.concat(z(r)));for(var a=H(t),s=H(r),l=0;l<i.length;++l){var c=i[l];if(!(k[c]||n&&n[c]||s&&s[c]||a&&a[c])){var d=Y(r,c);try{q(t,c,d)}catch(e){}}}}return t},Z={exports:{}},ee={};!function(e){e.exports=function(){if(K)return ee;K=1;var e,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var g=e.$$typeof;switch(g){case t:switch(e=e.type){case n:case i:case o:case d:case u:return e;default:switch(e=e&&e.$$typeof){case l:case s:case c:case f:case p:case a:return e;default:return g}}case r:return g}}}return e=Symbol.for("react.module.reference"),ee.ContextConsumer=s,ee.ContextProvider=a,ee.Element=t,ee.ForwardRef=c,ee.Fragment=n,ee.Lazy=f,ee.Memo=p,ee.Portal=r,ee.Profiler=i,ee.StrictMode=o,ee.Suspense=d,ee.SuspenseList=u,ee.isAsyncMode=function(){return!1},ee.isConcurrentMode=function(){return!1},ee.isContextConsumer=function(e){return m(e)===s},ee.isContextProvider=function(e){return m(e)===a},ee.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ee.isForwardRef=function(e){return m(e)===c},ee.isFragment=function(e){return m(e)===n},ee.isLazy=function(e){return m(e)===f},ee.isMemo=function(e){return m(e)===p},ee.isPortal=function(e){return m(e)===r},ee.isProfiler=function(e){return m(e)===i},ee.isStrictMode=function(e){return m(e)===o},ee.isSuspense=function(e){return m(e)===d},ee.isSuspenseList=function(e){return m(e)===u},ee.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===i||t===o||t===d||t===u||t===g||"object"==typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},ee.typeOf=m,ee}()}(Z);const te=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function re(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,d,u,p=!1;function f(p,f){const g=!i(f,l),m=!o(p,s,f,l);return s=p,l=f,g&&m?(c=e(s,l),t.dependsOnOwnProps&&(d=t(n,l)),u=r(c,d,l),u):g?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(d=t(n,l)),u=r(c,d,l),u):m?function(){const t=e(s,l),n=!a(t,c);return c=t,n&&(u=r(c,d,l)),u}():u}return function(o,i){return p?f(o,i):(s=o,l=i,c=e(s,l),d=t(n,l),u=r(c,d,l),p=!0,u)}}function ne(e){return function(t){const r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function oe(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function ie(e,t){return function(t,{displayName:r}){const n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=oe(e);let o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=oe(o),o=n(t,r)),o},n}}function ae(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function se(e,t,r){return L({},r,e,t)}const le={notify(){},get:()=>[]};function ce(e,t){let r,n=le;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=t?t.addNestedSub(o):e.subscribe(o),n=function(){const e=B();let t=null,r=null;return{clear(){t=null,r=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],r=t;for(;r;)e.push(r),r=r.next;return e},subscribe(e){let n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}const a={addNestedSub:function(e){return i(),n.subscribe(e)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=le)},getListeners:()=>n};return a}const de=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?t.useLayoutEffect:t.useEffect;function ue(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function pe(e,t){if(ue(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!ue(e[r[n]],t[r[n]]))return!1;return!0}const fe=["reactReduxForwardedRef"];let ge=()=>{throw new Error("uSES not initialized!")};const me=[null,null];function be(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function he(e,t){return e===t}function ye(e,r,n,{pure:o,areStatesEqual:a=he,areOwnPropsEqual:s=pe,areStatePropsEqual:l=pe,areMergedPropsEqual:c=pe,forwardRef:d=!1,context:u=T}={}){const p=u,f=function(e){return e?"function"==typeof e?ie(e):ae(e,"mapStateToProps"):ne((()=>({})))}(e),g=function(e){return e&&"object"==typeof e?ne((t=>function(e,t){const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=(...e)=>t(o(...e)))}return r}(e,t))):e?"function"==typeof e?ie(e):ae(e,"mapDispatchToProps"):ne((e=>({dispatch:e})))}(r),m=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:r,areMergedPropsEqual:n}){let o,i=!1;return function(t,r,a){const s=e(t,r,a);return i?n(s,o)||(o=s):(i=!0,o=s),o}}}(e):ae(e,"mergeProps"):()=>se}(n),b=Boolean(e);return e=>{const r=e.displayName||e.name||"Component",n=`Connect(${r})`,o={shouldHandleStateChanges:b,displayName:n,wrappedComponentName:r,WrappedComponent:e,initMapStateToProps:f,initMapDispatchToProps:g,initMergeProps:m,areStatesEqual:a,areStatePropsEqual:l,areOwnPropsEqual:s,areMergedPropsEqual:c};function u(r){const[n,a,s]=t.useMemo((()=>{const{reactReduxForwardedRef:e}=r,t=M(r,fe);return[r.context,e,t]}),[r]),l=t.useMemo((()=>n&&n.Consumer&&Z.exports.isContextConsumer(i.default.createElement(n.Consumer,null))?n:p),[n,p]),c=t.useContext(l),d=Boolean(r.store)&&Boolean(r.store.getState)&&Boolean(r.store.dispatch),u=Boolean(c)&&Boolean(c.store),f=d?r.store:c.store,g=u?c.getServerState:f.getState,m=t.useMemo((()=>function(e,t){let{initMapStateToProps:r,initMapDispatchToProps:n,initMergeProps:o}=t,i=M(t,te);return re(r(e,i),n(e,i),o(e,i),e,i)}(f.dispatch,o)),[f]),[h,y]=t.useMemo((()=>{if(!b)return me;const e=ce(f,d?void 0:c.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,d,c]),v=t.useMemo((()=>d?c:L({},c,{subscription:h})),[d,c,h]),x=t.useRef(),I=t.useRef(s),D=t.useRef(),w=t.useRef(!1);t.useRef(!1);const E=t.useRef(!1),S=t.useRef();de((()=>(E.current=!0,()=>{E.current=!1})),[]);const C=t.useMemo((()=>()=>D.current&&s===I.current?D.current:m(f.getState(),s)),[f,s]),O=t.useMemo((()=>e=>h?function(e,t,r,n,o,i,a,s,l,c,d){if(!e)return()=>{};let u=!1,p=null;const f=()=>{if(u||!s.current)return;const e=t.getState();let r,f;try{r=n(e,o.current)}catch(e){f=e,p=e}f||(p=null),r===i.current?a.current||c():(i.current=r,l.current=r,a.current=!0,d())};return r.onStateChange=f,r.trySubscribe(),f(),()=>{if(u=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}(b,f,h,m,I,x,w,E,D,y,e):()=>{}),[h]);var A,P,R;let N;A=be,P=[I,x,w,s,D,y],de((()=>A(...P)),R);try{N=ge(O,C,g?()=>m(g(),s):C)}catch(e){throw S.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${S.current.stack}\n\n`),e}de((()=>{S.current=void 0,D.current=void 0,x.current=N}));const B=t.useMemo((()=>i.default.createElement(e,L({},N,{ref:a}))),[a,e,N]);return t.useMemo((()=>b?i.default.createElement(l.Provider,{value:v},B):B),[l,B,v])}const h=i.default.memo(u);if(h.WrappedComponent=e,h.displayName=u.displayName=n,d){const t=i.default.forwardRef((function(e,t){return i.default.createElement(h,L({},e,{reactReduxForwardedRef:t}))}));return t.displayName=n,t.WrappedComponent=e,Q(t,e)}return Q(h,e)}}function ve({store:e,context:r,children:n,serverState:o}){const a=t.useMemo((()=>{const t=ce(e);return{store:e,subscription:t,getServerState:o?()=>o:void 0}}),[e,o]),s=t.useMemo((()=>e.getState()),[e]);de((()=>{const{subscription:t}=a;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),s!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[a,s]);const l=r||T;return i.default.createElement(l.Provider,{value:a},n)}var xe,Ie;function De(e,r){var n=t.useState((function(){return{inputs:r,result:e()}}))[0],o=t.useRef(!0),i=t.useRef(n),a=o.current||Boolean(r&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(r,i.current.inputs))?i.current:{inputs:r,result:e()};return t.useEffect((function(){o.current=!1,i.current=a}),[a]),a.result}xe=n.useSyncExternalStore,ge=xe,Ie=r.unstable_batchedUpdates,N=Ie;var we=De,Ee=function(e,t){return De((function(){return e}),t)};const Se={x:0,y:0},Ce=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Oe=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Ae=(e,t)=>e.x===t.x&&e.y===t.y,Pe=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Re=function(e,t,r){return void 0===r&&(r=0),"x"===e?{x:t,y:r}:{x:r,y:t}},Ne=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Be=(e,t)=>Math.min(...t.map((t=>Ne(e,t)))),Te=e=>t=>({x:e(t.x),y:e(t.y)});var Le=function(e){var t=e.top,r=e.right,n=e.bottom,o=e.left;return{top:t,right:r,bottom:n,left:o,width:r-o,height:n-t,x:o,y:t,center:{x:(r+o)/2,y:(n+t)/2}}},Me=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Ge=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},_e={top:0,right:0,bottom:0,left:0},Fe=function(e){var t=e.borderBox,r=e.margin,n=void 0===r?_e:r,o=e.border,i=void 0===o?_e:o,a=e.padding,s=void 0===a?_e:a,l=Le(Me(t,n)),c=Le(Ge(t,i)),d=Le(Ge(c,s));return{marginBox:l,borderBox:Le(t),paddingBox:c,contentBox:d,margin:n,border:i,padding:s}},$e=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var r=Number(t);return isNaN(r)&&function(e,t){if(!e)throw new Error("Invariant failed")}(!1),r},We=function(e,t){var r,n,o=e.borderBox,i=e.border,a=e.margin,s=e.padding,l=(n=t,{top:(r=o).top+n.y,left:r.left+n.x,bottom:r.bottom+n.y,right:r.right+n.x});return Fe({borderBox:l,border:i,margin:a,padding:s})},ke=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),We(e,t)},je=function(e,t){var r={top:$e(t.marginTop),right:$e(t.marginRight),bottom:$e(t.marginBottom),left:$e(t.marginLeft)},n={top:$e(t.paddingTop),right:$e(t.paddingRight),bottom:$e(t.paddingBottom),left:$e(t.paddingLeft)},o={top:$e(t.borderTopWidth),right:$e(t.borderRightWidth),bottom:$e(t.borderBottomWidth),left:$e(t.borderLeftWidth)};return Fe({borderBox:e,margin:r,padding:n,border:o})},Ue=function(e){var t=e.getBoundingClientRect(),r=window.getComputedStyle(e);return je(t,r)};const He=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),qe=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}],Ve=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const r=Le({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})(t.pageMarginBox,e):Le(e);var ze=e=>{let{page:t,withPlaceholder:r,axis:n,frame:o}=e;const i=((e,t)=>t?He(e,t.scroll.diff.displacement):e)(t.marginBox,o),a=((e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e)(i,n,r);return{page:t,withPlaceholder:r,active:Ve(a,o)}},Ye=(e,t)=>{e.frame||u(!1);const r=e.frame,n=Oe(t,r.scroll.initial),o=Pe(n),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}},a=ze({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}},Je=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Xe(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(n=e[r],o=t[r],!(n===o||Je(n)&&Je(o)))return!1;var n,o;return!0}function Ke(e,t){void 0===t&&(t=Xe);var r=null;function n(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(r&&r.lastThis===this&&t(n,r.lastArgs))return r.lastResult;var i=e.apply(this,n);return r={lastResult:i,lastArgs:n,lastThis:this},i}return n.clear=function(){r=null},n}const Qe=Ke((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),Ze=Ke((e=>e.reduce(((e,t)=>(e[t.descriptor.id]=t,e)),{}))),et=Ke((e=>Object.values(e))),tt=Ke((e=>Object.values(e)));var rt=Ke(((e,t)=>{const r=tt(t).filter((t=>e===t.descriptor.droppableId)).sort(((e,t)=>e.descriptor.index-t.descriptor.index));return r}));function nt(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function ot(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var it=Ke(((e,t)=>t.filter((t=>t.descriptor.id!==e.descriptor.id)))),at=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const st={point:Se,value:0},lt={invisible:{},visible:{},all:[]};var ct={displaced:lt,displacedBy:st,at:null},dt=(e,t)=>r=>e<=r&&r<=t,ut=e=>{const t=dt(e.top,e.bottom),r=dt(e.left,e.right);return n=>{if(t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right))return!0;const o=t(n.top)||t(n.bottom),i=r(n.left)||r(n.right);if(o&&i)return!0;const a=n.top<e.top&&n.bottom>e.bottom,s=n.left<e.left&&n.right>e.right;if(a&&s)return!0;return a&&i||s&&o}},pt=e=>{const t=dt(e.top,e.bottom),r=dt(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&r(e.left)&&r(e.right)};const ft={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},gt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const mt=e=>{let{target:t,destination:r,viewport:n,withDroppableDisplacement:o,isVisibleThroughFrameFn:i}=e;const a=o?((e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:Se;return He(e,r)})(t,r):t;return((e,t,r)=>!!t.subject.active&&r(t.subject.active)(e))(a,r,i)&&((e,t,r)=>r(t)(e))(a,n,i)},bt=e=>mt({...e,isVisibleThroughFrameFn:ut}),ht=e=>mt({...e,isVisibleThroughFrameFn:pt});function yt(e){let{afterDragging:t,destination:r,displacedBy:n,viewport:o,forceShouldAnimate:i,last:a}=e;return t.reduce((function(e,t){const s=function(e,t){const r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Le(Me(r,n))}(t,n),l=t.descriptor.id;e.all.push(l);if(!bt({target:s,destination:r,viewport:o,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;const c=((e,t,r)=>{if("boolean"==typeof r)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})(l,a,i),d={draggableId:l,shouldAnimate:c};return e.visible[l]=d,e}),{all:[],visible:{},invisible:{}})}function vt(e){let{insideDestination:t,inHomeList:r,displacedBy:n,destination:o}=e;const i=function(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}(t,{inHomeList:r});return{displaced:lt,displacedBy:n,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function xt(e){let{draggable:t,insideDestination:r,destination:n,viewport:o,displacedBy:i,last:a,index:s,forceShouldAnimate:l}=e;const c=at(t,n);if(null==s)return vt({insideDestination:r,inHomeList:c,displacedBy:i,destination:n});const d=r.find((e=>e.descriptor.index===s));if(!d)return vt({insideDestination:r,inHomeList:c,displacedBy:i,destination:n});const u=it(t,r),p=r.indexOf(d);return{displaced:yt({afterDragging:u.slice(p),destination:n,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:l}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:s}}}}function It(e,t){return Boolean(t.effected[e])}var Dt=e=>{let{isMovingForward:t,isInHomeList:r,draggable:n,draggables:o,destination:i,insideDestination:a,previousImpact:s,viewport:l,afterCritical:c}=e;const d=s.at;if(d||u(!1),"REORDER"===d.type){const e=(e=>{let{isMovingForward:t,isInHomeList:r,insideDestination:n,location:o}=e;if(!n.length)return null;const i=o.index,a=t?i+1:i-1,s=n[0].descriptor.index,l=n[n.length-1].descriptor.index;return a<s||a>(r?l:l+1)?null:a})({isMovingForward:t,isInHomeList:r,location:d.destination,insideDestination:a});return null==e?null:xt({draggable:n,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:e})}const p=(e=>{let{isMovingForward:t,destination:r,draggables:n,combine:o,afterCritical:i}=e;if(!r.isCombineEnabled)return null;const a=o.draggableId,s=n[a].descriptor.index;return It(a,i)?t?s:s-1:t?s+1:s})({isMovingForward:t,destination:i,displaced:s.displaced,draggables:o,combine:d.combine,afterCritical:c});return null==p?null:xt({draggable:n,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:p})},wt=e=>{let{afterCritical:t,impact:r,draggables:n}=e;const o=ot(r);o||u(!1);const i=o.draggableId,a=n[i].page.borderBox.center,s=(e=>{let{displaced:t,afterCritical:r,combineWith:n,displacedBy:o}=e;const i=Boolean(t.visible[n]||t.invisible[n]);return It(n,r)?i?Se:Pe(o.point):i?o.point:Se})({displaced:r.displaced,afterCritical:t,combineWith:i,displacedBy:r.displacedBy});return Ce(a,s)};const Et=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,St=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,Ct=e=>{let{axis:t,moveRelativeTo:r,isMoving:n}=e;return Re(t.line,r.marginBox[t.end]+Et(t,n),St(t,r.marginBox,n))},Ot=e=>{let{axis:t,moveRelativeTo:r,isMoving:n}=e;return Re(t.line,r.marginBox[t.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(t,n),St(t,r.marginBox,n))};var At=e=>{let{impact:t,draggable:r,draggables:n,droppable:o,afterCritical:i}=e;const a=rt(o.descriptor.id,n),s=r.page,l=o.axis;if(!a.length)return(e=>{let{axis:t,moveInto:r,isMoving:n}=e;return Re(t.line,r.contentBox[t.start]+Et(t,n),St(t,r.contentBox,n))})({axis:l,moveInto:o.page,isMoving:s});const{displaced:c,displacedBy:d}=t,u=c.all[0];if(u){const e=n[u];if(It(u,i))return Ot({axis:l,moveRelativeTo:e.page,isMoving:s});const t=We(e.page,d.point);return Ot({axis:l,moveRelativeTo:t,isMoving:s})}const p=a[a.length-1];if(p.descriptor.id===r.descriptor.id)return s.borderBox.center;if(It(p.descriptor.id,i)){const e=We(p.page,Pe(i.displacedBy.point));return Ct({axis:l,moveRelativeTo:e,isMoving:s})}return Ct({axis:l,moveRelativeTo:p.page,isMoving:s})},Pt=(e,t)=>{const r=e.frame;return r?Ce(t,r.scroll.diff.displacement):t};var Rt=e=>{const t=(e=>{let{impact:t,draggable:r,droppable:n,draggables:o,afterCritical:i}=e;const a=r.page.borderBox.center,s=t.at;return n&&s?"REORDER"===s.type?At({impact:t,draggable:r,draggables:o,droppable:n,afterCritical:i}):wt({impact:t,draggables:o,afterCritical:i}):a})(e),r=e.droppable;return r?Pt(r,t):t},Nt=(e,t)=>{const r=Oe(t,e.scroll.initial),n=Pe(r);return{frame:Le({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 Bt(e,t){return e.map((e=>t[e]))}var Tt=e=>{let{pageBorderBoxCenter:t,draggable:r,viewport:n}=e;const o=((e,t)=>Ce(e.scroll.diff.displacement,t))(n,t),i=Oe(o,r.page.borderBox.center);return Ce(r.client.borderBox.center,i)},Lt=e=>{let{draggable:t,destination:r,newPageBorderBoxCenter:n,viewport:o,withDroppableDisplacement:i,onlyOnMainAxis:a=!1}=e;const s=Oe(n,t.page.borderBox.center),l={target:He(t.page.borderBox,s),destination:r,withDroppableDisplacement:i,viewport:o};return a?(e=>{return mt({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const r=dt(e.top,e.bottom),n=dt(e.left,e.right);return e=>t===ft?r(e.top)&&r(e.bottom):n(e.left)&&n(e.right)})});var t})(l):ht(l)},Mt=e=>{let{isMovingForward:t,draggable:r,destination:n,draggables:o,previousImpact:i,viewport:a,previousPageBorderBoxCenter:s,previousClientSelection:l,afterCritical:c}=e;if(!n.isEnabled)return null;const d=rt(n.descriptor.id,o),p=at(r,n),f=(e=>{let{isMovingForward:t,draggable:r,destination:n,insideDestination:o,previousImpact:i}=e;if(!n.isCombineEnabled)return null;if(!nt(i))return null;function a(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return{...i,at:t}}const s=i.displaced.all,l=s.length?s[0]:null;if(t)return l?a(l):null;const c=it(r,o);if(!l)return c.length?a(c[c.length-1].descriptor.id):null;const d=c.findIndex((e=>e.descriptor.id===l));-1===d&&u(!1);const p=d-1;return p<0?null:a(c[p].descriptor.id)})({isMovingForward:t,draggable:r,destination:n,insideDestination:d,previousImpact:i})||Dt({isMovingForward:t,isInHomeList:p,draggable:r,draggables:o,destination:n,insideDestination:d,previousImpact:i,viewport:a,afterCritical:c});if(!f)return null;const g=Rt({impact:f,draggable:r,droppable:n,draggables:o,afterCritical:c});if(Lt({draggable:r,destination:n,newPageBorderBoxCenter:g,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:Tt({pageBorderBoxCenter:g,draggable:r,viewport:a}),impact:f,scrollJumpRequest:null}}const m=Oe(g,s),b=(e=>{let{impact:t,viewport:r,destination:n,draggables:o,maxScrollChange:i}=e;const a=Nt(r,Ce(r.scroll.current,i)),s=n.frame?Ye(n,Ce(n.frame.scroll.current,i)):n,l=t.displaced,c=yt({afterDragging:Bt(l.all,o),destination:n,displacedBy:t.displacedBy,viewport:a.frame,last:l,forceShouldAnimate:!1}),d=yt({afterDragging:Bt(l.all,o),destination:s,displacedBy:t.displacedBy,viewport:r.frame,last:l,forceShouldAnimate:!1}),u={},p={},f=[l,c,d];return l.all.forEach((e=>{const t=function(e,t){for(let r=0;r<t.length;r++){const n=t[r].visible[e];if(n)return n}return null}(e,f);t?p[e]=t:u[e]=!0})),{...t,displaced:{all:l.all,invisible:u,visible:p}}})({impact:f,viewport:a,destination:n,draggables:o,maxScrollChange:m});return{clientSelection:l,impact:b,scrollJumpRequest:m}};const Gt=e=>{const t=e.subject.active;return t||u(!1),t};const _t=(e,t)=>{const r=e.page.borderBox.center;return It(e.descriptor.id,t)?Oe(r,t.displacedBy.point):r},Ft=(e,t)=>{const r=e.page.borderBox;return It(e.descriptor.id,t)?He(r,Pe(t.displacedBy.point)):r};var $t=Ke((function(e,t){const r=t[e.line];return{value:r,point:Re(e.line,r)}}));const Wt=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),kt=(e,t,r)=>{const n=e.frame;at(t,e)&&u(!1),e.subject.withPlaceholder&&u(!1);const o=$t(e.axis,t.displaceBy).point,i=((e,t,r)=>{const n=e.axis;if("virtual"===e.descriptor.mode)return Re(n.line,t[n.line]);const o=e.subject.page.contentBox[n.size],i=rt(e.descriptor.id,r).reduce(((e,t)=>e+t.client.marginBox[n.size]),0)+t[n.line]-o;return i<=0?null:Re(n.line,i)})(e,o,r),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!n){const t=ze({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?Ce(n.scroll.max,i):n.scroll.max,l=Wt(n,s),c=ze({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var jt=e=>{let{isMovingForward:t,previousPageBorderBoxCenter:r,draggable:n,isOver:o,draggables:i,droppables:a,viewport:s,afterCritical:l}=e;const c=(e=>{let{isMovingForward:t,pageBorderBoxCenter:r,source:n,droppables:o,viewport:i}=e;const a=n.subject.active;if(!a)return null;const s=n.axis,l=dt(a[s.start],a[s.end]),c=et(o).filter((e=>e!==n)).filter((e=>e.isEnabled)).filter((e=>Boolean(e.subject.active))).filter((e=>ut(i.frame)(Gt(e)))).filter((e=>{const r=Gt(e);return t?a[s.crossAxisEnd]<r[s.crossAxisEnd]:r[s.crossAxisStart]<a[s.crossAxisStart]})).filter((e=>{const t=Gt(e),r=dt(t[s.start],t[s.end]);return l(t[s.start])||l(t[s.end])||r(a[s.start])||r(a[s.end])})).sort(((e,r)=>{const n=Gt(e)[s.crossAxisStart],o=Gt(r)[s.crossAxisStart];return t?n-o:o-n})).filter(((e,t,r)=>Gt(e)[s.crossAxisStart]===Gt(r[0])[s.crossAxisStart]));if(!c.length)return null;if(1===c.length)return c[0];const d=c.filter((e=>dt(Gt(e)[s.start],Gt(e)[s.end])(r[s.line])));return 1===d.length?d[0]:d.length>1?d.sort(((e,t)=>Gt(e)[s.start]-Gt(t)[s.start]))[0]:c.sort(((e,t)=>{const n=Be(r,qe(Gt(e))),o=Be(r,qe(Gt(t)));return n!==o?n-o:Gt(e)[s.start]-Gt(t)[s.start]}))[0]})({isMovingForward:t,pageBorderBoxCenter:r,source:o,droppables:a,viewport:s});if(!c)return null;const d=rt(c.descriptor.id,i),u=(e=>{let{pageBorderBoxCenter:t,viewport:r,destination:n,insideDestination:o,afterCritical:i}=e;const a=o.filter((e=>ht({target:Ft(e,i),destination:n,viewport:r.frame,withDroppableDisplacement:!0}))).sort(((e,r)=>{const o=Ne(t,Pt(n,_t(e,i))),a=Ne(t,Pt(n,_t(r,i)));return o<a?-1:a<o?1:e.descriptor.index-r.descriptor.index}));return a[0]||null})({pageBorderBoxCenter:r,viewport:s,destination:c,insideDestination:d,afterCritical:l}),p=(e=>{let{previousPageBorderBoxCenter:t,moveRelativeTo:r,insideDestination:n,draggable:o,draggables:i,destination:a,viewport:s,afterCritical:l}=e;if(!r){if(n.length)return null;const e={displaced:lt,displacedBy:st,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},t=Rt({impact:e,draggable:o,droppable:a,draggables:i,afterCritical:l}),r=at(o,a)?a:kt(a,o,i);return Lt({draggable:o,destination:r,newPageBorderBoxCenter:t,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const c=Boolean(t[a.axis.line]<=r.page.borderBox.center[a.axis.line]),d=(()=>{const e=r.descriptor.index;return r.descriptor.id===o.descriptor.id||c?e:e+1})(),u=$t(a.axis,o.displaceBy);return xt({draggable:o,insideDestination:n,destination:a,viewport:s,displacedBy:u,last:lt,index:d})})({previousPageBorderBoxCenter:r,destination:c,draggable:n,draggables:i,moveRelativeTo:u,insideDestination:d,viewport:s,afterCritical:l});if(!p)return null;const f=Rt({impact:p,draggable:n,droppable:c,draggables:i,afterCritical:l});return{clientSelection:Tt({pageBorderBoxCenter:f,draggable:n,viewport:s}),impact:p,scrollJumpRequest:null}},Ut=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var Ht=e=>{let{state:t,type:r}=e;const n=((e,t)=>{const r=Ut(e);return r?t[r]:null})(t.impact,t.dimensions.droppables),o=Boolean(n),i=t.dimensions.droppables[t.critical.droppable.id],a=n||i,s=a.axis.direction,l="vertical"===s&&("MOVE_UP"===r||"MOVE_DOWN"===r)||"horizontal"===s&&("MOVE_LEFT"===r||"MOVE_RIGHT"===r);if(l&&!o)return null;const c="MOVE_DOWN"===r||"MOVE_RIGHT"===r,d=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,{draggables:p,droppables:f}=t.dimensions;return l?Mt({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:d,destination:a,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):jt({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:d,isOver:a,draggables:p,droppables:f,viewport:t.viewport,afterCritical:t.afterCritical})};function qt(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Vt(e){const t=dt(e.top,e.bottom),r=dt(e.left,e.right);return function(e){return t(e.y)&&r(e.x)}}function zt(e){let{pageBorderBox:t,draggable:r,droppables:n}=e;const o=et(n).filter((e=>{if(!e.isEnabled)return!1;const r=e.subject.active;if(!r)return!1;if(o=r,!((n=t).left<o.right&&n.right>o.left&&n.top<o.bottom&&n.bottom>o.top))return!1;var n,o;if(Vt(r)(t.center))return!0;const i=e.axis,a=r.center[i.crossAxisLine],s=t[i.crossAxisStart],l=t[i.crossAxisEnd],c=dt(r[i.crossAxisStart],r[i.crossAxisEnd]),d=c(s),u=c(l);return!d&&!u||(d?s<a:l>a)}));return o.length?1===o.length?o[0].descriptor.id:function(e){let{pageBorderBox:t,draggable:r,candidates:n}=e;const o=r.page.borderBox.center,i=n.map((e=>{const r=e.axis,n=Re(e.axis.line,t.center[r.line],e.page.borderBox.center[r.crossAxisLine]);return{id:e.descriptor.id,distance:Ne(o,n)}})).sort(((e,t)=>t.distance-e.distance));return i[0]?i[0].id:null}({pageBorderBox:t,draggable:r,candidates:o}):null}const Yt=(e,t)=>Le(He(e,t));function Jt(e){let{displaced:t,id:r}=e;return Boolean(t.visible[r]||t.invisible[r])}var Xt=e=>{let{pageOffset:t,draggable:r,draggables:n,droppables:o,previousImpact:i,viewport:a,afterCritical:s}=e;const l=Yt(r.page.borderBox,t),c=zt({pageBorderBox:l,draggable:r,droppables:o});if(!c)return ct;const d=o[c],u=rt(d.descriptor.id,n),p=((e,t)=>{const r=e.frame;return r?Yt(t,r.scroll.diff.value):t})(d,l);return(e=>{let{draggable:t,pageBorderBoxWithDroppableScroll:r,previousImpact:n,destination:o,insideDestination:i,afterCritical:a}=e;if(!o.isCombineEnabled)return null;const s=o.axis,l=$t(o.axis,t.displaceBy),c=l.value,d=r[s.start],u=r[s.end],p=it(t,i).find((e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[s.size]/4,i=It(t,a),l=Jt({displaced:n.displaced,id:t});return i?l?u>r[s.start]+o&&u<r[s.end]-o:d>r[s.start]-c+o&&d<r[s.end]-c-o:l?u>r[s.start]+c+o&&u<r[s.end]+c-o:d>r[s.start]+o&&d<r[s.end]-o}));return p?{displacedBy:l,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:o.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:p,draggable:r,previousImpact:i,destination:d,insideDestination:u,afterCritical:s})||(e=>{let{pageBorderBoxWithDroppableScroll:t,draggable:r,destination:n,insideDestination:o,last:i,viewport:a,afterCritical:s}=e;const l=n.axis,c=$t(n.axis,r.displaceBy),d=c.value,u=t[l.start],p=t[l.end],f=function(e){let{draggable:t,closest:r,inHomeList:n}=e;return r?n&&r.descriptor.index>t.descriptor.index?r.descriptor.index-1:r.descriptor.index:null}({draggable:r,closest:it(r,o).find((e=>{const t=e.descriptor.id,r=e.page.borderBox.center[l.line],n=It(t,s),o=Jt({displaced:i,id:t});return n?o?p<=r:u<r-d:o?p<=r+d:u<r}))||null,inHomeList:at(r,n)});return xt({draggable:r,insideDestination:o,destination:n,viewport:a,last:i,displacedBy:c,index:f})})({pageBorderBoxWithDroppableScroll:p,draggable:r,destination:d,insideDestination:u,last:i.displaced,viewport:a,afterCritical:s})},Kt=(e,t)=>({...e,[t.descriptor.id]:t});const Qt=e=>{let{previousImpact:t,impact:r,droppables:n}=e;const o=Ut(t),i=Ut(r);if(!o)return n;if(o===i)return n;const a=n[o];if(!a.subject.withPlaceholder)return n;const s=(e=>{const t=e.subject.withPlaceholder;t||u(!1);const r=e.frame;if(!r){const t=ze({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const n=t.oldFrameMaxScroll;n||u(!1);const o=Wt(r,n),i=ze({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(a);return Kt(n,s)};var Zt=e=>{let{state:t,clientSelection:r,dimensions:n,viewport:o,impact:i,scrollJumpRequest:a}=e;const s=o||t.viewport,l=n||t.dimensions,c=r||t.current.client.selection,d=Oe(c,t.initial.client.selection),u={offset:d,selection:c,borderBoxCenter:Ce(t.initial.client.borderBoxCenter,d)},p={selection:Ce(u.selection,s.scroll.current),borderBoxCenter:Ce(u.borderBoxCenter,s.scroll.current),offset:Ce(u.offset,s.scroll.diff.value)},f={client:u,page:p};if("COLLECTING"===t.phase)return{...t,dimensions:l,viewport:s,current:f};const g=l.draggables[t.critical.draggable.id],m=i||Xt({pageOffset:p.offset,draggable:g,draggables:l.draggables,droppables:l.droppables,previousImpact:t.impact,viewport:s,afterCritical:t.afterCritical}),b=(e=>{let{draggable:t,draggables:r,droppables:n,previousImpact:o,impact:i}=e;const a=Qt({previousImpact:o,impact:i,droppables:n}),s=Ut(i);if(!s)return a;const l=n[s];if(at(t,l))return a;if(l.subject.withPlaceholder)return a;const c=kt(l,t,r);return Kt(a,c)})({draggable:g,impact:m,previousImpact:t.impact,draggables:l.draggables,droppables:l.droppables});return{...t,current:f,dimensions:{draggables:l.draggables,droppables:b},impact:m,viewport:s,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null}};var er=e=>{let{impact:t,viewport:r,draggables:n,destination:o,forceShouldAnimate:i}=e;const a=t.displaced,s=function(e,t){return e.map((e=>t[e]))}(a.all,n),l=yt({afterDragging:s,destination:o,displacedBy:t.displacedBy,viewport:r.frame,forceShouldAnimate:i,last:a});return{...t,displaced:l}},tr=e=>{let{impact:t,draggable:r,droppable:n,draggables:o,viewport:i,afterCritical:a}=e;const s=Rt({impact:t,draggable:r,draggables:o,droppable:n,afterCritical:a});return Tt({pageBorderBoxCenter:s,draggable:r,viewport:i})},rr=e=>{let{state:t,dimensions:r,viewport:n}=e;"SNAP"!==t.movementMode&&u(!1);const o=t.impact,i=n||t.viewport,a=r||t.dimensions,{draggables:s,droppables:l}=a,c=s[t.critical.draggable.id],d=Ut(o);d||u(!1);const p=l[d],f=er({impact:o,viewport:i,destination:p,draggables:s}),g=tr({impact:f,draggable:c,droppable:p,draggables:s,viewport:i,afterCritical:t.afterCritical});return Zt({impact:f,clientSelection:g,state:t,dimensions:a,viewport:i})},nr=e=>{let{draggable:t,home:r,draggables:n,viewport:o}=e;const i=$t(r.axis,t.displaceBy),a=rt(r.descriptor.id,n),s=a.indexOf(t);-1===s&&u(!1);const l=a.slice(s+1),c=l.reduce(((e,t)=>(e[t.descriptor.id]=!0,e)),{}),d={inVirtualList:"virtual"===r.descriptor.mode,displacedBy:i,effected:c};var p;return{impact:{displaced:yt({afterDragging:l,destination:r,displacedBy:i,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:(p=t.descriptor,{index:p.index,droppableId:p.droppableId})}},afterCritical:d}};var or=e=>{let{additions:t,updatedDroppables:r,viewport:n}=e;const o=n.scroll.diff.value;return t.map((e=>{const t=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||u(!1),t})(r[t]),a=i.scroll.diff.value,s=(e=>{let{draggable:t,offset:r,initialWindowScroll:n}=e;const o=We(t.client,r),i=ke(o,n);return{...t,placeholder:{...t.placeholder,client:o},client:o,page:i}})({draggable:e,offset:Ce(o,a),initialWindowScroll:n.scroll.initial});return s}))};const ir=e=>"SNAP"===e.movementMode,ar=(e,t,r)=>{const n=((e,t)=>({draggables:e.draggables,droppables:Kt(e.droppables,t)}))(e.dimensions,t);return!ir(e)||r?Zt({state:e,dimensions:n}):rr({state:e,dimensions:n})};function sr(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const lr={phase:"IDLE",completed:null,shouldFlush:!1};var cr=function(e,t){if(void 0===e&&(e=lr),"FLUSH"===t.type)return{...lr,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&u(!1);const{critical:r,clientSelection:n,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[r.draggable.id],l=i.droppables[r.droppable.id],c={selection:n,borderBoxCenter:s.client.borderBox.center,offset:Se},d={client:c,page:{selection:Ce(c.selection,o.scroll.initial),borderBoxCenter:Ce(c.selection,o.scroll.initial),offset:Ce(c.selection,o.scroll.diff.value)}},p=et(i.droppables).every((e=>!e.isFixedOnPage)),{impact:f,afterCritical:g}=nr({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:a,dimensions:i,initial:d,current:d,isWindowScrollAllowed:p,impact:f,afterCritical:g,onLiftImpact:f,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&u(!1);return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&u(!1),(e=>{let{state:t,published:r}=e;const n=r.modified.map((e=>{const r=t.dimensions.droppables[e.droppableId];return Ye(r,e.scroll)})),o={...t.dimensions.droppables,...Qe(n)},i=Ze(or({additions:r.additions,updatedDroppables:o,viewport:t.viewport})),a={...t.dimensions.draggables,...i};r.removals.forEach((e=>{delete a[e]}));const s={droppables:o,draggables:a},l=Ut(t.impact),c=l?s.droppables[l]:null,d=s.draggables[t.critical.draggable.id],u=s.droppables[t.critical.droppable.id],{impact:p,afterCritical:f}=nr({draggable:d,home:u,draggables:a,viewport:t.viewport}),g=c&&c.isCombineEnabled?t.impact:p,m=Xt({pageOffset:t.current.page.offset,draggable:s.draggables[t.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:g,viewport:t.viewport,afterCritical:f}),b={...t,phase:"DRAGGING",impact:m,onLiftImpact:p,dimensions:s,afterCritical:f,forceShouldAnimate:!1};return"COLLECTING"===t.phase?b:{...b,phase:"DROP_PENDING",reason:t.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;qt(e)||u(!1);const{client:r}=t.payload;return Ae(r,e.current.client.selection)?e:Zt({state:e,clientSelection:r,impact:ir(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return sr(e);if("COLLECTING"===e.phase)return sr(e);qt(e)||u(!1);const{id:r,newScroll:n}=t.payload,o=e.dimensions.droppables[r];if(!o)return e;const i=Ye(o,n);return ar(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;qt(e)||u(!1);const{id:r,isEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||u(!1),o.isEnabled===n&&u(!1);const i={...o,isEnabled:n};return ar(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;qt(e)||u(!1);const{id:r,isCombineEnabled:n}=t.payload,o=e.dimensions.droppables[r];o||u(!1),o.isCombineEnabled===n&&u(!1);const i={...o,isCombineEnabled:n};return ar(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;qt(e)||u(!1),e.isWindowScrollAllowed||u(!1);const r=t.payload.newScroll;if(Ae(e.viewport.scroll.current,r))return sr(e);const n=Nt(e.viewport,r);return ir(e)?rr({state:e,viewport:n}):Zt({state:e,viewport:n})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!qt(e))return e;const r=t.payload.maxScroll;if(Ae(r,e.viewport.scroll.max))return e;const n={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:n}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&u(!1);const r=Ht({state:e,type:t.type});return r?Zt({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const r=t.payload.reason;"COLLECTING"!==e.phase&&u(!1);return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if("DROP_ANIMATE"===t.type){const{completed:r,dropDuration:n,newHomeClientOffset:o}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&u(!1);return{phase:"DROP_ANIMATING",completed:r,dropDuration:n,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};const dr=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),ur=()=>({type:"COLLECTION_STARTING",payload:null}),pr=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),fr=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),gr=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),mr=e=>({type:"MOVE",payload:e}),br=()=>({type:"MOVE_UP",payload:null}),hr=()=>({type:"MOVE_DOWN",payload:null}),yr=()=>({type:"MOVE_RIGHT",payload:null}),vr=()=>({type:"MOVE_LEFT",payload:null}),xr=e=>({type:"DROP_COMPLETE",payload:e}),Ir=e=>({type:"DROP",payload:e}),Dr=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const wr="cubic-bezier(.2,1,.1,1)",Er={drop:0,combining:.7},Sr={drop:.75},Cr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Or=`${Cr.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,Ar={fluid:`opacity ${Or}`,snap:`transform ${Or}, opacity ${Or}`,drop:e=>{const t=`${e}s ${wr}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Or}`,placeholder:`height ${Or}, width ${Or}, margin ${Or}`},Pr=e=>Ae(e,Se)?void 0:`translate(${e.x}px, ${e.y}px)`,Rr=Pr,Nr=(e,t)=>{const r=Pr(e);if(r)return t?`${r} scale(${Sr.drop})`:r},{minDropTime:Br,maxDropTime:Tr}=Cr,Lr=Tr-Br;var Mr=e=>{let{getState:t,dispatch:r}=e;return e=>n=>{if("DROP"!==n.type)return void e(n);const o=t(),i=n.payload.reason;if("COLLECTING"===o.phase)return void r((e=>({type:"DROP_PENDING",payload:e}))({reason:i}));if("IDLE"===o.phase)return;"DROP_PENDING"===o.phase&&o.isWaiting&&u(!1),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&u(!1);const a=o.critical,s=o.dimensions,l=s.draggables[o.critical.draggable.id],{impact:c,didDropInsideDroppable:d}=(e=>{let{draggables:t,reason:r,lastImpact:n,home:o,viewport:i,onLiftImpact:a}=e;if(!n.at||"DROP"!==r)return{impact:er({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1};return"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:lt},didDropInsideDroppable:!0}})({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}),p=d?nt(c):null,f=d?ot(c):null,g={index:a.draggable.index,droppableId:a.droppable.id},m={draggableId:l.descriptor.id,type:l.descriptor.type,source:g,reason:i,mode:o.movementMode,destination:p,combine:f},b=(e=>{let{impact:t,draggable:r,dimensions:n,viewport:o,afterCritical:i}=e;const{draggables:a,droppables:s}=n,l=Ut(t),c=l?s[l]:null,d=s[r.descriptor.droppableId],u=tr({impact:t,draggable:r,draggables:a,afterCritical:i,droppable:c||d,viewport:o});return Oe(u,r.client.borderBox.center)})({impact:c,draggable:l,dimensions:s,viewport:o.viewport,afterCritical:o.afterCritical}),h={critical:o.critical,afterCritical:o.afterCritical,result:m,impact:c};if(!(!Ae(o.current.client.offset,b)||Boolean(m.combine)))return void r(xr({completed:h}));const y=(e=>{let{current:t,destination:r,reason:n}=e;const o=Ne(t,r);if(o<=0)return Br;if(o>=1500)return Tr;const i=Br+Lr*(o/1500);return Number(("CANCEL"===n?.6*i:i).toFixed(2))})({current:o.current.client.offset,destination:b,reason:i});r((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:b,dropDuration:y,completed:h}))}},Gr=function(e){var t=[],r=null,n=function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];t=o,r||(r=requestAnimationFrame((function(){r=null,e.apply(void 0,t)})))};return n.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},n},_r=()=>({x:window.pageXOffset,y:window.pageYOffset});function Fr(e){let{onWindowScroll:t}=e;const r=Gr((function(){t(_r())})),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(r);let o=s;function i(){return o!==s}return{start:function(){i()&&u(!1),o=l(window,[n])},stop:function(){i()||u(!1),r.cancel(),o(),o=s},isActive:i}}var $r=e=>{const t=Fr({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>r=>{t.isActive()||"INITIAL_PUBLISH"!==r.type||t.start(),t.isActive()&&(e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(r)&&t.stop(),e(r)}},Wr=()=>{const e=[];return{add:t=>{const r=setTimeout((()=>(t=>{const r=e.findIndex((e=>e.timerId===t));-1===r&&u(!1);const[n]=e.splice(r,1);n.callback()})(r))),n={timerId:r,callback:t};e.push(n)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach((e=>{clearTimeout(e.timerId),e.callback()}))}}};const kr=(e,t)=>{t()},jr=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Ur(e,t,r,n){if(!e)return void r(n(t));const o=(e=>{let t=!1,r=!1;const n=setTimeout((()=>{r=!0})),o=o=>{t||r||(t=!0,e(o),clearTimeout(n))};return o.wasCalled=()=>t,o})(r);e(t,{announce:o}),o.wasCalled()||r(n(t))}var Hr=(e,t)=>{const r=((e,t)=>{const r=Wr();let n=null;const o=r=>{n||u(!1),n=null,kr(0,(()=>Ur(e().onDragEnd,r,t,y.onDragEnd)))};return{beforeCapture:(t,r)=>{n&&u(!1),kr(0,(()=>{const n=e().onBeforeCapture;n&&n({draggableId:t,mode:r})}))},beforeStart:(t,r)=>{n&&u(!1),kr(0,(()=>{const n=e().onBeforeDragStart;n&&n(jr(t,r))}))},start:(o,i)=>{n&&u(!1);const a=jr(o,i);n={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},r.add((()=>{kr(0,(()=>Ur(e().onDragStart,a,t,y.onDragStart)))}))},update:(o,i)=>{const a=nt(i),s=ot(i);n||u(!1);const l=!((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})(o,n.lastCritical);l&&(n.lastCritical=o);const c=(p=a,!(null==(d=n.lastLocation)&&null==p||null!=d&&null!=p&&d.droppableId===p.droppableId&&d.index===p.index));var d,p;c&&(n.lastLocation=a);const f=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(n.lastCombine,s);if(f&&(n.lastCombine=s),!l&&!c&&!f)return;const g={...jr(o,n.mode),combine:s,destination:a};r.add((()=>{kr(0,(()=>Ur(e().onDragUpdate,g,t,y.onDragUpdate)))}))},flush:()=>{n||u(!1),r.flush()},drop:o,abort:()=>{if(!n)return;const e={...jr(n.lastCritical,n.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>n=>{if("BEFORE_INITIAL_CAPTURE"===n.type)return void r.beforeCapture(n.payload.draggableId,n.payload.movementMode);if("INITIAL_PUBLISH"===n.type){const e=n.payload.critical;return r.beforeStart(e,n.payload.movementMode),t(n),void r.start(e,n.payload.movementMode)}if("DROP_COMPLETE"===n.type){const e=n.payload.completed.result;return r.flush(),t(n),void r.drop(e)}if(t(n),"FLUSH"===n.type)return void r.abort();const o=e.getState();"DRAGGING"===o.phase&&r.update(o.critical,o.impact)}};var qr=e=>t=>r=>{if("DROP_ANIMATION_FINISHED"!==r.type)return void t(r);const n=e.getState();"DROP_ANIMATING"!==n.phase&&u(!1),e.dispatch(xr({completed:n.completed}))};var Vr=e=>{let t=null,r=null;return n=>o=>{if("FLUSH"!==o.type&&"DROP_COMPLETE"!==o.type&&"DROP_ANIMATION_FINISHED"!==o.type||(r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)),n(o),"DROP_ANIMATE"!==o.type)return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};r=requestAnimationFrame((()=>{r=null,t=l(window,[i])}))}};var zr=e=>t=>r=>{if(t(r),"PUBLISH_WHILE_DRAGGING"!==r.type)return;const n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(Ir({reason:n.reason})))};const Yr=R;var Jr=e=>{let{dimensionMarshal:t,focusMarshal:r,styleMarshal:n,getResponders:o,announce:i,autoScroller:a}=e;return O(cr,Yr(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error(D(15))},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return n=R.apply(void 0,i)(r.dispatch),I(I({},r),{},{dispatch:n})}}}((s=n,()=>e=>t=>{"INITIAL_PUBLISH"===t.type&&s.dragging(),"DROP_ANIMATE"===t.type&&s.dropping(t.payload.completed.result.reason),"FLUSH"!==t.type&&"DROP_COMPLETE"!==t.type||s.resting(),e(t)}),(e=>()=>t=>r=>{"DROP_COMPLETE"!==r.type&&"FLUSH"!==r.type&&"DROP_ANIMATE"!==r.type||e.stopPublishing(),t(r)})(t),(e=>t=>{let{getState:r,dispatch:n}=t;return t=>o=>{if("LIFT"!==o.type)return void t(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=r();"DROP_ANIMATING"===l.phase&&n(xr({completed:l.completed})),"IDLE"!==r().phase&&u(!1),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:d,dimensions:p,viewport:f}=e.startPublishing(c);n({type:"INITIAL_PUBLISH",payload:{critical:d,dimensions:p,clientSelection:a,movementMode:s,viewport:f}})}})(t),Mr,qr,Vr,zr,(e=>t=>r=>n=>{if((e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(n))return e.stop(),void r(n);if("INITIAL_PUBLISH"===n.type){r(n);const o=t.getState();return"DRAGGING"!==o.phase&&u(!1),void e.start(o)}r(n),e.scroll(t.getState())})(a),$r,(e=>{let t=!1;return()=>r=>n=>{if("INITIAL_PUBLISH"===n.type)return t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),void e.tryRestoreFocusRecorded();if(r(n),t){if("FLUSH"===n.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===n.type){t=!1;const r=n.payload.completed.result;r.combine&&e.tryShiftRecord(r.draggableId,r.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(r),Hr(o,i))));var s};var Xr=e=>{let{scrollHeight:t,scrollWidth:r,height:n,width:o}=e;const i=Oe({x:r,y:t},{x:o,y:n});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},Kr=()=>{const e=document.documentElement;return e||u(!1),e},Qr=()=>{const e=Kr();return Xr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Zr=e=>{let{critical:t,scrollOptions:r,registry:n}=e;const o=(()=>{const e=_r(),t=Qr(),r=e.y,n=e.x,o=Kr(),i=o.clientWidth,a=o.clientHeight;return{frame:Le({top:r,left:n,right:n+i,bottom:r+a}),scroll:{initial:e,current:e,max:t,diff:{value:Se,displacement:Se}}}})(),i=o.scroll.current,a=t.droppable,s=n.droppable.getAllByType(a.type).map((e=>e.callbacks.getDimensionAndWatchScroll(i,r))),l=n.draggable.getAllByType(t.draggable.type).map((e=>e.getDimension(i)));return{dimensions:{draggables:Ze(l),droppables:Qe(s)},critical:t,viewport:o}};function en(e,t,r){if(r.descriptor.id===t.id)return!1;if(r.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(r.descriptor.droppableId).descriptor.mode}var tn=(e,t)=>{let r=null;const n=function(e){let{registry:t,callbacks:r}=e,n={additions:{},removals:{},modified:{}},o=null;const i=()=>{o||(r.collectionStarting(),o=requestAnimationFrame((()=>{o=null;const{additions:e,removals:i,modified:a}=n,s=Object.keys(e).map((e=>t.draggable.getById(e).getDimension(Se))).sort(((e,t)=>e.descriptor.index-t.descriptor.index)),l=Object.keys(a).map((e=>({droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}))),c={additions:s,removals:Object.keys(i),modified:l};n={additions:{},removals:{},modified:{}},r.publish(c)})))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],i()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],i()},stop:()=>{o&&(cancelAnimationFrame(o),o=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{r||u(!1);const o=r.critical.draggable;"ADDITION"===t.type&&en(e,o,t.value)&&n.add(t.value),"REMOVAL"===t.type&&en(e,o,t.value)&&n.remove(t.value)},i={updateDroppableIsEnabled:(n,o)=>{e.droppable.exists(n)||u(!1),r&&t.updateDroppableIsEnabled({id:n,isEnabled:o})},updateDroppableIsCombineEnabled:(n,o)=>{r&&(e.droppable.exists(n)||u(!1),t.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:o}))},scrollDroppable:(t,n)=>{r&&e.droppable.getById(t).callbacks.scroll(n)},updateDroppableScroll:(n,o)=>{r&&(e.droppable.exists(n)||u(!1),t.updateDroppableScroll({id:n,newScroll:o}))},startPublishing:t=>{r&&u(!1);const n=e.draggable.getById(t.draggableId),i=e.droppable.getById(n.descriptor.droppableId),a={draggable:n.descriptor,droppable:i.descriptor},s=e.subscribe(o);return r={critical:a,unsubscribe:s},Zr({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!r)return;n.stop();const t=r.critical.droppable;e.droppable.getAllByType(t.type).forEach((e=>e.callbacks.dragStopped())),r.unsubscribe(),r=null}};return i},rn=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),nn=e=>{window.scrollBy(e.x,e.y)};const on=Ke((e=>et(e).filter((e=>!!e.isEnabled&&!!e.frame))));var an=e=>{let{center:t,destination:r,droppables:n}=e;if(r){const e=n[r];return e.frame?e:null}const o=((e,t)=>{const r=on(t).find((t=>(t.frame||u(!1),Vt(t.frame.pageMarginBox)(e))))||null;return r})(t,n);return o};const sn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var ln=e=>{let{startOfRange:t,endOfRange:r,current:n}=e;const o=r-t;if(0===o)return 0;return(n-t)/o},cn=e=>{let{distanceToEdge:t,thresholds:r,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}=e;const a=function(e,t,r){void 0===r&&(r=()=>sn);const n=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return n.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=1-ln({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=n.maxPixelScroll*n.ease(o);return Math.ceil(i)}(t,r,i);return 0===a?0:o?Math.max(((e,t,r)=>{const n=r(),o=n.durationDampening.accelerateAt,i=n.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=ln({startOfRange:o,endOfRange:s,current:l}),d=e*n.ease(c);return Math.ceil(d)})(a,n,i),1):a},dn=e=>{let{container:t,distanceToEdges:r,dragStartTime:n,axis:o,shouldUseTimeDampening:i,getAutoScrollerOptions:a}=e;const s=function(e,t,r){void 0===r&&(r=()=>sn);const n=r();return{startScrollingFrom:e[t.size]*n.startFromPercentage,maxScrollValueAt:e[t.size]*n.maxScrollAtPercentage}}(t,o,a);return r[o.end]<r[o.start]?cn({distanceToEdge:r[o.end],thresholds:s,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a}):-1*cn({distanceToEdge:r[o.start],thresholds:s,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a})};const un=Te((e=>0===e?0:e));var pn=e=>{let{dragStartTime:t,container:r,subject:n,center:o,shouldUseTimeDampening:i,getAutoScrollerOptions:a}=e;const s={top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y,left:o.x-r.left},l=dn({container:r,distanceToEdges:s,dragStartTime:t,axis:ft,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),c=dn({container:r,distanceToEdges:s,dragStartTime:t,axis:gt,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),d=un({x:c,y:l});if(Ae(d,Se))return null;const u=(e=>{let{container:t,subject:r,proposedScroll:n}=e;const o=r.height>t.height,i=r.width>t.width;return i||o?i&&o?null:{x:i?0:n.x,y:o?0:n.y}:n})({container:r,subject:n,proposedScroll:d});return u?Ae(u,Se)?null:u:null};const fn=Te((e=>0===e?0:e>0?1:-1)),gn=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return t=>{let{current:r,max:n,change:o}=t;const i=Ce(r,o),a={x:e(i.x,n.x),y:e(i.y,n.y)};return Ae(a,Se)?null:a}})(),mn=e=>{let{max:t,current:r,change:n}=e;const o={x:Math.max(r.x,t.x),y:Math.max(r.y,t.y)},i=fn(n),a=gn({max:o,current:r,change:i});return!a||(0!==i.x&&0===a.x||0!==i.y&&0===a.y)},bn=(e,t)=>mn({current:e.scroll.current,max:e.scroll.max,change:t}),hn=(e,t)=>{const r=e.frame;return!!r&&mn({current:r.scroll.current,max:r.scroll.max,change:t})};var yn=e=>{let{state:t,dragStartTime:r,shouldUseTimeDampening:n,scrollWindow:o,scrollDroppable:i,getAutoScrollerOptions:a}=e;const s=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){const e=(e=>{let{viewport:t,subject:r,center:n,dragStartTime:o,shouldUseTimeDampening:i,getAutoScrollerOptions:a}=e;const s=pn({dragStartTime:o,container:t.frame,subject:r,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return s&&bn(t,s)?s:null})({dragStartTime:r,viewport:t.viewport,subject:l,center:s,shouldUseTimeDampening:n,getAutoScrollerOptions:a});if(e)return void o(e)}const c=an({center:s,destination:Ut(t.impact),droppables:t.dimensions.droppables});if(!c)return;const d=(e=>{let{droppable:t,subject:r,center:n,dragStartTime:o,shouldUseTimeDampening:i,getAutoScrollerOptions:a}=e;const s=t.frame;if(!s)return null;const l=pn({dragStartTime:o,container:s.pageMarginBox,subject:r,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return l&&hn(t,l)?l:null})({dragStartTime:r,droppable:c,subject:l,center:s,shouldUseTimeDampening:n,getAutoScrollerOptions:a});d&&i(c.descriptor.id,d)},vn=e=>{let{move:t,scrollDroppable:r,scrollWindow:n}=e;const o=(e,t)=>{if(!hn(e,t))return t;const n=((e,t)=>{const r=e.frame;return r&&hn(e,t)?gn({current:r.scroll.current,max:r.scroll.max,change:t}):null})(e,t);if(!n)return r(e.descriptor.id,t),null;const o=Oe(t,n);r(e.descriptor.id,o);return Oe(t,o)},i=(e,t,r)=>{if(!e)return r;if(!bn(t,r))return r;const o=((e,t)=>{if(!bn(e,t))return null;const r=e.scroll.max,n=e.scroll.current;return gn({current:n,max:r,change:t})})(t,r);if(!o)return n(r),null;const i=Oe(r,o);n(i);return Oe(r,i)};return e=>{const r=e.scrollJumpRequest;if(!r)return;const n=Ut(e.impact);n||u(!1);const a=o(e.dimensions.droppables[n],r);if(!a)return;const s=e.viewport,l=i(e.isWindowScrollAllowed,s,a);l&&((e,r)=>{const n=Ce(e.current.client.selection,r);t({client:n})})(e,l)}};const xn=(()=>{const e="data-rfd-drag-handle";return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),In=(()=>{const e="data-rfd-draggable";return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Dn=(()=>{const e="data-rfd-droppable";return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),wn={contextId:"data-rfd-scroll-container-context-id"},En=(e,t)=>e.map((e=>{const r=e.styles[t];return r?`${e.selector} { ${r} }`:""})).join(" ");var Sn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;const Cn=()=>{const e=document.querySelector("head");return e||u(!1),e},On=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function An(e,r){const n=we((()=>(e=>{const t=(r=e,e=>`[${e}="${r}"]`);var r;const n=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(xn.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),o=[(()=>{const e=`\n transition: ${Ar.outOfTheWay};\n `;return{selector:t(In.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),n,{selector:t(Dn.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:En(o,"always"),resting:En(o,"resting"),dragging:En(o,"dragging"),dropAnimating:En(o,"dropAnimating"),userCancel:En(o,"userCancel")}})(e)),[e]),o=t.useRef(null),i=t.useRef(null),a=Ee(Ke((e=>{const t=i.current;t||u(!1),t.textContent=e})),[]),s=Ee((e=>{const t=o.current;t||u(!1),t.textContent=e}),[]);Sn((()=>{(o.current||i.current)&&u(!1);const t=On(r),l=On(r);return o.current=t,i.current=l,t.setAttribute("data-rfd-always",e),l.setAttribute("data-rfd-dynamic",e),Cn().appendChild(t),Cn().appendChild(l),s(n.always),a(n.resting),()=>{const e=e=>{const t=e.current;t||u(!1),Cn().removeChild(t),e.current=null};e(o),e(i)}}),[r,s,a,n.always,n.resting,e]);const l=Ee((()=>a(n.dragging)),[a,n.dragging]),c=Ee((e=>{a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),d=Ee((()=>{i.current&&a(n.resting)}),[a,n.resting]);return we((()=>({dragging:l,dropping:c,resting:d})),[l,c,d])}function Pn(e,t){return Array.from(e.querySelectorAll(t))}var Rn=e=>{var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window};function Nn(e){return e instanceof Rn(e).HTMLElement}function Bn(e){const r=t.useRef({}),n=t.useRef(null),o=t.useRef(null),i=t.useRef(!1),a=Ee((function(e,t){const n={id:e,focus:t};return r.current[e]=n,function(){const t=r.current;t[e]!==n&&delete t[e]}}),[]),s=Ee((function(t){const r=function(e,t){const r=`[${xn.contextId}="${e}"]`,n=Pn(document,r);if(!n.length)return null;const o=n.find((e=>e.getAttribute(xn.draggableId)===t));return o&&Nn(o)?o:null}(e,t);r&&r!==document.activeElement&&r.focus()}),[e]),l=Ee((function(e,t){n.current===e&&(n.current=t)}),[]),c=Ee((function(){o.current||i.current&&(o.current=requestAnimationFrame((()=>{o.current=null;const e=n.current;e&&s(e)})))}),[s]),d=Ee((function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(xn.draggableId)===e&&(n.current=e)}),[]);Sn((()=>(i.current=!0,function(){i.current=!1;const e=o.current;e&&cancelAnimationFrame(e)})),[]);return we((()=>({register:a,tryRecordFocus:d,tryRestoreFocusRecorded:c,tryShiftRecord:l})),[a,d,c,l])}function Tn(){const e={draggables:{},droppables:{}},t=[];function r(e){t.length&&t.forEach((t=>t(e)))}function n(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,r({type:"ADDITION",value:t})},update:(t,r)=>{const n=e.draggables[r.descriptor.id];n&&n.uniqueId===t.uniqueId&&(delete e.draggables[r.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=n(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&r({type:"REMOVAL",value:t}))},getById:function(e){const t=n(e);return t||u(!1),t},findById:n,exists:e=>Boolean(n(e)),getAllByType:t=>Object.values(e.draggables).filter((e=>e.descriptor.type===t))},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const r=o(t.descriptor.id);r&&t.uniqueId===r.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||u(!1),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Object.values(e.droppables).filter((e=>e.descriptor.type===t))},subscribe:function(e){return t.push(e),function(){const r=t.indexOf(e);-1!==r&&t.splice(r,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Ln=i.default.createContext(null),Mn=()=>{const e=document.body;return e||u(!1),e};var Gn={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};let _n=0;const Fn={separator:"::"};var $n="useId"in i.default?function(e,t){void 0===t&&(t=Fn);const r=i.default.useId();return we((()=>`${e}${t.separator}${r}`),[t.separator,e,r])}:function(e,t){return void 0===t&&(t=Fn),we((()=>`${e}${t.separator}${_n++}`),[t.separator,e])};var Wn=i.default.createContext(null);function kn(e){const r=t.useRef(e);return t.useEffect((()=>{r.current=e})),r}function jn(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const Un={13:!0,9:!0};var Hn=e=>{Un[e.keyCode]&&e.preventDefault()};var qn=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find((e=>`on${e}`in document))||e})();const Vn={type:"IDLE"};function zn(e){let{cancel:t,completed:r,getPhase:n,setPhase:o}=e;return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:r,clientY:i}=e;if(0!==t)return;const a={x:r,y:i},s=n();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&u(!1);const l=s.point;if(c=l,d=a,!(Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5))return;var c,d;e.preventDefault();const p=s.actions.fluidLift(a);o({type:"DRAGGING",actions:p})}},{eventName:"mouseup",fn:e=>{const o=n();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),r()):t()}},{eventName:"mousedown",fn:e=>{"DRAGGING"===n().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:e=>{if("PENDING"!==n().type)return 27===e.keyCode?(e.preventDefault(),void t()):void Hn(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&t()}},{eventName:"webkitmouseforcedown",fn:e=>{const r=n();"IDLE"===r.type&&u(!1),r.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:qn,fn:t}]}function Yn(e){const r=t.useRef(Vn),n=t.useRef(s),o=we((()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,c,{sourceEvent:t});if(!o)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),f(o,i)}})),[e]),i=we((()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const n=e.findOptionsForDraggable(r);n&&(n.shouldRespectForcePress||e.canGetLock(r)&&t.preventDefault())}})),[e]),a=Ee((function(){n.current=l(window,[i,o],{passive:!1,capture:!0})}),[i,o]),c=Ee((()=>{"IDLE"!==r.current.type&&(r.current=Vn,n.current(),a())}),[a]),d=Ee((()=>{const e=r.current;c(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[c]),p=Ee((function(){const e=zn({cancel:d,completed:c,getPhase:()=>r.current,setPhase:e=>{r.current=e}});n.current=l(window,e,{capture:!0,passive:!1})}),[d,c]),f=Ee((function(e,t){"IDLE"!==r.current.type&&u(!1),r.current={type:"PENDING",point:t,actions:e},p()}),[p]);Sn((function(){return a(),function(){n.current()}}),[a])}function Jn(){}const Xn={34:!0,33:!0,36:!0,35:!0};function Kn(e,t){function r(){t(),e.cancel()}return[{eventName:"keydown",fn:n=>27===n.keyCode?(n.preventDefault(),void r()):32===n.keyCode?(n.preventDefault(),t(),void e.drop()):40===n.keyCode?(n.preventDefault(),void e.moveDown()):38===n.keyCode?(n.preventDefault(),void e.moveUp()):39===n.keyCode?(n.preventDefault(),void e.moveRight()):37===n.keyCode?(n.preventDefault(),void e.moveLeft()):void(Xn[n.keyCode]?n.preventDefault():Hn(n))},{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:qn,fn:r}]}function Qn(e){const r=t.useRef(Jn),n=we((()=>({eventName:"keydown",fn:function(t){if(t.defaultPrevented)return;if(32!==t.keyCode)return;const n=e.findClosestDraggableId(t);if(!n)return;const i=e.tryGetLock(n,c,{sourceEvent:t});if(!i)return;t.preventDefault();let a=!0;const s=i.snapLift();function c(){a||u(!1),a=!1,r.current(),o()}r.current(),r.current=l(window,Kn(s,c),{capture:!0,passive:!1})}})),[e]),o=Ee((function(){r.current=l(window,[n],{passive:!1,capture:!0})}),[n]);Sn((function(){return o(),function(){r.current()}}),[o])}const Zn={type:"IDLE"};function eo(e){const r=t.useRef(Zn),n=t.useRef(s),o=Ee((function(){return r.current}),[]),i=Ee((function(e){r.current=e}),[]),a=we((()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const o=e.tryGetLock(r,d,{sourceEvent:t});if(!o)return;const i=t.touches[0],{clientX:a,clientY:s}=i,l={x:a,y:s};n.current(),m(o,l)}})),[e]),c=Ee((function(){n.current=l(window,[a],{capture:!0,passive:!1})}),[a]),d=Ee((()=>{const e=r.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(Zn),n.current(),c())}),[c,i]),p=Ee((()=>{const e=r.current;d(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[d]),f=Ee((function(){const e={capture:!0,passive:!1},t={cancel:p,completed:d,getPhase:o},r=l(window,function(e){let{cancel:t,completed:r,getPhase:n}=e;return[{eventName:"touchmove",options:{capture:!1},fn:e=>{const r=n();if("DRAGGING"!==r.type)return void t();r.hasMoved=!0;const{clientX:o,clientY:i}=e.touches[0],a={x:o,y:i};e.preventDefault(),r.actions.move(a)}},{eventName:"touchend",fn:e=>{const o=n();"DRAGGING"===o.type?(e.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),r()):t()}},{eventName:"touchcancel",fn:e=>{"DRAGGING"===n().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:e=>{const r=n();"IDLE"===r.type&&u(!1);const o=e.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=r.actions.shouldRespectForcePress();if("PENDING"!==r.type)return i?r.hasMoved?void e.preventDefault():void t():void e.preventDefault();i&&t()}},{eventName:qn,fn:t}]}(t),e),i=l(window,function(e){let{cancel:t,getPhase:r}=e;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:e=>{"DRAGGING"===r().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:qn,fn:t}]}(t),e);n.current=function(){r(),i()}}),[p,o,d]),g=Ee((function(){const e=o();"PENDING"!==e.type&&u(!1);const t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})}),[o,i]),m=Ee((function(e,t){"IDLE"!==o().type&&u(!1);const r=setTimeout(g,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:r}),f()}),[f,o,i,g]);Sn((function(){return c(),function(){n.current();const e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(Zn))}}),[o,c,i]),Sn((function(){return l(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])}),[])}const to=["input","button","textarea","select","option","optgroup","video","audio"];function ro(e,t){if(null==t)return!1;if(to.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return"true"===r||""===r||t!==e&&ro(e,t.parentElement)}function no(e,t){const r=t.target;return!!Nn(r)&&ro(e,r)}var oo=e=>Le(e.getBoundingClientRect()).center;const io=(()=>{const e="matches";if("undefined"==typeof document)return e;return[e,"msMatchesSelector","webkitMatchesSelector"].find((e=>e in Element.prototype))||e})();function ao(e,t){return null==e?null:e[io](t)?e:ao(e.parentElement,t)}function so(e,t){return e.closest?e.closest(t):ao(e,t)}function lo(e,t){const r=t.target;if(!((n=r)instanceof Rn(n).Element))return null;var n;const o=function(e){return`[${xn.contextId}="${e}"]`}(e),i=so(r,o);return i&&Nn(i)?i:null}function co(e){e.preventDefault()}function uo(e){let{expected:t,phase:r,isLockActive:n,shouldWarn:o}=e;return!!n()&&t===r}function po(e){let{lockAPI:t,store:r,registry:n,draggableId:o}=e;if(t.isClaimed())return!1;const i=n.draggable.findById(o);return!!i&&(!!i.options.isEnabled&&!!rn(r.getState(),o))}function fo(e){let{lockAPI:t,contextId:r,store:n,registry:o,draggableId:i,forceSensorStop:a,sourceEvent:c}=e;if(!po({lockAPI:t,store:n,registry:o,draggableId:i}))return null;const d=o.draggable.getById(i),p=function(e,t){const r=`[${In.contextId}="${e}"]`,n=Pn(document,r).find((e=>e.getAttribute(In.id)===t));return n&&Nn(n)?n:null}(r,d.descriptor.id);if(!p)return null;if(c&&!d.options.canDragInteractiveElements&&no(p,c))return null;const f=t.claim(a||s);let g="PRE_DRAG";function m(){return d.options.shouldRespectForcePress}function b(){return t.isActive(f)}const h=function(e,t){uo({expected:e,phase:g,isLockActive:b,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function y(e){function r(){t.release(),g="COMPLETED"}function o(t,o){if(void 0===o&&(o={shouldBlockNextClick:!1}),e.cleanup(),o.shouldBlockNextClick){const e=l(window,[{eventName:"click",fn:co,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Ir({reason:t}))}return"PRE_DRAG"!==g&&(r(),u(!1)),n.dispatch((e=>({type:"LIFT",payload:e}))(e.liftActionArgs)),g="DRAGGING",{isActive:()=>uo({expected:"DRAGGING",phase:g,isLockActive:b,shouldWarn:!1}),shouldRespectForcePress:m,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...e.actions}}return{isActive:()=>uo({expected:"PRE_DRAG",phase:g,isLockActive:b,shouldWarn:!1}),shouldRespectForcePress:m,fluidLift:function(e){const t=Gr((e=>{h((()=>mr({client:e})))}));return{...y({liftActionArgs:{id:i,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>h(br),moveRight:()=>h(yr),moveDown:()=>h(hr),moveLeft:()=>h(vr)};return y({liftActionArgs:{id:i,clientSelection:oo(p),movementMode:"SNAP"},cleanup:s,actions:e})},abort:function(){uo({expected:"PRE_DRAG",phase:g,isLockActive:b,shouldWarn:!0})&&t.release()}}}const go=[Yn,Qn,eo];function mo(e){let{contextId:r,store:n,registry:o,customSensors:i,enableDefaultSensors:a}=e;const s=[...a?go:[],...i||[]],l=t.useState((()=>function(){let e=null;function t(){e||u(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&u(!1);const r={abandon:t};return e=r,r},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()))[0],c=Ee((function(e,t){jn(e)&&!jn(t)&&l.tryAbandon()}),[l]);Sn((function(){let e=n.getState();return n.subscribe((()=>{const t=n.getState();c(e,t),e=t}))}),[l,n,c]),Sn((()=>l.tryAbandon),[l.tryAbandon]);const d=Ee((e=>po({lockAPI:l,registry:o,store:n,draggableId:e})),[l,o,n]),p=Ee(((e,t,i)=>fo({lockAPI:l,registry:o,contextId:r,store:n,draggableId:e,forceSensorStop:t||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null})),[r,l,o,n]),f=Ee((e=>function(e,t){const r=lo(e,t);return r?r.getAttribute(xn.draggableId):null}(r,e)),[r]),g=Ee((e=>{const t=o.draggable.findById(e);return t?t.options:null}),[o.draggable]),m=Ee((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[l,n]),b=Ee((()=>l.isClaimed()),[l]),h=we((()=>({canGetLock:d,tryGetLock:p,findClosestDraggableId:f,findOptionsForDraggable:g,tryReleaseLock:m,isLockClaimed:b})),[d,p,f,g,m,b]);for(let e=0;e<s.length;e++)s[e](h)}function bo(e){return e.current||u(!1),e.current}function ho(e){const{contextId:n,setCallbacks:o,sensors:a,nonce:s,dragHandleUsageInstructions:l}=e,c=t.useRef(null),d=kn(e),p=Ee((()=>(e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};i.default.version.startsWith("16")||i.default.version.startsWith("17")?n():r.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(d.current)),[d]),f=Ee((()=>(e=>({...sn,...e.autoScrollerOptions,durationDampening:{...sn.durationDampening,...e.autoScrollerOptions}}))(d.current)),[d]),g=function(e){const r=we((()=>(e=>`rfd-announcement-${e}`)(e)),[e]),n=t.useRef(null);return t.useEffect((function(){const e=document.createElement("div");return n.current=e,e.id=r,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),L(e.style,Gn),Mn().appendChild(e),function(){setTimeout((function(){const t=Mn();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[r]),Ee((e=>{const t=n.current;t&&(t.textContent=e)}),[])}(n),m=function(e){let{contextId:r,text:n}=e;const o=$n("hidden-text",{separator:"-"}),i=we((()=>function(e){let{contextId:t,uniqueId:r}=e;return`rfd-hidden-text-${t}-${r}`}({contextId:r,uniqueId:o})),[o,r]);return t.useEffect((function(){const e=document.createElement("div");return e.id=i,e.textContent=n,e.style.display="none",Mn().appendChild(e),function(){const t=Mn();t.contains(e)&&t.removeChild(e)}}),[i,n]),i}({contextId:n,text:l}),b=An(n,s),h=Ee((e=>{bo(c).dispatch(e)}),[]),y=we((()=>P({publishWhileDragging:dr,updateDroppableScroll:pr,updateDroppableIsEnabled:fr,updateDroppableIsCombineEnabled:gr,collectionStarting:ur},h)),[h]),v=function(){const e=we(Tn,[]);return t.useEffect((()=>function(){i.default.version.startsWith("16")||i.default.version.startsWith("17")?requestAnimationFrame(e.clean):e.clean()}),[e]),e}(),x=we((()=>tn(v,y)),[v,y]),I=we((()=>(e=>{let{scrollDroppable:t,scrollWindow:r,move:n,getAutoScrollerOptions:o}=e;const i=(e=>{let{scrollWindow:t,scrollDroppable:r,getAutoScrollerOptions:n=(()=>sn)}=e;const o=Gr(t),i=Gr(r);let a=null;const s=e=>{a||u(!1);const{shouldUseTimeDampening:t,dragStartTime:r}=a;yn({state:e,scrollWindow:o,scrollDroppable:i,dragStartTime:r,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{a&&u(!1);const t=Date.now();let r=!1;const o=()=>{r=!0};yn({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:n}),a={dragStartTime:t,shouldUseTimeDampening:r},r&&s(e)},stop:()=>{a&&(o.cancel(),i.cancel(),a=null)},scroll:s}})({scrollWindow:r,scrollDroppable:t,getAutoScrollerOptions:o}),a=vn({move:n,scrollWindow:r,scrollDroppable:t});return{scroll:e=>{o().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&a(e):i.scroll(e))},start:i.start,stop:i.stop}})({scrollWindow:nn,scrollDroppable:x.scrollDroppable,getAutoScrollerOptions:f,...P({move:mr},h)})),[x.scrollDroppable,h,f]),D=Bn(n),w=we((()=>Jr({announce:g,autoScroller:I,dimensionMarshal:x,focusMarshal:D,getResponders:p,styleMarshal:b})),[g,I,x,D,p,b]);c.current=w;const E=Ee((()=>{const e=bo(c);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),S=Ee((()=>{const e=bo(c).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging}),[]);o(we((()=>({isDragging:S,tryAbort:E})),[S,E]));const C=Ee((e=>rn(bo(c).getState(),e)),[]),O=Ee((()=>qt(bo(c).getState())),[]),A=we((()=>({marshal:x,focus:D,contextId:n,canLift:C,isMovementAllowed:O,dragHandleUsageInstructionsId:m,registry:v})),[n,x,m,D,C,O,v]);return mo({contextId:n,store:w,registry:v,customSensors:a||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),t.useEffect((()=>E),[E]),i.default.createElement(Wn.Provider,{value:A},i.default.createElement(ve,{context:Ln,store:w},e.children))}let yo=0;var vo="useId"in i.default?function(){return i.default.useId()}:function(){return we((()=>""+yo++),[])};const xo=5e3,Io=4500,Do=(e,t)=>t?Ar.drop(t.duration):e?Ar.snap:Ar.fluid,wo=(e,t)=>{if(e)return t?Er.drop:Er.combining};function Eo(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:r,combineWith:n,dropping:o}=e,i=Boolean(n),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),l=s?Nr(r,i):Rr(r);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Do(a,o),transform:l,opacity:wo(i,s),zIndex:s?Io:xo,pointerEvents:"none"}}(e):{transform:Rr((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function So(e){const r=$n("draggable"),{descriptor:n,registry:o,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l}=e,c=we((()=>({canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l})),[a,l,s]),d=Ee((e=>{const t=i();return t||u(!1),function(e,t,r){void 0===r&&(r=Se);const n=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=je(o,n),a=ke(i,r);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:n.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(n,t,e)}),[n,i]),p=we((()=>({uniqueId:r,descriptor:n,options:c,getDimension:d})),[n,d,c,r]),f=t.useRef(p),g=t.useRef(!0);Sn((()=>(o.draggable.register(f.current),()=>o.draggable.unregister(f.current))),[o.draggable]),Sn((()=>{if(g.current)return void(g.current=!1);const e=f.current;f.current=p,o.draggable.update(p,e)}),[p,o.draggable])}var Co=i.default.createContext(null);function Oo(e){const r=t.useContext(e);return r||u(!1),r}function Ao(e){e.preventDefault()}var Po=e=>{const n=t.useRef(null),o=Ee((function(e){void 0===e&&(e=null),n.current=e}),[]),a=Ee((()=>n.current),[]),{contextId:s,dragHandleUsageInstructionsId:l,registry:c}=Oo(Wn),{type:d,droppableId:u}=Oo(Co),p=we((()=>({id:e.draggableId,index:e.index,type:d,droppableId:u})),[e.draggableId,e.index,d,u]),{children:f,draggableId:g,isEnabled:m,shouldRespectForcePress:b,canDragInteractiveElements:h,isClone:y,mapped:v,dropAnimationFinished:x}=e;if(!y){So(we((()=>({descriptor:p,registry:c,getDraggableRef:a,canDragInteractiveElements:h,shouldRespectForcePress:b,isEnabled:m})),[p,c,a,h,b,m]))}const I=we((()=>m?{tabIndex:0,role:"button","aria-describedby":l,"data-rfd-drag-handle-draggable-id":g,"data-rfd-drag-handle-context-id":s,draggable:!1,onDragStart:Ao}:null),[s,l,g,m]),D=Ee((e=>{"DRAGGING"===v.type&&v.dropping&&"transform"===e.propertyName&&(i.default.version.startsWith("16")||i.default.version.startsWith("17")?x():r.flushSync(x))}),[x,v]),w=we((()=>{const e=Eo(v),t="DRAGGING"===v.type&&v.dropping?D:void 0;return{innerRef:o,draggableProps:{"data-rfd-draggable-context-id":s,"data-rfd-draggable-id":g,style:e,onTransitionEnd:t},dragHandleProps:I}}),[s,I,g,v,D,o]),E=we((()=>({draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}})),[p.droppableId,p.id,p.index,p.type]);return i.default.createElement(i.default.Fragment,null,f(w,v.snapshot,E))},Ro=(e,t)=>e===t,No=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};function Bo(e){return void 0===e&&(e=null),{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const To={mapped:{type:"SECONDARY",offset:Se,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Bo(null)}};const Lo=ye((()=>{const e=function(){const e=Ke(((e,t)=>({x:e,y:t}))),t=Ke((function(e,t,r,n,o){return void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=null),{isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:r,combineWith:n,combineTargetFor:null}})),r=Ke((function(e,r,n,o,i,a,s){return void 0===i&&(i=null),void 0===a&&(a=null),void 0===s&&(s=null),{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:r,offset:e,dimension:n,forceShouldAnimate:s,snapshot:t(r,o,i,a,null)}}}));return(n,o)=>{if(jn(n)){if(n.critical.draggable.id!==o.draggableId)return null;const t=n.current.client.offset,a=n.dimensions.draggables[o.draggableId],s=Ut(n.impact),l=(i=n.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=n.forceShouldAnimate;return r(e(t.x,t.y),n.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===n.phase){const e=n.completed;if(e.result.draggableId!==o.draggableId)return null;const r=o.isClone,i=n.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=No(a),c=(e=>e.combine?e.combine.draggableId:null)(a),d={duration:n.dropDuration,curve:wr,moveTo:n.newHomeClientOffset,opacity:c?Er.drop:null,scale:c?Sr.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:i,dropping:d,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,r,l,c,d)}}}return null}}(),t=function(){const e=Ke(((e,t)=>({x:e,y:t}))),t=Ke(Bo),r=Ke((function(e,r,n){return void 0===r&&(r=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:r,shouldAnimateDisplacement:n,snapshot:t(r)}}})),n=e=>e?r(Se,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=ot(i),d=c&&c.draggableId===t?o:null;if(!s){if(!l)return n(d);if(i.displaced.invisible[t])return null;const o=Pe(a.displacedBy.point),s=e(o.x,o.y);return r(s,d,!0)}if(l)return n(d);const u=i.displacedBy.point,p=e(u.x,u.y);return r(p,d,s.shouldAnimate)};return(e,t)=>{if(jn(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const r=e.completed;return r.result.draggableId===t.draggableId?null:o(t.draggableId,r.result.draggableId,r.impact,r.afterCritical)}return null}}();return(r,n)=>e(r,n)||t(r,n)||To}),{dropAnimationFinished:Dr},null,{context:Ln,areStatePropsEqual:Ro})(Po);var Mo=Lo;function Go(e){return Oo(Co).isUsingCloneFor!==e.draggableId||e.isClone?i.default.createElement(Mo,e):null}const _o=e=>t=>e===t,Fo=_o("scroll"),$o=_o("auto"),Wo=(e,t)=>t(e.overflowX)||t(e.overflowY),ko=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return Wo(r,Fo)||Wo(r,$o)})(e)?e:ko(e.parentElement);var jo=ko,Uo=e=>({x:e.scrollLeft,y:e.scrollTop});const Ho=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||Ho(e.parentElement)};var qo=e=>{let{ref:t,descriptor:r,env:n,windowScroll:o,direction:i,isDropDisabled:a,isCombineEnabled:s,shouldClipSubject:l}=e;const c=n.closestScrollable,d=((e,t)=>{const r=Ue(e);if(!t)return r;if(e!==t)return r;const n=r.paddingBox.top-t.scrollTop,o=r.paddingBox.left-t.scrollLeft,i=n+t.scrollHeight,a=o+t.scrollWidth,s=Me({top:n,right:a,bottom:i,left:o},r.border);return Fe({borderBox:s,margin:r.margin,border:r.border,padding:r.padding})})(t,c),u=ke(d,o),p=(()=>{if(!c)return null;const e=Ue(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:ke(e,o),scroll:Uo(c),scrollSize:t,shouldClipSubject:l}})(),f=(e=>{let{descriptor:t,isEnabled:r,isCombineEnabled:n,isFixedOnPage:o,direction:i,client:a,page:s,closest:l}=e;const c=(()=>{if(!l)return null;const{scrollSize:e,client:t}=l,r=Xr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:r,diff:{value:Se,displacement:Se}}}})(),d="vertical"===i?ft:gt;return{descriptor:t,isCombineEnabled:n,isFixedOnPage:o,axis:d,isEnabled:r,client:a,page:s,frame:c,subject:ze({page:s,withPlaceholder:null,axis:d,frame:c})}})({descriptor:r,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:n.isFixedOnPage,direction:i,client:d,page:u,closest:p});return f};const Vo={passive:!1},zo={passive:!0};var Yo=e=>e.shouldPublishImmediately?Vo:zo;const Jo=e=>e&&e.env.closestScrollable||null;function Xo(e){const r=t.useRef(null),n=Oo(Wn),o=$n("droppable"),{registry:i,marshal:a}=n,s=kn(e),l=we((()=>({id:e.droppableId,type:e.type,mode:e.mode})),[e.droppableId,e.mode,e.type]),c=t.useRef(l),d=we((()=>Ke(((e,t)=>{r.current||u(!1);const n={x:e,y:t};a.updateDroppableScroll(l.id,n)}))),[l.id,a]),p=Ee((()=>{const e=r.current;return e&&e.env.closestScrollable?Uo(e.env.closestScrollable):Se}),[]),f=Ee((()=>{const e=p();d(e.x,e.y)}),[p,d]),g=we((()=>Gr(f)),[f]),m=Ee((()=>{const e=r.current,t=Jo(e);e&&t||u(!1);e.scrollOptions.shouldPublishImmediately?f():g()}),[g,f]),b=Ee(((e,t)=>{r.current&&u(!1);const o=s.current,i=o.getDroppableRef();i||u(!1);const a=(e=>({closestScrollable:jo(e),isFixedOnPage:Ho(e)}))(i),c={ref:i,descriptor:l,env:a,scrollOptions:t};r.current=c;const d=qo({ref:i,descriptor:l,env:a,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),p=a.closestScrollable;return p&&(p.setAttribute(wn.contextId,n.contextId),p.addEventListener("scroll",m,Yo(c.scrollOptions))),d}),[n.contextId,l,m,s]),h=Ee((()=>{const e=r.current,t=Jo(e);return e&&t||u(!1),Uo(t)}),[]),y=Ee((()=>{const e=r.current;e||u(!1);const t=Jo(e);r.current=null,t&&(g.cancel(),t.removeAttribute(wn.contextId),t.removeEventListener("scroll",m,Yo(e.scrollOptions)))}),[m,g]),v=Ee((e=>{const t=r.current;t||u(!1);const n=Jo(t);n||u(!1),n.scrollTop+=e.y,n.scrollLeft+=e.x}),[]),x=we((()=>({getDimensionAndWatchScroll:b,getScrollWhileDragging:h,dragStopped:y,scroll:v})),[y,b,h,v]),I=we((()=>({uniqueId:o,descriptor:l,callbacks:x})),[x,l,o]);Sn((()=>(c.current=I.descriptor,i.droppable.register(I),()=>{r.current&&y(),i.droppable.unregister(I)})),[x,l,y,I,a,i.droppable]),Sn((()=>{r.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),Sn((()=>{r.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}function Ko(){}const Qo={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},Zo=e=>{let{isAnimatingOpenOnMount:t,placeholder:r,animate:n}=e;const o=(e=>{let{isAnimatingOpenOnMount:t,placeholder:r,animate:n}=e;return t||"close"===n?Qo:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}})({isAnimatingOpenOnMount:t,placeholder:r,animate:n});return{display:r.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?Ar.placeholder:null}};var ei=i.default.memo((e=>{const r=t.useRef(null),n=Ee((()=>{r.current&&(clearTimeout(r.current),r.current=null)}),[]),{animate:o,onTransitionEnd:a,onClose:s,contextId:l}=e,[c,d]=t.useState("open"===e.animate);t.useEffect((()=>c?"open"!==o?(n(),d(!1),Ko):r.current?Ko:(r.current=setTimeout((()=>{r.current=null,d(!1)})),n):Ko),[o,c,n]);const u=Ee((e=>{"height"===e.propertyName&&(a(),"close"===o&&s())}),[o,s,a]),p=Zo({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return i.default.createElement(e.placeholder.tagName,{style:p,"data-rfd-placeholder-context-id":l,onTransitionEnd:u,ref:e.innerRef})}));class ti extends i.default.PureComponent{constructor(){super(...arguments),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}var ri=e=>{const r=t.useContext(Wn);r||u(!1);const{contextId:n,isMovementAllowed:o}=r,s=t.useRef(null),l=t.useRef(null),{children:c,droppableId:d,type:p,mode:f,direction:g,ignoreContainerClipping:m,isDropDisabled:b,isCombineEnabled:h,snapshot:y,useClone:v,updateViewportMaxScroll:x,getContainerForClone:I}=e,D=Ee((()=>s.current),[]),w=Ee((function(e){void 0===e&&(e=null),s.current=e}),[]);Ee((()=>l.current),[]);const E=Ee((function(e){void 0===e&&(e=null),l.current=e}),[]),S=Ee((()=>{o()&&x({maxScroll:Qr()})}),[o,x]);Xo({droppableId:d,type:p,mode:f,direction:g,isDropDisabled:b,isCombineEnabled:h,ignoreContainerClipping:m,getDroppableRef:D});const C=we((()=>i.default.createElement(ti,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(e=>{let{onClose:t,data:r,animate:o}=e;return i.default.createElement(ei,{placeholder:r,onClose:t,innerRef:E,animate:o,contextId:n,onTransitionEnd:S})}))),[n,S,e.placeholder,e.shouldAnimatePlaceholder,E]),O=we((()=>({innerRef:w,placeholder:C,droppableProps:{"data-rfd-droppable-id":d,"data-rfd-droppable-context-id":n}})),[n,d,C,w]),A=v?v.dragging.draggableId:null,P=we((()=>({droppableId:d,type:p,isUsingCloneFor:A})),[d,A,p]);return i.default.createElement(Co.Provider,{value:P},c(O,y),function(){if(!v)return null;const{dragging:e,render:t}=v,r=i.default.createElement(Go,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},((r,n)=>t(r,n,e)));return a.default.createPortal(r,I())}())};const ni=(e,t)=>e===t.droppable.type,oi=(e,t)=>t.draggables[e.draggable.id];const ii={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||u(!1),document.body}},ai=ye((()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=Ke((e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}))),n=Ke(((n,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===n){const e=l?{render:l,dragging:r(s.descriptor)}:null,t={isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!o)return t;if(!a)return e;const d={isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:d,useClone:null}}));return(r,o)=>{const i=o.droppableId,a=o.type,s=!o.isDropDisabled,l=o.renderClone;if(jn(r)){const e=r.critical;if(!ni(a,e))return t;const o=oi(e,r.dimensions),c=Ut(r.impact)===i;return n(i,s,c,c,o,l)}if("DROP_ANIMATING"===r.phase){const e=r.completed;if(!ni(a,e.critical))return t;const o=oi(e.critical,r.dimensions);return n(i,s,No(e.result)===i,Ut(e.impact)===i,o,l)}if("IDLE"===r.phase&&r.completed&&!r.shouldFlush){const n=r.completed;if(!ni(a,n.critical))return t;const o=Ut(n.impact)===i,s=Boolean(n.impact.at&&"COMBINE"===n.impact.at.type),l=n.critical.droppable.id===i;return o?s?e:t:l?e:t}return t}}),{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},null,{context:Ln,areStatePropsEqual:Ro})(ri);ai.defaultProps=ii;var si=ai;e.DragDropContext=function(e){const t=vo(),r=e.dragHandleUsageInstructions||y.dragHandleUsageInstructions;return i.default.createElement(p,null,(n=>i.default.createElement(ho,{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)))},e.Draggable=function(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,r=Boolean(e.disableInteractiveElementBlocking),n=Boolean(e.shouldRespectForcePress);return i.default.createElement(Go,L({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:n}))},e.Droppable=si,e.resetServerContext=function(){"useId"in i.default||(yo=0,_n=0)},e.useKeyboardSensor=Qn,e.useMouseSensor=Yn,e.useTouchSensor=eo,Object.defineProperty(e,"__esModule",{value:!0})}));
|