(self.webpackChunk=self.webpackChunk||[]).push([[81546],{680:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5891),o=n(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},a=n(22589),s=function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var l=o.forwardRef(s)},45532:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5891),o=n(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},a=n(22589),s=function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var l=o.forwardRef(s)},28103:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(92310),o=n.n(r),i=n(59301),a=n(36355),s=n(17313),l=n(83116),c=n(37613);const d=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:l}=e;return{[t]:Object.assign(Object.assign({},(0,s.Wf)(e)),{borderBlockStart:`${o}px solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${o}px solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${o}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:100*a+"%"},"&::after":{width:100-100*a+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*a+"%"},"&::after":{width:100*a+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${o}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}};var u=(0,l.Z)("Divider",(e=>{const t=(0,c.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[d(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{getPrefixCls:t,direction:n,divider:r}=i.useContext(a.E_),{prefixCls:s,type:l="horizontal",orientation:c="center",orientationMargin:d,className:f,rootClassName:p,children:g,dashed:v,plain:m,style:y}=e,x=h(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),w=t("divider",s),[b,S]=u(w),C=c.length>0?`-${c}`:c,O=!!g,k="left"===c&&null!=d,T="right"===c&&null!=d,E=o()(w,null==r?void 0:r.className,S,`${w}-${l}`,{[`${w}-with-text`]:O,[`${w}-with-text${C}`]:O,[`${w}-dashed`]:!!v,[`${w}-plain`]:!!m,[`${w}-rtl`]:"rtl"===n,[`${w}-no-default-orientation-margin-left`]:k,[`${w}-no-default-orientation-margin-right`]:T},f,p),Z=i.useMemo((()=>"number"==typeof d?d:/^\d+$/.test(d)?Number(d):d),[d]),I=Object.assign(Object.assign({},k&&{marginLeft:Z}),T&&{marginRight:Z});return b(i.createElement("div",Object.assign({className:E,style:Object.assign(Object.assign({},null==r?void 0:r.style),y)},x,{role:"separator"}),g&&"vertical"!==l&&i.createElement("span",{className:`${w}-inner-text`,style:I},g)))}},24334:function(e,t,n){var r,o;o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:this,e.exports=function(n){"use strict";var o,i=(n=n||{}).Base64,a="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,r=e.length;n>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},u=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(e){return e.replace(u,d)},f=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)].join("")},p=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},g=function(e){return p(h(String(e)))},v=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},m=function(e,t){return t?v(g(e)):g(e)},y=function(e){return m(e,!0)};n.Uint8Array&&(o=function(e,t){for(var n="",r=0,o=e.length;r>>18)+s.charAt(c>>>12&63)+(void 0!==a?s.charAt(c>>>6&63):"=")+(void 0!==l?s.charAt(63&c):"=")}return t?v(n):n});var x,w=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,b=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},S=function(e){return e.replace(w,b)},C=function(e){var t=e.length,n=t%4,r=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),o=[c(r>>>16),c(r>>>8&255),c(255&r)];return o.length-=[0,0,2,1][n],o.join("")},O=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,C)},k=function(e){return O(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},T=function(e){return S(O(e))},E=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},Z=function(e){return T(E(e))};n.Uint8Array&&(x=function(e){return Uint8Array.from(k(E(e)),(function(e){return e.charCodeAt(0)}))});var I=function(){var e=n.Base64;return n.Base64=i,e};if(n.Base64={VERSION:a,atob:k,btoa:p,fromBase64:Z,toBase64:m,utob:h,encode:m,encodeURI:y,btou:S,decode:Z,noConflict:I,fromUint8Array:o,toUint8Array:x},"function"==typeof Object.defineProperty){var L=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L((function(){return Z(this)}))),Object.defineProperty(String.prototype,"toBase64",L((function(e){return m(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",L((function(){return m(this,!0)})))}}return n.Meteor&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(t,[]))||(e.exports=r),{Base64:n.Base64}}(o)},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var d=[n];return o&&(s?a?d.unshift(s):d.push(s):this.defaultLoader&&(a?d.unshift(this.defaultLoader):d.push(this.defaultLoader))),i.default.createElement(r,c,d)}}]),t}(o.Component);l.propTypes={children:a.default.node.isRequired,element:a.default.node,hasMore:a.default.bool,initialLoad:a.default.bool,isReverse:a.default.bool,loader:a.default.node,loadMore:a.default.func.isRequired,pageStart:a.default.number,ref:a.default.func,getScrollParent:a.default.func,threshold:a.default.number,useCapture:a.default.bool,useWindow:a.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)},44589:function(e,t,n){"use strict";n.d(t,{JN:function(){return ue},Rp:function(){return S},W8:function(){return pe}});var r=n(5891),o=n(29043),i=n(61468),a=n(79545),s=n(68550),l=n(81058),c=n(43962),d=n(17928),u=n(21882),h=n(80962),f=n(59301),p=n(12708),g=n.n(p),v=n(4676),m=n(44520),y=n.n(m),x=n(26390),w=function(){function e(){(0,a.Z)(this,e),(0,h.Z)(this,"refs",{})}return(0,s.Z)(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find((function(t){return t.node.sortableInfo.index==e.active.index}))}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(b)}}]),e}();function b(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function S(e,t,n){return(e=e.slice()).splice(n<0?e.length+n:n,0,e.splice(t,1)[0]),e}function C(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var O={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},k=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function T(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function E(e,t){e.style["".concat(k,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function Z(e,t){e.style["".concat(k,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function I(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function L(e,t,n){return Math.max(e,Math.min(n,t))}function A(e){return"px"===e.substr(-2)?parseFloat(e):0}function M(e){var t=window.getComputedStyle(e);return{bottom:A(t.marginBottom),left:A(t.marginLeft),right:A(t.marginRight),top:A(t.marginTop)}}function R(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function P(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function D(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function N(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function W(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:W(e.parentNode,t,r)}}function B(e,t,n){return et?e-1:e>n&&e0&&n[t].height>0)&&e.getContext("2d").drawImage(n[t],0,0)})),r}function re(e){return null!=e.sortableHandle}var oe=function(){function e(t,n){(0,a.Z)(this,e),this.container=t,this.onScrollCallback=n}return(0,s.Z)(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,o=e.maxTranslate,i=e.width,a=e.height,s={x:0,y:0},l={x:1,y:1},c=10,d=10,u=this.container,h=u.scrollTop,f=u.scrollLeft,p=u.scrollHeight,g=u.scrollWidth,v=0===h,m=p-h-u.clientHeight==0,y=0===f,x=g-f-u.clientWidth==0;n.y>=o.y-a/2&&!m?(s.y=1,l.y=d*Math.abs((o.y-a/2-n.y)/a)):n.x>=o.x-i/2&&!x?(s.x=1,l.x=c*Math.abs((o.x-i/2-n.x)/i)):n.y<=r.y+a/2&&!v?(s.y=-1,l.y=d*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+i/2&&!y&&(s.x=-1,l.x=c*Math.abs((n.x-i/2-r.x)/i)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===s.x&&0===s.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:l.x*s.x,top:l.y*s.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}();var ie={axis:g().oneOf(["x","y","xy"]),contentWindow:g().any,disableAutoscroll:g().bool,distance:g().number,getContainer:g().func,getHelperDimensions:g().func,helperClass:g().string,helperContainer:g().oneOfType([g().func,"undefined"==typeof HTMLElement?g().any:g().instanceOf(HTMLElement)]),hideSortableGhost:g().bool,keyboardSortingTransitionDuration:g().number,lockAxis:g().string,lockOffset:g().oneOfType([g().number,g().string,g().arrayOf(g().oneOfType([g().number,g().string]))]),lockToContainerEdges:g().bool,onSortEnd:g().func,onSortMove:g().func,onSortOver:g().func,onSortStart:g().func,pressDelay:g().number,pressThreshold:g().number,keyCodes:g().shape({lift:g().arrayOf(g().number),drop:g().arrayOf(g().number),cancel:g().arrayOf(g().number),up:g().arrayOf(g().number),down:g().arrayOf(g().number)}),shouldCancelStart:g().func,transitionDuration:g().number,updateBeforeSortStart:g().func,useDragHandle:g().bool,useWindowAsScrollContainer:g().bool},ae={lift:[G],drop:[G],cancel:[F],up:[_,K],down:[Y,U]},se={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:ae,shouldCancelStart:function(e){return-1!==[J,ee,te,Q,V].indexOf(e.target.tagName)||!!I(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},le=Object.keys(ie);function ce(e){y()(!(e.distance&&e.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function de(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}function ue(e){var t,n,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;return(0,a.Z)(this,n),t=(0,l.Z)(this,(0,c.Z)(n).call(this,e)),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"state",{}),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"handleStart",(function(e){var n=t.props,r=n.distance,o=n.shouldCancelStart;if(2!==e.button&&!o(e)){t.touched=!0,t.position=D(e);var i=I(e.target,(function(e){return null!=e.sortableInfo}));if(i&&i.sortableInfo&&t.nodeIsChild(i)&&!t.state.sorting){var a=t.props.useDragHandle,s=i.sortableInfo,l=s.index,c=s.collection;if(s.disabled)return;if(a&&!I(e.target,re))return;t.manager.active={collection:c,index:l},N(e)||e.target.tagName!==X||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"handleMove",(function(e){var n=t.props,r=n.distance,o=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var i=D(e),a={x:t.position.x-i.x,y:t.position.y-i.y},s=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||o&&!(s>=o)?r&&s>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n=f.sortableInfo.index,r=M(f),o=z(t.container),d=t.scrollContainer.getBoundingClientRect(),v=s({index:n,node:f,collection:p});if(t.node=f,t.margin=r,t.gridGap=o,t.width=v.width,t.height=v.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=f.getBoundingClientRect(),t.containerBoundingRect=d,t.index=n,t.newIndex=n,t.axis={x:a.indexOf("x")>=0,y:a.indexOf("y")>=0},t.offsetEdge=W(f,t.container),t.initialOffset=D(g?(0,i.Z)({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild(ne(f)),T(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-r.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-r.top,"px"),width:"".concat(t.width,"px")}),g&&t.helper.focus(),c&&(t.sortableGhost=f,T(f,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},g){var m=h?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,y=m.top,x=m.left,w=m.width,b=y+m.height,S=x+w;t.axis.x&&(t.minTranslate.x=x-t.boundingClientRect.left,t.maxTranslate.x=S-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=y-t.boundingClientRect.top,t.maxTranslate.y=b-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(h?0:d.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(h?t.contentWindow.innerWidth:d.left+d.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(h?0:d.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(h?t.contentWindow.innerHeight:d.top+d.height)-t.boundingClientRect.top-t.height/2);l&&l.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?f:t.contentWindow,g?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(O.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),O.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:n}),u&&u({node:f,index:n,collection:p,isKeySorting:g,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),g&&t.keyMove(0)},o=t.props,a=o.axis,s=o.getHelperDimensions,l=o.helperClass,c=o.hideSortableGhost,d=o.updateBeforeSortStart,u=o.onSortStart,h=o.useWindowAsScrollContainer,f=n.node,p=n.collection,g=t.manager.isKeySorting,v=function(){if("function"==typeof d){t._awaitingUpdateBeforeSortStart=!0;var n=de((function(){var t=f.sortableInfo.index;return Promise.resolve(d({collection:p,index:t,node:f,isKeySorting:g},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return v&&v.then?v.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),(0,h.Z)((0,u.Z)((0,u.Z)(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,o=n.onSortEnd,i=t.manager,a=i.active.collection,s=i.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(s?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(O.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),O.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&T(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,d=l.length;cr)){t.prevIndex=i,t.newIndex=o;var a=B(t.newIndex,t.prevIndex,t.index),s=n.find((function(e){return e.node.sortableInfo.index===a})),l=s.node,c=t.containerScrollDelta,d=s.boundingClientRect||P(l,c),u=s.translate||{x:0,y:0},h=d.top+u.y-c.top,f=d.left+u.x-c.left,p=iv?v/2:this.height/2,width:this.width>g?g/2:this.width/2},y=c&&p>this.index&&p<=d,x=c&&p=d,w={x:0,y:0},b=a[u].edgeOffset;b||(b=W(f,this.container),a[u].edgeOffset=b,c&&(a[u].boundingClientRect=P(f,o)));var S=u0&&a[u-1];S&&!S.edgeOffset&&(S.edgeOffset=W(S.node,this.container),c&&(S.boundingClientRect=P(S.node,o))),p!==this.index?(t&&Z(f,t),this.axis.x?this.axis.y?x||pthis.containerBoundingRect.width-m.width&&S&&(w.x=S.edgeOffset.left-b.left,w.y=S.edgeOffset.top-b.top),null===this.newIndex&&(this.newIndex=p)):(y||p>this.index&&(s+i.left+m.width>=b.left&&l+i.top+m.height>=b.top||l+i.top+m.height>=b.top+v))&&(w.x=-(this.width+this.marginOffset.x),b.left+w.xthis.index&&s+i.left+m.width>=b.left?(w.x=-(this.width+this.marginOffset.x),this.newIndex=p):(x||pthis.index&&l+i.top+m.height>=b.top?(w.y=-(this.height+this.marginOffset.y),this.newIndex=p):(x||p1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){return(0,a.Z)(this,n),(0,l.Z)(this,(0,c.Z)(n).apply(this,arguments))}return(0,d.Z)(n,t),(0,s.Z)(n,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,r=e.index,o=(0,v.findDOMNode)(this);o.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=o,this.ref={node:o},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return y()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=o.withRef?"wrappedInstance":null;return(0,f.createElement)(e,(0,r.Z)({ref:t},C(this.props,fe)))}}]),n}(f.Component),(0,h.Z)(t,"displayName",R("sortableElement",e)),(0,h.Z)(t,"contextTypes",{manager:g().object.isRequired}),(0,h.Z)(t,"propTypes",he),(0,h.Z)(t,"defaultProps",{collection:0}),n}}}]);