h||rd?u.offsetWidth:e.setup.minPositionX||0,r>h?u.offsetHeight:e.setup.minPositionY||0,i,e.bounds,s||l),y=g.x,b=g.y;return{scale:i,positionX:v?y:n,positionY:m?b:r}}}(e);c&&qb(e,c,l,u)}}function cx(e,t,n){var r=e.startCoords,i=e.setup.alignmentAnimation,o=i.sizeX,a=i.sizeY;if(r){var s=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var c=t-r.x,d=n-r.y;return{x:a?l:c,y:s?u:d}}(e,t,n),l=s.x,u=s.y,c=rx(e,o),d=rx(e,a);sx(e,{x:l,y:u}),nx(e,l,u,c,d)}}function dx(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=null===r||void 0===r?void 0:r.getBoundingClientRect(),a=null===i||void 0===i?void 0:i.getBoundingClientRect(),s=(null===o||void 0===o?void 0:o.width)||0,l=(null===o||void 0===o?void 0:o.height)||0,u=(null===a||void 0===a?void 0:a.width)||0,c=(null===a||void 0===a?void 0:a.height)||0,d=s.1&&d?function(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent;if(ox(e)&&t&&n&&i){var o=t.velocityX,a=t.velocityY,s=t.total,l=n.maxPositionX,u=n.minPositionX,c=n.maxPositionY,d=n.minPositionY,f=r.limitToBounds,h=r.alignmentAnimation,p=r.zoomAnimation,v=r.panning,m=v.lockAxisY,g=v.lockAxisX,y=p.animationType,b=h.sizeX,x=h.sizeY,w=h.velocityAlignmentTime,k=function(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}(e,s),S=Math.max(k,w),C=rx(e,b),P=rx(e,x),_=C*i.offsetWidth/100,E=P*i.offsetHeight/100,Z=l+_,M=u-_,j=c+E,R=d-E,O=e.transformState,T=(new Date).getTime();Yb(e,y,S,(function(t){var n=e.transformState,r=n.scale,i=n.positionX,s=n.positionY,p=((new Date).getTime()-T)/w,v=1-(0,Hb[h.animationType])(Math.min(1,p)),y=1-t,b=i+o*y,x=s+a*y,k=ax(b,O.positionX,i,g,f,u,l,M,Z,v),S=ax(x,O.positionY,s,m,f,d,c,R,j,v);i===b&&s===x||e.setTransformState(r,k,S)}))}}(e):ux(e)}}function fx(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=Jb(Bb(t,2),o,a,0,!1),u=Qb(e,n,r,l,Kb(e,l),s);return{scale:l,positionX:u.x,positionY:u.y}}function hx(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.minScale,s=o.limitToBounds,l=o.zoomAnimation,u=l.disabled,c=l.animationTime,d=l.animationType,f=u||r>=a;if((r>=1||s)&&ux(e),!f&&i&&e.mounted){var h=fx(e,a,t||i.offsetWidth/2,n||i.offsetHeight/2);h&&qb(e,h,c,d)}}var px=function(){return px=Object.assign||function(e){for(var t,n=1,r=arguments.length;na||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY))}(e,t);o&&(Ix(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout((function(){e.mounted&&(e.wheelStopEventTimer=null,Wb(Ax(e),t,r),Wb(Ax(e),t,i))}),160))},Ux=function(e){for(var t=0,n=0,r=0;r<2;r+=1)t+=e.touches[r].clientX,n+=e.touches[r].clientY;return{x:t/2,y:n/2}},Yx=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.wrapperComponent,o=e.transformState.scale,a=e.setup,s=a.limitToBounds,l=a.centerZoomedOut,u=a.zoomAnimation,c=a.alignmentAnimation,d=u.disabled,f=u.size;if(null!==r&&n){var h=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Bb(i[0].clientX-r.left,5),a=Bb(i[0].clientY-r.top,5);return{x:(o+Bb(i[1].clientX-r.left,5))/2/t,y:(a+Bb(i[1].clientY-r.top,5))/2/t}}(t,o,n);if(Number.isFinite(h.x)&&Number.isFinite(h.y)){var p=Wx(t),v=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=i.disablePadding,u=s.size,c=s.disabled;if(!n||null===r||!t)throw new Error("Pinch touches distance was not provided");return t<0?e.transformState.scale:Jb(Bb(t/r*n,2),a,o,u,!c&&!l)}(e,p),m=Ux(t),g=m.x-(e.pinchLastCenterX||0),y=m.y-(e.pinchLastCenterY||0);if(v!==o||0!==g||0!==y){e.pinchLastCenterX=m.x,e.pinchLastCenterY=m.y;var b=Kb(e,v),x=s&&(d||0===f||l),w=Qb(e,h.x,h.y,v,b,x),k=w.x,S=w.y;e.pinchMidpoint=h,e.lastDistance=p;var C=c.sizeX,P=c.sizeY,_=Gb(k+g,S+y,b,s,rx(e,C),rx(e,P),i),E=_.x,Z=_.y;e.setTransformState(v,E,Z)}}}},qx=function(e,t){var n=e.props.onZoomStop,r=e.setup.doubleClick.animationTime;Ix(e.doubleClickStopEventTimer),e.doubleClickStopEventTimer=setTimeout((function(){e.doubleClickStopEventTimer=null,Wb(Ax(e),t,n)}),r)};function Xx(e,t){var n=e.setup,r=e.doubleClickStopEventTimer,i=e.transformState,o=e.contentComponent,a=i.scale,s=e.props,l=s.onZoomStart,u=s.onZoom,c=n.doubleClick,d=c.disabled,f=c.mode,h=c.step,p=c.animationTime,v=c.animationType;if(!d&&!r){if("reset"===f)return function(e,t){var n=e.props,r=n.onZoomStart,i=n.onZoom,o=e.setup.doubleClick,a=o.animationTime,s=o.animationType;Wb(Ax(e),t,r),_x(e,a,s,(function(){return Wb(Ax(e),t,i)})),qx(e,t)}(e,t);if(!o)return console.error("No ContentComponent found");var m=function(e,t){return"toggle"===e?1===t?1:-1:"zoomOut"===e?-1:1}(f,e.transformState.scale),g=Cx(e,m,h);if(a!==g){Wb(Ax(e),t,l);var y=Bx(t,o,a),b=fx(e,g,y.x,y.y);if(!b)return console.error("Error during zoom event. New transformation state was not calculated.");Wb(Ax(e),t,u),qb(e,b,p,v),qx(e,t)}}}var $x=function(e){var t=this;this.mounted=!0,this.pinchLastCenterX=null,this.pinchLastCenterY=null,this.onChangeCallbacks=new Set,this.onInitCallbacks=new Set,this.wrapperComponent=null,this.contentComponent=null,this.isInitialized=!1,this.bounds=null,this.previousWheelEvent=null,this.wheelStopEventTimer=null,this.wheelAnimationTimer=null,this.isPanning=!1,this.isWheelPanning=!1,this.startCoords=null,this.lastTouch=null,this.distance=null,this.lastDistance=null,this.pinchStartDistance=null,this.pinchStartScale=null,this.pinchMidpoint=null,this.doubleClickStopEventTimer=null,this.velocity=null,this.velocityTime=null,this.lastMousePosition=null,this.animate=!1,this.animation=null,this.maxBounds=null,this.pressedKeys={},this.mount=function(){t.initializeWindowEvents()},this.unmount=function(){t.cleanupWindowEvents()},this.update=function(e){t.props=e,Kb(t,t.transformState.scale),t.setup=Sx(e)},this.initializeWindowEvents=function(){var e,n,r=Nx(),i=null===(e=t.wrapperComponent)||void 0===e?void 0:e.ownerDocument,o=null===i||void 0===i?void 0:i.defaultView;null===(n=t.wrapperComponent)||void 0===n||n.addEventListener("wheel",t.onWheelPanning,r),null===o||void 0===o||o.addEventListener("mousedown",t.onPanningStart,r),null===o||void 0===o||o.addEventListener("mousemove",t.onPanning,r),null===o||void 0===o||o.addEventListener("mouseup",t.onPanningStop,r),null===i||void 0===i||i.addEventListener("mouseleave",t.clearPanning,r),null===o||void 0===o||o.addEventListener("keyup",t.setKeyUnPressed,r),null===o||void 0===o||o.addEventListener("keydown",t.setKeyPressed,r)},this.cleanupWindowEvents=function(){var e,n,r=Nx(),i=null===(e=t.wrapperComponent)||void 0===e?void 0:e.ownerDocument,o=null===i||void 0===i?void 0:i.defaultView;null===o||void 0===o||o.removeEventListener("mousedown",t.onPanningStart,r),null===o||void 0===o||o.removeEventListener("mousemove",t.onPanning,r),null===o||void 0===o||o.removeEventListener("mouseup",t.onPanningStop,r),null===i||void 0===i||i.removeEventListener("mouseleave",t.clearPanning,r),null===o||void 0===o||o.removeEventListener("keyup",t.setKeyUnPressed,r),null===o||void 0===o||o.removeEventListener("keydown",t.setKeyPressed,r),document.removeEventListener("mouseleave",t.clearPanning,r),Ub(t),null===(n=t.observer)||void 0===n||n.disconnect()},this.handleInitializeWrapperEvents=function(e){var n=Nx();e.addEventListener("wheel",t.onWheelZoom,n),e.addEventListener("dblclick",t.onDoubleClick,n),e.addEventListener("touchstart",t.onTouchPanningStart,n),e.addEventListener("touchmove",t.onTouchPanning,n),e.addEventListener("touchend",t.onTouchPanningStop,n)},this.handleInitialize=function(e){var n=t.setup.centerOnInit;t.applyTransformation(),t.onInitCallbacks.forEach((function(e){return e(Ax(t))})),n&&(t.setCenter(),t.observer=new ResizeObserver((function(){var n,r=e.offsetWidth,i=e.offsetHeight;(r>0||i>0)&&(t.onInitCallbacks.forEach((function(e){return e(Ax(t))})),t.setCenter(),null===(n=t.observer)||void 0===n||n.disconnect())})),setTimeout((function(){var e;null===(e=t.observer)||void 0===e||e.disconnect()}),5e3),t.observer.observe(e))},this.onWheelZoom=function(e){if(!t.setup.disabled){var n=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target;return!(!s||l||r||!u)&&!(i&&!t.ctrlKey)&&(!o||!t.ctrlKey)&&!Dx(u,a)}(t,e);n&&t.isPressingKeys(t.setup.wheel.activationKeys)&&(function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Ub(e),Wb(Ax(e),t,r),Wb(Ax(e),t,i))}(t,e),Hx(t,e),Vx(t,e))}},this.onWheelPanning=function(e){var n=t.setup,r=n.disabled,i=n.wheel,o=n.panning;if(t.wrapperComponent&&t.contentComponent&&!r&&i.wheelDisabled&&!o.disabled&&o.wheelPanning&&!e.ctrlKey){e.preventDefault(),e.stopPropagation();var a=t.transformState,s=a.positionX,l=a.positionY,u=s-e.deltaX,c=l-e.deltaY,d=o.lockAxisX?s:u,f=o.lockAxisY?l:c,h=t.setup.alignmentAnimation,p=h.sizeX,v=h.sizeY,m=rx(t,p),g=rx(t,v);d===s&&f===l||nx(t,d,f,m,g)}},this.onPanningStart=function(e){var n=t.setup.disabled,r=t.props.onPanningStart;n||ex(t,e)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(0!==e.button||t.setup.panning.allowLeftClickPan)&&(1!==e.button||t.setup.panning.allowMiddleClickPan)&&(2!==e.button||t.setup.panning.allowRightClickPan)&&(e.preventDefault(),e.stopPropagation(),Ub(t),lx(t,e),Wb(Ax(t),e,r))},this.onPanning=function(e){var n=t.setup.disabled,r=t.props.onPanning;n||tx(t)&&t.isPressingKeys(t.setup.panning.activationKeys)&&(e.preventDefault(),e.stopPropagation(),cx(t,e.clientX,e.clientY),Wb(Ax(t),e,r))},this.onPanningStop=function(e){var n=t.props.onPanningStop;t.isPanning&&(dx(t),Wb(Ax(t),e,n))},this.onPinchStart=function(e){var n=t.setup.disabled,r=t.props,i=r.onPinchingStart,o=r.onZoomStart;if(!n){var a=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target;return!(!o||r||!a)&&!Dx(a,i)}(t,e);a&&(function(e,t){var n=Wx(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1;var r=Ux(t);e.pinchLastCenterX=r.x,e.pinchLastCenterY=r.y,Ub(e)}(t,e),Ub(t),Wb(Ax(t),e,i),Wb(Ax(t),e,o))}},this.onPinch=function(e){var n=t.setup.disabled,r=t.props,i=r.onPinching,o=r.onZoom;if(!n){var a=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance;return!(!n||t||!r)}(t);a&&(e.preventDefault(),e.stopPropagation(),Yx(t,e),Wb(Ax(t),e,i),Wb(Ax(t),e,o))}},this.onPinchStop=function(e){var n=t.props,r=n.onPinchingStop,i=n.onZoomStop;t.pinchStartScale&&(function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,hx(e,null===t||void 0===t?void 0:t.x,null===t||void 0===t?void 0:t.y)}(t),Wb(Ax(t),e,r),Wb(Ax(t),e,i))},this.onTouchPanningStart=function(e){var n=t.setup.disabled,r=t.props.onPanningStart;if(!n&&ex(t,e)&&!(t.lastTouch&&+new Date-t.lastTouch<200)){t.lastTouch=+new Date,Ub(t);var i=e.touches,o=1===i.length,a=2===i.length;o&&(Ub(t),lx(t,e),Wb(Ax(t),e,r)),a&&t.onPinchStart(e)}},this.onTouchPanning=function(e){var n=t.setup.disabled,r=t.props.onPanning;if(t.isPanning&&1===e.touches.length){if(n)return;if(!tx(t))return;e.preventDefault(),e.stopPropagation();var i=e.touches[0];cx(t,i.clientX,i.clientY),Wb(Ax(t),e,r)}else e.touches.length>1&&t.onPinch(e)},this.onTouchPanningStop=function(e){t.onPanningStop(e),t.onPinchStop(e)},this.onDoubleClick=function(e){if(!t.setup.disabled){var n=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=null===i||void 0===i?void 0:i.contains(l);return!(!(n&&l&&u)||a)&&!Dx(l,s)}(t,e);n&&Xx(t,e)}},this.clearPanning=function(e){t.isPanning&&t.onPanningStop(e)},this.setKeyPressed=function(e){t.pressedKeys[e.key]=!0},this.setKeyUnPressed=function(e){t.pressedKeys[e.key]=!1},this.isPressingKeys=function(e){return!e.length||Boolean(e.find((function(e){return t.pressedKeys[e]})))},this.setTransformState=function(e,n,r){var i=t.props.onTransformed;if(Number.isNaN(e)||Number.isNaN(n)||Number.isNaN(r))console.error("Detected NaN set state values");else{e!==t.transformState.scale&&(t.transformState.previousScale=t.transformState.scale,t.transformState.scale=e),t.transformState.positionX=n,t.transformState.positionY=r,t.applyTransformation();var o=Ax(t);t.onChangeCallbacks.forEach((function(e){return e(o)})),Wb(o,{scale:e,positionX:n,positionY:r},i)}},this.setCenter=function(){if(t.wrapperComponent&&t.contentComponent){var e=Fx(t.transformState.scale,t.wrapperComponent,t.contentComponent);t.setTransformState(e.scale,e.positionX,e.positionY)}},this.handleTransformStyles=function(e,n,r){return t.props.customTransform?t.props.customTransform(e,n,r):function(e,t,n){return"translate(".concat(e,"px, ").concat(t,"px) scale(").concat(n,")")}(e,n,r)},this.applyTransformation=function(){if(t.mounted&&t.contentComponent){var e=t.transformState,n=e.scale,r=e.positionX,i=e.positionY,o=t.handleTransformStyles(r,i,n);t.contentComponent.style.transform=o}},this.getContext=function(){return Ax(t)},this.onChange=function(e){return t.onChangeCallbacks.has(e)||t.onChangeCallbacks.add(e),function(){t.onChangeCallbacks.delete(e)}},this.onInit=function(e){return t.onInitCallbacks.has(e)||t.onInitCallbacks.add(e),function(){t.onInitCallbacks.delete(e)}},this.init=function(e,n){t.cleanupWindowEvents(),t.wrapperComponent=e,t.contentComponent=n,Kb(t,t.transformState.scale),t.handleInitializeWrapperEvents(e),t.handleInitialize(n),t.initializeWindowEvents(),t.isInitialized=!0;var r=Ax(t);Wb(r,void 0,t.props.onInit)},this.props=e,this.setup=Sx(this.props),this.transformState=kx(this.props)},Kx=r.createContext(null),Gx=r.forwardRef((function(e,t){var n,i,o=(0,r.useRef)(new $x(e)).current,a=(n=e.children,i=Tx(o),"function"===typeof n?n(i):n);return(0,r.useImperativeHandle)(t,(function(){return Tx(o)}),[o]),(0,r.useEffect)((function(){o.update(e)}),[o,e]),r.createElement(Kx.Provider,{value:o},a)}));r.forwardRef((function(e,t){var n,i=(0,r.useRef)(null),o=(0,r.useContext)(Kx);return(0,r.useEffect)((function(){return o.onChange((function(e){if(i.current){i.current.style.transform=o.handleTransformStyles(0,0,1/e.instance.transformState.scale)}}))}),[o]),r.createElement("div",px({},e,{ref:(n=[i,t],function(e){n.forEach((function(t){"function"===typeof t?t(e):null!=t&&(t.current=e)}))})}))}));var Qx="transform-component-module_wrapper__SPB86",Jx="transform-component-module_content__FBWxo";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".transform-component-module_wrapper__SPB86 {\n position: relative;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n overflow: hidden;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n margin: 0;\n padding: 0;\n}\n.transform-component-module_content__FBWxo {\n display: flex;\n flex-wrap: wrap;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n margin: 0;\n padding: 0;\n transform-origin: 0% 0%;\n}\n.transform-component-module_content__FBWxo img {\n pointer-events: none;\n}\n");var ew=function(e){var t=e.children,n=e.wrapperClass,i=void 0===n?"":n,o=e.contentClass,a=void 0===o?"":o,s=e.wrapperStyle,l=e.contentStyle,u=e.wrapperProps,c=void 0===u?{}:u,d=e.contentProps,f=void 0===d?{}:d,h=(0,r.useContext)(Kx),p=h.init,v=h.cleanupWindowEvents,m=(0,r.useRef)(null),g=(0,r.useRef)(null);return(0,r.useEffect)((function(){var e=m.current,t=g.current;return null!==e&&null!==t&&p&&(null===p||void 0===p||p(e,t)),function(){null===v||void 0===v||v()}}),[]),r.createElement("div",px({},c,{ref:m,className:"".concat(xx," ").concat(Qx," ").concat(i),style:s}),r.createElement("div",px({},f,{ref:g,className:"".concat(wx," ").concat(Jx," ").concat(a),style:l}),t))};var tw=n(9962),nw=n.n(tw),rw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iw=function(){return iw=Object.assign||function(e){for(var t,n=1,r=arguments.length;nNumber(c)?c:_})}if(S||this.props.lockAspectRatio&&!k&&!C){_=x+(y-v)/r;this.setState({maxWidth:_>Number(c)?c:_})}if((C||k)&&this.resizable){_=(m-b)/r+this.resizable.size.height;this.setState({maxHeight:_>Number(d)?d:_})}if(P||this.props.lockAspectRatio&&!C&&!k){_=w+(b-m)/r;this.setState({maxHeight:_>Number(d)?d:_})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(e,t,n)},t.prototype.onResize=function(e,t,n,r){var i=this,o={x:this.originalPosition.x,y:this.originalPosition.y},a=-r.width,s=-r.height;["top","left","topLeft","bottomLeft","topRight"].includes(t)&&("bottomLeft"===t?o.x+=a:("topRight"===t||(o.x+=a),o.y+=s));var l=this.draggable.state;o.x===l.x&&o.y===l.y||(0,fm.flushSync)((function(){i.draggable.setState(o)})),this.updateOffsetFromParent();var u=this.offsetFromParent,c=this.getDraggablePosition().x+u.left,d=this.getDraggablePosition().y+u.top;this.resizingPosition={x:c,y:d},this.props.onResize&&this.props.onResize(e,t,n,r,{x:c,y:d})},t.prototype.onResizeStop=function(e,t,n,r){this.setState({resizing:!1});var i=this.getMaxSizesFromProps(),o=i.maxWidth,a=i.maxHeight;this.setState({maxWidth:o,maxHeight:a}),this.props.onResizeStop&&this.props.onResizeStop(e,t,n,r,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),n=this.getSelfElement();if(!t||null===n)return{top:0,left:0};var r=t.getBoundingClientRect(),i=r.left,o=r.top,a=n.getBoundingClientRect(),s=this.getDraggablePosition(),l=t.scrollLeft,u=t.scrollTop;this.offsetFromParent={left:a.left-i+l-s.x*e,top:a.top-o+u-s.y*e}},t.prototype.render=function(){var e=this,t=this.props,n=t.disableDragging,i=t.style,o=t.dragHandleClassName,a=t.position,s=t.onMouseDown,l=t.onMouseUp,u=t.dragAxis,c=t.dragGrid,d=t.bounds,f=t.enableUserSelectHack,h=t.cancel,p=t.children,v=(t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop,t.resizeHandleStyles),m=t.resizeHandleClasses,g=t.resizeHandleComponent,y=t.enableResizing,b=t.resizeGrid,x=t.resizeHandleWrapperClass,w=t.resizeHandleWrapperStyle,k=t.scale,S=t.allowAnyClick,C=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 i=0;for(r=Object.getOwnPropertySymbols(e);i0?Pw="default":(e.scrollLeft=1,0===e.scrollLeft&&(Pw="negative")),document.body.removeChild(e),Pw}function Zw(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;switch(Ew()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function Mw(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var jw=["onChange"],Rw={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var Ow=(0,h.Z)((0,p.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Tw=(0,h.Z)((0,p.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function zw(e){return(0,Td.ZP)("MuiTabScrollButton",e)}var Aw=(0,vf.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Nw=["className","slots","slotProps","direction","orientation","disabled"],Lw=(0,of.ZP)(Ph,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.orientation&&t[n.orientation]]}})((function(e){var t=e.ownerState;return(0,El.Z)((0,b.Z)({width:40,flexShrink:0,opacity:.8},"&.".concat(Aw.disabled),{opacity:0}),"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})})),Dw=r.forwardRef((function(e,t){var n,r,i=(0,af.i)({props:e,name:"MuiTabScrollButton"}),o=i.className,a=i.slots,s=void 0===a?{}:a,l=i.slotProps,u=void 0===l?{}:l,c=i.direction,d=(0,Na.Z)(i,Nw),f=Bv(),h=(0,El.Z)({isRtl:f},i),v=function(e){var t=e.classes,n={root:["root",e.orientation,e.disabled&&"disabled"]};return(0,zd.Z)(n,zw,t)}(h),m=null!=(n=s.StartScrollButtonIcon)?n:Ow,g=null!=(r=s.EndScrollButtonIcon)?r:Tw,y=$v({elementType:m,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),b=$v({elementType:g,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return(0,p.jsx)(Lw,(0,El.Z)({component:"div",className:(0,Od.Z)(v.root,o),ref:t,role:null,ownerState:h,tabIndex:null},d,{children:"left"===c?(0,p.jsx)(m,(0,El.Z)({},y)):(0,p.jsx)(g,(0,El.Z)({},b))}))}));function Iw(e){return(0,Td.ZP)("MuiTabs",e)}var Fw=(0,vf.Z)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Bw=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Ww=function(e,t){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild},Hw=function(e,t){return e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild},Vw=function(e,t,n){for(var r=!1,i=n(e,t);i;){if(i===e.firstChild){if(r)return;r=!0}var o=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!o)return void i.focus();i=n(e,i)}},Uw=(0,of.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[(0,b.Z)({},"& .".concat(Fw.scrollButtons),t.scrollButtons),(0,b.Z)({},"& .".concat(Fw.scrollButtons),n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile),t.root,n.vertical&&t.vertical]}})((function(e){var t=e.ownerState,n=e.theme;return(0,El.Z)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&(0,b.Z)({},"& .".concat(Fw.scrollButtons),(0,b.Z)({},n.breakpoints.down("sm"),{display:"none"})))})),Yw=(0,of.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:function(e,t){var n=e.ownerState;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((function(e){var t=e.ownerState;return(0,El.Z)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})})),qw=(0,of.ZP)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:function(e,t){var n=e.ownerState;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((function(e){var t=e.ownerState;return(0,El.Z)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})})),Xw=(0,of.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:function(e,t){return t.indicator}})((function(e){var t=e.ownerState,n=e.theme;return(0,El.Z)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})})),$w=(0,of.ZP)((function(e){var t=e.onChange,n=(0,Na.Z)(e,jw),i=r.useRef(),o=r.useRef(null),a=function(){i.current=o.current.offsetHeight-o.current.clientHeight};return(0,Mp.Z)((function(){var e=(0,cm.Z)((function(){var e=i.current;a(),e!==i.current&&t(i.current)})),n=(0,dm.Z)(o.current);return n.addEventListener("resize",e),function(){e.clear(),n.removeEventListener("resize",e)}}),[t]),r.useEffect((function(){a(),t(i.current)}),[t]),(0,p.jsx)("div",(0,El.Z)({style:Rw,ref:o},n))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Kw={},Gw=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiTabs"}),i=hf(),o=Bv(),a=n["aria-label"],s=n["aria-labelledby"],l=n.action,u=n.centered,c=void 0!==u&&u,d=n.children,h=n.className,v=n.component,m=void 0===v?"div":v,g=n.allowScrollButtonsMobile,y=void 0!==g&&g,x=n.indicatorColor,w=void 0===x?"primary":x,k=n.onChange,S=n.orientation,C=void 0===S?"horizontal":S,P=n.ScrollButtonComponent,_=void 0===P?Dw:P,E=n.scrollButtons,Z=void 0===E?"auto":E,M=n.selectionFollowsFocus,j=n.slots,R=void 0===j?{}:j,O=n.slotProps,T=void 0===O?{}:O,z=n.TabIndicatorProps,A=void 0===z?{}:z,N=n.TabScrollButtonProps,L=void 0===N?{}:N,D=n.textColor,I=void 0===D?"primary":D,F=n.value,B=n.variant,W=void 0===B?"standard":B,H=n.visibleScrollbar,V=void 0!==H&&H,U=(0,Na.Z)(n,Bw),Y="scrollable"===W,q="vertical"===C,X=q?"scrollTop":"scrollLeft",$=q?"top":"left",K=q?"bottom":"right",G=q?"clientHeight":"clientWidth",Q=q?"height":"width",J=(0,El.Z)({},n,{component:m,allowScrollButtonsMobile:y,indicatorColor:w,orientation:C,vertical:q,scrollButtons:Z,textColor:I,variant:W,visibleScrollbar:V,fixed:!Y,hideScrollbar:Y&&!V,scrollableX:Y&&!q,scrollableY:Y&&q,centered:c&&!Y,scrollButtonsHideMobile:!y}),ee=function(e){var t=e.vertical,n=e.fixed,r=e.hideScrollbar,i=e.scrollableX,o=e.scrollableY,a=e.centered,s=e.scrollButtonsHideMobile,l=e.classes,u={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,zd.Z)(u,Iw,l)}(J),te=$v({elementType:R.StartScrollButtonIcon,externalSlotProps:T.startScrollButtonIcon,ownerState:J}),ne=$v({elementType:R.EndScrollButtonIcon,externalSlotProps:T.endScrollButtonIcon,ownerState:J});var re=r.useState(!1),ie=(0,f.Z)(re,2),oe=ie[0],ae=ie[1],se=r.useState(Kw),le=(0,f.Z)(se,2),ue=le[0],ce=le[1],de=r.useState(!1),fe=(0,f.Z)(de,2),he=fe[0],pe=fe[1],ve=r.useState(!1),me=(0,f.Z)(ve,2),ge=me[0],ye=me[1],be=r.useState(!1),xe=(0,f.Z)(be,2),we=xe[0],ke=xe[1],Se=r.useState({overflow:"hidden",scrollbarWidth:0}),Ce=(0,f.Z)(Se,2),Pe=Ce[0],_e=Ce[1],Ee=new Map,Ze=r.useRef(null),Me=r.useRef(null),je=function(){var e,t,n=Ze.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:Zw(n,o?"rtl":"ltr"),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==F){var i=Me.current.children;if(i.length>0){var a=i[Ee.get(F)];0,t=a?a.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Re=(0,Hf.Z)((function(){var e,t,n=je(),r=n.tabsMeta,i=n.tabMeta,a=0;if(q)t="top",i&&r&&(a=i.top-r.top+r.scrollTop);else if(t=o?"right":"left",i&&r){var s=o?r.scrollLeftNormalized+r.clientWidth-r.scrollWidth:r.scrollLeft;a=(o?-1:1)*(i[t]-r[t]+s)}var l=(e={},(0,b.Z)(e,t,a),(0,b.Z)(e,Q,i?i[Q]:0),e);if(isNaN(ue[t])||isNaN(ue[Q]))ce(l);else{var u=Math.abs(ue[t]-l[t]),c=Math.abs(ue[Q]-l[Q]);(u>=1||c>=1)&&ce(l)}})),Oe=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).animation;void 0===t||t?function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=r.ease,a=void 0===o?Mw:o,s=r.duration,l=void 0===s?300:s,u=null,c=t[e],d=!1,f=function(){d=!0};c===n?i(new Error("Element already at target position")):requestAnimationFrame((function r(o){if(d)i(new Error("Animation cancelled"));else{null===u&&(u=o);var s=Math.min(1,(o-u)/l);t[e]=a(s)*(n-c)+c,s>=1?requestAnimationFrame((function(){i(null)})):requestAnimationFrame(r)}}))}(X,Ze.current,e,{duration:i.transitions.duration.standard}):Ze.current[X]=e},Te=function(e){var t=Ze.current[X];q?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Ew()?-1:1),Oe(t)},ze=function(){for(var e=Ze.current[G],t=0,n=Array.from(Me.current.children),r=0;re){0===r&&(t=e);break}t+=i[G]}return t},Ae=function(){Te(-1*ze())},Ne=function(){Te(ze())},Le=r.useCallback((function(e){_e({overflow:null,scrollbarWidth:e})}),[]),De=(0,Hf.Z)((function(e){var t=je(),n=t.tabsMeta,r=t.tabMeta;if(r&&n)if(r[$]n[K]){var o=n[X]+(r[K]-n[K]);Oe(o,{animation:e})}})),Ie=(0,Hf.Z)((function(){Y&&!1!==Z&&ke(!we)}));r.useEffect((function(){var e,t,n=(0,cm.Z)((function(){Ze.current&&Re()})),r=(0,dm.Z)(Ze.current);return r.addEventListener("resize",n),"undefined"!==typeof ResizeObserver&&(e=new ResizeObserver(n),Array.from(Me.current.children).forEach((function(t){e.observe(t)}))),"undefined"!==typeof MutationObserver&&(t=new MutationObserver((function(t){t.forEach((function(t){t.removedNodes.forEach((function(t){var n;null==(n=e)||n.unobserve(t)})),t.addedNodes.forEach((function(t){var n;null==(n=e)||n.observe(t)}))})),n(),Ie()}))).observe(Me.current,{childList:!0}),function(){var i,o;n.clear(),r.removeEventListener("resize",n),null==(i=t)||i.disconnect(),null==(o=e)||o.disconnect()}}),[Re,Ie]),r.useEffect((function(){var e=Array.from(Me.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&Y&&!1!==Z){var n=e[0],r=e[t-1],i={root:Ze.current,threshold:.99},o=new IntersectionObserver((function(e){pe(!e[0].isIntersecting)}),i);o.observe(n);var a=new IntersectionObserver((function(e){ye(!e[0].isIntersecting)}),i);return a.observe(r),function(){o.disconnect(),a.disconnect()}}}),[Y,Z,we,null==d?void 0:d.length]),r.useEffect((function(){ae(!0)}),[]),r.useEffect((function(){Re()})),r.useEffect((function(){De(Kw!==ue)}),[De,ue]),r.useImperativeHandle(l,(function(){return{updateIndicator:Re,updateScrollButtons:Ie}}),[Re,Ie]);var Fe=(0,p.jsx)(Xw,(0,El.Z)({},A,{className:(0,Od.Z)(ee.indicator,A.className),ownerState:J,style:(0,El.Z)({},ue,A.style)})),Be=0,We=r.Children.map(d,(function(e){if(!r.isValidElement(e))return null;var t=void 0===e.props.value?Be:e.props.value;Ee.set(t,Be);var n=t===F;return Be+=1,r.cloneElement(e,(0,El.Z)({fullWidth:"fullWidth"===W,indicator:n&&!oe&&Fe,selected:n,selectionFollowsFocus:M,onChange:k,textColor:I,value:t},1!==Be||!1!==F||e.props.tabIndex?{}:{tabIndex:0}))})),He=function(){var e={};e.scrollbarSizeListener=Y?(0,p.jsx)($w,{onChange:Le,className:(0,Od.Z)(ee.scrollableX,ee.hideScrollbar)}):null;var t=Y&&("auto"===Z&&(he||ge)||!0===Z);return e.scrollButtonStart=t?(0,p.jsx)(_,(0,El.Z)({slots:{StartScrollButtonIcon:R.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:te},orientation:C,direction:o?"right":"left",onClick:Ae,disabled:!he},L,{className:(0,Od.Z)(ee.scrollButtons,L.className)})):null,e.scrollButtonEnd=t?(0,p.jsx)(_,(0,El.Z)({slots:{EndScrollButtonIcon:R.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ne},orientation:C,direction:o?"left":"right",onClick:Ne,disabled:!ge},L,{className:(0,Od.Z)(ee.scrollButtons,L.className)})):null,e}();return(0,p.jsxs)(Uw,(0,El.Z)({className:(0,Od.Z)(ee.root,h),ownerState:J,ref:t,as:m},U,{children:[He.scrollButtonStart,He.scrollbarSizeListener,(0,p.jsxs)(Yw,{className:ee.scroller,ownerState:J,style:(0,b.Z)({overflow:Pe.overflow},q?"margin".concat(o?"Left":"Right"):"marginBottom",V?void 0:-Pe.scrollbarWidth),ref:Ze,children:[(0,p.jsx)(qw,{"aria-label":a,"aria-labelledby":s,"aria-orientation":"vertical"===C?"vertical":null,className:ee.flexContainer,ownerState:J,onKeyDown:function(e){var t=Me.current,n=(0,Dv.Z)(t).activeElement;if("tab"===n.getAttribute("role")){var r="horizontal"===C?"ArrowLeft":"ArrowUp",i="horizontal"===C?"ArrowRight":"ArrowDown";switch("horizontal"===C&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),Vw(t,n,Hw);break;case i:e.preventDefault(),Vw(t,n,Ww);break;case"Home":e.preventDefault(),Vw(t,null,Ww);break;case"End":e.preventDefault(),Vw(t,null,Hw)}}},ref:Me,role:"tablist",children:We}),oe&&Fe]}),He.scrollButtonEnd]}))})),Qw=Gw;function Jw(e){return(0,Td.ZP)("MuiTab",e)}var ek=(0,vf.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),tk=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],nk=(0,of.ZP)(Ph,{name:"MuiTab",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor".concat((0,rf.Z)(n.textColor))],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,(0,b.Z)({},"& .".concat(ek.iconWrapper),t.iconWrapper)]}})((function(e){var t,n,r,i=e.theme,o=e.ownerState;return(0,El.Z)({},i.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},o.label&&{flexDirection:"top"===o.iconPosition||"bottom"===o.iconPosition?"column":"row"},{lineHeight:1.25},o.icon&&o.label&&(0,b.Z)({minHeight:72,paddingTop:9,paddingBottom:9},"& > .".concat(ek.iconWrapper),(0,El.Z)({},"top"===o.iconPosition&&{marginBottom:6},"bottom"===o.iconPosition&&{marginTop:6},"start"===o.iconPosition&&{marginRight:i.spacing(1)},"end"===o.iconPosition&&{marginLeft:i.spacing(1)})),"inherit"===o.textColor&&(t={color:"inherit",opacity:.6},(0,b.Z)(t,"&.".concat(ek.selected),{opacity:1}),(0,b.Z)(t,"&.".concat(ek.disabled),{opacity:(i.vars||i).palette.action.disabledOpacity}),t),"primary"===o.textColor&&(n={color:(i.vars||i).palette.text.secondary},(0,b.Z)(n,"&.".concat(ek.selected),{color:(i.vars||i).palette.primary.main}),(0,b.Z)(n,"&.".concat(ek.disabled),{color:(i.vars||i).palette.text.disabled}),n),"secondary"===o.textColor&&(r={color:(i.vars||i).palette.text.secondary},(0,b.Z)(r,"&.".concat(ek.selected),{color:(i.vars||i).palette.secondary.main}),(0,b.Z)(r,"&.".concat(ek.disabled),{color:(i.vars||i).palette.text.disabled}),r),o.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},o.wrapped&&{fontSize:i.typography.pxToRem(12)})})),rk=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiTab"}),i=n.className,o=n.disabled,a=void 0!==o&&o,s=n.disableFocusRipple,l=void 0!==s&&s,u=n.fullWidth,c=n.icon,d=n.iconPosition,f=void 0===d?"top":d,h=n.indicator,v=n.label,m=n.onChange,g=n.onClick,y=n.onFocus,b=n.selected,x=n.selectionFollowsFocus,w=n.textColor,k=void 0===w?"inherit":w,S=n.value,C=n.wrapped,P=void 0!==C&&C,_=(0,Na.Z)(n,tk),E=(0,El.Z)({},n,{disabled:a,disableFocusRipple:l,selected:b,icon:!!c,iconPosition:f,label:!!v,fullWidth:u,textColor:k,wrapped:P}),Z=function(e){var t=e.classes,n=e.textColor,r=e.fullWidth,i=e.wrapped,o=e.icon,a=e.label,s=e.selected,l=e.disabled,u={root:["root",o&&a&&"labelIcon","textColor".concat((0,rf.Z)(n)),r&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return(0,zd.Z)(u,Jw,t)}(E),M=c&&v&&r.isValidElement(c)?r.cloneElement(c,{className:(0,Od.Z)(Z.iconWrapper,c.props.className)}):c;return(0,p.jsxs)(nk,(0,El.Z)({focusRipple:!l,className:(0,Od.Z)(Z.root,i),ref:t,role:"tab","aria-selected":b,disabled:a,onClick:function(e){!b&&m&&m(e,S),g&&g(e)},onFocus:function(e){x&&!b&&m&&m(e,S),y&&y(e)},ownerState:E,tabIndex:b?0:-1},_,{children:["top"===f||"start"===f?(0,p.jsxs)(r.Fragment,{children:[M,v]}):(0,p.jsxs)(r.Fragment,{children:[v,M]}),h]}))})),ik=rk;var ok=(0,vf.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);function ak(e){return(0,Td.ZP)("MuiListItemIcon",e)}var sk=(0,vf.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]);function lk(e){return(0,Td.ZP)("MuiMenuItem",e)}var uk=(0,vf.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ck=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],dk=(0,of.ZP)(Ph,{shouldForwardProp:function(e){return(0,Bf.Z)(e)||"classes"===e},name:"MuiMenuItem",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((function(e){var t,n=e.theme,r=e.ownerState;return(0,El.Z)({},n.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!r.disableGutters&&{paddingLeft:16,paddingRight:16},r.divider&&{borderBottom:"1px solid ".concat((n.vars||n).palette.divider),backgroundClip:"padding-box"},(t={"&:hover":{textDecoration:"none",backgroundColor:(n.vars||n).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},(0,b.Z)(t,"&.".concat(uk.selected),(0,b.Z)({backgroundColor:n.vars?"rgba(".concat(n.vars.palette.primary.mainChannel," / ").concat(n.vars.palette.action.selectedOpacity,")"):(0,Ff.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity)},"&.".concat(uk.focusVisible),{backgroundColor:n.vars?"rgba(".concat(n.vars.palette.primary.mainChannel," / calc(").concat(n.vars.palette.action.selectedOpacity," + ").concat(n.vars.palette.action.focusOpacity,"))"):(0,Ff.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity+n.palette.action.focusOpacity)})),(0,b.Z)(t,"&.".concat(uk.selected,":hover"),{backgroundColor:n.vars?"rgba(".concat(n.vars.palette.primary.mainChannel," / calc(").concat(n.vars.palette.action.selectedOpacity," + ").concat(n.vars.palette.action.hoverOpacity,"))"):(0,Ff.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:n.vars?"rgba(".concat(n.vars.palette.primary.mainChannel," / ").concat(n.vars.palette.action.selectedOpacity,")"):(0,Ff.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity)}}),(0,b.Z)(t,"&.".concat(uk.focusVisible),{backgroundColor:(n.vars||n).palette.action.focus}),(0,b.Z)(t,"&.".concat(uk.disabled),{opacity:(n.vars||n).palette.action.disabledOpacity}),(0,b.Z)(t,"& + .".concat(ok.root),{marginTop:n.spacing(1),marginBottom:n.spacing(1)}),(0,b.Z)(t,"& + .".concat(ok.inset),{marginLeft:52}),(0,b.Z)(t,"& .".concat(Ob.root),{marginTop:0,marginBottom:0}),(0,b.Z)(t,"& .".concat(Ob.inset),{paddingLeft:36}),(0,b.Z)(t,"& .".concat(sk.root),{minWidth:36}),t),!r.dense&&(0,b.Z)({},n.breakpoints.up("sm"),{minHeight:"auto"}),r.dense&&(0,El.Z)({minHeight:32,paddingTop:4,paddingBottom:4},n.typography.body2,(0,b.Z)({},"& .".concat(sk.root," svg"),{fontSize:"1.25rem"})))})),fk=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiMenuItem"}),i=n.autoFocus,o=void 0!==i&&i,a=n.component,s=void 0===a?"li":a,l=n.dense,u=void 0!==l&&l,c=n.divider,d=void 0!==c&&c,f=n.disableGutters,h=void 0!==f&&f,v=n.focusVisibleClassName,m=n.role,g=void 0===m?"menuitem":m,y=n.tabIndex,b=n.className,x=(0,Na.Z)(n,ck),w=r.useContext(Kv),k=r.useMemo((function(){return{dense:u||w.dense||!1,disableGutters:h}}),[w.dense,u,h]),S=r.useRef(null);(0,Mp.Z)((function(){o&&S.current&&S.current.focus()}),[o]);var C,P=(0,El.Z)({},n,{dense:k.dense,divider:d,disableGutters:h}),_=function(e){var t=e.disabled,n=e.dense,r=e.divider,i=e.disableGutters,o=e.selected,a=e.classes,s={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,zd.Z)(s,lk,a);return(0,El.Z)({},a,l)}(n),E=(0,Wf.Z)(S,t);return n.disabled||(C=void 0!==y?y:-1),(0,p.jsx)(Kv.Provider,{value:k,children:(0,p.jsx)(dk,(0,El.Z)({ref:E,role:g,tabIndex:C,component:s,focusVisibleClassName:(0,Od.Z)(_.focusVisible,v),className:(0,Od.Z)(_.root,b)},x,{ownerState:P,classes:_}))})}));function hk(e){return(0,Td.ZP)("MuiLinearProgress",e)}(0,vf.Z)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var pk,vk,mk,gk,yk,bk,xk,wk,kk,Sk,Ck,Pk,_k=["className","color","value","valueBuffer","variant"],Ek=(0,Jf.F4)(xk||(xk=pk||(pk=Uf(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])))),Zk=(0,Jf.F4)(wk||(wk=vk||(vk=Uf(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])))),Mk=(0,Jf.F4)(kk||(kk=mk||(mk=Uf(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])))),jk=function(e,t){return"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?(0,Ff.$n)(e.palette[t].main,.62):(0,Ff._j)(e.palette[t].main,.5)},Rk=(0,of.ZP)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["color".concat((0,rf.Z)(n.color))],t[n.variant]]}})((function(e){var t=e.ownerState,n=e.theme;return(0,El.Z)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:jk(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),Ok=(0,of.ZP)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:function(e,t){var n=e.ownerState;return[t.dashed,t["dashedColor".concat((0,rf.Z)(n.color))]]}})((function(e){var t=e.ownerState,n=e.theme,r=jk(n,t.color);return(0,El.Z)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,Jf.iv)(Sk||(Sk=gk||(gk=Uf(["\n animation: "," 3s infinite linear;\n "]))),Mk)),Tk=(0,of.ZP)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:function(e,t){var n=e.ownerState;return[t.bar,t["barColor".concat((0,rf.Z)(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((function(e){var t=e.ownerState,n=e.theme;return(0,El.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})}),(function(e){var t=e.ownerState;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Jf.iv)(Ck||(Ck=yk||(yk=Uf(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "]))),Ek)})),zk=(0,of.ZP)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:function(e,t){var n=e.ownerState;return[t.bar,t["barColor".concat((0,rf.Z)(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((function(e){var t=e.ownerState,n=e.theme;return(0,El.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:jk(n,t.color),transition:"transform .".concat(4,"s linear")})}),(function(e){var t=e.ownerState;return("indeterminate"===t.variant||"query"===t.variant)&&(0,Jf.iv)(Pk||(Pk=bk||(bk=Uf(["\n width: auto;\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "]))),Zk)})),Ak=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiLinearProgress"}),r=n.className,i=n.color,o=void 0===i?"primary":i,a=n.value,s=n.valueBuffer,l=n.variant,u=void 0===l?"indeterminate":l,c=(0,Na.Z)(n,_k),d=(0,El.Z)({},n,{color:o,variant:u}),f=function(e){var t=e.classes,n=e.variant,r=e.color,i={root:["root","color".concat((0,rf.Z)(r)),n],dashed:["dashed","dashedColor".concat((0,rf.Z)(r))],bar1:["bar","barColor".concat((0,rf.Z)(r)),("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&"barColor".concat((0,rf.Z)(r)),"buffer"===n&&"color".concat((0,rf.Z)(r)),("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,zd.Z)(i,hk,t)}(d),h=Bv(),v={},m={bar1:{},bar2:{}};if("determinate"===u||"buffer"===u)if(void 0!==a){v["aria-valuenow"]=Math.round(a),v["aria-valuemin"]=0,v["aria-valuemax"]=100;var g=a-100;h&&(g=-g),m.bar1.transform="translateX(".concat(g,"%)")}else 0;if("buffer"===u)if(void 0!==s){var y=(s||0)-100;h&&(y=-y),m.bar2.transform="translateX(".concat(y,"%)")}else 0;return(0,p.jsxs)(Rk,(0,El.Z)({className:(0,Od.Z)(f.root,r),ownerState:d,role:"progressbar"},v,{ref:t},c,{children:["buffer"===u?(0,p.jsx)(Ok,{className:f.dashed,ownerState:d}):null,(0,p.jsx)(Tk,{className:f.bar1,ownerState:d,style:m.bar1}),"determinate"===u?null:(0,p.jsx)(zk,{className:f.bar2,ownerState:d,style:m.bar2})]}))})),Nk=Ak,Lk=function(e){var t=e.hostIP,n=e.hostPort,i=(0,r.useState)("Laser 1"),o=(0,f.Z)(i,2),a=o[0],l=o[1],c=(0,r.useState)(128),h=(0,f.Z)(c,2),v=h[0],m=h[1],g=(0,r.useState)("300"),y=(0,f.Z)(g,2),b=y[0],x=y[1],k=(0,r.useState)("300"),S=(0,f.Z)(k,2),C=S[0],P=S[1],_=(0,r.useState)("2"),E=(0,f.Z)(_,2),Z=E[0],M=E[1],j=(0,r.useState)("2"),R=(0,f.Z)(j,2),O=R[0],T=R[1],z=(0,r.useState)({mouseX:null,mouseY:null}),A=(0,f.Z)(z,2),N=A[0],L=A[1],D=(0,r.useState)("Default Path"),I=(0,f.Z)(D,2),F=I[0],B=I[1],W=(0,r.useState)(""),H=(0,f.Z)(W,2),V=H[0],U=H[1],Y=(0,r.useState)(""),q=(0,f.Z)(Y,2),X=q[0],$=q[1],K=(0,r.useState)(!1),G=(0,f.Z)(K,2),Q=G[0],J=G[1],ee=(0,r.useState)(0),te=(0,f.Z)(ee,2),ne=te[0],re=te[1],ie=(0,r.useState)(0),oe=(0,f.Z)(ie,2),ae=oe[0],se=oe[1],le=(0,r.useState)(!1),ue=(0,f.Z)(le,2),ce=ue[0],de=ue[1],fe=(0,r.useState)([0,0]),he=(0,f.Z)(fe,2),pe=he[0],ve=he[1],me=(0,r.useState)(!1),ge=(0,f.Z)(me,2),ye=ge[0],be=ge[1],xe=(0,r.useState)(!1),we=(0,f.Z)(xe,2),ke=we[0],Se=we[1],Ce=(0,r.useState)(!1),Pe=(0,f.Z)(Ce,2),_e=Pe[0],Ee=Pe[1],Ze=(0,r.useState)(1),Me=(0,f.Z)(Ze,2),je=Me[0],Re=Me[1],Oe=(0,r.useState)(""),Te=(0,f.Z)(Oe,2),ze=Te[0],Ae=Te[1],Ne=(0,r.useState)(""),Le=(0,f.Z)(Ne,2),De=Le[0],Ie=Le[1],Fe=(0,r.useState)(""),Be=(0,f.Z)(Fe,2),We=Be[0],He=Be[1],Ve=(0,r.useState)(""),Ue=(0,f.Z)(Ve,2),Ye=Ue[0],qe=Ue[1],Xe=(0,r.useState)(null),$e=(0,f.Z)(Xe,2),Ke=$e[0],Ge=$e[1],Qe=(0,r.useState)({x:0,y:0}),Je=(0,f.Z)(Qe,2),et=Je[0],tt=Je[1],nt=(0,r.useState)([]),rt=(0,f.Z)(nt,2),it=rt[0],ot=rt[1],at=(0,r.useState)(0),st=(0,f.Z)(at,2),lt=st[0],ut=st[1],ct=(0,r.useState)(!0),dt=(0,f.Z)(ct,2),ft=dt[0],ht=dt[1],pt=(0,r.useState)({x:0,y:0}),vt=(0,f.Z)(pt,2),mt=vt[0],gt=(vt[1],(0,r.useState)(null)),yt=(0,f.Z)(gt,2),bt=yt[0],xt=yt[1],wt=(0,r.useState)([]),kt=(0,f.Z)(wt,2),St=kt[0],Ct=kt[1],Pt=(0,r.useState)(""),_t=(0,f.Z)(Pt,2),Et=_t[0],Zt=_t[1],Mt=(0,r.useState)(null),jt=(0,f.Z)(Mt,2),Rt=jt[0],Ot=jt[1],Tt=(0,r.useState)([]),zt=(0,f.Z)(Tt,2),At=zt[0],Nt=zt[1],Lt=(0,r.useState)("".concat(t,":").concat(n,"/RecordingController/video_feeder")),Dt=(0,f.Z)(Lt,2),It=(Dt[0],Dt[1],(0,r.useState)({width:320,height:180})),Ft=(0,f.Z)(It,2),Bt=(Ft[0],Ft[1],(0,r.useState)({x:50,y:50})),Wt=(0,f.Z)(Bt,2);Wt[0],Wt[1];(0,r.useEffect)((function(){var e=function(){var e=d(u().mark((function e(){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(t,":").concat(n,"/HistoScanController/getHistoStatus"));case 3:if((r=e.sent).ok){e.next=6;break}throw new Error("Error: ".concat(r.statusText));case 6:return e.next=8,r.json();case 8:i=e.sent,ve(i.currentPosition),J(i.ishistoscanRunning),de(i.stitchResultAvailable),se(i.mScanIndex),re(i.mScanCount),x(parseInt(i.currentStepSizeX)),P(parseInt(i.currentStepSizeY)),M(i.currentNX.toString()),T(i.currentNY.toString()),be(i.currentAshlarStitching),Se(i.currentAshlarFlipX),Ee(i.currentAshlarFlipY),Re(i.currentResizeFactor.toString()),Ae(parseInt(i.currentIinitialPosX).toString()),Ie(parseInt(i.currentIinitialPosY).toString()),U(i.currentTimeInterval.toString()),$(i.currentNtimes.toString()),console.log("Pixel Size: ".concat(i.pixelSize)),e.next=32;break;case 29:e.prev=29,e.t0=e.catch(0),console.error("Error fetching HistoScan status:",e.t0);case 32:case"end":return e.stop()}}),e,null,[[0,29]])})));return function(){return e.apply(this,arguments)}}();e()}),[]);(0,r.useEffect)((function(){var e=function(){var e=d(u().mark((function e(){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(t,":").concat(n,"/HistoScanController/getSampleLayoutFilePaths"));case 3:return r=e.sent,e.next=6,r.json();case 6:i=e.sent,Ct(i),Zt(i[0]),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.error("Error fetching layout files:",e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();e()}),[t,n]);var Ht=function(){var e=d(u().mark((function e(r){var i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Zt(r),e.prev=1,e.next=4,fetch("".concat(t,":").concat(n,"/").concat(r));case 4:return i=e.sent,e.next=7,i.json();case 7:o=e.sent,Ot(o),qe("".concat(t,":").concat(n,"/").concat(o.ScanParameters.imagePath)),Nt([]),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),console.error("Error loading layout:",e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(t){return e.apply(this,arguments)}}(),Vt=function(e){if(e&&Rt){var t=e.offsetWidth,n=e.offsetHeight,r=t/Rt.ScanParameters.pixelImageX,i=n/Rt.ScanParameters.pixelImageY,o=Rt.ScanParameters.wells.map((function(e){return w(w({},e),{},{scaledX:e.positionXpx*r,scaledY:e.positionYpx*i})}));Nt(o)}},Ut=function(){Ge(null),L({mouseX:null,mouseY:null}),ht(!0)},Yt=function(e,r){var i="".concat(t,":").concat(n,"/PositionerController/movePositioner?axis=").concat(e,"&dist=").concat(r,"&isAbsolute=true&isBlocking=false");fetch(i,{method:"GET"}).then((function(e){return e.json()})).then((function(e){return console.log("Positioner moved:",e)})).catch((function(e){return console.error("Error:",e)})),Ut()};(0,r.useEffect)((function(){var e=qt((function(){var e=document.querySelector("img[alt='Map']");e&&Vt(e)}),100);return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[Rt]);var qt=function(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(If,{variant:"body2",children:["Scanning: ",ae+1," / ",ne]}),(0,p.jsx)(Nk,{variant:"determinate",value:(ae+1)/ne*100})]}),(0,p.jsxs)(If,{variant:"body2",children:["Result Available: ",ce?"Yes":"No",", Current Position:"," ",pe&&pe.length>1?"".concat(pe[0],", ").concat(pe[1]):"Loading..."]})]})]}),1===lt&&(0,p.jsxs)(_f,{container:!0,spacing:2,children:[(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(Ah,{variant:"contained",color:"primary",onClick:function(){fetch("".concat(t,":").concat(n,"/HistoScanController/getLastStitchedImage")).then((function(e){if(!e.ok)throw new Error("Network response was not ok");return e.blob()})).then((function(e){var t=URL.createObjectURL(e);He(t)})).catch((function(e){return console.error("Error fetching image:",e)}))},children:"Fetch Last Stitched Image"})}),We&&(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsx)(Ah,{variant:"contained",color:"secondary",onClick:function(){var e=document.createElement("a");e.href=We,e.download="stitched_image.png",e.click()},children:"Download Image"}),(0,p.jsx)("div",{style:{marginTop:"20px"},children:(0,p.jsx)(Gx,{panning:{disabled:!ft},children:(0,p.jsx)(ew,{children:(0,p.jsx)("img",{src:We,alt:"Map",style:{maxWidth:"100%"}})})})})]})]}),2===lt&&(0,p.jsxs)(_f,{container:!0,spacing:2,children:[(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsx)(If,{variant:"h6",children:"Select Layout"}),(0,p.jsx)(sy,{value:Et,onChange:function(e){return Ht(e.target.value)},fullWidth:!0,children:St.map((function(e,t){return(0,p.jsx)(fk,{value:e,children:e.split("/").pop()},t)}))})]}),(0,p.jsx)("div",{children:Rt&&(0,p.jsxs)("div",{style:{position:"relative",padding:0,margin:0},children:[(0,p.jsx)("img",{src:Ye,alt:"Map",style:{maxWidth:"100%",display:"block",margin:0,padding:0},onLoad:function(e){return Vt(e.target)}}),At.map((function(e){return console.log("Well ID: ".concat(e.wellID,", scaledX: ").concat(e.scaledX,"px, scaledY: ").concat(e.scaledY,"px")),(0,p.jsx)("div",{style:{position:"absolute",top:"".concat(e.scaledY,"px"),left:"".concat(e.scaledX,"px"),width:"10px",height:"10px",backgroundColor:"blue",borderRadius:"50%",transform:"translate(-50%, -50%)"},title:e.wellID},e.wellID)}))]})})]}),3===lt&&(0,p.jsxs)(_f,{container:!0,spacing:2,children:[Ye&&(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsxs)("div",{style:{marginTop:"20px",position:"relative"},children:[(0,p.jsx)("img",{src:Ye,alt:"Map",style:{maxWidth:"100%"},onContextMenu:function(e){e.preventDefault();var t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;tt({x:n,y:r}),L({mouseX:e.clientX,mouseY:e.clientY}),Ge(e.currentTarget),ht(!1)}}),bt&&(0,p.jsx)("div",{style:{position:"absolute",top:"".concat(bt.y,"px"),left:"".concat(bt.x,"px"),width:"10px",height:"10px",backgroundColor:"red",borderRadius:"50%",transform:"translate(-50%, -50%)"}}),mt&&(0,p.jsx)("div",{style:{position:"absolute",top:"".concat(mt.y,"px"),left:"".concat(mt.x,"px"),width:"10px",height:"10px",backgroundColor:"blue",borderRadius:"50%",transform:"translate(-50%, -50%)"}}),(0,p.jsx)(Gx,{onPanningStart:function(e){return e.preventDefault()},onPinchingStart:function(e){return e.preventDefault()},panning:{disabled:!ft},children:(0,p.jsx)(ew,{})}),(0,p.jsxs)(Og,{anchorReference:"anchorPosition",anchorPosition:null!==N.mouseY&&null!==N.mouseX?{top:N.mouseY,left:N.mouseX}:void 0,open:Boolean(Ke),onClose:Ut,children:[(0,p.jsx)(fk,{onClick:function(){return Yt("X",et.x)},children:"Go to X Position"}),(0,p.jsx)(fk,{onClick:function(){return Yt("Y",et.y)},children:"Go to Y Position"}),(0,p.jsx)(fk,{onClick:function(){xt(et),Yt("X",et.x),Yt("Y",et.y),Ut()},children:"Go to X & Y Position"}),(0,p.jsx)(fk,{onClick:function(){ot([].concat((0,s.Z)(it),[et])),xt(et),Ut()},children:"Save Position"})]}),(0,p.jsx)(Tf,{mt:2,children:(0,p.jsxs)(If,{variant:"h6",children:["Current XY Position: X = ",mt.x.toFixed(2),", Y ="," ",mt.y.toFixed(2)]})})]})}),(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsx)(If,{variant:"h6",children:"Saved Positions"}),(0,p.jsx)(em,{children:it.map((function(e,t){return(0,p.jsxs)(jb,{children:["Position ",t+1,": X = ",e.x,", Y = ",e.y]},t)}))})]})]})]})},Dk=n(7),Ik=n(2460),Fk=n(8384),Bk=n(6711),Wk=["children","value","index"],Hk=function(e){var t=e.children,n=e.value,r=e.index,i=La(e,Wk);return(0,p.jsx)("div",w(w({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},i),{},{children:n===r&&(0,p.jsx)(Tf,{p:3,children:t})}))},Vk=function(e){var t=e.hostIP,n=e.hostPort,i=(e.WindowTitle,(0,r.useState)(0)),o=(0,f.Z)(i,2),a=o[0],s=o[1],l=(0,r.useState)("0"),c=(0,f.Z)(l,2),h=c[0],v=c[1],m=(0,r.useState)("Test"),g=(0,f.Z)(m,2),y=g[0],b=g[1],x=(0,r.useState)("Some description"),w=(0,f.Z)(x,2),k=w[0],S=w[1],C=(0,r.useState)(1),P=(0,f.Z)(C,2),_=P[0],E=P[1],Z=(0,r.useState)(10),M=(0,f.Z)(Z,2),j=M[0],R=M[1],O=(0,r.useState)(1e3),T=(0,f.Z)(O,2),z=T[0],A=T[1],N=(0,r.useState)(.5),L=(0,f.Z)(N,2),D=L[0],I=L[1],F=(0,r.useState)(1e4),B=(0,f.Z)(F,2),W=B[0],H=B[1],V=(0,r.useState)(!1),U=(0,f.Z)(V,2),Y=U[0],q=U[1],X=(0,r.useState)(0),$=(0,f.Z)(X,2),K=$[0],G=$[1],Q=Cl();(0,r.useEffect)((function(){var e=function(){var e=d(u().mark((function e(){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(t,":").concat(n,"/FlowStopController/getStatus"));case 3:return r=e.sent,e.next=6,r.json();case 6:i=e.sent,q(i[0]),G(i[1]),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(0);case 13:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}(),r=function(){var e=d(u().mark((function e(){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(t,":").concat(n,"/FlowStopController/getExperimentParameters"));case 3:return r=e.sent,e.next=6,r.json();case 6:i=e.sent,v(i.timeStamp),b(i.experimentName),S("Add some description here"),E(parseFloat(i.uniqueId,1)),R(parseFloat(i.numImages,-1)),A(parseFloat(i.volumePerImage,1e3)),I(parseFloat(i.timeToStabilize,1)),H(parseFloat(i.pumpSpeed,1e3)),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),console.error("Error fetching experiment parameters:",e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})));return function(){return e.apply(this,arguments)}}();e(),r()}),[t,n]),(0,r.useEffect)((function(){if(Q)return Q.on("signal",(function(e){var t=JSON.parse(e);"sigImagesTaken"===t.name&&G(t.args.p0)})),function(){Q&&(Q.onmessage=null)}}),[Q]);return(0,p.jsxs)(dg,{children:[(0,p.jsxs)(Qw,{value:a,onChange:function(e,t){s(t)},"aria-label":"acquisition settings tabs",children:[(0,p.jsx)(ik,{label:"Automatic Settings"}),(0,p.jsx)(ik,{label:"Manual Acquisition Settings"})]}),(0,p.jsxs)(Hk,{value:a,index:1,children:[(0,p.jsx)(If,{children:"Focus"}),(0,p.jsx)(Yy,{defaultValue:30}),(0,p.jsx)(If,{children:"Pump Speed"}),(0,p.jsx)(Yy,{defaultValue:30}),(0,p.jsx)(Ah,{variant:"contained",children:"Snap"}),(0,p.jsx)(hy,{label:"Exposure Time",defaultValue:"0.1"}),(0,p.jsx)(hy,{label:"Gain",defaultValue:"0"})]}),(0,p.jsx)(Hk,{value:a,index:0,children:(0,p.jsxs)(_f,{container:!0,spacing:2,children:[(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{style:{marginBottom:"20px"},label:"Time Stamp Name",value:h,onChange:function(e){return v(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{style:{marginBottom:"20px"},label:"Experiment Name",value:y,onChange:function(e){return b(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{style:{marginBottom:"20px"},label:"Experiment Description",value:k,onChange:function(e){return S(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{style:{marginBottom:"20px"},label:"Volume Per Image",value:z,onChange:function(e){return A(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{style:{marginBottom:"20px"},label:"Time to stabilize",value:D,onChange:function(e){return I(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{style:{marginBottom:"20px"},label:"Pump Speed",value:W,onChange:function(e){return H(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{style:{marginBottom:"20px"},label:"Number of Images",value:j,onChange:function(e){return R(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsxs)("div",{children:[(0,p.jsx)(Ah,{style:{marginBottom:"20px",marginRight:"10px"},variant:"contained",onClick:function(){var e="".concat(t,":").concat(n,"/FlowStopController/startFlowStopExperimentFastAPI?timeStamp=").concat(h,"&experimentName=").concat(y,"&experimentDescription=").concat(k,"&uniqueId=").concat(_,"&numImages=").concat(j,"&volumePerImage=").concat(z,"&timeToStabilize=").concat(D,"&isRecordVideo=true&pumpSpeed=").concat(W);fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log(e),q(!0)})).catch((function(e){return console.error("Error:",e)}))},disabled:Y,children:"Start"}),(0,p.jsx)(Ah,{style:{marginBottom:"20px"},variant:"contained",onClick:function(){var e="".concat(t,":").concat(n,"/FlowStopController/stopFlowStopExperiment");fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log(e),q(!1)})).catch((function(e){return console.error("Error:",e)}))},disabled:!Y,children:"Stop"})]})}),(0,p.jsx)(_f,{item:!0,xs:6,children:(0,p.jsxs)(Tf,{display:"flex",alignItems:"center",children:[(0,p.jsx)(If,{variant:"h6",children:"Status: "}),Y?(0,p.jsx)(Fk.Z,{style:{color:Dk.Z[500],marginLeft:"10px"}}):(0,p.jsx)(Bk.Z,{style:{color:Ik.Z[500],marginLeft:"10px"}})]})}),(0,p.jsx)(_f,{item:!0,xs:6,children:(0,p.jsxs)(If,{variant:"h6",children:["Images Taken: ",K]})})]})})]})},Uk=(0,r.createContext)(),Yk=function(e){var t=e.children,n=(0,r.useState)("5"),i=(0,f.Z)(n,2),o=i[0],a=i[1],s=(0,r.useState)("1"),l=(0,f.Z)(s,2),u=l[0],c=l[1],d=(0,r.useState)("-100"),h=(0,f.Z)(d,2),v=h[0],m=h[1],g=(0,r.useState)("100"),y=(0,f.Z)(g,2),b=y[0],x=y[1],w=(0,r.useState)("0"),k=(0,f.Z)(w,2),S=k[0],C=k[1],P=(0,r.useState)(!1),_=(0,f.Z)(P,2),E=_[0],Z=_[1],M=(0,r.useState)("-1000"),j=(0,f.Z)(M,2),R=j[0],O=j[1],T=(0,r.useState)("1000"),z=(0,f.Z)(T,2),A=z[0],N=z[1],L=(0,r.useState)("0"),D=(0,f.Z)(L,2),I=D[0],F=D[1],B=(0,r.useState)(!1),W=(0,f.Z)(B,2),H=W[0],V=W[1],U=(0,r.useState)("-1000"),Y=(0,f.Z)(U,2),q=Y[0],X=Y[1],$=(0,r.useState)("1000"),K=(0,f.Z)($,2),G=K[0],Q=K[1],J=(0,r.useState)("0"),ee=(0,f.Z)(J,2),te=ee[0],ne=ee[1],re=(0,r.useState)(!1),ie=(0,f.Z)(re,2),oe=ie[0],ae=ie[1],se=(0,r.useState)(0),le=(0,f.Z)(se,2),ue=le[0],ce=le[1],de=(0,r.useState)(0),fe=(0,f.Z)(de,2),he=fe[0],pe=fe[1],ve=(0,r.useState)(0),me=(0,f.Z)(ve,2),ge=me[0],ye=me[1],be=(0,r.useState)("MCT"),xe=(0,f.Z)(be,2),we=xe[0],ke=xe[1],Se=(0,r.useState)(!1),Ce=(0,f.Z)(Se,2),Pe=Ce[0],_e=Ce[1];return(0,p.jsx)(Uk.Provider,{value:{timePeriod:o,setTimePeriod:a,numMeasurements:u,setNumMeasurements:c,zMin:v,setZMin:m,zMax:b,setZMax:x,zSteps:S,setZSteps:C,zStackEnabled:E,setZStackEnabled:Z,xMin:R,setXMin:O,xMax:A,setXMax:N,xSteps:I,setXSteps:F,xStackEnabled:H,setXStackEnabled:V,yMin:q,setYMin:X,yMax:G,setYMax:Q,ySteps:te,setYSteps:ne,yStackEnabled:oe,setYStackEnabled:ae,intensityLaser1:ue,setIntensityLaser1:ce,intensityLaser2:he,setIntensityLaser2:pe,intensityLED:ge,setIntensityLED:ye,fileName:we,setFileName:ke,isRunning:Pe,setIsRunning:_e},children:t})},qk=r.createContext();function Xk(e){var t=e.children,n=(0,r.useState)(0),i=(0,f.Z)(n,2),o=i[0],a=i[1],s=(0,r.useState)({init:"init"}),l=(0,f.Z)(s,2),u=l[0],c=l[1];return(0,p.jsx)(qk.Provider,{value:{sliderValue:o,setSliderValue:a,generic:u,handleGeneric:function(e){var t=e[0],n=e[1];c((function(e){return w(w({},e),{},(0,b.Z)({},t,n))}))}},children:t})}var $k=function(e){var t=e.hostIP,n=e.hostPort,i=(0,r.useState)(0),o=(0,f.Z)(i,2),a=o[0],s=o[1],l=(0,r.useState)(""),u=(0,f.Z)(l,2),c=u[0],d=u[1],h=(0,r.useContext)(Uk),v=h.timePeriod,m=h.setTimePeriod,g=h.numMeasurements,y=h.setNumMeasurements,b=h.zMin,x=h.setZMin,w=h.zMax,k=h.setZMax,S=h.zSteps,C=h.setZSteps,P=h.zStackEnabled,_=h.setZStackEnabled,E=h.xMin,Z=h.setXMin,M=h.xMax,j=h.setXMax,R=h.xSteps,O=h.setXSteps,T=h.xStackEnabled,z=h.setXStackEnabled,A=h.yMin,N=h.setYMin,L=h.yMax,D=h.setYMax,I=h.ySteps,F=h.setYSteps,B=h.yStackEnabled,W=h.setYStackEnabled,H=h.intensityLaser1,V=h.setIntensityLaser1,U=h.intensityLaser2,Y=h.setIntensityLaser2,q=h.intensityLED,X=h.setIntensityLED,$=h.fileName,K=h.setFileName,G=h.isRunning,Q=h.setIsRunning,J=(0,r.useContext)(qk);(0,r.useEffect)((function(){!function(){var e="".concat(t,":").concat(n,"/MCTController/getMCTStatus");fetch(e).then((function(e){return e.json()})).then((function(e){console.log(e),m(e.timePeriod),_(e.zStackEnabled),x(e.zStackMin),k(e.zStackMax),C(e.zStackStep),z(e.xyScanEnabled),Z(e.xScanMin),j(e.xScanMax),O(e.xScanStep),N(e.yScanMin),D(e.yScanMax),F(e.yScanStep),V(e.Illu1Value),Y(e.Illu2Value),X(e.Illu3Value),s(e.nImagesTaken),Q(e.isMCTrunning),d(e.MCTFilename)})).catch((function(e){}))}()}),[t,n]);return(0,p.jsx)(dg,{style:{padding:"20px"},children:(0,p.jsxs)(_f,{container:!0,spacing:2,children:[(0,p.jsx)(_f,{item:!0,xs:6,children:(0,p.jsx)(hy,{label:"Period T (s)",value:v,onChange:function(e){return m(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:6,children:(0,p.jsx)(hy,{label:"N Measurements",value:g,onChange:function(e){return y(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"Z-Stack Min",value:b,onChange:function(e){return x(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"Z-Stack Max",value:w,onChange:function(e){return k(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"Z-Stack Steps",value:S,onChange:function(e){return C(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(ep,{control:(0,p.jsx)(rb,{}),checked:P,onChange:function(e){return _(e.target.checked)},label:"Z-Stack Enabled"})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"X Scan Min",value:E,onChange:function(e){return Z(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"X Scan Max",value:M,onChange:function(e){return j(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"X Scan Steps",value:R,onChange:function(e){return O(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(ep,{control:(0,p.jsx)(rb,{}),checked:T,onChange:function(e){return z(e.target.checked)},label:"XY Scan Enabled"})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"Y Scan Min",value:A,onChange:function(e){return N(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"Y Scan Max",value:L,onChange:function(e){return D(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(hy,{label:"Y Scan Steps",value:I,onChange:function(e){return F(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(ep,{control:(0,p.jsx)(rb,{}),checked:B,onChange:function(e){return W(e.target.checked)},label:"Y-Stack Enabled"})}),(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsxs)(If,{children:["Intensity (Laser 1): ",H]}),(0,p.jsx)(Yy,{value:J.sliderValue,onChange:function(e,t){return J.setSliderValue(t)},max:32767,step:1})]}),(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsxs)(If,{children:["Intensity (Laser 2): ",J.generic.slider2]}),(0,p.jsx)(Yy,{value:J.generic.slider2,onChange:function(e,t){return J.handleGeneric(["slider2",t])},max:32767,step:1})]}),(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsxs)(If,{children:["Intensity (LED): ",J.generic.intensity]}),(0,p.jsx)(Yy,{value:J.generic.intensity,onChange:function(e,t){return J.handleGeneric(["intensity",t])},max:255,step:1})]}),(0,p.jsx)(_f,{item:!0,xs:6,children:(0,p.jsx)(hy,{label:"File Name",value:$,onChange:function(e){return K(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(If,{variant:"body1",color:"textSecondary",children:"Images taken: ".concat(a)})}),(0,p.jsx)(_f,{item:!0,xs:3,children:(0,p.jsx)(If,{variant:"body1",color:"textSecondary",children:"Folder: ".concat(c)})}),(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsx)(Ah,{variant:"contained",color:"primary",onClick:function(){var e="".concat(t,":").concat(n,"/MCTController/startTimelapseImaging?")+"tperiod=".concat(v,"&nImagesToCapture=").concat(g,"&MCTFilename=").concat($,"&")+"zStackEnabled=".concat(P,"&zStackMin=").concat(b,"&zStackMax=").concat(w,"&zStackStep=").concat(S,"&")+"xyScanEnabled=".concat(T,"&xScanMin=").concat(E,"&xScanMax=").concat(M,"&xScanStep=").concat(R,"&")+"yScanMin=".concat(A,"&yScanMax=").concat(L,"&yScanStep=").concat(I,"&")+"IlluValue1=".concat(H,"&IlluValue2=").concat(U,"&IlluValue3=").concat(q);fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log(e),Q(!0)})).catch((function(e){return console.error("Error:",e)}))},disabled:G,children:"Start"}),(0,p.jsx)(Ah,{variant:"contained",color:"secondary",onClick:function(){var e="".concat(t,":").concat(n,"/MCTController/stopTimelapseImaging");fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log(e),Q(!1)})).catch((function(e){return console.error("Error:",e)}))},disabled:!G,style:{marginLeft:"10px"},children:"Stop"})]})]})})},Kk=["children","value","index"],Gk=function(e){var t=e.children,n=e.value,r=e.index,i=La(e,Kk);return(0,p.jsx)("div",w(w({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},i),{},{children:n===r&&(0,p.jsx)(Tf,{p:3,children:t})}))},Qk=function(){window.open("https://youseetoo.github.io","_blank")},Jk=function(e){var t=e.hostIP,n=e.hostPort,i=(e.WindowTitle,(0,r.useState)(0)),o=(0,f.Z)(i,2),a=o[0],s=o[1],l=(0,r.useState)([]),u=(0,f.Z)(l,2),c=u[0],d=u[1],h=(0,r.useState)(""),v=(0,f.Z)(h,2),m=v[0],g=v[1];return(0,r.useEffect)((function(){!function(){var e="".concat(t,":").concat(n,"/UC2ConfigController/returnAvailableSetups");fetch(e).then((function(e){return e.json()})).then((function(e){d(e.available_setups||[])})).catch((function(e){return console.error("Error fetching setups:",e)}))}()}),[]),(0,p.jsxs)(dg,{children:[(0,p.jsxs)(Qw,{value:a,onChange:function(e,t){s(t)},"aria-label":"settings tabs",children:[(0,p.jsx)(ik,{label:"Reconnect to UC2 board"}),(0,p.jsx)(ik,{label:"Select Setup"})]}),(0,p.jsx)(Gk,{value:a,index:0,children:(0,p.jsx)(_f,{container:!0,spacing:2,children:(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsx)(If,{variant:"h6",children:"Reconnect to UC2 board"}),(0,p.jsx)("div",{children:(0,p.jsx)(Ah,{style:{marginBottom:"20px"},variant:"contained",onClick:function(){var e="".concat(t,":").concat(n,"/UC2ConfigController/reconnect");fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log(e)})).catch((function(e){return console.error("Error:",e)}))},children:"Reconnect"})}),(0,p.jsx)(If,{variant:"h6",children:"Bluetooth Pairing"}),(0,p.jsx)("div",{children:(0,p.jsx)(Ah,{style:{marginBottom:"20px"},variant:"contained",onClick:function(){var e="".concat(t,":").concat(n,"/UC2ConfigController/btpairing");fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log(e)})).catch((function(e){return console.error("Error:",e)}))},children:"BT Pairing"})}),(0,p.jsx)(If,{variant:"h6",children:"Flash New Firmware"}),(0,p.jsx)("div",{children:(0,p.jsx)(Ah,{style:{marginBottom:"20px"},variant:"contained",onClick:Qk,children:"UC2-ESP32"})})]})})}),(0,p.jsx)(Gk,{value:a,index:1,children:(0,p.jsx)(_f,{container:!0,spacing:2,children:(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsx)(If,{variant:"h6",children:"Select Available Setup"}),(0,p.jsxs)(Rv,{fullWidth:!0,style:{marginBottom:"20px"},children:[(0,p.jsx)(_v,{id:"setup-select-label",children:"Available Setups"}),(0,p.jsx)(sy,{labelId:"setup-select-label",value:m,onChange:function(e){g(e.target.value)},children:c.map((function(e,t){return(0,p.jsx)(fk,{value:e,children:e},t)}))})]}),(0,p.jsx)(Ah,{style:{marginBottom:"20px"},variant:"contained",onClick:function(){if(m){var e="".concat(t,":").concat(n,"/UC2ConfigController/setSetupFileName?setupFileName=").concat(encodeURIComponent(m));fetch(e,{method:"get"}).then((function(e){return e.json()})).then((function(e){console.log("Setup selected:",e)})).catch((function(e){return console.error("Error setting setup:",e)}))}else alert("Please select a setup before proceeding.")},children:"OK"})]})})})]})},eS=function(e){var t=e.hostIP,n=e.hostPort,i=(0,r.useState)(10),o=(0,f.Z)(i,2),a=o[0],s=o[1],l=(0,r.useState)(1),u=(0,f.Z)(l,2),c=u[0],d=u[1],h=(0,r.useState)(0),v=(0,f.Z)(h,2),m=v[0],g=v[1],y=(0,r.useState)(!1),b=(0,f.Z)(y,2),x=(b[0],b[1]);return(0,p.jsx)(dg,{style:{padding:"20px"},children:(0,p.jsxs)(_f,{container:!0,spacing:2,children:[(0,p.jsx)(_f,{item:!0,xs:4,children:(0,p.jsx)(hy,{label:"Range Z",value:a,onChange:function(e){return s(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:4,children:(0,p.jsx)(hy,{label:"Resolution Z",value:c,onChange:function(e){return d(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:4,children:(0,p.jsx)(hy,{label:"Defocus Z",value:m,onChange:function(e){return g(e.target.value)},fullWidth:!0})}),(0,p.jsxs)(_f,{item:!0,xs:12,children:[(0,p.jsx)(Ah,{variant:"contained",color:"primary",onClick:function(){var e="".concat(t,":").concat(n,"/AufofocusController/autoFocus?")+"rangez=".concat(a,"&resolutionz=").concat(c,"&defocusz=").concat(m);console.log("Autofocus started:",e),fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log("Autofocus started:",e),x(!0)})).catch((function(e){console.error("Error starting autofocus:",e)}))},children:"Start Autofocus"}),(0,p.jsx)(Ah,{variant:"contained",color:"secondary",onClick:function(){var e="http://".concat(t,":").concat(n,"/AufofocusController/stopAutoFocus");fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log("Autofocus stopped:",e),x(!1)})).catch((function(e){console.error("Error stopping autofocus:",e)}))},style:{marginLeft:"10px"},children:"Stop Autofocus"})]})]})})},tS=function(e){var t=e.hostIP,n=e.hostPort,i=(e.WindowTitle,(0,r.useState)(0)),o=(0,f.Z)(i,2),a=(o[0],o[1],(0,r.useState)("")),s=(0,f.Z)(a,2),l=s[0],u=s[1],c=(0,r.useRef)(null);return(0,r.useEffect)((function(){u("".concat(t,":").concat(n,"/RecordingController/video_feeder"))}),[t,n]),(0,p.jsxs)(dg,{children:[(0,p.jsx)(If,{variant:"h6",gutterBottom:!0,children:"Video Display"}),l?(0,p.jsx)("img",{style:{width:"100%",height:"auto"},src:l,ref:c,alt:"Live Stream"}):(0,p.jsx)(If,{variant:"body1",color:"textSecondary",children:"No stream available"})]})},nS=function(e){var t=e.hostIP,n=e.hostPort;return(0,p.jsxs)(_f,{container:!0,spacing:3,className:"control-panel-grid",children:[(0,p.jsx)(_f,{item:!0,xs:12,sm:6,md:4,className:"grid-item",children:(0,p.jsx)(tS,{hostIP:t,hostPort:n,title:"Flow Stop"})}),(0,p.jsx)(_f,{item:!0,xs:12,sm:6,md:4,className:"grid-item",children:(0,p.jsx)(Vk,{hostIP:t,hostPort:n,title:"Flow Stop"})}),(0,p.jsx)(_f,{item:!0,xs:12,sm:6,md:4,className:"grid-item",children:(0,p.jsx)(Jk,{hostIP:t,hostPort:n,title:"Reconnect"})}),(0,p.jsx)(_f,{item:!0,xs:12,sm:6,md:4,className:"grid-item",children:(0,p.jsx)(eS,{hostIP:t,hostPort:n,title:"Autofocus"})}),(0,p.jsx)(_f,{item:!0,xs:12,sm:6,md:4,className:"grid-item",children:(0,p.jsx)(Yk,{children:(0,p.jsx)($k,{hostIP:t,hostPort:n,title:"MCT"})})}),(0,p.jsx)(_f,{item:!0,xs:12,sm:6,md:4,className:"grid-item",children:(0,p.jsx)(Lk,{hostIP:t,hostPort:n,title:"HistoScan"})})]})},rS=["children","value","index"],iS=function(e){var t=e.children,n=e.value,r=e.index,i=La(e,rS);return(0,p.jsx)("div",w(w({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},i),{},{children:n===r&&(0,p.jsx)(Tf,{p:3,children:t})}))},oS=function(e){var t=e.hostIP,n=e.hostPort,i=(0,r.useState)(0),o=(0,f.Z)(i,2),a=o[0],s=o[1],l=(0,r.useState)(0),c=(0,f.Z)(l,2),h=c[0],v=c[1],m=(0,r.useState)(1e3),g=(0,f.Z)(m,2),y=g[0],b=g[1],x=(0,r.useState)(1e3),w=(0,f.Z)(x,2),k=w[0],S=w[1],C=(0,r.useState)("A"),P=(0,f.Z)(C,2),_=P[0],E=P[1],Z=(0,r.useState)(-1),M=(0,f.Z)(Z,2),j=M[0],R=M[1],O=(0,r.useState)(512),T=(0,f.Z)(O,2),z=T[0],A=T[1],N=(0,r.useState)(null),L=(0,f.Z)(N,2),D=(L[0],L[1],(0,r.useState)(!1)),I=(0,f.Z)(D,2),F=I[0],B=I[1];(0,r.useEffect)((function(){var e=function(){var e=d(u().mark((function e(){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(t,":").concat(n,"/LightsheetController/returnLastLightsheetStackPath"));case 3:return r=e.sent,e.next=6,r.json();case 6:(i=e.sent)&&i.filepath,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching latest image path:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}();e()}),[t,n,F]);return(0,p.jsxs)(dg,{children:[(0,p.jsxs)(Qw,{value:a,onChange:function(e,t){s(t)},"aria-label":"Lightsheet Controller Tabs",children:[(0,p.jsx)(ik,{label:"Scanning Parameters"}),(0,p.jsx)(ik,{label:"View Latest Stack"})]}),(0,p.jsx)(iS,{value:a,index:0,children:(0,p.jsxs)(_f,{container:!0,spacing:2,children:[(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{label:"Min Position",value:h,onChange:function(e){return v(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{label:"Max Position",value:y,onChange:function(e){return b(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(hy,{label:"Speed",value:k,onChange:function(e){return S(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:6,children:(0,p.jsx)(hy,{label:"Axis",value:_,onChange:function(e){return E(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:6,children:(0,p.jsx)(hy,{label:"Illumination Source",value:j,onChange:function(e){return R(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:6,children:(0,p.jsx)(hy,{label:"Illumination Value",value:z,onChange:function(e){return A(e.target.value)},fullWidth:!0})}),(0,p.jsx)(_f,{item:!0,xs:12,children:(0,p.jsx)(Ah,{variant:"contained",color:"primary",onClick:function(){var e="".concat(t,":").concat(n,"/LightsheetController/performScanningRecording?minPos=").concat(h,"&maxPos=").concat(y,"&speed=").concat(k,"&axis=").concat(_,"&illusource=").concat(j,"&illuvalue=").concat(z);fetch(e,{method:"GET"}).then((function(e){return e.json()})).then((function(e){console.log(e),B(!0)})).catch((function(e){return console.error("Error:",e)}))},disabled:F,children:"Start Scanning"})})]})}),(0,p.jsx)(iS,{value:a,index:1})]})},aS=(0,h.Z)((0,p.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),sS=(0,h.Z)((0,p.jsx)("path",{d:"M3 13h8V3H3zm0 8h8v-6H3zm10 0h8V11h-8zm0-18v6h8V3z"}),"Dashboard"),lS=(0,h.Z)((0,p.jsx)("path",{d:"M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1m-1 9h-4v-7h4z"}),"Devices"),uS=(0,h.Z)((0,p.jsx)("path",{d:"M12.01 5.5 10 8h4zM18 10v4l2.5-1.99zM6 10l-2.5 2.01L6 14zm8 6h-4l2.01 2.5zm9-13H1v18h22zm-2 16.01H3V4.99h18z"}),"SettingsOverscanSharp"),cS=(0,h.Z)((0,p.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),dS=n(2140),fS=n(4250),hS=n(1162);function pS(e,t){return function(){return e.apply(t,arguments)}}var vS=Object.prototype.toString,mS=Object.getPrototypeOf,gS=function(e){return function(t){var n=vS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null)),yS=function(e){return e=e.toLowerCase(),function(t){return gS(t)===e}},bS=function(e){return function(t){return typeof t===e}},xS=Array.isArray,wS=bS("undefined");var kS=yS("ArrayBuffer");var SS=bS("string"),CS=bS("function"),PS=bS("number"),_S=function(e){return null!==e&&"object"===typeof e},ES=function(e){if("object"!==gS(e))return!1;var t=mS(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ZS=yS("Date"),MS=yS("File"),jS=yS("Blob"),RS=yS("FileList"),OS=yS("URLSearchParams"),TS=["ReadableStream","Request","Response","Headers"].map(yS),zS=(0,f.Z)(TS,4),AS=zS[0],NS=zS[1],LS=zS[2],DS=zS[3];function IS(e,t){var n,r,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,o=void 0!==i&&i;if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),xS(e))for(n=0,r=e.length;n0;)if(t===(n=r[i]).toLowerCase())return n;return null}var BS="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,WS=function(e){return!wS(e)&&e!==BS};var HS,VS=(HS="undefined"!==typeof Uint8Array&&mS(Uint8Array),function(e){return HS&&e instanceof HS}),US=yS("HTMLFormElement"),YS=function(e){var t=Object.prototype.hasOwnProperty;return function(e,n){return t.call(e,n)}}(),qS=yS("RegExp"),XS=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};IS(n,(function(n,i){var o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},$S="abcdefghijklmnopqrstuvwxyz",KS="0123456789",GS={DIGIT:KS,ALPHA:$S,ALPHA_DIGIT:$S+$S.toUpperCase()+KS};var QS=yS("AsyncFunction"),JS=function(e,t){return e?setImmediate:t?(n="axios@".concat(Math.random()),r=[],BS.addEventListener("message",(function(e){var t=e.source,i=e.data;t===BS&&i===n&&r.length&&r.shift()()}),!1),function(e){r.push(e),BS.postMessage(n,"*")}):function(e){return setTimeout(e)};var n,r}("function"===typeof setImmediate,CS(BS.postMessage)),eC="undefined"!==typeof queueMicrotask?queueMicrotask.bind(BS):"undefined"!==typeof process&&process.nextTick||JS,tC={isArray:xS,isArrayBuffer:kS,isBuffer:function(e){return null!==e&&!wS(e)&&null!==e.constructor&&!wS(e.constructor)&&CS(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"===typeof FormData&&e instanceof FormData||CS(e.append)&&("formdata"===(t=gS(e))||"object"===t&&CS(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&kS(e.buffer)},isString:SS,isNumber:PS,isBoolean:function(e){return!0===e||!1===e},isObject:_S,isPlainObject:ES,isReadableStream:AS,isRequest:NS,isResponse:LS,isHeaders:DS,isUndefined:wS,isDate:ZS,isFile:MS,isBlob:jS,isRegExp:qS,isFunction:CS,isStream:function(e){return _S(e)&&CS(e.pipe)},isURLSearchParams:OS,isTypedArray:VS,isFileList:RS,forEach:IS,merge:function e(){for(var t=(WS(this)&&this||{}).caseless,n={},r=function(r,i){var o=t&&FS(n,i)||i;ES(n[o])&&ES(r)?n[o]=e(n[o],r):ES(r)?n[o]=e({},r):xS(r)?n[o]=r.slice():n[o]=r},i=0,o=arguments.length;i3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&mS(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:gS,kindOfTest:yS,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(xS(e))return e;var t=e.length;if(!PS(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var i=n.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:US,hasOwnProperty:YS,hasOwnProp:YS,reduceDescriptors:XS,freezeMethods:function(e){XS(e,(function(t,n){if(CS(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];CS(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return xS(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:FS,global:BS,isContextDefined:WS,ALPHABET:GS,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:GS.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&CS(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(_S(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var i=xS(n)?[]:{};return IS(n,(function(t,n){var o=e(t,r+1);!wS(o)&&(i[n]=o)})),t[r]=void 0,i}}return n}(e,0)},isAsyncFn:QS,isThenable:function(e){return e&&(_S(e)||CS(e))&&CS(e.then)&&CS(e.catch)},setImmediate:JS,asap:eC};function nC(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}tC.inherits(nC,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:tC.toJSONObject(this.config),code:this.code,status:this.status}}});var rC=nC.prototype,iC={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){iC[e]={value:e}})),Object.defineProperties(nC,iC),Object.defineProperty(rC,"isAxiosError",{value:!0}),nC.from=function(e,t,n,r,i,o){var a=Object.create(rC);return tC.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),nC.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var oC=nC;function aC(e){return tC.isPlainObject(e)||tC.isArray(e)}function sC(e){return tC.endsWith(e,"[]")?e.slice(0,-2):e}function lC(e,t,n){return e?e.concat(t).map((function(e,t){return e=sC(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var uC=tC.toFlatObject(tC,{},null,(function(e){return/^is[A-Z]/.test(e)}));var cC=function(e,t,n){if(!tC.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=tC.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!tC.isUndefined(t[e])}))).metaTokens,i=n.visitor||u,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&tC.isSpecCompliantForm(t);if(!tC.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(tC.isDate(e))return e.toISOString();if(!s&&tC.isBlob(e))throw new oC("Blob is not supported. Use a Buffer instead.");return tC.isArrayBuffer(e)||tC.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,i){var s=e;if(e&&!i&&"object"===typeof e)if(tC.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(tC.isArray(e)&&function(e){return tC.isArray(e)&&!e.some(aC)}(e)||(tC.isFileList(e)||tC.endsWith(n,"[]"))&&(s=tC.toArray(e)))return n=sC(n),s.forEach((function(e,r){!tC.isUndefined(e)&&null!==e&&t.append(!0===a?lC([n],r,o):null===a?n:n+"[]",l(e))})),!1;return!!aC(e)||(t.append(lC(i,n,o),l(e)),!1)}var c=[],d=Object.assign(uC,{defaultVisitor:u,convertValue:l,isVisitable:aC});if(!tC.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!tC.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),tC.forEach(n,(function(n,o){!0===(!(tC.isUndefined(n)||null===n)&&i.call(t,n,tC.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),c.pop()}}(e),t};function dC(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function fC(e,t){this._pairs=[],e&&cC(e,this,t)}var hC=fC.prototype;hC.append=function(e,t){this._pairs.push([e,t])},hC.toString=function(e){var t=e?function(t){return e.call(this,t,dC)}:dC;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var pC=fC;function vC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function mC(e,t,n){if(!t)return e;var r,i=n&&n.encode||vC,o=n&&n.serialize;if(r=o?o(t,n):tC.isURLSearchParams(t)?t.toString():new pC(t,n).toString(i)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var gC=function(){function e(){(0,M.Z)(this,e),this.handlers=[]}return(0,j.Z)(e,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){tC.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),yC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bC={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:pC,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},xC="undefined"!==typeof window&&"undefined"!==typeof document,wC="object"===typeof navigator&&navigator||void 0,kC=xC&&(!wC||["ReactNative","NativeScript","NS"].indexOf(wC.product)<0),SC="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,CC=xC&&window.location.href||"http://localhost",PC=w(w({},t),bC);var _C=function(e){function t(e,n,r,i){var o=e[i++];if("__proto__"===o)return!0;var a=Number.isFinite(+o),s=i>=e.length;return o=!o&&tC.isArray(r)?r.length:o,s?(tC.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&tC.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&tC.isArray(r[o])&&(r[o]=function(e){var t,n,r={},i=Object.keys(e),o=i.length;for(t=0;t-1,o=tC.isObject(e);if(o&&tC.isHTMLForm(e)&&(e=new FormData(e)),tC.isFormData(e))return i?JSON.stringify(_C(e)):e;if(tC.isArrayBuffer(e)||tC.isBuffer(e)||tC.isStream(e)||tC.isFile(e)||tC.isBlob(e)||tC.isReadableStream(e))return e;if(tC.isArrayBufferView(e))return e.buffer;if(tC.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return cC(e,new PC.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return PC.isNode&&tC.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=tC.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return cC(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(tC.isString(e))try{return(t||JSON.parse)(e),tC.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||EC.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(tC.isResponse(e)||tC.isReadableStream(e))return e;if(e&&tC.isString(e)&&(n&&!this.responseType||r)){var i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(i){if("SyntaxError"===o.name)throw oC.from(o,oC.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:PC.classes.FormData,Blob:PC.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};tC.forEach(["delete","get","head","post","put","patch"],(function(e){EC.headers[e]={}}));var ZC=EC,MC=tC.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jC=Symbol("internals");function RC(e){return e&&String(e).trim().toLowerCase()}function OC(e){return!1===e||null==e?e:tC.isArray(e)?e.map(OC):String(e)}function TC(e,t,n,r,i){return tC.isFunction(r)?r.call(this,t,n):(i&&(t=n),tC.isString(t)?tC.isString(r)?-1!==t.indexOf(r):tC.isRegExp(r)?r.test(t):void 0:void 0)}var zC=function(e,t){function n(e){(0,M.Z)(this,n),e&&this.set(e)}return(0,j.Z)(n,[{key:"set",value:function(e,t,n){var r=this;function i(e,t,n){var i=RC(t);if(!i)throw new Error("header name must be a non-empty string");var o=tC.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=OC(e))}var o=function(e,t){return tC.forEach(e,(function(e,n){return i(e,n,t)}))};if(tC.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(tC.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o(function(e){var t,n,r,i={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||i[t]&&MC[t]||("set-cookie"===t?i[t]?i[t].push(n):i[t]=[n]:i[t]=i[t]?i[t]+", "+n:n)})),i}(e),t);else if(tC.isHeaders(e)){var s,l=a(e.entries());try{for(l.s();!(s=l.n()).done;){var u=(0,f.Z)(s.value,2),c=u[0];i(u[1],c,n)}}catch(MM){l.e(MM)}finally{l.f()}}else null!=e&&i(t,e,n);return this}},{key:"get",value:function(e,t){if(e=RC(e)){var n=tC.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(tC.isFunction(t))return t.call(this,r,n);if(tC.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=RC(e)){var n=tC.findKey(this,e);return!(!n||void 0===this[n]||t&&!TC(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function i(e){if(e=RC(e)){var i=tC.findKey(n,e);!i||t&&!TC(0,n[i],i,t)||(delete n[i],r=!0)}}return tC.isArray(e)?e.forEach(i):i(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var i=t[n];e&&!TC(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return tC.forEach(this,(function(r,i){var o=tC.findKey(n,i);if(o)return t[o]=OC(r),void delete t[i];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(i):String(i).trim();a!==i&&delete t[i],t[a]=OC(r),n[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:Date.now();i=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){for(var e=Date.now(),t=e-i,s=arguments.length,l=new Array(s),u=0;u=o?a(l,e):(n=l,r||(r=setTimeout((function(){r=null,a(n)}),o-t)))},function(){return n&&a(n)}]},HC=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0,i=BC(50,250);return WC((function(n){var o=n.loaded,a=n.lengthComputable?n.total:void 0,s=o-r,l=i(s),u=o<=a;r=o;var c=(0,b.Z)({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:n,lengthComputable:null!=a},t?"download":"upload",!0);e(c)}),n)},VC=function(e,t){var n=null!=e;return[function(r){return t[0]({lengthComputable:n,total:e,loaded:r})},t[1]]},UC=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r1?t-1:0),r=1;r1?"since :\n"+s.map(EP).join("\n"):" "+EP(s[0]):"as no adapter specified";throw new oC("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n};function jP(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new IC(null,e)}function RP(e){return jP(e),e.headers=AC.from(e.headers),e.data=NC.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),MP(e.adapter||ZC.adapter)(e).then((function(t){return jP(e),t.data=NC.call(e,e.transformResponse,t),t.headers=AC.from(t.headers),t}),(function(t){return LC(t)||(jP(e),t&&t.response&&(t.response.data=NC.call(e,e.transformResponse,t.response),t.response.headers=AC.from(t.response.headers))),Promise.reject(t)}))}var OP="1.7.7",TP={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){TP[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var zP={};TP.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,o){if(!1===e)throw new oC(r(i," has been removed"+(t?" in "+t:"")),oC.ERR_DEPRECATED);return t&&!zP[i]&&(zP[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var AP={assertOptions:function(e,t,n){if("object"!==typeof e)throw new oC("options must be an object",oC.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new oC("option "+o+" must be "+l,oC.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new oC("Unknown option "+o,oC.ERR_BAD_OPTION)}},validators:TP},NP=AP.validators,LP=function(){function e(t){(0,M.Z)(this,e),this.defaults=t,this.interceptors={request:new gC,response:new gC}}return(0,j.Z)(e,[{key:"request",value:function(){var e=d(u().mark((function e(t,n){var r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._request(t,n);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),e.t0 instanceof Error){Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error,i=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.t0.stack?i&&!String(e.t0.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.t0.stack+="\n"+i):e.t0.stack=i}catch(o){}}throw e.t0;case 10:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_request",value:function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{};var n=t=JC(this.defaults,t),r=n.transitional,i=n.paramsSerializer,o=n.headers;void 0!==r&&AP.assertOptions(r,{silentJSONParsing:NP.transitional(NP.boolean),forcedJSONParsing:NP.transitional(NP.boolean),clarifyTimeoutError:NP.transitional(NP.boolean)},!1),null!=i&&(tC.isFunction(i)?t.paramsSerializer={serialize:i}:AP.assertOptions(i,{encode:NP.function,serialize:NP.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=o&&tC.merge(o.common,o[t.method]);o&&tC.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete o[e]})),t.headers=AC.concat(a,o);var s=[],l=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var u,c=[];this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));var d,f=0;if(!l){var h=[RP.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),d=h.length,u=Promise.resolve(t);f0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t((function(e,t,i){r.reason||(r.reason=new IC(e,t,i),n(r.reason))}))}return(0,j.Z)(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,n=function(e){t.abort(e)};return this.subscribe(n),t.signal.unsubscribe=function(){return e.unsubscribe(n)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}(),FP=IP;var BP={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(BP).forEach((function(e){var t=(0,f.Z)(e,2),n=t[0],r=t[1];BP[r]=n}));var WP=BP;var HP=function e(t){var n=new DP(t),r=pS(DP.prototype.request,n);return tC.extend(r,DP.prototype,n,{allOwnKeys:!0}),tC.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(JC(t,n))},r}(ZC);HP.Axios=DP,HP.CanceledError=IC,HP.CancelToken=FP,HP.isCancel=LC,HP.VERSION=OP,HP.toFormData=cC,HP.AxiosError=oC,HP.Cancel=HP.CanceledError,HP.all=function(e){return Promise.all(e)},HP.spread=function(e){return function(t){return e.apply(null,t)}},HP.isAxiosError=function(e){return tC.isObject(e)&&!0===e.isAxiosError},HP.mergeConfig=JC,HP.AxiosHeaders=AC,HP.formToJSON=function(e){return _C(tC.isHTMLForm(e)?new FormData(e):e)},HP.getAdapter=MP,HP.HttpStatusCode=WP,HP.default=HP;var VP=HP,UP=n(1968),YP=n.n(UP),qP=function(e){if(e.isLoading)return(0,p.jsx)("div",{className:"fm-loader",children:(0,p.jsx)(YP(),{color:"black",type:"spokes",height:50,width:50})})},XP={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},$P=r.createContext&&r.createContext(XP),KP=["attr","size","title"];function GP(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function QP(){return QP=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:function(){},t=(0,r.useState)(!1),n=(0,f.Z)(t,2),i=n[0],o=n[1],a=(0,r.useRef)(null),s=function(t){var n;null!==(n=a.current)&&void 0!==n&&n.contains(t.target)?o(!1):(o(!0),e(t,a))};return(0,r.useEffect)((function(){return document.addEventListener("click",s,!0),document.addEventListener("mousedown",s,!0),function(){document.removeEventListener("click",s,!0),document.removeEventListener("mousedown",s,!0)}}),[]),{ref:a,isClicked:i,setIsClicked:o}},F_=(0,r.createContext)(),B_=function(e){var t=e.children,n=e.layout,i=(0,r.useState)((function(){return function(e){return["list","grid"].includes(e)?e:"grid"}(n)})),o=(0,f.Z)(i,2),a=o[0],s=o[1];return(0,p.jsx)(F_.Provider,{value:{activeLayout:a,setActiveLayout:s},children:t})},W_=function(){return(0,r.useContext)(F_)},H_=function(e){var t=e.setShowToggleViewMenu,n=e.onLayoutChange,r=I_((function(){t(!1)})),i=W_(),o=i.activeLayout,a=i.setActiveLayout,s=[{key:"grid",name:"Grid",icon:(0,p.jsx)(s_,{size:18})},{key:"list",name:"List",icon:(0,p.jsx)(P_,{size:18})}],l=function(e){a(e),n(e),t(!1)};return(0,p.jsx)("div",{ref:r.ref,className:"toggle-view",role:"dropdown",children:(0,p.jsx)("ul",{role:"menu","aria-orientation":"vertical",children:s.map((function(e){return(0,p.jsxs)("li",{role:"menuitem",onClick:function(){return l(e.key)},onKeyDown:function(){return l(e.key)},children:[(0,p.jsx)("span",{children:e.key===o&&(0,p.jsx)(k_,{size:13})}),(0,p.jsx)("span",{children:e.icon}),(0,p.jsx)("span",{children:e.name})]},e.key)}))})})},V_=(0,r.createContext)(),U_=function(e){var t=e.children,n=e.filesData,i=e.onError,o=(0,r.useState)([]),a=(0,f.Z)(o,2),s=a[0],l=a[1];(0,r.useEffect)((function(){l(n)}),[n]);return(0,p.jsx)(V_.Provider,{value:{files:s,setFiles:l,getChildren:function(e){return e.isDirectory?s.filter((function(t){return t.path==="".concat(e.path,"/").concat(t.name)})):[]},onError:i},children:t})},Y_=function(){return(0,r.useContext)(V_)},q_=(0,r.createContext)(),X_=function(e){var t=e.children,n=(0,r.useState)(""),i=(0,f.Z)(n,2),o=i[0],a=i[1],s=(0,r.useState)(null),l=(0,f.Z)(s,2),u=l[0],c=l[1],d=(0,r.useState)([]),h=(0,f.Z)(d,2),v=h[0],m=h[1],g=Y_().files;return(0,r.useEffect)((function(){Array.isArray(g)&&g.length>0&&(m((function(){return g.filter((function(e){return e.path==="".concat(o,"/").concat(e.name)}))})),c((function(){var e;return null!==(e=g.find((function(e){return e.path===o})))&&void 0!==e?e:null})))}),[g,o]),(0,p.jsx)(q_.Provider,{value:{currentPath:o,setCurrentPath:a,currentFolder:u,setCurrentFolder:c,currentPathFiles:v,setCurrentPathFiles:m},children:t})},$_=function(){return(0,r.useContext)(q_)},K_=function(e,t){try{if("function"!==typeof e)throw new Error(' Missing prop: Callback function "'.concat(t,'" is required.'));for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i0?(0,p.jsx)("div",{className:"toolbar file-selected",children:(0,p.jsxs)("div",{className:"file-action-container",children:[(0,p.jsxs)("div",{children:[(0,p.jsxs)("button",{className:"item-action file-action",onClick:function(){return S(!0)},children:[(0,p.jsx)(u_,{size:18}),(0,p.jsx)("span",{children:"Cut"})]}),(0,p.jsxs)("button",{className:"item-action file-action",onClick:function(){return S(!1)},children:[(0,p.jsx)(o_,{strokeWidth:.1,size:17}),(0,p.jsx)("span",{children:"Copy"})]}),(null===w||void 0===w||null===(M=w.files)||void 0===M?void 0:M.length)>0&&(0,p.jsxs)("button",{className:"item-action file-action",onClick:Z,children:[(0,p.jsx)(D_,{size:18}),(0,p.jsx)("span",{children:"Paste"})]}),1===g.length&&(0,p.jsxs)("button",{className:"item-action file-action",onClick:function(){return l.show("rename")},children:[(0,p.jsx)(x_,{size:19}),(0,p.jsx)("span",{children:"Rename"})]}),!g.isDirectory&&(0,p.jsxs)("button",{className:"item-action file-action",onClick:function(){b(),y([])},children:[(0,p.jsx)(g_,{size:19}),(0,p.jsx)("span",{children:"Download"})]}),(0,p.jsxs)("button",{className:"item-action file-action",onClick:function(){return l.show("delete")},children:[(0,p.jsx)(m_,{size:19}),(0,p.jsx)("span",{children:"Delete"})]})]}),(0,p.jsxs)("button",{className:"item-action file-action",title:"Clear selection",onClick:function(){return y([])},children:[(0,p.jsxs)("span",{children:[g.length," item",g.length>1&&"s"," selected"]}),(0,p.jsx)(f_,{size:18})]})]})}):(0,p.jsx)("div",{className:"toolbar",children:(0,p.jsxs)("div",{className:"fm-toolbar",children:[(0,p.jsx)("div",{children:_.filter((function(e){return e.permission})).map((function(e,t){return(0,p.jsxs)("button",{className:"item-action",onClick:e.onClick,children:[e.icon,(0,p.jsx)("span",{children:e.text})]},t)}))}),(0,p.jsxs)("div",{children:[E.map((function(e,t){return(0,p.jsxs)("div",{className:"toolbar-left-items",children:[(0,p.jsx)("button",{className:"item-action icon-only",title:e.title,onClick:e.onClick,children:e.icon}),t!==E.length-1&&(0,p.jsx)("div",{className:"item-separator"})]},t)})),d&&(0,p.jsx)(H_,{setShowToggleViewMenu:h,onLayoutChange:a})]})]})})},iE=n(4553),oE=n.n(iE);function aE(e){return r_({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"},child:[]}]})(e)}function sE(e){return r_({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"},child:[]}]})(e)}function lE(e){return r_({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M527.9 224H480v-48c0-26.5-21.5-48-48-48H272l-64-64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h400c16.5 0 31.9-8.5 40.7-22.6l79.9-128c20-31.9-3-73.4-40.7-73.4zM48 118c0-3.3 2.7-6 6-6h134.1l64 64H426c3.3 0 6 2.7 6 6v42H152c-16.8 0-32.4 8.8-41.1 23.2L48 351.4zm400 282H72l77.2-128H528z"},child:[]}]})(e)}function uE(e){return r_({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z"},child:[]}]})(e)}var cE=function e(t){var n=t.folder,i=(0,r.useState)(!1),o=(0,f.Z)(i,2),a=o[0],s=o[1],l=(0,r.useState)(!1),u=(0,f.Z)(l,2),c=u[0],d=u[1],h=$_(),v=h.currentPath,m=h.setCurrentPath,g=function(){d(!0),m(n.path)};return(0,r.useEffect)((function(){d(v===n.path);var e=v.split("/");e.pop(),e.join("/")===n.path&&s(!0)}),[v]),n.subDirectories.length>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"sb-folders-list-item ".concat(c?"active-list-item":""),onClick:g,children:[(0,p.jsx)("span",{onClick:function(e){e.stopPropagation(),s((function(e){return!e}))},children:(0,p.jsx)(h_,{size:20,className:"".concat(a?"folder-rotate-down":"folder-rotate-right")})}),(0,p.jsxs)("div",{className:"sb-folder-details",children:[a||c?(0,p.jsx)(lE,{size:20,className:"folder-open-icon"}):(0,p.jsx)(uE,{size:17,className:"folder-close-icon"}),(0,p.jsx)("span",{className:"sb-folder-name",title:n.name,children:n.name})]})]}),(0,p.jsx)(oE(),{open:a,children:(0,p.jsx)("div",{className:"folder-collapsible",children:n.subDirectories.map((function(t,n){return(0,p.jsx)(e,{folder:t},n)}))})})]}):(0,p.jsxs)("div",{className:"sb-folders-list-item ".concat(c?"active-list-item":""),onClick:g,children:[(0,p.jsx)("span",{className:"non-expanable"}),(0,p.jsxs)("div",{className:"sb-folder-details",children:[c?(0,p.jsx)(lE,{size:20,className:"folder-open-icon"}):(0,p.jsx)(uE,{size:17,className:"folder-close-icon"}),(0,p.jsx)("span",{className:"sb-folder-name",title:n.name,children:n.name})]})]})},dE=function(){var e=(0,r.useState)([]),t=(0,f.Z)(e,2),n=t[0],i=t[1],o=Y_().files,a=function e(t,n){var r;return n[t]?null===(r=n[t])||void 0===r?void 0:r.map((function(t){return w(w({},t),{},{subDirectories:e(t.path,n)})})):[]};return(0,r.useEffect)((function(){if(Array.isArray(o)){var e=o.filter((function(e){return e.isDirectory})),t=Object.groupBy(e,(function(e){return function(e){return null===e||void 0===e?void 0:e.split("/").slice(0,-1).join("/")}(e.path)}));i((function(){return a("",t)}))}}),[o]),(0,p.jsx)("div",{className:"sb-folders-list",children:(null===n||void 0===n?void 0:n.length)>0?(0,p.jsx)(p.Fragment,{children:null===n||void 0===n?void 0:n.map((function(e,t){return(0,p.jsx)(cE,{folder:e},t)}))}):(0,p.jsx)("div",{className:"empty-nav-pane",children:"Nothing here yet"})})},fE=function(){var e=(0,r.useState)([]),t=(0,f.Z)(e,2),n=t[0],i=t[1],o=(0,r.useState)([]),a=(0,f.Z)(o,2),l=a[0],u=a[1],c=(0,r.useState)([]),d=(0,f.Z)(c,2),h=d[0],v=d[1],m=(0,r.useState)(!1),g=(0,f.Z)(m,2),y=g[0],b=g[1],x=$_(),w=x.currentPath,k=x.setCurrentPath,S=(0,r.useRef)(null),C=(0,r.useRef)([]),P=(0,r.useRef)(null),_=I_((function(){b(!1)}));(0,r.useEffect)((function(){i((function(){var e="";return null===w||void 0===w?void 0:w.split("/").map((function(t){return{name:t||"Home",path:""===t?t:e+="/".concat(t)}}))})),u([]),v([])}),[w]);var E=function(e){k(e)},Z=function(){var e;return function(){var e=S.current.clientWidth,t=getComputedStyle(S.current),r=parseFloat(t.paddingLeft),i=l.length>0?1:0;return e-(r+parseFloat(t.gap)*(n.length+i))}()-(C.current.reduce((function(e,t){return t?e+t.clientWidth:e}),0)+((null===(e=P.current)||void 0===e?void 0:e.clientWidth)||0))},M=function(){return S.current.scrollWidth>S.current.clientWidth};return(0,r.useEffect)((function(){if(M()){var e,t=n[1],r=null===(e=C.current[1])||void 0===e?void 0:e.clientWidth;v((function(e){return[].concat((0,s.Z)(e),[r])})),u((function(e){return[].concat((0,s.Z)(e),[t])})),i((function(e){return e.filter((function(e,t){return 1!==t}))}))}else if(l.length>0&&Z()>h.at(-1)){var o=[n[0],l.at(-1)].concat((0,s.Z)(n.slice(1)));i(o),u((function(e){return e.slice(0,-1)})),v((function(e){return e.slice(0,-1)}))}}),[M]),(0,p.jsxs)("div",{className:"bread-crumb-container",children:[(0,p.jsx)("div",{className:"breadcrumb",ref:S,children:n.map((function(e,t){return(0,p.jsxs)("div",{style:{display:"contents"},children:[(0,p.jsxs)("span",{className:"folder-name",onClick:function(){return E(e.path)},ref:function(e){return C.current[t]=e},children:[0===t?(0,p.jsx)(d_,{}):(0,p.jsx)(b_,{}),e.name]}),(null===l||void 0===l?void 0:l.length)>0&&0===t&&(0,p.jsx)("button",{className:"folder-name folder-name-btn",onClick:function(){return b(!0)},ref:P,title:"Show more folders",children:(0,p.jsx)(v_,{size:22,className:"hidden-folders"})})]},t)}))}),y&&(0,p.jsx)("ul",{ref:_.ref,className:"hidden-folders-container",children:l.map((function(e,t){return(0,p.jsx)("li",{onClick:function(){E(e.path),b(!1)},children:e.name},t)}))})]})},hE=function(e){return{pdf:(0,p.jsx)(R_,{size:e}),jpg:(0,p.jsx)(M_,{size:e}),jpeg:(0,p.jsx)(M_,{size:e}),png:(0,p.jsx)(M_,{size:e}),txt:(0,p.jsx)(j_,{size:e}),doc:(0,p.jsx)(z_,{size:e}),docx:(0,p.jsx)(z_,{size:e}),mp4:(0,p.jsx)(T_,{size:e}),webm:(0,p.jsx)(T_,{size:e}),mp3:(0,p.jsx)(__,{size:e}),m4a:(0,p.jsx)(__,{size:e}),zip:(0,p.jsx)(A_,{size:e}),ppt:(0,p.jsx)(O_,{size:e}),pptx:(0,p.jsx)(O_,{size:e}),xls:(0,p.jsx)(Z_,{size:e}),xlsx:(0,p.jsx)(Z_,{size:e}),exe:(0,p.jsx)(C_,{size:e}),html:(0,p.jsx)(E_,{size:e}),css:(0,p.jsx)(E_,{size:e}),js:(0,p.jsx)(E_,{size:e}),php:(0,p.jsx)(E_,{size:e}),py:(0,p.jsx)(E_,{size:e}),java:(0,p.jsx)(E_,{size:e}),cpp:(0,p.jsx)(E_,{size:e}),c:(0,p.jsx)(E_,{size:e}),ts:(0,p.jsx)(E_,{size:e}),jsx:(0,p.jsx)(E_,{size:e}),tsx:(0,p.jsx)(E_,{size:e}),json:(0,p.jsx)(E_,{size:e}),xml:(0,p.jsx)(E_,{size:e}),sql:(0,p.jsx)(E_,{size:e}),csv:(0,p.jsx)(E_,{size:e}),md:(0,p.jsx)(E_,{size:e}),svg:(0,p.jsx)(E_,{size:e})}},pE=function(e,t,n){if(n.find((function(t){return t.name===e}))){var r=t?"":"."+e.split(".").pop(),i=t?e:e.split(".").slice(0,-1).join("."),o=0,a=new RegExp("".concat(i," \\(\\d+\\)"));n.forEach((function(e){var t=e.isDirectory?e.name:e.name.split(".").slice(0,-1).join(".");if(a.test(t)){var n=t.split("".concat(i," (")).pop().slice(0,-1),r=parseInt(n);!isNaN(r)&&r>o&&(o=r)}}));var s=" (".concat(++o,")");return i+s+r}return e},vE=function(e){var t=e.nameInputRef,n=e.maxLength,r=e.value,i=e.onChange,o=e.onKeyDown,a=e.onClick,s=e.rows;return(0,p.jsx)("textarea",{ref:t,className:"rename-file",maxLength:n,value:r,onChange:i,onKeyDown:o,onClick:a,rows:s})},mE=function(e){var t=e.message,n=e.xPlacement,r=e.yPlacement;return(0,p.jsx)("p",{className:"error-tooltip ".concat(n," ").concat(r),children:t})},gE=function(e){var t=e.filesViewRef,n=e.file,i=e.onCreateFolder,o=e.triggerAction,a=(0,r.useState)(n.name),s=(0,f.Z)(a,2),l=s[0],u=s[1],c=(0,r.useState)(!1),d=(0,f.Z)(c,2),h=d[0],v=d[1],m=(0,r.useState)(""),g=(0,f.Z)(m,2),y=g[0],b=g[1],x=(0,r.useState)("right"),k=(0,f.Z)(x,2),S=k[0],C=k[1],P=(0,r.useState)("bottom"),_=(0,f.Z)(P,2),E=_[0],Z=_[1],M=I_((function(e){e.preventDefault(),e.stopPropagation()})),j=$_(),R=j.currentFolder,O=j.currentPathFiles,T=j.setCurrentPathFiles,z=W_().activeLayout;function A(){var e,t,r=l.trim(),a=O.filter((function(e){return!(e.key&&e.key===n.key)}));if(a.find((function(e){return e.name.toLowerCase()===r.toLowerCase()})))return b("This destination already contains a folder named '".concat(r,"'.")),v(!0),null===(e=M.ref.current)||void 0===e||e.focus(),null===(t=M.ref.current)||void 0===t||t.select(),void M.setIsClicked(!1);""===r&&(r=pE("New Folder",!0,a)),K_(i,"onCreateFolder",r,R),T((function(e){return e.filter((function(e){return e.key!==n.key}))})),o.close()}return(0,r.useEffect)((function(){if(h){var e=setTimeout((function(){v(!1),b("")}),7e3);return function(){return clearTimeout(e)}}}),[h]),(0,r.useEffect)((function(){var e,n,r;if(null===(e=M.ref.current)||void 0===e||e.focus(),null===(n=M.ref.current)||void 0===n||n.select(),null!==(r=M.ref)&&void 0!==r&&r.current){var i=t.current.getBoundingClientRect(),o=M.ref.current,a=o.getBoundingClientRect(),s=i.right-a.left;C(s>313?"right":"left");var l=i.bottom-(a.top+o.clientHeight);Z(l>88?"bottom":"top")}}),[]),(0,r.useEffect)((function(){M.isClicked&&A()}),[M.isClicked]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(vE,w({nameInputRef:M.ref,maxLength:220,value:l,onChange:function(e){u(e.target.value),v(!1)},onKeyDown:function(e){if(e.stopPropagation(),"Enter"===e.key)return e.preventDefault(),void A();"Escape"===e.key&&(e.preventDefault(),o.close(),T((function(e){return e.filter((function(e){return e.key!==n.key}))})));/[\\/:*?"<>|]/.test(e.key)?(e.preventDefault(),b("A file name can't contain any of the following characters: \\ / : * ? \" < > |"),v(!0)):(v(!1),b(""))},onClick:function(e){return e.stopPropagation()}},"list"===z&&{rows:1})),h&&(0,p.jsx)(mE,{message:y,xPlacement:S,yPlacement:E})]})},yE=function(e){var t=e.onClick,n=e.onKeyDown,r=e.type,i=void 0===r?"primary":r,o=e.padding,a=void 0===o?"0.4rem 0.8rem":o,s=e.children;return(0,p.jsx)("button",{onClick:t,onKeyDown:n,className:"fm-button fm-button-".concat(i),style:{padding:a},children:s})};function bE(e){return r_({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M85.57 446.25h340.86a32 32 0 0 0 28.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0 0 28.17 47.17z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m250.26 195.39 5.74 122 5.73-121.95a5.74 5.74 0 0 0-5.79-6h0a5.74 5.74 0 0 0-5.68 5.95z"},child:[]},{tag:"path",attr:{d:"M256 397.25a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"},child:[]}]})(e)}var xE=function(e){var t=e.children,n=e.show,i=e.setShow,o=e.heading,a=e.dialogWidth,s=void 0===a?"25%":a,l=(e.contentClassName,e.closeButton),u=void 0===l||l,c=(0,r.useRef)(null);return(0,r.useEffect)((function(){n?c.current.showModal():c.current.close()}),[n]),(0,p.jsxs)("dialog",{ref:c,className:"fm-modal dialog",style:{width:s},onKeyDown:function(e){"Escape"===e.key&&i(!1)},children:[(0,p.jsxs)("div",{className:"fm-modal-header",children:[(0,p.jsx)("span",{className:"fm-modal-heading",children:o}),u&&(0,p.jsx)(p_,{size:18,onClick:function(){return i(!1)},className:"close-icon",title:"Close"})]}),t]})},wE=function(e){return e.split(".").pop()},kE=function(e){var t=e.filesViewRef,n=e.file,i=e.onRename,o=e.triggerAction,a=(0,r.useState)(null===n||void 0===n?void 0:n.name),s=(0,f.Z)(a,2),l=s[0],u=s[1],c=(0,r.useState)(!1),d=(0,f.Z)(c,2),h=d[0],v=d[1],m=(0,r.useState)(!1),g=(0,f.Z)(m,2),y=g[0],b=g[1],x=(0,r.useState)(""),k=(0,f.Z)(x,2),S=k[0],C=k[1],P=(0,r.useState)("right"),_=(0,f.Z)(P,2),E=_[0],Z=_[1],M=(0,r.useState)("bottom"),j=(0,f.Z)(M,2),R=j[0],O=j[1],T=$_(),z=T.currentPathFiles,A=T.setCurrentPathFiles,N=W_().activeLayout,L=(0,r.useRef)(null),D=I_((function(e){var t;null!==(t=L.current)&&void 0!==t&&t.contains(e.target)||(e.preventDefault(),e.stopPropagation())}));function I(e){return""===l||l===n.name?(A((function(e){return e.map((function(e){return e.key===n.key&&(e.isEditing=!1),e}))})),void o.close()):z.some((function(e){return e.name===l}))?(b(!0),C("This destination already contains a folder named '".concat(l,"'.")),void D.setIsClicked(!1)):void(n.isDirectory||e||wE(n.name)===wE(l)?(b(!1),K_(i,"onRename",n,l),A((function(e){return e.filter((function(e){return e.key!==n.key}))})),o.close()):v(!0))}(0,r.useEffect)((function(){if(y){var e=setTimeout((function(){b(!1),C("")}),7e3);return function(){return clearTimeout(e)}}}),[y]);var F=function(){var e,t;if(null===(e=D.ref)||void 0===e||null===(t=e.current)||void 0===t||t.focus(),n.isDirectory){var r,i;null===(r=D.ref)||void 0===r||null===(i=r.current)||void 0===i||i.select()}else{var o,a,s=wE(n.name),l=n.name.length-s.length-1;null===(o=D.ref)||void 0===o||null===(a=o.current)||void 0===a||a.setSelectionRange(0,l)}};return(0,r.useEffect)((function(){var e;if(F(),null!==(e=D.ref)&&void 0!==e&&e.current){var n=t.current.getBoundingClientRect(),r=D.ref.current,i=r.getBoundingClientRect(),o=n.right-i.left;Z(o>313?"right":"left");var a=n.bottom-(i.top+r.clientHeight);O(a>88?"bottom":"top")}}),[]),(0,r.useEffect)((function(){D.isClicked&&I(!1),F()}),[D.isClicked]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(vE,w({nameInputRef:D.ref,maxLength:220,value:l,onChange:function(e){u(e.target.value),b(!1)},onKeyDown:function(e){if(e.stopPropagation(),"Enter"===e.key)return e.preventDefault(),void D.setIsClicked(!0);/[\\/:*?"<>|]/.test(e.key)?(e.preventDefault(),C("A file name can't contain any of the following characters: \\ / : * ? \" < > |"),b(!0)):b(!1)},onClick:function(e){return e.stopPropagation()}},"list"===N&&{rows:1})),y&&(0,p.jsx)(mE,{message:S,xPlacement:E,yPlacement:R}),(0,p.jsx)(xE,{heading:"Rename",show:h,setShow:v,dialogWidth:"25vw",closeButton:!1,children:(0,p.jsxs)("div",{className:"fm-rename-folder-container",ref:L,children:[(0,p.jsx)("div",{className:"fm-rename-folder-input",children:(0,p.jsxs)("div",{className:"fm-rename-warning",children:[(0,p.jsx)(bE,{size:70,color:"orange"}),(0,p.jsx)("div",{children:"If you change a file name extension, the file might become unusable. Are you sure you want to change it?"})]})}),(0,p.jsxs)("div",{className:"fm-rename-folder-action",children:[(0,p.jsx)(yE,{type:"secondary",onClick:function(){A((function(e){return e.map((function(e){return e.key===n.key&&(e.isEditing=!1),e}))})),v(!1),o.close()},children:"No"}),(0,p.jsx)(yE,{type:"danger",onClick:function(){v(!1),I(!0)},children:"Yes"})]})]})})]})},SE=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(isNaN(e))return"";var n=e/1024,r=n/1024,i=r/1024;return n<1024?"".concat(n.toFixed(t)," KB"):r<1024?"".concat(r.toFixed(t)," MB"):r>=1024?"".concat(i.toFixed(t)," GB"):void 0},CE=function(e){if(!e||isNaN(Date.parse(e)))return"";var t=(e=new Date(e)).getHours(),n=e.getMinutes(),r=t>=12?"PM":"AM";t=(t%=12)||12;var i=e.getMonth()+1,o=e.getDate(),a=e.getFullYear();return"".concat(i,"/").concat(o,"/").concat(a," ").concat(t,":").concat(n<10?"0"+n:n," ").concat(r)},PE=function(e){var t=e.name,n=e.id,r=e.checked,i=e.onClick,o=e.onChange,a=e.className,s=void 0===a?"":a,l=e.title;return(0,p.jsx)("input",{className:"fm-checkbox ".concat(s),type:"checkbox",name:t,id:n,checked:r,onClick:i,onChange:o,title:l})},_E=function(e){var t,n,i,o,a,l,u=e.index,c=e.file,d=e.onCreateFolder,h=e.onRename,v=e.enableFilePreview,m=e.onFileOpen,g=e.filesViewRef,y=e.selectedFileIndexes,b=e.triggerAction,x=e.handleContextMenu,w=e.setLastSelectedFile,k=(0,r.useState)(!1),S=(0,f.Z)(k,2),C=S[0],P=S[1],_=(0,r.useState)(0),E=(0,f.Z)(_,2),Z=E[0],M=E[1],j=(0,r.useState)("hidden"),R=(0,f.Z)(j,2),O=R[0],T=R[1],z=(0,r.useState)(""),A=(0,f.Z)(z,2),N=A[0],L=A[1],D=(0,r.useState)(null),I=(0,f.Z)(D,2),F=I[0],B=I[1],W=W_().activeLayout,H="grid"===W?48:20,V=hE(H),U=$_(),Y=U.setCurrentPath,q=U.currentPathFiles,X=J_().setSelectedFiles,$=nE(),K=$.clipBoard,G=$.handleCutCopy,Q=$.setClipBoard,J=$.handlePasting,ee=(0,r.useRef)(null),te=hE(50),ne=(null===K||void 0===K?void 0:K.isMoving)&&K.files.find((function(e){return e.name===c.name&&e.path===c.path})),re=function(){m(c),c.isDirectory?(Y(c.path),X([])):v&&b.show("previewFile")},ie=function(e){e.preventDefault(),C||!c.isDirectory?e.dataTransfer.dropEffect="none":(B({x:e.clientX,y:e.clientY+12}),e.dataTransfer.dropEffect="copy",L("file-drop-zone"))};return(0,r.useEffect)((function(){P(y.includes(u)),T(y.includes(u)?"visible":"hidden")}),[y]),(0,p.jsxs)("div",{className:"file-item-container ".concat(N," ").concat(C||c.isEditing?"file-selected":""," ").concat(ne?"file-moving":""),tabIndex:0,title:c.name,onClick:function(e){if(e.stopPropagation(),!c.isEditing){!function(e,t){if(y.length>0&&e){var n=!1,r=y[0],i=u;if(r>=i){var o=r;r=i,i=o,n=!0}var a=q.slice(r,i+1);X(n?a.reverse():a)}else y.length>0&&t?X((function(e){var t=e.filter((function(e){return e.path!==c.path}));return e.length===t.length?[].concat((0,s.Z)(e),[c]):t})):X([c])}(e.shiftKey,e.ctrlKey);var t=(new Date).getTime();t-Z<300?re():M(t)}},onKeyDown:function(e){"Enter"===e.key&&(e.stopPropagation(),X([c]),re())},onContextMenu:function(e){e.stopPropagation(),e.preventDefault(),c.isEditing||(C||X([c]),w(c),x(e,!0))},onMouseOver:function(){T("visible")},onMouseLeave:function(){!C&&T("hidden")},draggable:C,onDragStart:function(e){e.dataTransfer.setDragImage(ee.current,30,50),e.dataTransfer.effectAllowed="copy",G(!0)},onDragEnd:function(){return Q(null)},onDragEnter:ie,onDragOver:ie,onDragLeave:function(e){e.currentTarget.contains(e.relatedTarget)||(L((function(e){return e?"":e})),B(null))},onDrop:function(e){e.preventDefault(),!C&&c.isDirectory&&(J(c),L((function(e){return e?"":e})),B(null))},children:[(0,p.jsxs)("div",{className:"file-item",children:[!c.isEditing&&(0,p.jsx)(PE,{name:c.name,id:c.name,checked:C,className:"selection-checkbox ".concat(O),onChange:function(e){e.target.checked?X((function(e){return[].concat((0,s.Z)(e),[c])})):X((function(e){return e.filter((function(e){return e.name!==c.name&&e.path!==c.path}))})),P(e.target.checked)},onClick:function(e){return e.stopPropagation()}}),c.isDirectory?(0,p.jsx)(L_,{size:H}):(0,p.jsx)(p.Fragment,{children:null!==(t=V[null===(n=c.name)||void 0===n||null===(i=n.split(".").pop())||void 0===i?void 0:i.toLowerCase()])&&void 0!==t?t:(0,p.jsx)(N_,{size:H})}),c.isEditing?(0,p.jsx)("div",{className:"rename-file-container ".concat(W),children:"createFolder"===b.actionType?(0,p.jsx)(gE,{filesViewRef:g,file:c,onCreateFolder:d,triggerAction:b}):(0,p.jsx)(kE,{filesViewRef:g,file:c,onRename:h,triggerAction:b})}):(0,p.jsx)("span",{className:"text-truncate file-name",children:c.name})]}),"list"===W&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"modified-date",children:CE(c.updatedAt)}),(0,p.jsx)("div",{className:"size",children:(null===c||void 0===c?void 0:c.size)>0?SE(null===c||void 0===c?void 0:c.size):""})]}),F&&(0,p.jsxs)("div",{style:{top:"".concat(F.y,"px"),left:"".concat(F.x,"px")},className:"drag-move-tooltip",children:["Move to ",(0,p.jsx)("span",{className:"drop-zone-file-name",children:c.name})]}),(0,p.jsx)("div",{ref:ee,className:"drag-icon",children:c.isDirectory?(0,p.jsx)(L_,{size:50}):(0,p.jsx)(p.Fragment,{children:null!==(o=te[null===(a=c.name)||void 0===a||null===(l=a.split(".").pop())||void 0===l?void 0:l.toLowerCase()])&&void 0!==o?o:(0,p.jsx)(N_,{size:50})})})]})},EE=function(e){var t=e.list;return(0,p.jsx)("ul",{className:"sub-menu",children:null===t||void 0===t?void 0:t.map((function(e){return(0,p.jsxs)("li",{onClick:e.onClick,children:[(0,p.jsx)("span",{className:"item-selected",children:e.selected&&(0,p.jsx)(k_,{size:13})}),e.icon,(0,p.jsx)("span",{children:e.title})]},e.title)}))})},ZE=function(e){var t=e.filesViewRef,n=e.contextMenuRef,i=e.menuItems,o=e.visible,a=e.clickPosition,s=(0,r.useState)(0),l=(0,f.Z)(s,2),u=l[0],c=l[1],d=(0,r.useState)(0),h=(0,f.Z)(d,2),v=h[0],m=h[1],g=(0,r.useState)(null),y=(0,f.Z)(g,2),b=y[0],x=y[1];if((0,r.useEffect)((function(){o&&n.current?function(){var e=a.clickX,r=a.clickY,i=t.current,o=i.getBoundingClientRect(),s=i.offsetWidth-i.clientWidth,l=n.current.getBoundingClientRect(),u=l.width,d=l.height,f=e-o.left,h=o.width-(f+s)>u,p=!h,v=r-o.top,g=o.height-v>d,y=!g;h?c("".concat(f,"px")):p&&c("".concat(f-u,"px")),g?m("".concat(v+i.scrollTop,"px")):y&&m("".concat(v+i.scrollTop-d,"px"))}():(m(0),c(0),x(null))}),[o]),o)return(0,p.jsx)("div",{ref:n,onContextMenu:function(e){e.preventDefault(),e.stopPropagation()},onClick:function(e){return e.stopPropagation()},className:"fm-context-menu ".concat(v?"visible":"hidden"),style:{top:v,left:u},children:(0,p.jsx)("div",{className:"file-context-menu-list",children:(0,p.jsx)("ul",{children:i.filter((function(e){return!e.hidden})).map((function(e,t){var n,r=e.hasOwnProperty("children"),i=b===t;return(0,p.jsxs)("div",{children:[(0,p.jsxs)("li",{onClick:e.onClick,className:"".concat(null!==(n=e.className)&&void 0!==n?n:""," ").concat(i?"active":""),onMouseOver:function(){return function(e){x(e)}(t)},children:[e.icon,(0,p.jsx)("span",{children:e.title}),r&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(S_,{size:14,className:"list-expand-icon"}),i&&(0,p.jsx)(EE,{list:e.children})]})]}),e.divider&&(0,p.jsx)("div",{className:"divider"})]},e.title)}))})})})};function ME(e){return r_({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z"},child:[]}]})(e)}var jE=function(e,t,n){var i=(0,r.useState)([]),o=(0,f.Z)(i,2),a=o[0],l=o[1],u=(0,r.useState)(!1),c=(0,f.Z)(u,2),d=c[0],h=c[1],v=(0,r.useState)(!1),m=(0,f.Z)(v,2),g=m[0],y=m[1],b=(0,r.useState)({clickX:0,clickY:0}),x=(0,f.Z)(b,2),w=x[0],k=x[1],S=(0,r.useState)(null),C=(0,f.Z)(S,2),P=C[0],_=C[1],E=nE(),Z=E.clipBoard,M=E.setClipBoard,j=E.handleCutCopy,R=E.handlePasting,O=J_(),T=O.selectedFiles,z=O.setSelectedFiles,A=O.handleDownload,N=$_(),L=N.currentPath,D=N.setCurrentPath,I=N.currentPathFiles,F=N.setCurrentPathFiles,B=W_(),W=B.activeLayout,H=B.setActiveLayout,V=function(e){j(e),h(!1)},U=[{title:"View",icon:"grid"===W?(0,p.jsx)(l_,{size:18}):(0,p.jsx)(P_,{size:18}),onClick:function(){},children:[{title:"Grid",icon:(0,p.jsx)(l_,{size:18}),selected:"grid"===W,onClick:function(){H("grid"),h(!1)}},{title:"List",icon:(0,p.jsx)(P_,{size:18}),selected:"list"===W,onClick:function(){H("list"),h(!1)}}]},{title:"Refresh",icon:(0,p.jsx)(c_,{size:18}),onClick:function(){h(!1),K_(e,"onRefresh"),M(null)},divider:!0},{title:"New folder",icon:(0,p.jsx)(a_,{size:18}),onClick:function(){n.show("createFolder"),h(!1)}},{title:"Upload",icon:(0,p.jsx)(y_,{size:18}),onClick:function(){h(!1),n.show("uploadFile")},divider:!0},{title:"Select all",icon:(0,p.jsx)(w_,{size:18}),onClick:function(){z(I),h(!1)}}],Y=[{title:"Open",icon:null!==P&&void 0!==P&&P.isDirectory?(0,p.jsx)(ME,{size:20}):(0,p.jsx)(N_,{size:16}),onClick:function(){P.isDirectory?(D(P.path),l([]),z([])):t&&n.show("previewFile"),h(!1)},divider:!0},{title:"Cut",icon:(0,p.jsx)(u_,{size:19}),onClick:function(){return V(!0)}},{title:"Copy",icon:(0,p.jsx)(o_,{strokeWidth:.1,size:17}),onClick:function(){return V(!1)},divider:!(null!==P&&void 0!==P&&P.isDirectory)},{title:"Paste",icon:(0,p.jsx)(D_,{size:18}),onClick:function(){R(P),h(!1)},className:"".concat(Z?"":"disable-paste"),hidden:!(null!==P&&void 0!==P&&P.isDirectory),divider:!0},{title:"Rename",icon:(0,p.jsx)(x_,{size:19}),onClick:function(){h(!1),n.show("rename")},hidden:T.length>1},{title:"Download",icon:(0,p.jsx)(g_,{size:18}),onClick:function(){A(),h(!1)},hidden:null===P||void 0===P?void 0:P.isDirectory},{title:"Delete",icon:(0,p.jsx)(m_,{size:19}),onClick:function(){h(!1),n.show("delete")}}],q=function(){l([]),z((function(e){return e.length>0?[]:e}))};return(0,r.useEffect)((function(){if(n.isActive)switch(n.actionType){case"createFolder":F((function(e){return[].concat((0,s.Z)(e),[{name:pE("New Folder",!0,e),isDirectory:!0,path:L,isEditing:!0,key:(new Date).valueOf()}])}));break;case"rename":F((function(e){return e[a.at(-1)]&&(e[a.at(-1)].isEditing=!0),e})),l([]),z([])}}),[n.isActive]),(0,r.useEffect)((function(){l([]),z([])}),[L]),(0,r.useEffect)((function(){T.length>0?l((function(){return T.map((function(e){return I.findIndex((function(t){return t.path===e.path}))}))})):l([])}),[T,I]),{emptySelecCtxItems:U,selecCtxItems:Y,handleContextMenu:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.preventDefault(),k({clickX:e.clientX,clickY:e.clientY}),y(t),!t&&q(),h(!0)},unselectFiles:q,visible:d,setVisible:h,setLastSelectedFile:_,selectedFileIndexes:a,clickPosition:w,isSelectionCtx:g}},RE=function(e){var t=e.unselectFiles,n=(0,r.useState)(!1),i=(0,f.Z)(n,2),o=i[0],a=i[1],s=J_(),l=s.selectedFiles,u=s.setSelectedFiles,c=$_().currentPathFiles,d=(0,r.useMemo)((function(){return l.length===c.length}),[l,c]);return(0,p.jsxs)("div",{className:"files-header",onMouseOver:function(){return a(!0)},onMouseLeave:function(){return a(!1)},children:[(0,p.jsx)("div",{className:"file-select-all",children:(o||d)&&(0,p.jsx)(PE,{checked:d,onChange:function(e){e.target.checked?(u(c),a(!0)):t()},title:"Select all"})}),(0,p.jsx)("div",{className:"file-name",children:"Name"}),(0,p.jsx)("div",{className:"file-date",children:"Modified"}),(0,p.jsx)("div",{className:"file-size",children:"Size"})]})},OE=function(e){var t=e.onCreateFolder,n=e.onRename,i=e.onFileOpen,o=e.onRefresh,a=e.enableFilePreview,s=e.triggerAction,l=$_().currentPathFiles,u=(0,r.useRef)(null),c=W_().activeLayout,d=jE(o,a,s),f=d.emptySelecCtxItems,h=d.selecCtxItems,v=d.handleContextMenu,m=d.unselectFiles,g=d.visible,y=d.setVisible,b=d.setLastSelectedFile,x=d.selectedFileIndexes,w=d.clickPosition,k=d.isSelectionCtx,S=I_((function(){return y(!1)}));return(0,p.jsxs)("div",{ref:u,className:"files ".concat(c),onContextMenu:v,onClick:m,children:["list"===c&&(0,p.jsx)(RE,{unselectFiles:m}),(null===l||void 0===l?void 0:l.length)>0?(0,p.jsx)(p.Fragment,{children:l.map((function(e,r){return(0,p.jsx)(_E,{index:r,file:e,onCreateFolder:t,onRename:n,onFileOpen:i,enableFilePreview:a,triggerAction:s,filesViewRef:u,selectedFileIndexes:x,handleContextMenu:v,setVisible:y,setLastSelectedFile:b},r)}))}):(0,p.jsx)("div",{className:"empty-folder",children:"This folder is empty."}),(0,p.jsx)(ZE,{filesViewRef:u,contextMenuRef:S.ref,menuItems:k?h:f,visible:g,setVisible:y,clickPosition:w})]})},TE=function(e){var t=e.triggerAction,n=e.onDelete,i=(0,r.useState)(""),o=(0,f.Z)(i,2),a=o[0],s=o[1],l=J_(),u=l.selectedFiles,c=l.setSelectedFiles;(0,r.useEffect)((function(){s((function(){return 1===u.length?'Are you sure you want to delete "'.concat(u[0].name,'"?'):u.length>1?"Are you sure you want to delete these ".concat(u.length," items?"):void 0}))}),[]);return(0,p.jsxs)("div",{className:"file-delete-confirm",children:[(0,p.jsx)("p",{className:"file-delete-confirm-text",children:a}),(0,p.jsxs)("div",{className:"file-delete-confirm-actions",children:[(0,p.jsx)(yE,{type:"secondary",onClick:function(){return t.close()},children:"Cancel"}),(0,p.jsx)(yE,{type:"danger",onClick:function(){n(u),c([]),t.close()},children:"Delete"})]})]})};function zE(e){return r_({tag:"svg",attr:{viewBox:"0 0 1024 1024",fill:"currentColor",fillRule:"evenodd"},child:[{tag:"path",attr:{d:"M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926 224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512 166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"},child:[]}]})(e)}function AE(e){return r_({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M518.3 459a8 8 0 0 0-12.6 0l-112 141.7a7.98 7.98 0 0 0 6.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z"},child:[]},{tag:"path",attr:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0 1 52.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 0 1-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"},child:[]}]})(e)}var NE=function(e){var t=e.percent,n=void 0===t?0:t,r=e.isCanceled,i=void 0!==r&&r,o=e.isCompleted,a=void 0!==o&&o,s=e.error;return(0,p.jsxs)("div",{role:"progressbar",className:"fm-progress",children:[!s&&(0,p.jsx)("div",{className:"fm-progress-bar",children:(0,p.jsx)("div",{className:"fm-progress-bar-fill",style:{width:"".concat(n,"%")}})}),i?(0,p.jsx)("span",{className:"fm-upload-canceled",children:"Canceled"}):s?(0,p.jsx)("span",{className:"fm-upload-canceled",children:s}):(0,p.jsx)("div",{className:"fm-progress-status",children:(0,p.jsx)("span",{children:a?"Completed":n+"% done"})})]})};function LE(e){return r_({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 388c-72.597 0-132-59.405-132-132 0-72.601 59.403-132 132-132 36.3 0 69.299 15.4 92.406 39.601L278 234h154V80l-51.698 51.702C348.406 99.798 304.406 80 256 80c-96.797 0-176 79.203-176 176s78.094 176 176 176c81.045 0 148.287-54.134 169.401-128H378.85c-18.745 49.561-67.138 84-122.85 84z"},child:[]}]})(e)}var DE=function(e){var t,n,i,o,a,s=e.index,l=e.fileData,u=e.setFiles,c=e.setIsUploading,d=e.fileUploadConfig,h=e.onFileUploaded,v=e.handleFileRemove,m=(0,r.useState)(0),g=(0,f.Z)(m,2),y=g[0],x=g[1],k=(0,r.useState)(!1),S=(0,f.Z)(k,2),C=S[0],P=S[1],_=(0,r.useState)(!1),E=(0,f.Z)(_,2),Z=E[0],M=E[1],j=(0,r.useState)(!1),R=(0,f.Z)(j,2),O=R[0],T=R[1],z=hE(33),A=(0,r.useRef)(),N=Y_().onError,L=function(e){x(0),c((function(e){return w(w({},e),{},(0,b.Z)({},s,!1))}));var t={type:"upload",message:"Upload failed.",response:{status:e.status,statusText:e.statusText,data:e.response}};u((function(e){return e.map((function(e,n){return s===n?w(w({},e),{},{error:t.message}):e}))})),T(!0),N(t,l.file)},D=function(e){if(!e.error)return new Promise((function(t,n){var r=new XMLHttpRequest;A.current=r,c((function(e){return w(w({},e),{},(0,b.Z)({},s,!0))})),r.upload.onprogress=function(e){if(e.lengthComputable){var t=Math.round(e.loaded/e.total*100);x(t)}},r.onload=function(){c((function(e){return w(w({},e),{},(0,b.Z)({},s,!1))})),200===r.status||201===r.status?(P(!0),h(r.response),t(r.response)):(n(r.statusText),L(r))},r.onerror=function(){n(r.statusText),L(r)},r.open("POST",null===d||void 0===d?void 0:d.url,!0);var i=null===d||void 0===d?void 0:d.headers;for(var o in i)r.setRequestHeader(o,i[o]);var a=new FormData,l=null===e||void 0===e?void 0:e.appendData;for(var u in l)l[u]&&a.append(u,l[u]);a.append("file",e.file),r.send(a)}))};(0,r.useEffect)((function(){A.current||D(l)}),[]);return l.removed?null:(0,p.jsxs)("li",{children:[(0,p.jsx)("div",{className:"file-icon",children:null!==(t=z[wE(null===(n=l.file)||void 0===n?void 0:n.name)])&&void 0!==t?t:(0,p.jsx)(N_,{size:33})}),(0,p.jsxs)("div",{className:"file",children:[(0,p.jsxs)("div",{className:"file-details",children:[(0,p.jsxs)("div",{className:"file-info",children:[(0,p.jsx)("span",{className:"file-name text-truncate",title:null===(i=l.file)||void 0===i?void 0:i.name,children:null===(o=l.file)||void 0===o?void 0:o.name}),(0,p.jsx)("span",{className:"file-size",children:SE(null===(a=l.file)||void 0===a?void 0:a.size)})]}),C?(0,p.jsx)(aE,{color:"#5c5bb1",title:"Uploaded"}):Z||O?(0,p.jsx)(LE,{className:"retry-upload",title:"Retry",onClick:function(){null!==l&&void 0!==l&&l.file&&(u((function(e){return e.map((function(e,t){return s===t?w(w({},e),{},{error:!1}):e}))})),D(w(w({},l),{},{error:!1})),M(!1),T(!1))}}):(0,p.jsx)("div",{className:"rm-file",title:"".concat(l.error?"Remove":"Abort Upload"),onClick:l.error?function(){return v(s)}:function(){A.current&&(A.current.abort(),c((function(e){return w(w({},e),{},(0,b.Z)({},s,!1))})),M(!0),x(0))},children:(0,p.jsx)(zE,{})})]}),(0,p.jsx)(NE,{percent:y,isCanceled:Z,isCompleted:C,error:l.error})]})]})},IE=function(e){var t=e.fileUploadConfig,n=e.maxFileSize,i=e.acceptedFileTypes,o=e.onFileUploading,a=e.onFileUploaded,l=(0,r.useState)([]),u=(0,f.Z)(l,2),c=u[0],d=u[1],h=(0,r.useState)(!1),v=(0,f.Z)(h,2),m=v[0],g=v[1],y=(0,r.useState)({}),b=(0,f.Z)(y,2),x=b[0],k=b[1],S=$_(),C=S.currentFolder,P=S.currentPathFiles,_=Y_().onError,E=(0,r.useRef)(null),Z=function(e){if((e=e.filter((function(e){return!c.some((function(t){return t.file.name.toLowerCase()===e.name.toLowerCase()}))}))).length>0){var t=e.map((function(e){var t=o(e,C),r=function(e){return i&&!i.includes(wE(e.name))?"File type is not allowed.":P.some((function(t){return t.name.toLowerCase()===e.name.toLowerCase()&&!t.isDirectory}))?"File already exists.":n&&e.size>n?"Maximum upload size is ".concat(SE(n,0),"."):void 0}(e);return r&&_({type:"upload",message:r},e),w({file:e,appendData:t},r&&{error:r})}));d((function(e){return[].concat((0,s.Z)(e),(0,s.Z)(t))}))}},M=function(e){d((function(t){var n=t.map((function(t,n){return e===n?w(w({},t),{},{removed:!0}):t}));return n.every((function(e){return!!e.removed}))?[]:n}))};return(0,p.jsxs)("div",{className:"fm-upload-file ".concat(c.length>0?"file-selcted":""),children:[(0,p.jsxs)("div",{className:"select-files",children:[(0,p.jsx)("div",{className:"draggable-file-input ".concat(m?"dragging":""),onDrop:function(e){e.preventDefault(),g(!1);var t=Array.from(e.dataTransfer.files);Z(t)},onDragOver:function(e){return e.preventDefault()},onDragEnter:function(){return g(!0)},onDragLeave:function(){return g(!1)},children:(0,p.jsxs)("div",{className:"input-text",children:[(0,p.jsx)(AE,{size:30}),(0,p.jsx)("span",{children:"Drag files to upload"})]})}),(0,p.jsx)("div",{className:"btn-choose-file",children:(0,p.jsxs)(yE,{padding:"0",onKeyDown:function(e){"Enter"===e.key&&E.current.click()},children:[(0,p.jsx)("label",{htmlFor:"chooseFile",children:"Choose File"}),(0,p.jsx)("input",{ref:E,type:"file",id:"chooseFile",className:"choose-file-input",onChange:function(e){var t=Array.from(e.target.files);Z(t)},multiple:!0,accept:i})]})})]}),c.length>0&&(0,p.jsxs)("div",{className:"files-progress",children:[(0,p.jsx)("div",{className:"heading",children:Object.values(x).some((function(e){return e}))?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h2",{children:"Uploading"}),(0,p.jsx)(YP(),{type:"cylon",color:"black",height:18,width:20})]}):(0,p.jsx)("h2",{children:"Completed"})}),(0,p.jsx)("ul",{children:c.map((function(e,n){return(0,p.jsx)(DE,{index:n,fileData:e,setFiles:d,fileUploadConfig:t,setIsUploading:k,onFileUploaded:a,handleFileRemove:M},n)}))})]})]})},FE=["jpg","jpeg","png"],BE=["mp4","mov","avi"],WE=["mp3","wav","m4a"],HE=["txt","pdf"],VE=function(e){var t,n,i=e.filePreviewPath,o=(0,r.useState)(!0),a=(0,f.Z)(o,2),s=a[0],l=a[1],u=(0,r.useState)(!1),c=(0,f.Z)(u,2),d=c[0],h=c[1],v=J_().selectedFiles,m=hE(73),g=null===(t=wE(v[0].name))||void 0===t?void 0:t.toLowerCase(),y="".concat(i).concat(v[0].path),b=function(){l(!1),h(!1)},x=function(){l(!1),h(!0)};return(0,p.jsxs)("section",{className:"file-previewer ".concat("pdf"===g?"pdf-previewer":""),children:[d||![].concat(FE,BE,WE,HE).includes(g)&&(0,p.jsxs)("div",{className:"preview-error",children:[(0,p.jsx)("span",{className:"error-icon",children:null!==(n=m[g])&&void 0!==n?n:(0,p.jsx)(sE,{size:73})}),(0,p.jsx)("span",{className:"error-msg",children:"Sorry! Preview is not available for this file."}),(0,p.jsxs)("div",{className:"file-info",children:[(0,p.jsx)("span",{className:"file-name",children:v[0].name}),v[0].size&&(0,p.jsx)("span",{children:"-"}),(0,p.jsx)("span",{className:"file-size",children:SE(v[0].size)})]}),(0,p.jsx)(yE,{onClick:function(){window.location.href=y},padding:"0.45rem .9rem",children:(0,p.jsxs)("div",{className:"download-btn",children:[(0,p.jsx)(g_,{size:18}),(0,p.jsx)("span",{children:"Download"})]})})]}),FE.includes(g)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(qP,{isLoading:s}),(0,p.jsx)("img",{src:y,alt:"Preview Unavailable",className:"photo-popup-image ".concat(s?"img-loading":""),onLoad:b,onError:x,loading:"lazy"})]}),BE.includes(g)&&(0,p.jsx)("video",{src:y,className:"video-preview",controls:!0,autoPlay:!0}),WE.includes(g)&&(0,p.jsx)("audio",{src:y,controls:!0,autoPlay:!0,className:"audio-preview"}),HE.includes(g)&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("iframe",{src:y,onLoad:b,onError:x,frameBorder:"0",className:"photo-popup-iframe ".concat(s?"img-loading":"")})})]})},UE=function(e){return e.toLowerCase()},YE=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(0,r.useRef)(new Set([])),o=(0,r.useMemo)((function(){return new Set(e.map((function(e){return UE(e)})))}),[e]),a=function(e){if(!e.repeat)return i.current.add(UE(e.key)),o.isSubsetOf(i.current)&&!n?(e.preventDefault(),void t(e)):void 0},s=function(e){i.current.delete(UE(e.key))},l=function(){i.current.clear()};(0,r.useEffect)((function(){return window.addEventListener("keydown",a),window.addEventListener("keyup",s),window.addEventListener("blur",l),function(){window.removeEventListener("keydown",a),window.removeEventListener("keyup",s),window.removeEventListener("blur",l)}}),[o,t,n])},qE=["Alt","Shift","N"],XE=["Control","U"],$E=["Control","X"],KE=["Control","C"],GE=["Control","V"],QE=["F2"],JE=["Control","D"],eZ=["Delete"],tZ=["Control","A"],nZ=["Home"],rZ=["End"],iZ=["Control","Shift","!"],oZ=["Control","Shift","@"],aZ=["F5"],sZ=["Escape"],lZ=function(e){var t=e.fileUploadConfig,n=e.onFileUploading,i=e.onFileUploaded,o=e.onDelete,a=e.onRefresh,s=e.maxFileSize,l=e.filePreviewPath,u=e.acceptedFileTypes,c=e.triggerAction,d=(0,r.useState)(null),h=(0,f.Z)(d,2),v=h[0],m=h[1],g=J_().selectedFiles;!function(e,t){var n=nE(),r=n.setClipBoard,i=n.handleCutCopy,o=n.handlePasting,a=$_(),s=a.currentFolder,l=a.currentPathFiles,u=J_(),c=u.setSelectedFiles,d=u.handleDownload,f=W_().setActiveLayout;YE(qE,(function(){e.show("createFolder")}),e.isActive),YE(XE,(function(){e.show("uploadFile")}),e.isActive),YE($E,(function(){i(!0)}),e.isActive),YE(KE,(function(){i(!1)}),e.isActive),YE(GE,(function(){o(s)}),e.isActive),YE(QE,(function(){e.show("rename")}),e.isActive),YE(JE,(function(){d()}),e.isActive),YE(eZ,(function(){e.show("delete")}),e.isActive),YE(nZ,(function(){l.length>0&&c([l[0]])}),e.isActive),YE(rZ,(function(){l.length>0&&c([l.at(-1)])}),e.isActive),YE(tZ,(function(){c(l)}),e.isActive),YE(sZ,(function(){c((function(e){return e.length>0?[]:e}))}),e.isActive),YE(aZ,(function(){K_(t,"onRefresh"),r(null)}),e.isActive),YE(oZ,(function(){f("grid")}),e.isActive),YE(iZ,(function(){f("list")}),e.isActive)}(c,a);var y={uploadFile:{title:"Upload",component:(0,p.jsx)(IE,{fileUploadConfig:t,maxFileSize:s,acceptedFileTypes:u,onFileUploading:n,onFileUploaded:i}),width:"35%"},delete:{title:"Delete",component:(0,p.jsx)(TE,{triggerAction:c,onDelete:o}),width:"25%"},previewFile:{title:"Preview",component:(0,p.jsx)(VE,{filePreviewPath:l}),width:"50%"}};if((0,r.useEffect)((function(){if(c.isActive){var e,t=c.actionType;if("previewFile"===t)y[t].title=null!==(e=null===g||void 0===g?void 0:g.name)&&void 0!==e?e:"Preview";m(y[t])}else m(null)}),[c.isActive]),v)return(0,p.jsx)(xE,{heading:v.title,show:c.isActive,setShow:c.close,dialogWidth:v.width,children:null===v||void 0===v?void 0:v.component})},uZ=function(e){var t=e.files,n=e.fileUploadConfig,i=e.isLoading,o=e.onCreateFolder,a=e.onFileUploading,s=void 0===a?function(){}:a,l=e.onFileUploaded,u=void 0===l?function(){}:l,c=e.onPaste,d=e.onRename,h=e.onDownload,v=e.onDelete,m=void 0===v?function(){return null}:v,g=e.onLayoutChange,y=void 0===g?function(){}:g,b=e.onRefresh,x=e.onFileOpen,w=void 0===x?function(){}:x,k=e.onError,S=void 0===k?function(){}:k,C=e.layout,P=void 0===C?"grid":C,_=e.enableFilePreview,E=void 0===_||_,Z=e.maxFileSize,M=e.filePreviewPath,j=e.acceptedFileTypes,R=e.height,O=void 0===R?"600px":R,T=e.width,z=void 0===T?"100%":T,A=function(){var e=(0,r.useState)(!1),t=(0,f.Z)(e,2),n=t[0],i=t[1],o=(0,r.useState)(null),a=(0,f.Z)(o,2),s=a[0],l=a[1];return{isActive:n,actionType:s,show:function(e){i(!0),l(e)},close:function(){i(!1),l(null)}}}(),N=function(e,t){var n=(0,r.useState)({col1:e,col2:t}),i=(0,f.Z)(n,2),o=i[0],a=i[1],s=(0,r.useState)(!1),l=(0,f.Z)(s,2),u=l[0],c=l[1],d=(0,r.useRef)(null);return{containerRef:d,colSizes:o,setColSizes:a,isDragging:u,handleMouseDown:function(){c(!0)},handleMouseUp:function(){c(!1)},handleMouseMove:function(e){if(u){e.preventDefault();var t=d.current.getBoundingClientRect(),n=(e.clientX-t.left)/t.width*100;n>=15&&n<=60&&a({col1:n,col2:100-n})}}}}(20,80),L=N.containerRef,D=N.colSizes,I=N.isDragging,F=N.handleMouseMove,B=N.handleMouseUp,W=N.handleMouseDown;return(0,p.jsxs)("main",{className:"file-explorer",onContextMenu:function(e){return e.preventDefault()},style:{height:O,width:z},children:[(0,p.jsx)(qP,{isLoading:i}),(0,p.jsx)(U_,{filesData:t,onError:S,children:(0,p.jsx)(X_,{children:(0,p.jsx)(Q_,{onDownload:h,children:(0,p.jsx)(tE,{onPaste:c,children:(0,p.jsxs)(B_,{layout:P,children:[(0,p.jsx)(rE,{allowCreateFolder:!0,allowUploadFile:!0,onLayoutChange:y,onRefresh:b,triggerAction:A}),(0,p.jsxs)("section",{ref:L,onMouseMove:F,onMouseUp:B,className:"files-container",children:[(0,p.jsxs)("div",{className:"navigation-pane",style:{width:D.col1+"%"},children:[(0,p.jsx)(dE,{}),(0,p.jsx)("div",{className:"sidebar-resize ".concat(I?"sidebar-dragging":""),onMouseDown:W})]}),(0,p.jsxs)("div",{className:"folders-preview",style:{width:D.col2+"%"},children:[(0,p.jsx)(fE,{}),(0,p.jsx)(OE,{onCreateFolder:o,onRename:d,onFileOpen:w,onRefresh:b,enableFilePreview:E,triggerAction:A})]})]}),(0,p.jsx)(lZ,{fileUploadConfig:n,onFileUploading:s,onFileUploaded:u,onDelete:m,onRefresh:b,maxFileSize:Z,filePreviewPath:M,acceptedFileTypes:j,triggerAction:A})]})})})})})]})};uZ.displayName="FileManager";var cZ=uZ,dZ=VP.create({baseURL:"http://localhost:4000"}),fZ=function(){var e=d(u().mark((function e(t,n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dZ.post("/folder",{name:t,parentId:n});case 3:return r=e.sent,e.abrupt("return",r);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}(),hZ=function(){var e=d(u().mark((function e(t,n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=dZ.patch("/rename",{id:t,newName:n}),e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),pZ=function(){var e=d(u().mark((function e(t){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dZ.delete("",{data:{ids:t}});case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),vZ=function(){var e=d(u().mark((function e(t,n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dZ.post("/copy",{sourceIds:t,destinationId:n});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),mZ=function(){var e=d(u().mark((function e(t,n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dZ.put("/move",{sourceIds:t,destinationId:n});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),gZ=function(){var e=d(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dZ.get();case 3:return t=e.sent,e.abrupt("return",t);case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),yZ=function(){var e=d(u().mark((function e(t){var n,r,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.length){e.next=2;break}return e.abrupt("return");case 2:e.prev=2,n=t.map((function(e){return"files=".concat(encodeURIComponent(e._id))})).join("&"),r="http://localhost:4000/download?".concat(n),(i=document.createElement("a")).href=r,document.body.appendChild(i),i.click(),document.body.removeChild(i),e.next=15;break;case 12:return e.prev=12,e.t0=e.catch(2),e.abrupt("return",e.t0);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}(),bZ=function(e,t){return(0,El.Z)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode})},xZ=function(e){return(0,El.Z)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}})};var wZ=function(e){var t=(0,af.i)({props:e,name:"MuiCssBaseline"}),n=t.children,i=t.enableColorScheme,o=void 0!==i&&i;return(0,p.jsxs)(r.Fragment,{children:[(0,p.jsx)(Op,{styles:function(e){return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={};n&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach((function(t){var n,i=(0,f.Z)(t,2),o=i[0],a=i[1];r[e.getColorSchemeSelector(o).replace(/\s*&/,"")]={colorScheme:null==(n=a.palette)?void 0:n.mode}}));var i=(0,El.Z)({html:bZ(e,n),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,El.Z)({margin:0},xZ(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r),o=null==(t=e.components)||null==(t=t.MuiCssBaseline)?void 0:t.styleOverrides;return o&&(i=[i,o]),i}(e,o)}}),n]})};function kZ(e){return(0,Td.ZP)("MuiAppBar",e)}(0,vf.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var SZ=["className","color","enableColorOnDark","position"],CZ=function(e,t){return e?"".concat(null==e?void 0:e.replace(")",""),", ").concat(t,")"):t},PZ=(0,of.ZP)(dg,{name:"MuiAppBar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["position".concat((0,rf.Z)(n.position))],t["color".concat((0,rf.Z)(n.color))]]}})((function(e){var t=e.theme,n=e.ownerState,r="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,El.Z)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===n.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===n.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===n.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===n.position&&{position:"static"},"relative"===n.position&&{position:"relative"},!t.vars&&(0,El.Z)({},"default"===n.color&&{backgroundColor:r,color:t.palette.getContrastText(r)},n.color&&"default"!==n.color&&"inherit"!==n.color&&"transparent"!==n.color&&{backgroundColor:t.palette[n.color].main,color:t.palette[n.color].contrastText},"inherit"===n.color&&{color:"inherit"},"dark"===t.palette.mode&&!n.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===n.color&&(0,El.Z)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&(0,El.Z)({},"default"===n.color&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette.AppBar.defaultBg:CZ(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":n.enableColorOnDark?t.vars.palette.text.primary:CZ(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},n.color&&!n.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette[n.color].main:CZ(t.vars.palette.AppBar.darkBg,t.vars.palette[n.color].main),"--AppBar-color":n.enableColorOnDark?t.vars.palette[n.color].contrastText:CZ(t.vars.palette.AppBar.darkColor,t.vars.palette[n.color].contrastText)},!["inherit","transparent"].includes(n.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===n.color?"inherit":"var(--AppBar-color)"},"transparent"===n.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))})),_Z=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiAppBar"}),r=n.className,i=n.color,o=void 0===i?"primary":i,a=n.enableColorOnDark,s=void 0!==a&&a,l=n.position,u=void 0===l?"fixed":l,c=(0,Na.Z)(n,SZ),d=(0,El.Z)({},n,{color:o,position:u,enableColorOnDark:s}),f=function(e){var t=e.color,n=e.position,r=e.classes,i={root:["root","color".concat((0,rf.Z)(t)),"position".concat((0,rf.Z)(n))]};return(0,zd.Z)(i,kZ,r)}(d);return(0,p.jsx)(PZ,(0,El.Z)({square:!0,component:"header",ownerState:d,elevation:4,className:(0,Od.Z)(f.root,r,"fixed"===u&&"mui-fixed"),ref:t},c))}));function EZ(e){return(0,Td.ZP)("MuiToolbar",e)}(0,vf.Z)("MuiToolbar",["root","gutters","regular","dense"]);var ZZ=["className","component","disableGutters","variant"],MZ=(0,of.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,El.Z)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&(0,b.Z)({paddingLeft:t.spacing(2),paddingRight:t.spacing(2)},t.breakpoints.up("sm"),{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}),"dense"===n.variant&&{minHeight:48})}),(function(e){var t=e.theme;return"regular"===e.ownerState.variant&&t.mixins.toolbar})),jZ=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiToolbar"}),r=n.className,i=n.component,o=void 0===i?"div":i,a=n.disableGutters,s=void 0!==a&&a,l=n.variant,u=void 0===l?"regular":l,c=(0,Na.Z)(n,ZZ),d=(0,El.Z)({},n,{component:o,disableGutters:s,variant:u}),f=function(e){var t=e.classes,n={root:["root",!e.disableGutters&&"gutters",e.variant]};return(0,zd.Z)(n,EZ,t)}(d);return(0,p.jsx)(MZ,(0,El.Z)({as:o,className:(0,Od.Z)(f.root,r),ref:t,ownerState:d},c))}));function RZ(e){return(0,Td.ZP)("MuiIconButton",e)}var OZ=(0,vf.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),TZ=["edge","children","className","color","disabled","disableFocusRipple","size"],zZ=(0,of.ZP)(Ph,{name:"MuiIconButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"default"!==n.color&&t["color".concat((0,rf.Z)(n.color))],n.edge&&t["edge".concat((0,rf.Z)(n.edge))],t["size".concat((0,rf.Z)(n.size))]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,El.Z)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,Ff.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(function(e){var t,n=e.theme,r=e.ownerState,i=null==(t=(n.vars||n).palette)?void 0:t[r.color];return(0,El.Z)({},"inherit"===r.color&&{color:"inherit"},"inherit"!==r.color&&"default"!==r.color&&(0,El.Z)({color:null==i?void 0:i.main},!r.disableRipple&&{"&:hover":(0,El.Z)({},i&&{backgroundColor:n.vars?"rgba(".concat(i.mainChannel," / ").concat(n.vars.palette.action.hoverOpacity,")"):(0,Ff.Fq)(i.main,n.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===r.size&&{padding:5,fontSize:n.typography.pxToRem(18)},"large"===r.size&&{padding:12,fontSize:n.typography.pxToRem(28)},(0,b.Z)({},"&.".concat(OZ.disabled),{backgroundColor:"transparent",color:(n.vars||n).palette.action.disabled}))})),AZ=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiIconButton"}),r=n.edge,i=void 0!==r&&r,o=n.children,a=n.className,s=n.color,l=void 0===s?"default":s,u=n.disabled,c=void 0!==u&&u,d=n.disableFocusRipple,f=void 0!==d&&d,h=n.size,v=void 0===h?"medium":h,m=(0,Na.Z)(n,TZ),g=(0,El.Z)({},n,{edge:i,color:l,disabled:c,disableFocusRipple:f,size:v}),y=function(e){var t=e.classes,n=e.disabled,r=e.color,i=e.edge,o=e.size,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,rf.Z)(r)),i&&"edge".concat((0,rf.Z)(i)),"size".concat((0,rf.Z)(o))]};return(0,zd.Z)(a,RZ,t)}(g);return(0,p.jsx)(zZ,(0,El.Z)({className:(0,Od.Z)(y.root,a),centerRipple:!0,focusRipple:!f,disabled:c,ref:t},m,{ownerState:g,children:o}))})),NZ=(0,h.Z)((0,p.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function LZ(e){return(0,Td.ZP)("MuiAvatar",e)}(0,vf.Z)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);var DZ=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],IZ=["component","slots","slotProps"],FZ=["component"];var BZ=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],WZ=(0,of.ZP)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})((function(e){var t=e.theme;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,El.Z)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,El.Z)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}})),HZ=(0,of.ZP)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:function(e,t){return t.img}})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),VZ=(0,of.ZP)(NZ,{name:"MuiAvatar",slot:"Fallback",overridesResolver:function(e,t){return t.fallback}})({width:"75%",height:"75%"});var UZ=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiAvatar"}),i=n.alt,o=n.children,a=n.className,s=n.component,l=void 0===s?"div":s,u=n.slots,c=void 0===u?{}:u,d=n.slotProps,h=void 0===d?{}:d,v=n.imgProps,m=n.sizes,g=n.src,y=n.srcSet,x=n.variant,w=void 0===x?"circular":x,k=(0,Na.Z)(n,BZ),S=null,C=function(e){var t=e.crossOrigin,n=e.referrerPolicy,i=e.src,o=e.srcSet,a=r.useState(!1),s=(0,f.Z)(a,2),l=s[0],u=s[1];return r.useEffect((function(){if(i||o){u(!1);var e=!0,r=new Image;return r.onload=function(){e&&u("loaded")},r.onerror=function(){e&&u("error")},r.crossOrigin=t,r.referrerPolicy=n,r.src=i,o&&(r.srcset=o),function(){e=!1}}}),[t,n,i,o]),l}((0,El.Z)({},v,{src:g,srcSet:y})),P=g||y,_=P&&"error"!==C,E=(0,El.Z)({},n,{colorDefault:!_,component:l,variant:w}),Z=function(e){var t=e.classes,n={root:["root",e.variant,e.colorDefault&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,zd.Z)(n,LZ,t)}(E),M=function(e,t){var n=t.className,r=t.elementType,i=t.ownerState,o=t.externalForwardedProps,a=t.getSlotOwnerState,s=t.internalForwardedProps,l=(0,Na.Z)(t,DZ),u=o.component,c=o.slots,d=void 0===c?(0,b.Z)({},e,void 0):c,f=o.slotProps,h=void 0===f?(0,b.Z)({},e,void 0):f,p=(0,Na.Z)(o,IZ),v=d[e]||r,m=qv(h[e],i),g=Yv((0,El.Z)({className:n},l,{externalForwardedProps:"root"===e?p:void 0,externalSlotProps:m})),y=g.props.component,x=g.internalRef,w=(0,Na.Z)(g.props,FZ),k=(0,xp.Z)(x,null==m?void 0:m.ref,t.ref),S=a?a(w):{},C=(0,El.Z)({},i,S),P="root"===e?y||u:y,_=Hv(v,(0,El.Z)({},"root"===e&&!u&&!d[e]&&s,"root"!==e&&!d[e]&&s,w,P&&{as:P},{ref:k}),C);return Object.keys(S).forEach((function(e){delete _[e]})),[v,_]}("img",{className:Z.img,elementType:HZ,externalForwardedProps:{slots:c,slotProps:{img:(0,El.Z)({},v,h.img)}},additionalProps:{alt:i,src:g,srcSet:y,sizes:m},ownerState:E}),j=(0,f.Z)(M,2),R=j[0],O=j[1];return S=_?(0,p.jsx)(R,(0,El.Z)({},O)):o||0===o?o:P&&i?i[0]:(0,p.jsx)(VZ,{ownerState:E,className:Z.fallback}),(0,p.jsx)(WZ,(0,El.Z)({as:l,ownerState:E,className:(0,Od.Z)(Z.root,a),ref:t},k,{children:S}))})),YZ=UZ,qZ=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function XZ(e,t,n){var r,i=function(e,t,n){var r,i=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),a=(0,dm.Z)(t);if(t.fakeTransform)r=t.fakeTransform;else{var s=a.getComputedStyle(t);r=s.getPropertyValue("-webkit-transform")||s.getPropertyValue("transform")}var l=0,u=0;if(r&&"none"!==r&&"string"===typeof r){var c=r.split("(")[1].split(")")[0].split(",");l=parseInt(c[4],10),u=parseInt(c[5],10)}return"left"===e?"translateX(".concat(o?o.right+l-i.left:a.innerWidth+l-i.left,"px)"):"right"===e?"translateX(-".concat(o?i.right-o.left-l:i.left+i.width-l,"px)"):"up"===e?"translateY(".concat(o?o.bottom+u-i.top:a.innerHeight+u-i.top,"px)"):"translateY(-".concat(o?i.top-o.top+i.height-u:i.top+i.height-u,"px)")}(e,t,"function"===typeof(r=n)?r():r);i&&(t.style.webkitTransform=i,t.style.transform=i)}var $Z=r.forwardRef((function(e,t){var n=hf(),i={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},a=e.addEndListener,s=e.appear,l=void 0===s||s,u=e.children,c=e.container,d=e.direction,f=void 0===d?"down":d,h=e.easing,v=void 0===h?i:h,m=e.in,g=e.onEnter,y=e.onEntered,b=e.onEntering,x=e.onExit,w=e.onExited,k=e.onExiting,S=e.style,C=e.timeout,P=void 0===C?o:C,_=e.TransitionComponent,E=void 0===_?wm:_,Z=(0,Na.Z)(e,qZ),M=r.useRef(null),j=(0,Wf.Z)(u.ref,M,t),R=function(e){return function(t){e&&(void 0===t?e(M.current):e(M.current,t))}},O=R((function(e,t){XZ(f,e,c),km(e),g&&g(e,t)})),T=R((function(e,t){var r=Sm({timeout:P,style:S,easing:v},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,El.Z)({},r)),e.style.transition=n.transitions.create("transform",(0,El.Z)({},r)),e.style.webkitTransform="none",e.style.transform="none",b&&b(e,t)})),z=R(y),A=R(k),N=R((function(e){var t=Sm({timeout:P,style:S,easing:v},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),XZ(f,e,c),x&&x(e)})),L=R((function(e){e.style.webkitTransition="",e.style.transition="",w&&w(e)})),D=r.useCallback((function(){M.current&&XZ(f,M.current,c)}),[f,c]);return r.useEffect((function(){if(!m&&"down"!==f&&"right"!==f){var e=(0,cm.Z)((function(){M.current&&XZ(f,M.current,c)})),t=(0,dm.Z)(M.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}}),[f,m,c]),r.useEffect((function(){m||D()}),[m,D]),(0,p.jsx)(E,(0,El.Z)({nodeRef:M,onEnter:O,onEntered:z,onEntering:T,onExit:N,onExited:L,onExiting:A,addEndListener:function(e){a&&a(M.current,e)},appear:l,in:m,timeout:P},Z,{children:function(e,t){return r.cloneElement(u,(0,El.Z)({ref:j,style:(0,El.Z)({visibility:"exited"!==e||m?void 0:"hidden"},S,u.props.style)},t))}}))})),KZ=$Z;function GZ(e){return(0,Td.ZP)("MuiDrawer",e)}(0,vf.Z)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var QZ=["BackdropProps"],JZ=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],eM=function(e,t){var n=e.ownerState;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},tM=(0,of.ZP)(ag,{name:"MuiDrawer",slot:"Root",overridesResolver:eM})((function(e){var t=e.theme;return{zIndex:(t.vars||t).zIndex.drawer}})),nM=(0,of.ZP)("div",{shouldForwardProp:Bf.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:eM})({flex:"0 0 auto"}),rM=(0,of.ZP)(dg,{name:"MuiDrawer",slot:"Paper",overridesResolver:function(e,t){var n=e.ownerState;return[t.paper,t["paperAnchor".concat((0,rf.Z)(n.anchor))],"temporary"!==n.variant&&t["paperAnchorDocked".concat((0,rf.Z)(n.anchor))]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,El.Z)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===n.anchor&&{left:0},"top"===n.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===n.anchor&&{right:0},"bottom"===n.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===n.anchor&&"temporary"!==n.variant&&{borderRight:"1px solid ".concat((t.vars||t).palette.divider)},"top"===n.anchor&&"temporary"!==n.variant&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider)},"right"===n.anchor&&"temporary"!==n.variant&&{borderLeft:"1px solid ".concat((t.vars||t).palette.divider)},"bottom"===n.anchor&&"temporary"!==n.variant&&{borderTop:"1px solid ".concat((t.vars||t).palette.divider)})})),iM={left:"right",right:"left",top:"down",bottom:"up"};var oM=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiDrawer"}),i=hf(),o=Bv(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},s=n.anchor,l=void 0===s?"left":s,u=n.BackdropProps,c=n.children,d=n.className,f=n.elevation,h=void 0===f?16:f,v=n.hideBackdrop,m=void 0!==v&&v,g=n.ModalProps,y=(void 0===g?{}:g).BackdropProps,b=n.onClose,x=n.open,w=void 0!==x&&x,k=n.PaperProps,S=void 0===k?{}:k,C=n.SlideProps,P=n.TransitionComponent,_=void 0===P?KZ:P,E=n.transitionDuration,Z=void 0===E?a:E,M=n.variant,j=void 0===M?"temporary":M,R=(0,Na.Z)(n.ModalProps,QZ),O=(0,Na.Z)(n,JZ),T=r.useRef(!1);r.useEffect((function(){T.current=!0}),[]);var z=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?iM[t]:t}({direction:o?"rtl":"ltr"},l),A=l,N=(0,El.Z)({},n,{anchor:A,elevation:h,open:w,variant:j},O),L=function(e){var t=e.classes,n=e.anchor,r=e.variant,i={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper","paperAnchor".concat((0,rf.Z)(n)),"temporary"!==r&&"paperAnchorDocked".concat((0,rf.Z)(n))]};return(0,zd.Z)(i,GZ,t)}(N),D=(0,p.jsx)(rM,(0,El.Z)({elevation:"temporary"===j?h:0,square:!0},S,{className:(0,Od.Z)(L.paper,S.className),ownerState:N,children:c}));if("permanent"===j)return(0,p.jsx)(nM,(0,El.Z)({className:(0,Od.Z)(L.root,L.docked,d),ownerState:N,ref:t},O,{children:D}));var I=(0,p.jsx)(_,(0,El.Z)({in:w,direction:iM[z],timeout:Z,appear:T.current},C,{children:D}));return"persistent"===j?(0,p.jsx)(nM,(0,El.Z)({className:(0,Od.Z)(L.root,L.docked,d),ownerState:N,ref:t},O,{children:I})):(0,p.jsx)(tM,(0,El.Z)({BackdropProps:(0,El.Z)({},u,y,{transitionDuration:Z}),className:(0,Od.Z)(L.root,L.modal,d),open:w,ownerState:N,onClose:b,hideBackdrop:m,ref:t},O,R,{children:I}))})),aM=["className"],sM=(0,of.ZP)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((function(e){var t=e.theme,n=e.ownerState;return(0,El.Z)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===n.alignItems&&{marginTop:8})})),lM=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiListItemIcon"}),i=n.className,o=(0,Na.Z)(n,aM),a=r.useContext(Kv),s=(0,El.Z)({},n,{alignItems:a.alignItems}),l=function(e){var t=e.alignItems,n=e.classes,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,zd.Z)(r,ak,n)}(s);return(0,p.jsx)(sM,(0,El.Z)({className:(0,Od.Z)(l.root,i),ownerState:s,ref:t},o))}));function uM(e){return(0,Td.ZP)("MuiDialogContent",e)}(0,vf.Z)("MuiDialogContent",["root","dividers"]);var cM=["className","dividers"],dM=(0,of.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.dividers&&t.dividers]}})((function(e){var t=e.theme,n=e.ownerState;return(0,El.Z)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((t.vars||t).palette.divider),borderBottom:"1px solid ".concat((t.vars||t).palette.divider)}:(0,b.Z)({},".".concat(pb.root," + &"),{paddingTop:0}))})),fM=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiDialogContent"}),r=n.className,i=n.dividers,o=void 0!==i&&i,a=(0,Na.Z)(n,cM),s=(0,El.Z)({},n,{dividers:o}),l=function(e){var t=e.classes,n={root:["root",e.dividers&&"dividers"]};return(0,zd.Z)(n,uM,t)}(s);return(0,p.jsx)(dM,(0,El.Z)({className:(0,Od.Z)(l.root,r),ownerState:s,ref:t},a))}));function hM(e){return(0,Td.ZP)("MuiDialogActions",e)}(0,vf.Z)("MuiDialogActions",["root","spacing"]);var pM=["className","disableSpacing"],vM=(0,of.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.disableSpacing&&t.spacing]}})((function(e){var t=e.ownerState;return(0,El.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),mM=r.forwardRef((function(e,t){var n=(0,af.i)({props:e,name:"MuiDialogActions"}),r=n.className,i=n.disableSpacing,o=void 0!==i&&i,a=(0,Na.Z)(n,pM),s=(0,El.Z)({},n,{disableSpacing:o}),l=function(e){var t=e.classes,n={root:["root",!e.disableSpacing&&"spacing"]};return(0,zd.Z)(n,hM,t)}(s);return(0,p.jsx)(vM,(0,El.Z)({className:(0,Od.Z)(l.root,r),ownerState:s,ref:t},a))}));var gM=function(e){var t=e.children,n=e.theme,i=Yu(),o=r.useMemo((function(){var e=null===i?n:function(e,t){return"function"===typeof t?t(e):(0,El.Z)({},e,t)}(i,n);return null!=e&&(e[qu]=null!==i),e}),[n,i]);return(0,p.jsx)(Uu.Provider,{value:o,children:t})},yM=n(4769),bM={};function xM(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return r.useMemo((function(){var r=e&&t[e]||t;if("function"===typeof n){var o=n(r),a=e?(0,El.Z)({},t,(0,b.Z)({},e,o)):o;return i?function(){return a}:a}return e?(0,El.Z)({},t,(0,b.Z)({},e,n)):(0,El.Z)({},t,n)}),[e,t,n,i])}var wM=function(e){var t=e.children,n=e.theme,r=e.themeId,i=Dd(bM),o=Yu()||bM,a=xM(r,i,n),s=xM(r,o,n,!0),l="rtl"===a.direction;return(0,p.jsx)(gM,{theme:s,children:(0,p.jsx)(Ld.T.Provider,{value:a,children:(0,p.jsx)(Wv,{value:l,children:(0,p.jsx)(yM.Z,{value:null==a?void 0:a.components,children:t})})})})},kM=["theme"];function SM(e){var t=e.theme,n=(0,Na.Z)(e,kM),r=t[ff.Z];return(0,p.jsx)(wM,(0,El.Z)({},n,{themeId:r?ff.Z:void 0,theme:r||t}))}var CM=n(9161),PM=(0,Mf.Z)({palette:{mode:"light"},typography:{fontFamily:"Roboto",fontWeightBold:700}}),_M=(0,Mf.Z)({palette:{mode:"dark"},typography:{fontFamily:"Roboto",fontWeightBold:700}});var EM=function(){var e=(0,r.useState)(!0),t=(0,f.Z)(e,2),n=t[0],i=t[1],o=n?240:60,l=(0,r.useState)("https://".concat(window.location.hostname)),c=(0,f.Z)(l,2),h=c[0],v=c[1],m=(0,r.useState)(8001),g=(0,f.Z)(m,2),y=g[0],b=g[1],x=(0,r.useState)("LiveView"),w=(0,f.Z)(x,2),k=w[0],S=w[1],C=(0,r.useState)(!1),P=(0,f.Z)(C,2),_=P[0],E=P[1],Z=(0,r.useState)(!0),M=(0,f.Z)(Z,2),j=M[0],R=M[1],O=(0,r.useState)([{i:"widget1",x:0,y:0,w:2,h:2},{i:"widget2",x:2,y:0,w:2,h:2},{i:"widget3",x:4,y:0,w:2,h:2},{i:"FlowStop",x:6,y:0,w:5,h:5},{i:"Lightsheet",x:0,y:2,w:5,h:5}]),T=(0,f.Z)(O,2),z=T[0],A=T[1],N=(0,r.useState)(!1),L=(0,f.Z)(N,2),D=L[0],I=L[1],F=(0,r.useState)([]),B=(0,f.Z)(F,2),W=B[0],H=B[1],V=(0,r.useRef)(!1),U=function(){var e=d(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,gZ();case 3:t=e.sent,H(t.data),I(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){V.current||(V.current=!0,U())}),[]);var Y=function(){var e=d(u().mark((function e(t,n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,fZ(t,null===n||void 0===n?void 0:n._id);case 3:200!==(r=e.sent).status&&201!==r.status||H((function(e){return[].concat((0,s.Z)(e),[r.data])})),I(!1);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),q=function(){var e=d(u().mark((function e(t,n){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,hZ(t._id,n);case 3:U(),I(!1);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),X=function(){var e=d(u().mark((function e(t){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),n=t.map((function(e){return e._id})),e.next=4,pZ(n);case 4:U(),I(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=d(u().mark((function e(t,n,r){var i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I(!0),i=t.map((function(e){return e._id})),"copy"!==r){e.next=7;break}return e.next=5,vZ(i,null===n||void 0===n?void 0:n._id);case 5:e.next=9;break;case 7:return e.next=9,mZ(i,null===n||void 0===n?void 0:n._id);case 9:U();case 10:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),K=function(){var e=d(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yZ(t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){var e=window.location.hostname,t=[8001,8002,443],n=function(){var n=d(u().mark((function n(){var r;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,G(e,t);case 3:r=n.sent,v("https://".concat(e)),b(r),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),console.error("No valid API port found.");case 11:case"end":return n.stop()}}),n,null,[[0,8]])})));return function(){return n.apply(this,arguments)}}();e.startsWith("youseetoo.github.io")||n()}),[]);var G=function(){var e=d(u().mark((function e(t,n){var r,i,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=a(n),e.prev=1,r.s();case 3:if((i=r.n()).done){e.next=19;break}return o=i.value,e.prev=5,s="https://".concat(t,":").concat(o,"/openapi.json"),e.next=9,VP.get(s,{timeout:3e3});case 9:if(200!==e.sent.status){e.next=12;break}return e.abrupt("return",o);case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(5),console.error("Failed to retrieve API from ".concat(t,":").concat(o));case 17:e.next=3;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(1),r.e(e.t1);case 24:return e.prev=24,r.f(),e.finish(24);case 27:throw new Error("No valid port found for API.");case 28:case"end":return e.stop()}}),e,null,[[1,21,24,27],[5,14]])})));return function(t,n){return e.apply(this,arguments)}}(),Q=function(){E(!1)},J=function(e){S(e)};return(0,p.jsx)(SM,{theme:j?_M:PM,children:(0,p.jsxs)(Sl,{hostIP:h,children:[(0,p.jsx)(wZ,{}),(0,p.jsxs)(Tf,{sx:{display:"flex"},children:[(0,p.jsx)(_Z,{position:"fixed",sx:{zIndex:function(e){return e.zIndex.drawer+1}},children:(0,p.jsxs)(jZ,{children:[(0,p.jsx)(AZ,{edge:"start",color:"inherit","aria-label":"menu",onClick:function(){return i(!n)},children:(0,p.jsx)(aS,{})}),(0,p.jsx)(If,{variant:"h6",sx:{flexGrow:1,fontWeight:"bold"},children:"Microscope Control"}),(0,p.jsx)(If,{variant:"h6",sx:{fontWeight:"bold"},children:"Light/dark"}),(0,p.jsx)(mp,{checked:j,onChange:function(){R((function(e){return!e}))},color:"default",inputProps:{"aria-label":"toggle theme"}}),(0,p.jsx)(YZ,{src:"/logo192.png"})]})}),(0,p.jsx)(oM,{variant:"permanent",open:n,sx:{width:o,flexShrink:0,"& .MuiDrawer-paper":{width:o,boxSizing:"border-box",top:64}},children:(0,p.jsxs)(em,{children:[(0,p.jsxs)(jb,{button:!0,onClick:function(){return J("LiveView")},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(sS,{})}),(0,p.jsx)(Ab,{primary:n?"Live View":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){return J("FileManager")},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(lS,{})}),(0,p.jsx)(Ab,{primary:n?"File Manager":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){return J("HistoScan")},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(uS,{})}),(0,p.jsx)(Ab,{primary:n?"HistoScan":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){return J("SocketView")},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(CM.Z,{})}),(0,p.jsx)(Ab,{primary:n?"SocketView":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){return J("Lightsheet")},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(fS.Z,{})}),(0,p.jsx)(Ab,{primary:n?"Lightsheet":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){return J("FlowStop")},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(hS.Z,{})}),(0,p.jsx)(Ab,{primary:n?"FlowStop":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){return J("Widgets")},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(lS,{})}),(0,p.jsx)(Ab,{primary:n?"Widgets":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){E(!0)},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(dS.Z,{})}),(0,p.jsx)(Ab,{primary:n?"Connections":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){return J("About")},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(cS,{})}),(0,p.jsx)(Ab,{primary:n?"About":""})]}),(0,p.jsxs)(jb,{button:!0,onClick:function(){return i(!n)},children:[(0,p.jsx)(lM,{children:(0,p.jsx)(aS,{})}),(0,p.jsx)(Ab,{primary:n?"Minimize":""})]})]})}),(0,p.jsxs)(Tf,{component:"main",sx:{flexGrow:1,p:3,marginTop:"64px"},children:["LiveView"===k&&(0,p.jsx)(_l,{children:(0,p.jsx)(Ib,{hostIP:h,hostPort:y})}),"HistoScan"===k&&(0,p.jsx)(Xk,{children:(0,p.jsx)(Lk,{hostIP:h,hostPort:y})}),"FileManager"===k&&(0,p.jsx)(cZ,{files:W,fileUploadConfig:{url:"http://localhost:4000/upload"},isLoading:D,onCreateFolder:Y,onFileUploading:function(e,t){return{parentId:null===t||void 0===t?void 0:t._id}},onFileUploaded:function(e){var t=JSON.parse(e);H((function(e){return[].concat((0,s.Z)(e),[t])}))},onPaste:$,onRename:q,onDownload:K,onDelete:X,onRefresh:function(){return U()},layout:"grid",enableFilePreview:!0,maxFileSize:10485760,filePreviewPath:"http://localhost:4000",acceptedFileTypes:".txt, .png, .jpg, .jpeg, .pdf, .doc, .docx, .exe, .js, .csv",height:"100%",width:"100%"}),"Lightsheet"===k&&(0,p.jsx)(Xk,{children:(0,p.jsx)(oS,{hostIP:h,hostPort:y})}),"FlowStop"===k&&(0,p.jsx)(Xk,{children:(0,p.jsx)(Vk,{hostIP:h,hostPort:y})}),"SocketView"===k&&(0,p.jsx)(Fb,{hostIP:h,hostPort:y}),"Widgets"===k&&(0,p.jsx)(Xk,{children:(0,p.jsx)(nS,{hostIP:h,hostPort:y,layout:z,onLayoutChange:function(e){return A(e)}})})]}),(0,p.jsxs)(fb,{open:_,onClose:Q,children:[(0,p.jsx)(gb,{children:"Enter IP Address"}),(0,p.jsxs)(fM,{children:[(0,p.jsx)(hy,{autoFocus:!0,margin:"dense",id:"ip-address",label:"IP Address",type:"text",fullWidth:!0,value:h,onChange:function(e){var t=e.target.value.trim();t.startsWith("http://")||t.startsWith("https://")||(t="https://"+t),t.startsWith("http://")&&(t=t.replace("http://","https://")),v(t)}}),(0,p.jsx)(hy,{margin:"dense",id:"port",label:"Port",type:"text",fullWidth:!0,value:y,onChange:function(e){var t=e.target.value.trim();b(t)}})]}),(0,p.jsxs)(mM,{children:[(0,p.jsx)(Ah,{onClick:Q,children:"Cancel"}),(0,p.jsx)(Ah,{onClick:function(){v(h),b(y),Q()},children:"Save"})]})]})]})]})})},ZM=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))};i.createRoot(document.getElementById("root")).render((0,p.jsx)(r.StrictMode,{children:(0,p.jsx)(EM,{})})),ZM()}()}();
-//# sourceMappingURL=main.850420fe.js.map
\ No newline at end of file
+/*! For license information please see main.3db6d3db.js.LICENSE.txt */
+!function(){var e={5911:function(e,t,n){"use strict";n.d(t,{Z:function(){return ie}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?c(x,--y):0,m--,10===b&&(m=1,v--),b}function C(){return b=y2||Z(b)>3?"":" "}function T(e,t){for(;--t&&C()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return E(e,_()+(t<6&&32==P()&&32==C()))}function z(e){for(;C();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&z(b);break;case 40:41===e&&z(e);break;case 92:C()}return y}function A(e,t){for(;C()&&e+b!==57&&(e+b!==84||47!==P()););return"/*"+E(t,y-1)+"*"+o(47===e?e:C())}function N(e){for(;!Z(P());)C();return E(e,y)}var L="-ms-",D="-moz-",I="-webkit-",F="comm",B="rule",W="decl",H="@keyframes";function V(e,t){for(var n="",r=h(e),i=0;i0&&f(D)-g&&p(b>32?K(D+";",r,n,g-1):K(l(D," ","")+";",r,n,g-2),h);break;case 59:D+=";";default:if(p(L=X(D,t,n,v,m,i,d,M,j=[],z=[],g),a),123===Z)if(0===m)q(D,t,L,L,j,a,g,d,z);else switch(99===y&&110===c(D,3)?100:y){case 100:case 108:case 109:case 115:q(e,L,L,r&&p(X(e,L,L,0,0,i,d,M,i,j=[],g),z),i,z,g,d,r?j:z);break;default:q(D,L,L,L,[""],z,0,d,z)}}v=m=b=0,w=E=1,M=D="",g=s;break;case 58:g=1+f(D),b=x;default:if(w<1)if(123==Z)--w;else if(125==Z&&0==w++&&125==S())continue;switch(D+=o(Z),Z*w){case 38:E=m>0?1:(D+="\f",-1);break;case 44:d[v++]=(f(D)-1)*E,E=1;break;case 64:45===P()&&(D+=R(C())),y=P(),m=g=f(M=D+=N(_())),Z++;break;case 45:45===x&&2==f(D)&&(w=0)}}return a}function X(e,t,n,r,o,a,u,c,f,p,v){for(var m=o-1,g=0===o?a:[""],y=h(g),b=0,x=0,k=0;b0?g[S]+" "+C:l(C,/&\f/g,g[S])))&&(f[k++]=P);return w(e,t,n,0===o?B:c,f,p,v)}function $(e,t,n){return w(e,t,n,F,o(b),d(e,2,-2),0)}function K(e,t,n,r){return w(e,t,n,W,d(e,0,r),d(e,r+1,-1),r)}var G=function(e,t,n){for(var r=0,i=0;r=i,i=P(),38===r&&12===i&&(t[n]=1),!Z(i);)C();return E(e,y)},Q=function(e,t){return j(function(e,t){var n=-1,r=44;do{switch(Z(r)){case 0:38===r&&12===P()&&(t[n]=1),e[n]+=G(y-1,t,n);break;case 2:e[n]+=R(r);break;case 4:if(44===r){e[++n]=58===P()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=C());return e}(M(e),t))},J=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!r){J.set(e,!0);for(var i=[],o=Q(t,i),a=n.props,s=0,l=0;s6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+D+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,f(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+I)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+I+(45===c(e,14)?"inline-":"")+"box$3$1"+I+"$2$3$1"+L+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return I+e+L+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return I+e+L+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return I+e+L+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return I+e+L+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=ne(e.value,e.length);break;case H:return V([k(e,{value:l(e.value,"@","@"+I)})],r);case B:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return V([k(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return V([k(e,{props:[l(t,/:(plac\w+)/,":"+I+"input-$1")]}),k(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),k(e,{props:[l(t,/:(plac\w+)/,L+"input-$1")]})],r)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i,o,a=e.stylisPlugins||re,s={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:p}}},2561:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return a},j:function(){return s}});var i=n(2791),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},5438:function(e,t,n){"use strict";n.d(t,{My:function(){return o},fp:function(){return r},hC:function(){return i}});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},1162:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5649)),o=n(184);t.Z=(0,i.default)((0,o.jsx)("path",{d:"M14.5 17c0 1.65-1.35 3-3 3s-3-1.35-3-3h2c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1H2v-2h9.5c1.65 0 3 1.35 3 3M19 6.5C19 4.57 17.43 3 15.5 3S12 4.57 12 6.5h2c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S16.33 8 15.5 8H2v2h13.5c1.93 0 3.5-1.57 3.5-3.5m-.5 4.5H2v2h16.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5v2c1.93 0 3.5-1.57 3.5-3.5S20.43 11 18.5 11"}),"Air")},6711:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5649)),o=n(184);t.Z=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel")},8384:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5649)),o=n(184);t.Z=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},9161:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5649)),o=n(184);t.Z=(0,i.default)((0,o.jsx)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM18 14H6v-2h12zm0-3H6V9h12zm0-3H6V6h12z"}),"Comment")},4250:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5649)),o=n(184);t.Z=(0,i.default)((0,o.jsx)("path",{d:"M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24-.11-.1-.2-.22-.26-.37-.06-.14-.09-.3-.09-.47h-1.3c0 .36.07.68.21.95.14.27.33.5.56.69.24.18.51.32.82.41.3.1.62.15.96.15.37 0 .72-.05 1.03-.15.32-.1.6-.25.83-.44s.42-.43.55-.72c.13-.29.2-.61.2-.97 0-.19-.02-.38-.07-.56-.05-.18-.12-.35-.23-.51-.1-.16-.24-.3-.4-.43-.17-.13-.37-.23-.61-.31.2-.09.37-.2.52-.33.15-.13.27-.27.37-.42.1-.15.17-.3.22-.46.05-.16.07-.32.07-.48 0-.36-.06-.68-.18-.96-.12-.28-.29-.51-.51-.69-.2-.19-.47-.33-.77-.43C9.1 8.05 8.76 8 8.39 8c-.36 0-.69.05-1 .16-.3.11-.57.26-.79.45-.21.19-.38.41-.51.67-.12.26-.18.54-.18.85h1.3c0-.17.03-.32.09-.45s.14-.25.25-.34c.11-.09.23-.17.38-.22.15-.05.3-.08.48-.08.4 0 .7.1.89.31.19.2.29.49.29.86 0 .18-.03.34-.08.49-.05.15-.14.27-.25.37-.11.1-.25.18-.41.24-.16.06-.36.09-.58.09H7.5v1.03h.77c.22 0 .42.02.6.07s.33.13.45.23c.12.11.22.24.29.4.07.16.1.35.1.57 0 .41-.12.72-.35.93-.23.23-.55.33-.95.33m8.55-5.92c-.32-.33-.7-.59-1.14-.77-.43-.18-.92-.27-1.46-.27H12v8h2.3c.55 0 1.06-.09 1.51-.27.45-.18.84-.43 1.16-.76.32-.33.57-.73.74-1.19.17-.47.26-.99.26-1.57v-.4c0-.58-.09-1.1-.26-1.57-.18-.47-.43-.87-.75-1.2m-.39 3.16c0 .42-.05.79-.14 1.13-.1.33-.24.62-.43.85-.19.23-.43.41-.71.53-.29.12-.62.18-.99.18h-.91V9.12h.97c.72 0 1.27.23 1.64.69.38.46.57 1.12.57 1.99zM12 0l-.66.03 3.81 3.81 1.33-1.33c3.27 1.55 5.61 4.72 5.96 8.48h1.5C23.44 4.84 18.29 0 12 0"}),"ThreeDRotation")},2140:function(e,t,n){"use strict";var r=n(4836);t.Z=void 0;var i=r(n(5649)),o=n(184);t.Z=(0,i.default)((0,o.jsx)("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"}),"WifiSharp")},5649:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(186)},1020:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});n(2791);var r=n(4769);n(184);function i(e){return(0,r.i)(e)}},7:function(e,t){"use strict";t.Z={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},2460:function(e,t){"use strict";t.Z={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},6532:function(e,t){"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case f:case h:return e;default:switch(e=e&&e.$$typeof){case c:case u:case d:case v:case p:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference")},8457:function(e,t,n){"use strict";n(6532)},4584:function(e,t,n){"use strict";n.d(t,{Z:function(){return B}});var r=n(7462),i=n(3366),o=n(6187),a=n(7093),s=n(7416),l=n(104),u=n(8809),c=n(4942);function d(e,t){var n;return(0,r.Z)({toolbar:(n={minHeight:56},(0,c.Z)(n,e.up("xs"),{"@media (orientation: landscape)":{minHeight:48}}),(0,c.Z)(n,e.up("sm"),{minHeight:64}),n)},t)}var f=n(4131),h={black:"#000",white:"#fff"},p={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},v={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},m=n(2460),g={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},y={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},b={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},x=n(7),w=["mode","contrastThreshold","tonalOffset"],k={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:h.white,default:h.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},S={text:{primary:h.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:h.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function C(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,f.$n)(e.main,i):"dark"===t&&(e.dark=(0,f._j)(e.main,o)))}function P(e){var t=e.mode,n=void 0===t?"light":t,s=e.contrastThreshold,l=void 0===s?3:s,u=e.tonalOffset,c=void 0===u?.2:u,d=(0,i.Z)(e,w),P=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[200],light:y[50],dark:y[400]}:{main:y[700],light:y[400],dark:y[800]}}(n),_=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[200],light:v[50],dark:v[400]}:{main:v[500],light:v[300],dark:v[700]}}(n),E=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m.Z[500],light:m.Z[300],dark:m.Z[700]}:{main:m.Z[700],light:m.Z[400],dark:m.Z[800]}}(n),Z=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:b[400],light:b[300],dark:b[700]}:{main:b[700],light:b[500],dark:b[900]}}(n),M=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:x.Z[400],light:x.Z[300],dark:x.Z[700]}:{main:x.Z[800],light:x.Z[500],dark:x.Z[900]}}(n),j=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[400],light:g[300],dark:g[700]}:{main:"#ed6c02",light:g[500],dark:g[900]}}(n);function R(e){return(0,f.mi)(e,S.text.primary)>=l?S.text.primary:k.text.primary}var O=function(e){var t=e.color,n=e.name,i=e.mainShade,a=void 0===i?500:i,s=e.lightShade,l=void 0===s?300:s,u=e.darkShade,d=void 0===u?700:u;if(!(t=(0,r.Z)({},t)).main&&t[a]&&(t.main=t[a]),!t.hasOwnProperty("main"))throw new Error((0,o.Z)(11,n?" (".concat(n,")"):"",a));if("string"!==typeof t.main)throw new Error((0,o.Z)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return C(t,"light",l,c),C(t,"dark",d,c),t.contrastText||(t.contrastText=R(t.main)),t},T={dark:S,light:k};return(0,a.Z)((0,r.Z)({common:(0,r.Z)({},h),mode:n,primary:O({color:P,name:"primary"}),secondary:O({color:_,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:O({color:E,name:"error"}),warning:O({color:j,name:"warning"}),info:O({color:Z,name:"info"}),success:O({color:M,name:"success"}),grey:p,contrastThreshold:l,getContrastText:R,augmentColor:O,tonalOffset:c},T[n]),d)}var _=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];var E={textTransform:"uppercase"},Z='"Roboto", "Helvetica", "Arial", sans-serif';function M(e,t){var n="function"===typeof t?t(e):t,o=n.fontFamily,s=void 0===o?Z:o,l=n.fontSize,u=void 0===l?14:l,c=n.fontWeightLight,d=void 0===c?300:c,f=n.fontWeightRegular,h=void 0===f?400:f,p=n.fontWeightMedium,v=void 0===p?500:p,m=n.fontWeightBold,g=void 0===m?700:m,y=n.htmlFontSize,b=void 0===y?16:y,x=n.allVariants,w=n.pxToRem,k=(0,i.Z)(n,_);var S=u/14,C=w||function(e){return"".concat(e/b*S,"rem")},P=function(e,t,n,i,o){return(0,r.Z)({fontFamily:s,fontWeight:e,fontSize:C(t),lineHeight:n},s===Z?{letterSpacing:"".concat((a=i/t,Math.round(1e5*a)/1e5),"em")}:{},o,x);var a},M={h1:P(d,96,1.167,-1.5),h2:P(d,60,1.2,-.5),h3:P(h,48,1.167,0),h4:P(h,34,1.235,.25),h5:P(h,24,1.334,0),h6:P(v,20,1.6,.15),subtitle1:P(h,16,1.75,.15),subtitle2:P(v,14,1.57,.1),body1:P(h,16,1.5,.15),body2:P(h,14,1.43,.15),button:P(v,14,1.75,.4,E),caption:P(h,12,1.66,.4),overline:P(h,12,2.66,1,E),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.Z)((0,r.Z)({htmlFontSize:b,pxToRem:C,fontFamily:s,fontSize:u,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:v,fontWeightBold:g},M),k,{clone:!1})}function j(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var R=["none",j(0,2,1,-1,0,1,1,0,0,1,3,0),j(0,3,1,-2,0,2,2,0,0,1,5,0),j(0,3,3,-2,0,3,4,0,0,1,8,0),j(0,2,4,-1,0,4,5,0,0,1,10,0),j(0,3,5,-1,0,5,8,0,0,1,14,0),j(0,3,5,-1,0,6,10,0,0,1,18,0),j(0,4,5,-2,0,7,10,1,0,2,16,1),j(0,5,5,-3,0,8,10,1,0,3,14,2),j(0,5,6,-3,0,9,12,1,0,3,16,2),j(0,6,6,-3,0,10,14,1,0,4,18,3),j(0,6,7,-4,0,11,15,1,0,4,20,3),j(0,7,8,-4,0,12,17,2,0,5,22,4),j(0,7,8,-4,0,13,19,2,0,5,24,4),j(0,7,9,-4,0,14,21,2,0,5,26,4),j(0,8,9,-5,0,15,22,2,0,6,28,5),j(0,8,10,-5,0,16,24,2,0,6,30,5),j(0,8,11,-5,0,17,26,2,0,6,32,5),j(0,9,11,-5,0,18,28,2,0,7,34,6),j(0,9,12,-6,0,19,29,2,0,7,36,6),j(0,10,13,-6,0,20,31,3,0,8,38,7),j(0,10,13,-6,0,21,33,3,0,8,40,7),j(0,10,14,-6,0,22,35,3,0,8,42,7),j(0,11,14,-7,0,23,36,3,0,9,44,8),j(0,11,15,-7,0,24,38,3,0,9,46,8)],O=["duration","easing","delay"],T={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},z={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function A(e){return"".concat(Math.round(e),"ms")}function N(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}function L(e){var t=(0,r.Z)({},T,e.easing),n=(0,r.Z)({},z,e.duration);return(0,r.Z)({getAutoHeightDuration:N,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.duration,a=void 0===o?n.standard:o,s=r.easing,l=void 0===s?t.easeInOut:s,u=r.delay,c=void 0===u?0:u;(0,i.Z)(r,O);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof a?a:A(a)," ").concat(l," ").concat("string"===typeof c?c:A(c))})).join(",")}},e,{easing:t,duration:n})}var D={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},I=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mixins,n=void 0===t?{}:t,c=e.palette,f=void 0===c?{}:c,h=e.transitions,p=void 0===h?{}:h,v=e.typography,m=void 0===v?{}:v,g=(0,i.Z)(e,I);if(e.vars)throw new Error((0,o.Z)(18));var y=P(f),b=(0,u.Z)(e),x=(0,a.Z)(b,{mixins:d(b.breakpoints,n),palette:y,shadows:R.slice(),typography:M(y,m),transitions:L(p),zIndex:(0,r.Z)({},D)});x=(0,a.Z)(x,g);for(var w=arguments.length,k=new Array(w>1?w-1:0),S=1;S96?f:h},v=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,u.hC)(t,n,r),(0,d.L)((function(){return(0,u.My)(t,n,r)})),null},g=function e(t,n){var o,a,s=t.__emotion_real===t,d=s&&t.__emotion_base||t;void 0!==n&&(o=n.label,a=n.target);var f=v(t,n,s),h=f||p(d),g=!h("as");return function(){var y=arguments,b=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&b.push("label:"+o+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{b.push(y[0][0]);for(var x=y.length,w=1;w1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,o.default)(e,t,n)}function s(e){e=e.slice(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(s(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,i.default)(9,e));var r,o=e.substring(t+1,e.length-1);if("color"===n){if(r=(o=o.split(" ")).shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,i.default)(10,r))}else o=o.split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)})),colorSpace:r}}var u=function(e){var t=l(e);return t.values.slice(0,3).map((function(e,n){return-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e})).join(" ")};function c(e){var t=e.type,n=e.colorSpace,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function d(e){var t=(e=l(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),c({type:s,values:u})}function f(e){var t="hsl"===(e=l(e)).type||"hsla"===e.type?l(d(e)).values:e.values;return t=t.map((function(t){return"color"!==e.type&&(t/=255),t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function h(e,t){return e=l(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,c(e)}function p(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return c(e)}function v(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(var r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return c(e)}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return f(e)>.5?p(e,t):v(e,t)}},7012:function(e,t,n){"use strict";var r=n(861).default,i=n(7424).default,o=n(4836);t.ZP=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.themeId,n=e.defaultTheme,o=void 0===n?g:n,c=e.rootShouldForwardProp,f=void 0===c?m:c,h=e.slotShouldForwardProp,v=void 0===h?m:h,w=function(e){return(0,d.default)((0,a.default)({},e,{theme:b((0,a.default)({},e,{defaultTheme:o,themeId:t}))}))};return w.__mui_systemSx=!0,function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,l.internal_processStyles)(e,(function(e){return e.filter((function(e){return!(null!=e&&e.__mui_systemSx)}))}));var c=n.name,d=n.slot,h=n.skipVariantsResolver,g=n.skipSx,k=n.overridesResolver,S=void 0===k?function(e){if(!e)return null;return function(t,n){return n[e]}}(y(d)):k,C=(0,s.default)(n,p),P=void 0!==h?h:d&&"Root"!==d&&"root"!==d||!1,_=g||!1;var E=m;"Root"===d||"root"===d?E=f:d?E=v:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(E=void 0);var Z=(0,l.default)(e,(0,a.default)({shouldForwardProp:E,label:undefined},C)),M=function(e){return"function"===typeof e&&e.__emotion_real!==e||(0,u.isPlainObject)(e)?function(n){return x(e,(0,a.default)({},n,{theme:b({theme:n.theme,defaultTheme:o,themeId:t})}))}:e},j=function(n){for(var s=M(n),l=arguments.length,u=new Array(l>1?l-1:0),d=1;d0){var p=new Array(h).fill("");(s=[].concat(r(n),r(p))).raw=[].concat(r(n.raw),r(p))}var v=Z.apply(void 0,[s].concat(r(f)));return e.muiName&&(v.muiName=e.muiName),v};return Z.withConfig&&(j.withConfig=Z.withConfig),j}};var a=o(n(434)),s=o(n(7071)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(6649)),u=n(1037),c=(o(n(4884)),o(n(1627)),o(n(4652))),d=o(n(7150)),f=["ownerState"],h=["variants"],p=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function m(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}var g=(0,c.default)(),y=function(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e};function b(e){var t,n=e.defaultTheme,r=e.theme,i=e.themeId;return t=r,0===Object.keys(t).length?n:r[i]||r}function x(e,t){var n=t.ownerState,r=(0,s.default)(t,f),i="function"===typeof e?e((0,a.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap((function(e){return x(e,(0,a.default)({ownerState:n},r))}));if(i&&"object"===typeof i&&Array.isArray(i.variants)){var o=i.variants,l=void 0===o?[]:o,u=(0,s.default)(i,h);return l.forEach((function(e){var t=!0;"function"===typeof e.props?t=e.props((0,a.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((function(i){(null==n?void 0:n[i])!==e.props[i]&&r[i]!==e.props[i]&&(t=!1)})),t&&(Array.isArray(u)||(u=[u]),u.push("function"===typeof e.style?e.style((0,a.default)({ownerState:n},r,n)):e.style))})),u}return i}},4769:function(e,t,n){"use strict";n.d(t,{i:function(){return s}});var r=n(2791),i=n(8748),o=n(184),a=r.createContext(void 0);function s(e){return function(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.components||!t.components[n])return r;var o=t.components[n];return o.defaultProps?(0,i.Z)(o.defaultProps,r):o.styleOverrides||o.variants?r:(0,i.Z)(o,r)}({props:e.props,name:e.name,theme:{components:r.useContext(a)}})}t.Z=function(e){var t=e.value,n=e.children;return(0,o.jsx)(a.Provider,{value:t,children:n})}},1184:function(e,t,n){"use strict";n.d(t,{L7:function(){return l},P$:function(){return c},VO:function(){return i},W8:function(){return s},dt:function(){return u},k9:function(){return a}});var r=n(7093),i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(i[e],"px)")}};function a(e,t,n){var r=e.theme||{};if(Array.isArray(t)){var a=r.breakpoints||o;return t.reduce((function(e,r,i){return e[a.up(a.keys[i])]=n(t[i]),e}),{})}if("object"===typeof t){var s=r.breakpoints||o;return Object.keys(t).reduce((function(e,r){if(-1!==Object.keys(s.values||i).indexOf(r)){e[s.up(r)]=n(t[r],r)}else{var o=r;e[o]=t[o]}return e}),{})}return n(t)}function s(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null==(e=t.keys)?void 0:e.reduce((function(e,n){return e[t.up(n)]={},e}),{}))||{}}function l(e,t){return e.reduce((function(e,t){var n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function u(e){for(var t=s(e),n=arguments.length,i=new Array(n>1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,h=e.palette,p=void 0===h?{}:h,v=e.spacing,m=e.shape,g=void 0===m?{}:m,y=(0,i.Z)(e,f),b=(0,a.Z)(n),x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,l.hB)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r1?k-1:0),C=1;C2){if(!u[e])return[e];e=u[e]}var t=e.split(""),n=(0,r.Z)(t,2),i=n[0],o=n[1],a=s[i],c=l[o]||"";return Array.isArray(c)?c.map((function(e){return a+e})):[a+c]})),d=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[].concat(d,f);function p(e,t,n,r){var i,a=null!=(i=(0,o.DW)(e,t,!1))?i:n;return"number"===typeof a?function(e){return"string"===typeof e?e:a*e}:Array.isArray(a)?function(e){return"string"===typeof e?e:a[e]}:"function"===typeof a?a:function(){}}function v(e){return p(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,r){if(-1===t.indexOf(n))return null;var o=function(e,t){return function(n){return e.reduce((function(e,r){return e[r]=m(t,n),e}),{})}}(c(n),r),a=e[n];return(0,i.k9)(e,a,o)}function y(e,t){var n=v(e.theme);return Object.keys(e).map((function(r){return g(e,t,r,n)})).reduce(a.Z,{})}function b(e){return y(e,d)}function x(e){return y(e,f)}function w(e){return y(e,h)}b.propTypes={},b.filterProps=d,x.propTypes={},x.filterProps=f,w.propTypes={},w.filterProps=h},8529:function(e,t,n){"use strict";n.d(t,{DW:function(){return a},Jq:function(){return s}});var r=n(4942),i=n(1122),o=n(1184);function a(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){var r="vars.".concat(t).split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e);if(null!=r)return r}return t.split(".").reduce((function(e,t){return e&&null!=e[t]?e[t]:null}),e)}function s(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:a(e,n)||i,t&&(r=t(r,i,e)),r}t.ZP=function(e){var t=e.prop,n=e.cssProperty,l=void 0===n?e.prop:n,u=e.themeKey,c=e.transform,d=function(e){if(null==e[t])return null;var n=e[t],d=a(e.theme,u)||{};return(0,o.k9)(e,n,(function(e){var n=s(d,c,e);return e===n&&"string"===typeof e&&(n=s(d,c,"".concat(t).concat("default"===e?"":(0,i.Z)(e)),e)),!1===l?n:(0,r.Z)({},l,n)}))};return d.propTypes={},d.filterProps=[t],d}},7416:function(e,t,n){"use strict";n.d(t,{Z:function(){return z}});var r=n(5682),i=n(8529),o=n(8247);var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},2789:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(9884)},4419:function(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r={};return Object.keys(e).forEach((function(i){r[i]=e[i].reduce((function(e,r){if(r){var i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}n.d(t,{Z:function(){return r}})},7874:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a2&&void 0!==arguments[2]?arguments[2]:{clone:!0},s=n.clone?(0,r.Z)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){i(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&i(e[r])?s[r]=a(e[r],t[r],n):n.clone?s[r]=i(t[r])?o(t[r]):t[r]:s[r]=t[r]})),s}},1037:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},isPlainObject:function(){return r.P}});var r=n(7093)},6187:function(e,t,n){"use strict";function r(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n2&&void 0!==arguments[2]?arguments[2]:"Mui",o=i[t];return o?"".concat(n,"-").concat(o):"".concat(r.Z.generate(e),"-").concat(t)}},5878:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1217);function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui",i={};return t.forEach((function(t){i[t]=(0,r.ZP)(e,t,n)})),i}},1627:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l},getFunctionName:function(){return o}});var r=n(3325),i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function o(e){var t="".concat(e).match(i);return t&&t[1]||""}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||o(e)||t}function s(e,t,n){var r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return a(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.ForwardRef:return s(e,e.render,"ForwardRef");case r.Memo:return s(e,e.type,"memo");default:return}}}},4913:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:function(){return r}})},5202:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(4913);function i(e){return(0,r.Z)(e).defaultView||window}},8748:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7462);function i(e,t){var n=(0,r.Z)({},t);return Object.keys(e).forEach((function(o){if(o.toString().match(/^(components|slots)$/))n[o]=(0,r.Z)({},e[o],n[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){var a=e[o]||{},s=t[o];n[o]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[o]=(0,r.Z)({},s),Object.keys(a).forEach((function(e){n[o][e]=i(a[e],s[e])}))):n[o]=s:n[o]=a}else void 0===n[o]&&(n[o]=e[o])})),n}},6670:function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:function(){return r}})},8637:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9439),i=n(2791);function o(e){var t=e.controlled,n=e.default,o=(e.name,e.state,i.useRef(void 0!==t).current),a=i.useState(n),s=(0,r.Z)(a,2),l=s[0],u=s[1];return[o?t:l,i.useCallback((function(e){o||u(e)}),[])]}},2876:function(e,t,n){"use strict";var r=n(2791),i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;t.Z=i},7054:function(e,t,n){"use strict";var r=n(2791),i=n(2876);t.Z=function(e){var t=r.useRef(e);return(0,i.Z)((function(){t.current=e})),r.useRef((function(){return t.current.apply(void 0,arguments)})).current}},6117:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2791),i=n(6670);function o(){for(var e=arguments.length,t=new Array(e),n=0;nt}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(h,e)&&(f.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,y);m[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,y);m[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,y);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),k=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),E=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var z=Symbol.iterator;function A(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=z&&e[z]||e["@@iterator"])?e:null}var N,L=Object.assign;function D(e){if(void 0===N)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return"\n"+N+e}var I=!1;function F(e,t){if(!e||I)return"";I=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{I=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?D(e):""}function B(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function W(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case k:return"Portal";case P:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case j:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case _:return(e._context.displayName||"Context")+".Provider";case Z:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:W(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return W(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=U(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function G(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){G(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ve(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(he).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ge=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xe=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ke=null,Se=null,Ce=null;function Pe(e){if(e=bi(e)){if("function"!==typeof ke)throw Error(o(280));var t=e.stateNode;t&&(t=wi(t),ke(e.stateNode,e.type,t))}}function _e(e){Se?Ce?Ce.push(e):Ce=[e]:Se=e}function Ee(){if(Se){var e=Se,t=Ce;if(Ce=Se=null,Pe(e),t)for(e=0;e>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=dt(s):0!==(o&=a)&&(r=dt(o))}else 0!==(a=n&~i)?r=dt(a):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<=An),Dn=String.fromCharCode(32),In=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Tn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Un(e,t,n,r){_e(r),0<(t=Yr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yn=null,qn=null;function Xn(e){Dr(e,0)}function $n(e){if(q(xi(e)))return e}function Kn(e,t){if("change"===e)return t}var Gn=!1;if(c){var Qn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Qn=Jn}else Qn=!1;Gn=Qn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=cr(n,o);var a=cr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n=document.documentMode,mr=null,gr=null,yr=null,br=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==X(r)||("selectionStart"in(r=mr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Yr(gr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Sr={},Cr={};function Pr(e){if(Sr[e])return Sr[e];if(!kr[e])return e;var t,n=kr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return Sr[e]=n[t];return e}c&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);var _r=Pr("animationend"),Er=Pr("animationiteration"),Zr=Pr("animationstart"),Mr=Pr("transitionend"),jr=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){jr.set(e,t),l(t,[e])}for(var Tr=0;TrSi||(e.current=ki[Si],ki[Si]=null,Si--)}function _i(e,t){Si++,ki[Si]=e.current,e.current=t}var Ei={},Zi=Ci(Ei),Mi=Ci(!1),ji=Ei;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Ei;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Oi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ti(){Pi(Mi),Pi(Zi)}function zi(e,t,n){if(Zi.current!==Ei)throw Error(o(168));_i(Zi,t),_i(Mi,n)}function Ai(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,H(e)||"Unknown",i));return L({},n,r)}function Ni(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,ji=Zi.current,_i(Zi,e),_i(Mi,Mi.current),!0}function Li(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ai(e,t,ji),r.__reactInternalMemoizedMergedChildContext=e,Pi(Mi),Pi(Zi),_i(Zi,e)):Pi(Mi),_i(Mi,n)}var Di=null,Ii=!1,Fi=!1;function Bi(e){null===Di?Di=[e]:Di.push(e)}function Wi(){if(!Fi&&null!==Di){Fi=!0;var e=0,t=bt;try{var n=Di;for(bt=1;e>=a,i-=a,Ki=1<<32-at(t)+i|n<v?(m=d,d=null):m=d.sibling;var g=h(i,d,s[v],l);if(null===g){null===d&&(d=m);break}e&&d&&null===g.alternate&&t(i,d),o=a(g,o,v),null===c?u=g:c.sibling=g,c=g,d=m}if(v===s.length)return n(i,d),io&&Qi(i,v),u;if(null===d){for(;vm?(g=v,v=null):g=v.sibling;var b=h(i,v,y.value,u);if(null===b){null===v&&(v=g);break}e&&v&&null===b.alternate&&t(i,v),s=a(b,s,m),null===d?c=b:d.sibling=b,d=b,v=g}if(y.done)return n(i,v),io&&Qi(i,m),c;if(null===v){for(;!y.done;m++,y=l.next())null!==(y=f(i,y.value,u))&&(s=a(y,s,m),null===d?c=y:d.sibling=y,d=y);return io&&Qi(i,m),c}for(v=r(i,v);!y.done;m++,y=l.next())null!==(y=p(v,i,m,y.value,u))&&(e&&null!==y.alternate&&v.delete(null===y.key?m:y.key),s=a(y,s,m),null===d?c=y:d.sibling=y,d=y);return e&&v.forEach((function(e){return t(i,e)})),io&&Qi(i,m),c}return function e(r,o,a,l){if("object"===typeof a&&null!==a&&a.type===S&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var u=a.key,c=o;null!==c;){if(c.key===u){if((u=a.type)===S){if(7===c.tag){n(r,c.sibling),(o=i(c,a.props.children)).return=r,r=o;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===O&&bo(u)===c.type){n(r,c.sibling),(o=i(c,a.props)).ref=go(r,c,a),o.return=r,r=o;break e}n(r,c);break}t(r,c),c=c.sibling}a.type===S?((o=Au(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=zu(a.type,a.key,a.props,null,r.mode,l)).ref=go(r,o,a),l.return=r,r=l)}return s(r);case k:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Du(a,r.mode,l)).return=r,r=o}return s(r);case O:return e(r,o,(c=a._init)(a._payload),l)}if(te(a))return v(r,o,a,l);if(A(a))return m(r,o,a,l);yo(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=Lu(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var wo=xo(!0),ko=xo(!1),So=Ci(null),Co=null,Po=null,_o=null;function Eo(){_o=Po=Co=null}function Zo(e){var t=So.current;Pi(So),e._currentValue=t}function Mo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jo(e,t){Co=e,_o=Po=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Ro(e){var t=e._currentValue;if(_o!==e)if(e={context:e,memoizedValue:t,next:null},null===Po){if(null===Co)throw Error(o(308));Po=e,Co.dependencies={lanes:0,firstContext:e}}else Po=Po.next=e;return t}var Oo=null;function To(e){null===Oo?Oo=[e]:Oo.push(e)}function zo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,To(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ao(e,r)}function Ao(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var No=!1;function Lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Do(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Io(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Zl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ao(e,n)}return null===(i=r.interleaved)?(t.next=t,To(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ao(e,n)}function Bo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Wo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ho(e,t,n,r){var i=e.updateQueue;No=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?o=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,c=u=l=null,s=o;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,v=s;switch(f=t,h=n,v.tag){case 1:if("function"===typeof(p=v.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(f="function"===typeof(p=v.payload)?p.call(h,d,f):p)||void 0===f)break e;d=L({},d,f);break e;case 2:No=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=h,l=d):c=c.next=h,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Nl|=a,e.lanes=a,e.memoizedState=d}}function Vo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;tn?n:4,e(!0);var r=oa.transition;oa.transition={};try{e(!1),t()}finally{bt=n,oa.transition=r}}function Ya(){return ba().memoizedState}function qa(e,t,n){var r=tu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$a(e))Ka(t,n);else if(null!==(n=zo(e,t,n,r))){nu(n,e,r,eu()),Ga(n,t,r)}}function Xa(e,t,n){var r=tu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($a(e))Ka(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,To(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(u){}null!==(n=zo(e,t,i,r))&&(nu(n,e,r,i=eu()),Ga(n,t,r))}}function $a(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ka(e,t){da=ca=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ga(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qa={readContext:Ro,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},Ja={readContext:Ro,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:Ro,useEffect:Aa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ta(4194308,4,Ia.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ta(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ta(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ya();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qa.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:ja,useDebugValue:Ba,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=ja(!1),t=e[0];return e=Ua.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,i=ya();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Ml)throw Error(o(349));0!==(30&aa)||Pa(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Aa(Ea.bind(null,r,a,e),[e]),r.flags|=2048,Ra(9,_a.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=Ml.identifierPrefix;if(io){var n=Gi;t=":"+t+"R"+(n=(Ki&~(1<<32-at(Ki)-1)).toString(32)+n),0<(n=fa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ro,useCallback:Wa,useContext:Ro,useEffect:Na,useImperativeHandle:Fa,useInsertionEffect:La,useLayoutEffect:Da,useMemo:Ha,useReducer:wa,useRef:Oa,useState:function(){return wa(xa)},useDebugValue:Ba,useDeferredValue:function(e){return Va(ba(),la.memoizedState,e)},useTransition:function(){return[wa(xa)[0],ba().memoizedState]},useMutableSource:Sa,useSyncExternalStore:Ca,useId:Ya,unstable_isNewReconciler:!1},ts={readContext:Ro,useCallback:Wa,useContext:Ro,useEffect:Na,useImperativeHandle:Fa,useInsertionEffect:La,useLayoutEffect:Da,useMemo:Ha,useReducer:ka,useRef:Oa,useState:function(){return ka(xa)},useDebugValue:Ba,useDeferredValue:function(e){var t=ba();return null===la?t.memoizedState=e:Va(t,la.memoizedState,e)},useTransition:function(){return[ka(xa)[0],ba().memoizedState]},useMutableSource:Sa,useSyncExternalStore:Ca,useId:Ya,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=L({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:L({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&We(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),o=Io(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Fo(e,o,i))&&(nu(t,e,i,r),Bo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),o=Io(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Fo(e,o,i))&&(nu(t,e,i,r),Bo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),i=Io(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Fo(e,i,r))&&(nu(t,e,r,n),Bo(t,e,r))}};function os(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function as(e,t,n){var r=!1,i=Ei,o=t.contextType;return"object"===typeof o&&null!==o?o=Ro(o):(i=Oi(t)?ji:Zi.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ri(e,i):Ei),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Lo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Ro(o):(o=Oi(t)?ji:Zi.current,i.context=Ri(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Ho(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",r=t;do{n+=B(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function cs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var fs="function"===typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=Io(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Ul=r),ds(0,t)},n}function ps(e,t,n){(n=Io(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!==typeof r&&(null===Yl?Yl=new Set([this]):Yl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function vs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Pu.bind(null,e,t,n),t.then(e,e))}function ms(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function gs(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Io(-1,1)).tag=2,Fo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ys=x.ReactCurrentOwner,bs=!1;function xs(e,t,n,r){t.child=null===e?ko(t,null,n,r):wo(t,e.child,n,r)}function ws(e,t,n,r,i){n=n.render;var o=t.ref;return jo(t,i),r=ma(e,t,n,r,o,i),n=ga(),null===e||bs?(io&&n&&eo(t),t.flags|=1,xs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function ks(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Ou(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=zu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ss(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Vs(e,t,i)}return t.flags|=1,(e=Tu(o,r)).ref=t.ref,e.return=t,t.child=e}function Ss(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Vs(e,t,i);0!==(131072&e.flags)&&(bs=!0)}}return _s(e,t,n,r,i)}function Cs(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},_i(Tl,Ol),Ol|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,_i(Tl,Ol),Ol|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,_i(Tl,Ol),Ol|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,_i(Tl,Ol),Ol|=r;return xs(e,t,i,n),t.child}function Ps(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _s(e,t,n,r,i){var o=Oi(n)?ji:Zi.current;return o=Ri(t,o),jo(t,i),n=ma(e,t,n,r,o,i),r=ga(),null===e||bs?(io&&r&&eo(t),t.flags|=1,xs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function Es(e,t,n,r,i){if(Oi(n)){var o=!0;Ni(t)}else o=!1;if(jo(t,i),null===t.stateNode)Hs(e,t),as(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=Ro(u):u=Ri(t,u=Oi(n)?ji:Zi.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==u)&&ss(t,a,r,u),No=!1;var f=t.memoizedState;a.state=f,Ho(t,r,a,i),l=t.memoizedState,s!==r||f!==l||Mi.current||No?("function"===typeof c&&(rs(t,n,c,r),l=t.memoizedState),(s=No||os(t,n,s,r,f,l,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Do(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ns(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Ro(l):l=Ri(t,l=Oi(n)?ji:Zi.current);var h=n.getDerivedStateFromProps;(c="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||f!==l)&&ss(t,a,r,l),No=!1,f=t.memoizedState,a.state=f,Ho(t,r,a,i);var p=t.memoizedState;s!==d||f!==p||Mi.current||No?("function"===typeof h&&(rs(t,n,h,r),p=t.memoizedState),(u=No||os(t,n,u,r,f,p,l)||!1)?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Zs(e,t,n,r,o,i)}function Zs(e,t,n,r,i,o){Ps(e,t);var a=0!==(128&t.flags);if(!r&&!a)return i&&Li(t,n,!1),Vs(e,t,o);r=t.stateNode,ys.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=wo(t,e.child,null,o),t.child=wo(t,null,s,o)):xs(e,t,s,o),t.memoizedState=r.state,i&&Li(t,n,!0),t.child}function Ms(e){var t=e.stateNode;t.pendingContext?zi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&zi(0,t.context,!1),Ko(e,t.containerInfo)}function js(e,t,n,r,i){return po(),vo(i),t.flags|=256,xs(e,t,n,r),t.child}var Rs,Os,Ts,zs,As={dehydrated:null,treeContext:null,retryLane:0};function Ns(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ls(e,t,n){var r,i=t.pendingProps,a=ea.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),_i(ea,1&a),null===e)return uo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Nu(l,i,0,null),e=Au(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ns(n),t.memoizedState=As,e):Ds(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,Is(e,t,s,r=cs(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Nu({mode:"visible",children:r.children},i,0,null),(a=Au(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&wo(t,e.child,null,s),t.child.memoizedState=Ns(s),t.memoizedState=As,a);if(0===(1&t.mode))return Is(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Is(e,t,s,r=cs(a=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),bs||l){if(null!==(r=Ml)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Ao(e,i),nu(r,e,i,-1))}return vu(),Is(e,t,s,r=cs(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Eu.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ui(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(qi[Xi++]=Ki,qi[Xi++]=Gi,qi[Xi++]=$i,Ki=e.id,Gi=e.overflow,$i=t),t=Ds(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var u={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null):(i=Tu(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Tu(r,s):(s=Au(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Ns(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=As,i}return e=(s=e.child).sibling,i=Tu(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ds(e,t){return(t=Nu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Is(e,t,n,r){return null!==r&&vo(r),wo(t,e.child,null,n),(e=Ds(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Mo(e.return,t,n)}function Bs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ws(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(xs(e,t,r.children,n),0!==(2&(r=ea.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_i(ea,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bs(t,!0,n,null,o);break;case"together":Bs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Nl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Tu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Tu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Us(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ys(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ys(t),null;case 1:case 17:return Oi(t.type)&&Ti(),Ys(t),null;case 3:return r=t.stateNode,Go(),Pi(Mi),Pi(Zi),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(au(oo),oo=null))),Os(e,t),Ys(t),null;case 5:Jo(t);var i=$o(Xo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ts(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ys(t),null}if(e=$o(Yo.current),fo(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[fi]=t,r[hi]=a,e=0!==(1&t.mode),n){case"dialog":Ir("cancel",r),Ir("close",r);break;case"iframe":case"object":case"embed":Ir("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[fi]=t,e[hi]=r,Rs(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Ir("cancel",e),Ir("close",e),i=r;break;case"iframe":case"object":case"embed":Ir("load",e),i=r;break;case"video":case"audio":for(i=0;iWl&&(t.flags|=128,r=!0,Us(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Us(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return Ys(t),null}else 2*Ge()-a.renderingStartTime>Wl&&1073741824!==n&&(t.flags|=128,r=!0,Us(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ge(),t.sibling=null,n=ea.current,_i(ea,r?1&n|2:1&n),t):(Ys(t),null);case 22:case 23:return du(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ol)&&(Ys(t),6&t.subtreeFlags&&(t.flags|=8192)):Ys(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Xs(e,t){switch(to(t),t.tag){case 1:return Oi(t.type)&&Ti(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Go(),Pi(Mi),Pi(Zi),ra(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Jo(t),null;case 13:if(Pi(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Pi(ea),null;case 4:return Go(),null;case 10:return Zo(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Rs=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Os=function(){},Ts=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,$o(Yo.current);var o,a=null;switch(n){case"input":i=$(e,i),r=$(e,r),a=[];break;case"select":i=L({},i,{value:void 0}),r=L({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(c in ye(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Ir("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},zs=function(e,t,n,r){n!==r&&(t.flags|=4)};var $s=!1,Ks=!1,Gs="function"===typeof WeakSet?WeakSet:Set,Qs=null;function Js(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Cu(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Cu(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fi],delete t[hi],delete t[vi],delete t[mi],delete t[gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,dl=!1;function fl(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Ks||Js(n,t);case 6:var r=cl,i=dl;cl=null,fl(e,t,n),dl=i,null!==(cl=r)&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Wt(e)):li(cl,n.stateNode));break;case 4:r=cl,i=dl,cl=n.stateNode.containerInfo,dl=!0,fl(e,t,n),cl=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Ks&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&el(n,t,a),i=i.next}while(i!==r)}fl(e,t,n);break;case 1:if(!Ks&&(Js(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Cu(n,t,s)}fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:1&n.mode?(Ks=(r=Ks)||null!==n.memoizedState,fl(e,t,n),Ks=r):fl(e,t,n);break;default:fl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Gs),t.forEach((function(t){var r=Zu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vl(e,t){var n=t.deletions;if(null!==n)for(var r=0;ri&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Ge()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cl(r/1960))-r)){e.timeoutHandle=ri(wu.bind(null,e,Fl,Hl),r);break}wu(e,Fl,Hl);break;default:throw Error(o(329))}}}return ru(e,Ge()),e.callbackNode===n?iu.bind(null,e):null}function ou(e,t){var n=Il;return e.current.memoizedState.isDehydrated&&(fu(e,t).flags|=256),2!==(e=mu(e,t))&&(t=Fl,Fl=n,null!==t&&au(t)),e}function au(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function su(e,t){for(t&=~Dl,t&=~Ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Xl)var r=!1;else{if(e=Xl,Xl=null,$l=0,0!==(6&Zl))throw Error(o(331));var i=Zl;for(Zl|=4,Qs=e.current;null!==Qs;){var a=Qs,s=a.child;if(0!==(16&Qs.flags)){var l=a.deletions;if(null!==l){for(var u=0;uGe()-Bl?fu(e,0):Dl|=n),ru(e,t)}function _u(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=eu();null!==(e=Ao(e,t))&&(gt(e,t,n),ru(e,n))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),_u(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),_u(e,n)}function Mu(e,t){return qe(e,t)}function ju(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ru(e,t,n,r){return new ju(e,t,n,r)}function Ou(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Tu(e,t){var n=e.alternate;return null===n?((n=Ru(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zu(e,t,n,r,i,a){var s=2;if(r=e,"function"===typeof e)Ou(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return Au(n.children,i,a,t);case C:s=8,i|=8;break;case P:return(e=Ru(12,n,t,2|i)).elementType=P,e.lanes=a,e;case M:return(e=Ru(13,n,t,i)).elementType=M,e.lanes=a,e;case j:return(e=Ru(19,n,t,i)).elementType=j,e.lanes=a,e;case T:return Nu(n,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case _:s=10;break e;case E:s=9;break e;case Z:s=11;break e;case R:s=14;break e;case O:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Ru(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Au(e,t,n,r){return(e=Ru(7,e,r,t)).lanes=n,e}function Nu(e,t,n,r){return(e=Ru(22,e,r,t)).elementType=T,e.lanes=n,e.stateNode={isHidden:!1},e}function Lu(e,t,n){return(e=Ru(6,e,null,t)).lanes=n,e}function Du(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Iu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,i,o,a,s,l){return e=new Iu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ru(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lo(o),e}function Bu(e){if(!e)return Ei;e:{if(We(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Oi(n))return Ai(e,n,t)}return t}function Wu(e,t,n,r,i,o,a,s,l){return(e=Fu(n,r,!0,e,0,o,0,s,l)).context=Bu(null),n=e.current,(o=Io(r=eu(),i=tu(n))).callback=void 0!==t&&null!==t?t:null,Fo(n,o,i),e.current.lanes=i,gt(e,i,r),ru(e,r),e}function Hu(e,t,n,r){var i=t.current,o=eu(),a=tu(i);return n=Bu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Io(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Fo(i,t,a))&&(nu(e,i,a,o),Bo(e,i,a)),a}function Vu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Uu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),r}return l(n,[{key:"componentDidMount",value:function(){"undefined"!==typeof window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:v.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),a=t.defaultPosition,s=t.defaultClassName,l=t.defaultClassNameDragging,u=t.defaultClassNameDragged,c=t.position,d=t.positionOffset,p=(t.scale,i(t,f)),v={},b=null,w=!Boolean(c)||this.state.dragging,k=c||a,S={x:(0,y.canDragX)(this)&&w?this.state.x:k.x,y:(0,y.canDragY)(this)&&w?this.state.y:k.y};this.state.isElementSVG?b=(0,g.createSVGTransform)(S,d):v=(0,g.createCSSTransform)(S,d);var P=(0,m.default)(n.props.className||"",s,(r(e={},l,this.state.dragging),r(e,u,this.state.dragged),e));return h.createElement(x.default,C({},p,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),h.cloneElement(h.Children.only(n),{className:P,style:o(o({},n.props.style),v),transform:b}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,w.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:o({},n)})}}]),n}(h.Component);t.default=_,P(_,"displayName","Draggable"),P(_,"propTypes",o(o({},x.default.propTypes),{},{axis:p.default.oneOf(["both","x","y","none"]),bounds:p.default.oneOfType([p.default.shape({left:p.default.number,right:p.default.number,top:p.default.number,bottom:p.default.number}),p.default.string,p.default.oneOf([!1])]),defaultClassName:p.default.string,defaultClassNameDragging:p.default.string,defaultClassNameDragged:p.default.string,defaultPosition:p.default.shape({x:p.default.number,y:p.default.number}),positionOffset:p.default.shape({x:p.default.oneOfType([p.default.number,p.default.string]),y:p.default.oneOfType([p.default.number,p.default.string])}),position:p.default.shape({x:p.default.number,y:p.default.number}),className:b.dontSetMe,style:b.dontSetMe,transform:b.dontSetMe})),P(_,"defaultProps",o(o({},x.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},8091:function(e,t,n){"use strict";var r=n(7424).default,i=n(6690).default,o=n(9728).default,a=n(6115).default,s=n(1655).default,l=n(6389).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(2791)),c=m(n(2007)),d=m(n(4164)),f=n(2280),h=n(580),p=n(2693),v=m(n(9392));function m(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b={start:"touchstart",move:"touchmove",stop:"touchend"},x={start:"mousedown",move:"mousemove",stop:"mouseup"},w=x,k=function(e){s(n,e);var t=l(n);function n(){var e;return i(this,n),e=t.apply(this,arguments),y(a(e),"dragging",!1),y(a(e),"lastX",NaN),y(a(e),"lastY",NaN),y(a(e),"touchIdentifier",null),y(a(e),"mounted",!1),y(a(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"===typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error(" not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,f.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,f.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var i=(0,f.getTouchIdentifier)(t);e.touchIdentifier=i;var o=(0,h.getControlPosition)(t,i,a(e));if(null!=o){var s=o.x,l=o.y,u=(0,h.createCoreData)(a(e),s,l);(0,v.default)("DraggableCore: handleDragStart: %j",u),(0,v.default)("calling",e.props.onStart),!1!==e.props.onStart(t,u)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,f.addUserSelectStyles)(r),e.dragging=!0,e.lastX=s,e.lastY=l,(0,f.addEvent)(r,w.move,e.handleDrag),(0,f.addEvent)(r,w.stop,e.handleDragStop))}}})),y(a(e),"handleDrag",(function(t){var n=(0,h.getControlPosition)(t,e.touchIdentifier,a(e));if(null!=n){var i=n.x,o=n.y;if(Array.isArray(e.props.grid)){var s=i-e.lastX,l=o-e.lastY,u=(0,h.snapToGrid)(e.props.grid,s,l),c=r(u,2);if(s=c[0],l=c[1],!s&&!l)return;i=e.lastX+s,o=e.lastY+l}var d=(0,h.createCoreData)(a(e),i,o);if((0,v.default)("DraggableCore: handleDrag: %j",d),!1!==e.props.onDrag(t,d)&&!1!==e.mounted)e.lastX=i,e.lastY=o;else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(p){var f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(f)}}})),y(a(e),"handleDragStop",(function(t){if(e.dragging){var n=(0,h.getControlPosition)(t,e.touchIdentifier,a(e));if(null!=n){var i=n.x,o=n.y;if(Array.isArray(e.props.grid)){var s=i-e.lastX||0,l=o-e.lastY||0,u=(0,h.snapToGrid)(e.props.grid,s,l),c=r(u,2);s=c[0],l=c[1],i=e.lastX+s,o=e.lastY+l}var d=(0,h.createCoreData)(a(e),i,o);if(!1===e.props.onStop(t,d)||!1===e.mounted)return!1;var p=e.findDOMNode();p&&e.props.enableUserSelectHack&&(0,f.removeUserSelectStyles)(p.ownerDocument),(0,v.default)("DraggableCore: handleDragStop: %j",d),e.dragging=!1,e.lastX=NaN,e.lastY=NaN,p&&((0,v.default)("DraggableCore: Removing handlers"),(0,f.removeEvent)(p.ownerDocument,w.move,e.handleDrag),(0,f.removeEvent)(p.ownerDocument,w.stop,e.handleDragStop))}}})),y(a(e),"onMouseDown",(function(t){return w=x,e.handleDragStart(t)})),y(a(e),"onMouseUp",(function(t){return w=x,e.handleDragStop(t)})),y(a(e),"onTouchStart",(function(t){return w=b,e.handleDragStart(t)})),y(a(e),"onTouchEnd",(function(t){return w=b,e.handleDragStop(t)})),e}return o(n,[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,f.addEvent)(e,b.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,f.removeEvent)(t,x.move,this.handleDrag),(0,f.removeEvent)(t,b.move,this.handleDrag),(0,f.removeEvent)(t,x.stop,this.handleDragStop),(0,f.removeEvent)(t,b.stop,this.handleDragStop),(0,f.removeEvent)(e,b.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,f.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:d.default.findDOMNode(this)}},{key:"render",value:function(){return u.cloneElement(u.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),n}(u.Component);t.default=k,y(k,"displayName","DraggableCore"),y(k,"propTypes",{allowAnyClick:c.default.bool,children:c.default.node.isRequired,disabled:c.default.bool,enableUserSelectHack:c.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:c.default.arrayOf(c.default.number),handle:c.default.string,cancel:c.default.string,nodeRef:c.default.object,onStart:c.default.func,onDrag:c.default.func,onStop:c.default.func,onMouseDown:c.default.func,scale:c.default.number,className:p.dontSetMe,style:p.dontSetMe,transform:p.dontSetMe}),y(k,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},9962:function(e,t,n){"use strict";var r=n(37),i=r.default,o=r.DraggableCore;e.exports=i,e.exports.default=i,e.exports.DraggableCore=o},2280:function(e,t,n){"use strict";var r=n(8416).default,i=n(2122).default;Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=d,t.addEvent=function(e,t,n,r){if(!e)return;var o=i({capture:!0},r);e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&d(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){var n=c(e,t,"px");return r({},(0,a.browserPrefixToKey)("transform",a.default),n)},t.createSVGTransform=function(e,t){return c(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,o.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,o.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.getTranslation=c,t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingTop),t-=(0,o.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingLeft),t-=(0,o.int)(n.paddingRight)},t.matchesSelector=u,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(u(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,o=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:o}},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderTopWidth),t+=(0,o.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderLeftWidth),t+=(0,o.int)(n.borderRightWidth)},t.removeClassName=f,t.removeEvent=function(e,t,n,r){if(!e)return;var o=i({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&f(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(n){}};var o=n(2693),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(4021));function s(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var l="";function u(e,t){return l||(l=(0,o.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,o.isFunction)(e[t])}))),!!(0,o.isFunction)(e[l])&&e[l](t)}function c(e,t,n){var r=e.x,i=e.y,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){var a="".concat("string"===typeof t.x?t.x:t.x+n),s="".concat("string"===typeof t.y?t.y:t.y+n);o="translate(".concat(a,", ").concat(s,")")+o}return o}function d(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function f(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},4021:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserPrefixToKey=i,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0,t.getPrefix=r;var n=["Moz","Webkit","O","ms"];function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window)return"";var r=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!r)return"";if(t in r)return"";for(var o=0;o: Unmounted during event!");return t}},2693:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(var n=0,r=e.length;n0},c(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.delay;this.state.delayed&&(this.timeout=setTimeout((function(){e.setState({delayed:!1})}),t))}},{key:"componentWillUnmount",value:function(){var e=this.timeout;e&&clearTimeout(e)}},{key:"render",value:function(){var e=this.props,t=e.color,n=(e.delay,e.type),i=e.height,o=e.width,s=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","delay","type","height","width"]),u=this.state.delayed?"blank":n,c=l[u],d={fill:t,height:i,width:o};return a.default.createElement("div",r({style:d,dangerouslySetInnerHTML:{__html:c}},s))}}]),t}(o.Component);d.propTypes={color:s.default.string,delay:s.default.number,type:s.default.string,height:s.default.oneOfType([s.default.string,s.default.number]),width:s.default.oneOfType([s.default.string,s.default.number])},d.defaultProps={color:"#fff",delay:0,type:"balls",height:64,width:64},t.default=d},function(e,t,n){"use strict";e.exports=n(9)},function(e,t,n){"use strict";var r=n(2),i=n(0),o=n(5),a=n(1),s="function"===typeof Symbol&&Symbol.for,l=s?Symbol.for("react.element"):60103,u=s?Symbol.for("react.portal"):60106,c=s?Symbol.for("react.fragment"):60107,d=s?Symbol.for("react.strict_mode"):60108,f=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,p=s?Symbol.for("react.async_mode"):60111,v=s?Symbol.for("react.forward_ref"):60112,m="function"===typeof Symbol&&Symbol.iterator;function g(e){for(var t=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rM.length&&M.push(e)}function O(e,t,n,r){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var o=!1;if(null===e)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case l:case u:o=!0}}if(o)return n(r,e,""===t?"."+T(e,0):t),1;if(o=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;a>",d={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:p(r.thatReturnsNull),arrayOf:function(e){return p((function(t,n,r,i,o){if("function"!==typeof e)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new h("Invalid "+i+" `"+o+"` of type `"+g(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'}])},e.exports=t()},6374:function(e,t,n){"use strict";var r=n(2791),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:c,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},9117:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var x=b.prototype=new y;x.constructor=b,v(x,g.prototype),x.isPureReactComponent=!0;var w=Array.isArray,k=Object.prototype.hasOwnProperty,S={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function P(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,i)&&!C.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1>>1,i=e[r];if(!(0>>1;ro(l,n))uo(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(uo(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,f=null,h=3,p=!1,v=!1,m=!1,g="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function x(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function w(e){if(m=!1,x(e),!v)if(null!==r(u))v=!0,T(k);else{var t=r(c);null!==t&&z(w,t.startTime-e)}}function k(e,n){v=!1,m&&(m=!1,y(_),_=-1),p=!0;var o=h;try{for(x(n),f=r(u);null!==f&&(!(f.expirationTime>n)||e&&!M());){var a=f.callback;if("function"===typeof a){f.callback=null,h=f.priorityLevel;var s=a(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?f.callback=s:f===r(u)&&i(u),x(n)}else i(u);f=r(u)}if(null!==f)var l=!0;else{var d=r(c);null!==d&&z(w,d.startTime-n),l=!1}return l}finally{f=null,h=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,C=!1,P=null,_=-1,E=5,Z=-1;function M(){return!(t.unstable_now()-Ze||125a?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(m?(y(_),_=-1):m=!0,z(w,o-a))):(e.sortIndex=s,n(u,e),v||p||(v=!0,T(k))),e},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},5296:function(e,t,n){"use strict";e.exports=n(6813)},3897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},7071:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports.default=e.exports},4993:function(e,t,n){var r=n(8698).default,i=n(6115);e.exports=function(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},7424:function(e,t,n){var r=n(5372),i=n(8872),o=n(6116),a=n(2218);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},861:function(e,t,n){var r=n(3405),i=n(9498),o=n(6116),a=n(2281);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},5036:function(e,t,n){var r=n(8698).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},4062:function(e,t,n){var r=n(8698).default,i=n(5036);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},8698:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},6116:function(e,t,n){var r=n(3897);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}n.d(t,{Z:function(){return r}})},9439:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(3878);var i=n(181),o=n(5267);function a(e,t){return(0,r.Z)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||(0,i.Z)(e,t)||(0,o.Z)()}},3433:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(907);var i=n(9199),o=n(181);function a(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||(0,i.Z)(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!=(0,r.Z)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},3733:function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}var s=n(3433),l=n(1002);function u(){u=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new O(r||[]);return i(a,"_invoke",{value:Z(e,n,s)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function x(){}function w(){}var k={};d(k,a,(function(){return this}));var S=Object.getPrototypeOf,C=S&&S(S(T([])));C&&C!==n&&r.call(C,a)&&(k=C);var P=w.prototype=b.prototype=Object.create(k);function _(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,o,a,s){var u=h(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==(0,l.Z)(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function Z(t,n,r){var i=p;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=M(s,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var u=h(t,n,r);if("normal"===u.type){if(i=r.done?g:v,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=g,r.method="throw",r.arg=u.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function c(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){c(o,r,i,a,s,"next",e)}function s(e){c(o,r,i,a,s,"throw",e)}a(void 0)}))}}var f=n(9439),h=n(6189),p=n(184),v=(0,h.Z)((0,p.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop"),m=(0,h.Z)((0,p.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),g=(0,h.Z)([(0,p.jsx)("circle",{cx:"12",cy:"12",r:"3.2"},"0"),(0,p.jsx)("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),y=(0,h.Z)((0,p.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),b=n(4942);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t