diff --git a/README.md b/README.md index a8fd2204..c7ca6a72 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,8 @@ Start: zola serve ``` -To update the .min.js, .bundle.js and .jsx file: +To update the .bundle.js and .jsx file: ``` nix-shell -p nodejs --run "npm run build" - nix-shell -p nodejs --run "npx webpack" ``` diff --git a/package.json b/package.json index 7e644bad..79117e01 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. For deployment, see the nix-scripts repository. Commits to https://git.m-labs.hk/M-Labs/web2019.git are automatically deployed to m-labs.hk through Hydra.", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "./node_modules/.bin/babel static/js/shop.jsx --watch -o static/js/shop_bundle.js", - "build": "./node_modules/.bin/babel static/js/shop.jsx -o static/js/shop.min.js" + "start": "npx webpack --watch", + "build": "npx webpack" }, "repository": { "type": "git", diff --git a/static/js/shop.bundle.js b/static/js/shop.bundle.js index a4c16300..b16f1a55 100644 --- a/static/js/shop.bundle.js +++ b/static/js/shop.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see shop.bundle.js.LICENSE.txt */ -(()=>{var e={679:(e,t,n)=>{"use strict";var r=n(296),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=u(t),g=u(n),h=0;h{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case s:case f:case h:case g:case u:return e;default:return t}}case a:return t}}}function S(e){return E(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=s,t.ContextProvider=u,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=h,t.Memo=g,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||E(e)===c},t.isConcurrentMode=S,t.isContextConsumer=function(e){return E(e)===s},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===h},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===a},t.isProfiler=function(e){return E(e)===l},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===u||e.$$typeof===s||e.$$typeof===f||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===v)},t.typeOf=E},296:(e,t,n)=>{"use strict";e.exports=n(103)},703:(e,t,n)=>{"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},206:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DragDropContext:()=>Sa,Draggable:()=>Ya,Droppable:()=>to,resetServerContext:()=>Ea,useKeyboardSensor:()=>ea,useMouseSensor:()=>Yr,useTouchSensor:()=>aa});var r=n(294);function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}var O=n(679),P=n.n(O),D=n(864),N=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],R=["reactReduxForwardedRef"],T=[],_=[null,null];function M(e,t){var n=e[1];return[t.payload,n+1]}function A(e,t,n){C((function(){return e.apply(void 0,t)}),n)}function L(e,t,n,r,a,o,i){e.current=r,t.current=a,n.current=!1,o.current&&(o.current=null,i())}function B(e,t,n,r,a,o,i,l,u,s){if(e){var c=!1,d=null,f=function(){if(!c){var e,n,f=t.getState();try{e=r(f,a.current)}catch(e){n=e,d=e}n||(d=null),e===o.current?i.current||u():(o.current=e,l.current=e,i.current=!0,s({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=f,n.trySubscribe(),f(),function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var F=function(){return[null,0]};function j(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,o=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,l=n.methodName,u=void 0===l?"connectAdvanced":l,s=n.renderCountProp,c=void 0===s?void 0:s,d=n.shouldHandleStateChanges,f=void 0===d||d,p=n.storeKey,m=void 0===p?"store":p,g=(n.withRef,n.forwardRef),h=void 0!==g&&g,v=n.context,b=void 0===v?y:v,w=I(n,N),E=b;return function(t){var n=t.displayName||t.name||"Component",a=o(n),l=i({},w,{getDisplayName:o,methodName:u,renderCountProp:c,shouldHandleStateChanges:f,storeKey:m,displayName:a,wrappedComponentName:n,WrappedComponent:t}),s=w.pure,d=s?r.useMemo:function(e){return e()};function p(n){var a=(0,r.useMemo)((function(){var e=n.reactReduxForwardedRef,t=I(n,R);return[n.context,e,t]}),[n]),o=a[0],u=a[1],s=a[2],c=(0,r.useMemo)((function(){return o&&o.Consumer&&(0,D.isContextConsumer)(r.createElement(o.Consumer,null))?o:E}),[o,E]),p=(0,r.useContext)(c),m=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(p)&&Boolean(p.store);var g=m?n.store:p.store,h=(0,r.useMemo)((function(){return function(t){return e(t.dispatch,l)}(g)}),[g]),v=(0,r.useMemo)((function(){if(!f)return _;var e=k(g,m?null:p.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[g,m,p]),b=v[0],y=v[1],w=(0,r.useMemo)((function(){return m?p:i({},p,{subscription:b})}),[m,p,b]),S=(0,r.useReducer)(M,T,F),C=S[0][0],x=S[1];if(C&&C.error)throw C.error;var O=(0,r.useRef)(),P=(0,r.useRef)(s),N=(0,r.useRef)(),j=(0,r.useRef)(!1),z=d((function(){return N.current&&s===P.current?N.current:h(g.getState(),s)}),[g,C,s]);A(L,[P,O,j,s,z,N,y]),A(B,[f,g,b,h,P,O,j,N,y,x],[g,b,h]);var U=(0,r.useMemo)((function(){return r.createElement(t,i({},z,{ref:u}))}),[u,t,z]);return(0,r.useMemo)((function(){return f?r.createElement(c.Provider,{value:w},U):U}),[c,U,w])}var g=s?r.memo(p):p;if(g.WrappedComponent=t,g.displayName=p.displayName=a,h){var v=r.forwardRef((function(e,t){return r.createElement(g,i({},e,{reactReduxForwardedRef:t}))}));return v.displayName=a,v.WrappedComponent=t,P()(v,t)}return P()(g,t)}}function z(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function U(e,t){if(z(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function te(e,t){return e===t}function ne(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?j:n,a=t.mapStateToPropsFactories,o=void 0===a?q:a,l=t.mapDispatchToPropsFactories,u=void 0===l?V:l,s=t.mergePropsFactories,c=void 0===s?Q:s,d=t.selectorFactory,f=void 0===d?X:d;return function(e,t,n,a){void 0===a&&(a={});var l=a,s=l.pure,d=void 0===s||s,p=l.areStatesEqual,m=void 0===p?te:p,g=l.areOwnPropsEqual,h=void 0===g?U:g,v=l.areStatePropsEqual,b=void 0===v?U:v,y=l.areMergedPropsEqual,w=void 0===y?U:y,E=I(l,Z),S=ee(e,o,"mapStateToProps"),k=ee(t,u,"mapDispatchToProps"),C=ee(n,c,"mergeProps");return r(f,i({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:S,initMapDispatchToProps:k,initMergeProps:C,pure:d,areStatesEqual:m,areOwnPropsEqual:h,areStatePropsEqual:b,areMergedPropsEqual:w},E))}}const re=ne();var ae,oe=n(935);function ie(e,t){var n=(0,r.useState)((function(){return{inputs:t,result:e()}}))[0],a=(0,r.useRef)(!0),o=(0,r.useRef)(n),i=a.current||Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}o(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=xe(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof Pe))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(r.Component),Re=function(e){return e+1},Te=function(e,t){var n=e.droppableId===t.droppableId,r=Re(e.index),a=Re(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+a+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+a+"\n "},_e=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},Me=function(e){return"\n The item has returned to its starting position\n of "+Re(e.index)+"\n"},Ae={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:function(e){return"\n You have lifted an item in position "+Re(e.source.index)+"\n"},onDragUpdate:function(e){var t=e.destination;if(t)return Te(e.source,t);var n=e.combine;return n?_e(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+Me(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+Te(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+_e(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+Me(e.source)+"\n "}},Le={x:0,y:0},Be=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},Fe=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},je=function(e,t){return e.x===t.x&&e.y===t.y},ze=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},Ue=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},We=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},Ge=function(e,t){return Math.min.apply(Math,t.map((function(t){return We(e,t)})))},He=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},Ve=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},qe=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},$e=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=se({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 n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):se(e)},Qe=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,o=function(e,t){return t?Ve(e,t.scroll.diff.displacement):e}(t.marginBox,a),l=function(e,t,n){var r;return n&&n.increasedBy?i({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(o,r,n);return{page:t,withPlaceholder:n,active:$e(l,a)}},Ke=function(e,t){e.frame||De(!1);var n=e.frame,r=Fe(t,n.scroll.initial),a=ze(r),o=i({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}});return i({},e,{frame:o,subject:Qe({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o})})};function Je(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function Ye(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,l=r.lefte.right;return!(!i||!l)||i&&o||l&&a}},mt=function(e){var t=ft(e.top,e.bottom),n=ft(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},gt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},ht={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},vt=function(e){var t=e.target,n=e.destination,r=e.viewport,a=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,i=a?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:Le;return Ve(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(i,n,o)&&function(e,t,n){return n(t)(e)}(i,r,o)},bt=function(e){return vt(i({},e,{isVisibleThroughFrameFn:pt}))},yt=function(e){return vt(i({},e,{isVisibleThroughFrameFn:mt}))},wt=function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,a=t.visible;if(r[e])return!1;var o=a[e];return!o||o.shouldAnimate};function Et(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,a=e.viewport,o=e.forceShouldAnimate,i=e.last;return t.reduce((function(e,t){var l=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return se(ce(n,r))}(t,r),u=t.descriptor.id;if(e.all.push(u),!bt({target:l,destination:n,viewport:a,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var s={draggableId:u,shouldAnimate:wt(u,i,o)};return e.visible[u]=s,e}),{all:[],visible:{},invisible:{}})}function St(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,a=e.destination,o=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:ct,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:o}}}}function kt(e){var t=e.draggable,n=e.insideDestination,r=e.destination,a=e.viewport,o=e.displacedBy,i=e.last,l=e.index,u=e.forceShouldAnimate,s=ut(t,r);if(null==l)return St({insideDestination:n,inHomeList:s,displacedBy:o,destination:r});var c=Xe(n,(function(e){return e.descriptor.index===l}));if(!c)return St({insideDestination:n,inHomeList:s,displacedBy:o,destination:r});var d=lt(t,n),f=n.indexOf(c);return{displaced:Et({afterDragging:d.slice(f),destination:r,displacedBy:o,last:i,viewport:a.frame,forceShouldAnimate:u}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function Ct(e,t){return Boolean(t.effected[e])}var xt=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},It=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},Ot=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Ue(t.line,n.marginBox[t.end]+xt(t,r),It(t,n.marginBox,r))},Pt=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Ue(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),It(t,n.marginBox,r))},Dt=function(e,t){var n=e.frame;return n?Be(t,n.scroll.diff.displacement):t},Nt=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,a=e.draggables,o=e.afterCritical,i=n.page.borderBox.center,l=t.at;return r&&l?"REORDER"===l.type?function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,o=e.afterCritical,i=at(a.descriptor.id,r),l=n.page,u=a.axis;if(!i.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return Ue(t.line,n.contentBox[t.start]+xt(t,r),It(t,n.contentBox,r))}({axis:u,moveInto:a.page,isMoving:l});var s=t.displaced,c=t.displacedBy,d=s.all[0];if(d){var f=r[d];if(Ct(d,o))return Pt({axis:u,moveRelativeTo:f.page,isMoving:l});var p=ge(f.page,c.point);return Pt({axis:u,moveRelativeTo:p,isMoving:l})}var m=i[i.length-1];if(m.descriptor.id===n.descriptor.id)return l.borderBox.center;if(Ct(m.descriptor.id,o)){var g=ge(m.page,ze(o.displacedBy.point));return Ot({axis:u,moveRelativeTo:g,isMoving:l})}return Ot({axis:u,moveRelativeTo:m.page,isMoving:l})}({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:o}):function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=it(n);a||De(!1);var o=a.draggableId,i=r[o].page.borderBox.center,l=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return Ct(r,n)?o?Le:ze(a.point):o?a.point:Le}({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Be(i,l)}({impact:t,draggables:a,afterCritical:o}):i}(e),n=e.droppable;return n?Dt(n,t):t},Rt=function(e,t){var n=Fe(t,e.scroll.initial),r=ze(n);return{frame:se({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:n,displacement:r}}}};function Tt(e,t){return e.map((function(e){return t[e]}))}var _t=function(e){var t,n,r=e.pageBorderBoxCenter,a=e.draggable,o=(t=e.viewport,n=r,Be(t.scroll.diff.displacement,n)),i=Fe(o,a.page.borderBox.center);return Be(a.client.borderBox.center,i)},Mt=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,a=e.viewport,o=e.withDroppableDisplacement,l=e.onlyOnMainAxis,u=void 0!==l&&l,s=Fe(r,t.page.borderBox.center),c={target:Ve(t.page.borderBox,s),destination:n,withDroppableDisplacement:o,viewport:a};return u?function(e){return vt(i({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=ft(e.top,e.bottom),r=ft(e.left,e.right);return function(e){return t===gt?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(c):yt(c)},At=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.draggables,o=e.previousImpact,l=e.viewport,u=e.previousPageBorderBoxCenter,s=e.previousClientSelection,c=e.afterCritical;if(!r.isEnabled)return null;var d=at(r.descriptor.id,a),f=ut(n,r),p=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;if(!ot(o))return null;function l(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return i({},o,{at:t})}var u=o.displaced.all,s=u.length?u[0]:null;if(t)return s?l(s):null;var c=lt(n,a);if(!s)return c.length?l(c[c.length-1].descriptor.id):null;var d=Ye(c,(function(e){return e.descriptor.id===s}));-1===d&&De(!1);var f=d-1;return f<0?null:l(c[f].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:d,previousImpact:o})||function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,a=e.draggables,o=e.destination,i=e.insideDestination,l=e.previousImpact,u=e.viewport,s=e.afterCritical,c=l.at;if(c||De(!1),"REORDER"===c.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,a=e.location;if(!r.length)return null;var o=a.index,i=t?o+1:o-1,l=r[0].descriptor.index,u=r[r.length-1].descriptor.index;return i(n?u:u+1)?null:i}({isMovingForward:t,isInHomeList:n,location:c.destination,insideDestination:i});return null==d?null:kt({draggable:r,insideDestination:i,destination:o,viewport:u,last:l.displaced,displacedBy:l.displacedBy,index:d})}var f=function(e){var t=e.isMovingForward,n=e.draggables,r=e.combine,a=e.afterCritical;if(!e.destination.isCombineEnabled)return null;var o=r.draggableId,i=n[o].descriptor.index;return Ct(o,a)?t?i:i-1:t?i+1:i}({isMovingForward:t,destination:o,displaced:l.displaced,draggables:a,combine:c.combine,afterCritical:s});return null==f?null:kt({draggable:r,insideDestination:i,destination:o,viewport:u,last:l.displaced,displacedBy:l.displacedBy,index:f})}({isMovingForward:t,isInHomeList:f,draggable:n,draggables:a,destination:r,insideDestination:d,previousImpact:o,viewport:l,afterCritical:c});if(!p)return null;var m=Nt({impact:p,draggable:n,droppable:r,draggables:a,afterCritical:c});if(Mt({draggable:n,destination:r,newPageBorderBoxCenter:m,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:_t({pageBorderBoxCenter:m,draggable:n,viewport:l}),impact:p,scrollJumpRequest:null};var g=Fe(m,u),h=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,o=e.maxScrollChange,l=Rt(n,Be(n.scroll.current,o)),u=r.frame?Ke(r,Be(r.frame.scroll.current,o)):r,s=t.displaced,c=Et({afterDragging:Tt(s.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:s,forceShouldAnimate:!1}),d=Et({afterDragging:Tt(s.all,a),destination:u,displacedBy:t.displacedBy,viewport:n.frame,last:s,forceShouldAnimate:!1}),f={},p={},m=[s,c,d];return s.all.forEach((function(e){var t=function(e,t){for(var n=0;n1?c.sort((function(e,t){return Lt(e)[l.start]-Lt(t)[l.start]}))[0]:s.sort((function(e,t){var r=Ge(n,qe(Lt(e))),a=Ge(n,qe(Lt(t)));return r!==a?r-a:Lt(e)[l.start]-Lt(t)[l.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:i,viewport:l});if(!s)return null;var c=at(s.descriptor.id,o),d=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,a=e.afterCritical,o=e.insideDestination.filter((function(e){return yt({target:Ft(e,a),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var o=We(t,Dt(r,Bt(e,a))),i=We(t,Dt(r,Bt(n,a)));return or.left&&n.topr.top))return!1;if(Vt(a)(t.center))return!0;var o=e.axis,i=a.center[o.crossAxisLine],l=t[o.crossAxisStart],u=t[o.crossAxisEnd],s=ft(a[o.crossAxisStart],a[o.crossAxisEnd]),c=s(l),d=s(u);return!c&&!d||(c?li)}));return a.length?1===a.length?a[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.candidates,r=e.draggable.page.borderBox.center,a=n.map((function(e){var n=e.axis,a=Ue(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:We(r,a)}})).sort((function(e,t){return t.distance-e.distance}));return a[0]?a[0].id:null}({pageBorderBox:t,draggable:n,candidates:a}):null}({pageBorderBox:u,draggable:n,droppables:a});if(!s)return dt;var c=a[s],d=at(c.descriptor.id,r),f=function(e,t){var n=e.frame;return n?qt(t,n.scroll.diff.value):t}(c,u);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,a=e.destination,o=e.insideDestination,i=e.afterCritical;if(!a.isCombineEnabled)return null;var l=a.axis,u=jt(a.axis,t.displaceBy),s=u.value,c=n[l.start],d=n[l.end],f=Xe(lt(t,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox,a=n[l.size]/4,o=Ct(t,i),u=$t({displaced:r.displaced,id:t});return o?u?d>n[l.start]+a&&dn[l.start]-s+a&&cn[l.start]+s+a&&dn[l.start]+a&&ct.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:Xe(lt(n,a),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[u.line],r=Ct(t,l),a=$t({displaced:o,id:t});return r?a?f<=n:d=1500)return.55;var r=Nn+n/1500*.22000000000000003;return Number(("CANCEL"===t?.6*r:r).toFixed(2))}({current:a.current.client.offset,destination:v,reason:o});n({type:"DROP_ANIMATE",payload:{newHomeClientOffset:v,dropDuration:y,completed:b}})}else n(yn({completed:b}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:o}))}else e(r)}}},Tn=function(){return{x:window.pageXOffset,y:window.pageYOffset}};var _n=function(e){var t=function(e){var t=e.onWindowScroll,n=Se((function(){t(Tn())})),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),a=Ce;function o(){return a!==Ce}return{start:function(){o()&&De(!1),a=xe(window,[r])},stop:function(){o()||De(!1),n.cancel(),a(),a=Ce},isActive:o}}({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Mn=function(e,t){t()},An=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Ln=function(e,t,n,r){if(e){var a=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),a=function(a){t||n||(t=!0,e(a),clearTimeout(r))};return a.wasCalled=function(){return t},a}(n);e(t,{announce:a}),a.wasCalled()||n(r(t))}else n(r(t))},Bn=function(e,t){var n=function(e,t){var n,r=(n=[],{add:function(e){var t=setTimeout((function(){return function(e){var t=Ye(n,(function(t){return t.timerId===e}));-1===t&&De(!1),n.splice(t,1)[0].callback()}(t)})),r={timerId:t,callback:e};n.push(r)},flush:function(){if(n.length){var e=[].concat(n);n.length=0,e.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}),a=null,o=function(n){a||De(!1),a=null,Mn(0,(function(){return Ln(e().onDragEnd,n,t,Ae.onDragEnd)}))};return{beforeCapture:function(t,n){a&&De(!1),Mn(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){a&&De(!1),Mn(0,(function(){var r=e().onBeforeDragStart;r&&r(An(t,n))}))},start:function(n,o){a&&De(!1);var i=An(n,o);a={mode:o,lastCritical:n,lastLocation:i.source,lastCombine:null},r.add((function(){Mn(0,(function(){return Ln(e().onDragStart,i,t,Ae.onDragStart)}))}))},update:function(n,o){var l=ot(o),u=it(o);a||De(!1);var s=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(n,a.lastCritical);s&&(a.lastCritical=n);var c,d,f=(d=l,!(null==(c=a.lastLocation)&&null==d||null!=c&&null!=d&&c.droppableId===d.droppableId&&c.index===d.index));f&&(a.lastLocation=l);var p=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(a.lastCombine,u);if(p&&(a.lastCombine=u),s||f||p){var m=i({},An(n,a.mode),{combine:u,destination:l});r.add((function(){Mn(0,(function(){return Ln(e().onDragUpdate,m,t,Ae.onDragUpdate)}))}))}},flush:function(){a||De(!1),r.flush()},drop:o,abort:function(){if(a){var e=i({},An(a.lastCritical,a.mode),{combine:null,destination:null,reason:"CANCEL"});o(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var a=r.payload.critical;return n.beforeStart(a,r.payload.movementMode),t(r),void n.start(a,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var o=r.payload.completed.result;return n.flush(),t(r),void n.drop(o)}if(t(r),"FLUSH"!==r.type){var i=e.getState();"DRAGGING"===i.phase&&n.update(i.critical,i.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},Fn=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&De(!1),e.dispatch(yn({completed:r.completed}))}else t(n)}}},jn=function(e){var t=null,n=null;return function(r){return function(a){if("FLUSH"!==a.type&&"DROP_COMPLETE"!==a.type&&"DROP_ANIMATION_FINISHED"!==a.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(a),"DROP_ANIMATE"===a.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=xe(window,[o])}))}}}},zn=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(wn({reason:r.reason})))}}}},Un=b,Wn=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,a=e.styleMarshal,o=e.getResponders,i=e.announce,l=e.autoScroller;return g(on,Un(function(){for(var e=arguments.length,t=new Array(e),n=0;nt.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return 28;if(e===t.startScrollingFrom)return 1;var n=er({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=28*Zn(1-n);return Math.ceil(r)}(t,n);return 0===o?0:a?Math.max(function(e,t){var n=t,r=nr,a=Date.now()-n;if(a>=nr)return e;if(at.height,o=n.width>t.width;return o||a?o&&a?null:{x:o?0:r.x,y:a?0:r.y}:r}({container:n,subject:r,proposedScroll:s});return c?je(c,Le)?null:c:null},lr=He((function(e){return 0===e?0:e>0?1:-1})),ur=($n=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,a=Be(t,r),o={x:$n(a.x,n.x),y:$n(a.y,n.y)};return je(o,Le)?null:o}),sr=function(e){var t=e.max,n=e.current,r=e.change,a={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=lr(r),i=ur({max:a,current:n,change:o});return!i||0!==o.x&&0===i.x||0!==o.y&&0===i.y},cr=function(e,t){return sr({current:e.scroll.current,max:e.scroll.max,change:t})},dr=function(e,t){var n=e.frame;return!!n&&sr({current:n.scroll.current,max:n.scroll.max,change:t})},fr=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,a=e.scrollWindow,o=e.scrollDroppable,i=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var u=function(e){var t=e.viewport,n=e.subject,r=e.center,a=e.shouldUseTimeDampening,o=ir({dragStartTime:e.dragStartTime,container:t.frame,subject:n,center:r,shouldUseTimeDampening:a});return o&&cr(t,o)?o:null}({dragStartTime:n,viewport:t.viewport,subject:l,center:i,shouldUseTimeDampening:r});if(u)return void a(u)}var s=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var a=r[n];return a.frame?a:null}var o=function(e,t){var n=Xe(Xn(t),(function(t){return t.frame||De(!1),Vt(t.frame.pageMarginBox)(e)}));return n}(t,r);return o}({center:i,destination:Wt(t.impact),droppables:t.dimensions.droppables});if(s){var c=function(e){var t=e.droppable,n=e.subject,r=e.center,a=e.dragStartTime,o=e.shouldUseTimeDampening,i=t.frame;if(!i)return null;var l=ir({dragStartTime:a,container:i.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&dr(t,l)?l:null}({dragStartTime:n,droppable:s,subject:l,center:i,shouldUseTimeDampening:r});c&&o(s.descriptor.id,c)}},pr=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow;return function(e){var a=e.scrollJumpRequest;if(a){var o=Wt(e.impact);o||De(!1);var i=function(e,t){if(!dr(e,t))return t;var r=function(e,t){var n=e.frame;return n&&dr(e,t)?ur({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var a=Fe(t,r);return n(e.descriptor.id,a),Fe(t,a)}(e.dimensions.droppables[o],a);if(i){var l=e.viewport,u=function(e,t,n){if(!e)return n;if(!cr(t,n))return n;var a=function(e,t){if(!cr(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return ur({current:r,max:n,change:t})}(t,n);if(!a)return r(n),null;var o=Fe(n,a);return r(o),Fe(n,o)}(e.isWindowScrollAllowed,l,i);u&&function(e,n){var r=Be(e.current.client.selection,n);t({client:r})}(e,u)}}}},mr=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,a=function(e){var t=e.scrollDroppable,n=Se(e.scrollWindow),r=Se(t),a=null,o=function(e){a||De(!1);var t=a,o=t.shouldUseTimeDampening,i=t.dragStartTime;fr({state:e,scrollWindow:n,scrollDroppable:r,dragStartTime:i,shouldUseTimeDampening:o})};return{start:function(e){a&&De(!1);var t=Date.now(),n=!1,r=function(){n=!0};fr({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),a={dragStartTime:t,shouldUseTimeDampening:n},n&&o(e)},stop:function(){a&&(n.cancel(),r.cancel(),a=null)},scroll:o}}({scrollWindow:n,scrollDroppable:t}),o=pr({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):a.scroll(e))},start:a.start,stop:a.stop}},gr="data-rbd",hr={base:Qn=gr+"-drag-handle",draggableId:Qn+"-draggable-id",contextId:Qn+"-context-id"},vr=function(){var e=gr+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),br=function(){var e=gr+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),yr={contextId:gr+"-scroll-container-context-id"},wr=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},Er=function(e){var t,n,r,a=(t=e,function(e){return"["+e+'="'+t+'"]'}),o=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:a(hr.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),i=[(r="\n transition: "+In.outOfTheWay+";\n ",{selector:a(vr.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),o,{selector:a(br.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:wr(i,"always"),resting:wr(i,"resting"),dragging:wr(i,"dragging"),dropAnimating:wr(i,"dropAnimating"),userCancel:wr(i,"userCancel")}},Sr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,kr=function(){var e=document.querySelector("head");return e||De(!1),e},Cr=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t},xr=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Ir(e){return e instanceof xr(e).HTMLElement}function Or(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function a(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var a=t.descriptor.id,o=r(a);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[a],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||De(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return Je(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=a(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=a(e);return t||De(!1),t},findById:a,exists:function(e){return Boolean(a(e))},getAllByType:function(t){return Je(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Pr=r.createContext(null),Dr=function(){var e=document.body;return e||De(!1),e},Nr={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Rr=function(e){return"rbd-announcement-"+e},Tr=0,_r={separator:"::"};function Mr(e,t){return void 0===t&&(t=_r),le((function(){return""+e+t.separator+Tr++}),[t.separator,e])}var Ar=r.createContext(null);function Lr(e){var t=(0,r.useRef)(e);return(0,r.useEffect)((function(){t.current=e})),t}var Br,Fr,jr=27,zr=32,Ur=37,Wr=38,Gr=39,Hr=40,Vr=((Br={})[13]=!0,Br[9]=!0,Br),qr=function(e){Vr[e.keyCode]&&e.preventDefault()},$r=function(){var e="visibilitychange";return"undefined"==typeof document?e:Xe([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}(),Qr=0,Kr=5,Jr={type:"IDLE"};function Yr(e){var t=(0,r.useRef)(Jr),n=(0,r.useRef)(Ce),a=le((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&t.button===Qr&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var a=e.tryGetLock(r,l,{sourceEvent:t});if(a){t.preventDefault();var o={x:t.clientX,y:t.clientY};n.current(),c(a,o)}}}}}}),[e]),o=le((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),i=ue((function(){n.current=xe(window,[o,a],{passive:!1,capture:!0})}),[o,a]),l=ue((function(){"IDLE"!==t.current.type&&(t.current=Jr,n.current(),i())}),[i]),u=ue((function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),s=ue((function(){var e=function(e){var t=e.cancel,n=e.completed,r=e.getPhase,a=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,o=e.clientY;if(t===Qr){var i={x:n,y:o},l=r();if("DRAGGING"===l.type)return e.preventDefault(),void l.actions.move(i);if("PENDING"!==l.type&&De(!1),u=l.point,s=i,Math.abs(s.x-u.x)>=Kr||Math.abs(s.y-u.y)>=Kr){var u,s;e.preventDefault();var c=l.actions.fluidLift(i);a({type:"DRAGGING",actions:c})}}}},{eventName:"mouseup",fn:function(e){var a=r();"DRAGGING"===a.type?(e.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return e.keyCode===jr?(e.preventDefault(),void t()):void qr(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&De(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:$r,fn:t}]}({cancel:u,completed:l,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=xe(window,e,{capture:!0,passive:!1})}),[u,l]),c=ue((function(e,n){"IDLE"!==t.current.type&&De(!1),t.current={type:"PENDING",point:n,actions:e},s()}),[s]);Sr((function(){return i(),function(){n.current()}}),[i])}function Xr(){}var Zr=((Fr={})[34]=!0,Fr[33]=!0,Fr[36]=!0,Fr[35]=!0,Fr);function ea(e){var t=(0,r.useRef)(Xr),n=le((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&n.keyCode===zr){var r=e.findClosestDraggableId(n);if(r){var o=e.tryGetLock(r,u,{sourceEvent:n});if(o){n.preventDefault();var i=!0,l=o.snapLift();t.current(),t.current=xe(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return r.keyCode===jr?(r.preventDefault(),void n()):r.keyCode===zr?(r.preventDefault(),t(),void e.drop()):r.keyCode===Hr?(r.preventDefault(),void e.moveDown()):r.keyCode===Wr?(r.preventDefault(),void e.moveUp()):r.keyCode===Gr?(r.preventDefault(),void e.moveRight()):r.keyCode===Ur?(r.preventDefault(),void e.moveLeft()):void(Zr[r.keyCode]?r.preventDefault():qr(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:$r,fn:n}]}(l,u),{capture:!0,passive:!1})}}}function u(){i||De(!1),i=!1,t.current(),a()}}}}),[e]),a=ue((function(){t.current=xe(window,[n],{passive:!1,capture:!0})}),[n]);Sr((function(){return a(),function(){t.current()}}),[a])}var ta={type:"IDLE"},na=120,ra=.15;function aa(e){var t=(0,r.useRef)(ta),n=(0,r.useRef)(Ce),a=ue((function(){return t.current}),[]),o=ue((function(e){t.current=e}),[]),i=le((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var a=e.tryGetLock(r,u,{sourceEvent:t});if(a){var o=t.touches[0],i={x:o.clientX,y:o.clientY};n.current(),f(a,i)}}}}}}),[e]),l=ue((function(){n.current=xe(window,[i],{capture:!0,passive:!1})}),[i]),u=ue((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(ta),n.current(),l())}),[l,o]),s=ue((function(){var e=t.current;u(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[u]),c=ue((function(){var e={capture:!0,passive:!1},t={cancel:s,completed:u,getPhase:a},r=xe(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var a=e.touches[0],o={x:a.clientX,y:a.clientY};e.preventDefault(),n.actions.move(o)}else t()}},{eventName:"touchend",fn:function(e){var a=r();"DRAGGING"===a.type?(e.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&De(!1);var a=e.touches[0];if(a&&a.force>=ra){var o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}}},{eventName:$r,fn:t}]}(t),e),o=xe(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(e.keyCode===jr&&e.preventDefault(),t()):t()}},{eventName:$r,fn:t}]}(t),e);n.current=function(){r(),o()}}),[s,a,u]),d=ue((function(){var e=a();"PENDING"!==e.type&&De(!1);var t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})}),[a,o]),f=ue((function(e,t){"IDLE"!==a().type&&De(!1);var n=setTimeout(d,na);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()}),[c,a,o,d]);Sr((function(){return l(),function(){n.current();var e=a();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(ta))}}),[a,l,o]),Sr((function(){return xe(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}var oa={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function ia(e,t){if(null==t)return!1;if(Boolean(oa[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&ia(e,t.parentElement)}function la(e,t){var n=t.target;return!!Ir(n)&&ia(e,n)}var ua=function(e){return se(e.getBoundingClientRect()).center},sa=function(){var e="matches";return"undefined"==typeof document?e:Xe([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function ca(e,t){return null==e?null:e[sa](t)?e:ca(e.parentElement,t)}function da(e,t){return e.closest?e.closest(t):ca(e,t)}function fa(e){e.preventDefault()}function pa(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!!r()&&t===n}function ma(e){var t=e.lockAPI,n=e.store,r=e.registry,a=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(a);return!!o&&!!o.options.isEnabled&&!!Jn(n.getState(),a)}var ga=[Yr,ea,aa];function ha(e){var t=e.contextId,n=e.store,a=e.registry,o=e.customSensors,l=e.enableDefaultSensors,u=[].concat(l?ga:[],o||[]),s=(0,r.useState)((function(){return function(){var e=null;function t(){e||De(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&De(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=ue((function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()}),[s]);Sr((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();c(e,t),e=t}))}),[s,n,c]),Sr((function(){return s.tryAbandon}),[s.tryAbandon]);for(var d=ue((function(e){return ma({lockAPI:s,registry:a,store:n,draggableId:e})}),[s,a,n]),f=ue((function(e,r,o){return function(e){var t=e.lockAPI,n=e.contextId,r=e.store,a=e.registry,o=e.draggableId,l=e.forceSensorStop,u=e.sourceEvent;if(!ma({lockAPI:t,store:r,registry:a,draggableId:o}))return null;var s=a.draggable.getById(o),c=function(e,t){var n="["+vr.contextId+'="'+e+'"]',r=Xe(Ze(document.querySelectorAll(n)),(function(e){return e.getAttribute(vr.id)===t}));return r&&Ir(r)?r:null}(n,s.descriptor.id);if(!c)return null;if(u&&!s.options.canDragInteractiveElements&&la(c,u))return null;var d=t.claim(l||Ce),f="PRE_DRAG";function p(){return s.options.shouldRespectForcePress}function m(){return t.isActive(d)}var g=function(e,t){pa({expected:e,phase:f,isLockActive:m,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function h(e){function n(){t.release(),f="COMPLETED"}function a(t,a){if(void 0===a&&(a={shouldBlockNextClick:!1}),e.cleanup(),a.shouldBlockNextClick){var o=xe(window,[{eventName:"click",fn:fa,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}n(),r.dispatch(wn({reason:t}))}return"PRE_DRAG"!==f&&(n(),"PRE_DRAG"!==f&&De(!1)),r.dispatch(ln(e.liftActionArgs)),f="DRAGGING",i({isActive:function(){return pa({expected:"DRAGGING",phase:f,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return a("DROP",e)},cancel:function(e){return a("CANCEL",e)}},e.actions)}return{isActive:function(){return pa({expected:"PRE_DRAG",phase:f,isLockActive:m,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=Se((function(e){g((function(){return pn({client:e})}))}));return i({},h({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}}),{move:t})},snapLift:function(){var e={moveUp:function(){return g(mn)},moveRight:function(){return g(hn)},moveDown:function(){return g(gn)},moveLeft:function(){return g(vn)}};return h({liftActionArgs:{id:o,clientSelection:ua(c),movementMode:"SNAP"},cleanup:Ce,actions:e})},abort:function(){pa({expected:"PRE_DRAG",phase:f,isLockActive:m,shouldWarn:!0})&&t.release()}}}({lockAPI:s,registry:a,contextId:t,store:n,draggableId:e,forceSensorStop:r,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})}),[t,s,a,n]),p=ue((function(e){return function(e,t){var n=function(e,t){var n,r=t.target;if(!((n=r)instanceof xr(n).Element))return null;var a=function(e){return"["+hr.contextId+'="'+e+'"]'}(e),o=da(r,a);return o&&Ir(o)?o:null}(e,t);return n?n.getAttribute(hr.draggableId):null}(t,e)}),[t]),m=ue((function(e){var t=a.draggable.findById(e);return t?t.options:null}),[a.draggable]),g=ue((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch(bn()))}),[s,n]),h=ue(s.isClaimed,[s]),v=le((function(){return{canGetLock:d,tryGetLock:f,findClosestDraggableId:p,findOptionsForDraggable:m,tryReleaseLock:g,isLockClaimed:h}}),[d,f,p,m,g,h]),b=0;b{"use strict";var r=n(294),a=n(840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n