1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4475],{4902:(e,t,o)=>{"use strict";o.d(t,{C6:()=>r,Cl:()=>i,Tt:()=>a,sH:()=>s});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var i=function(){return(i=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function a(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o}function s(e,t,o,n){return new(o||(o=Promise))(function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}Object.create;Object.create,"function"==typeof SuppressedError&&SuppressedError},11787:(e,t,o)=>{"use strict";var n,r=o(29662);r.canUseDOM&&(n=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,i=o in document;if(!i){var a=document.createElement("div");a.setAttribute(o,"return;"),i="function"==typeof a[o]}return!i&&n&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},16711:(e,t,o)=>{"use strict";var n=o(35325),r=o(11787);function i(e){var t=0,o=0,n=0,r=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),n=10*t,r=10*o,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||r)&&e.deltaMode&&(1==e.deltaMode?(n*=40,r*=40):(n*=800,r*=800)),n&&!t&&(t=n<1?-1:1),r&&!o&&(o=r<1?-1:1),{spinX:t,spinY:o,pixelX:n,pixelY:r}}i.getEventType=function(){return n.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},29662:e=>{"use strict";var t=!!("undefined"!=typeof window&&window.document&&window.document.createElement);e.exports={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t}},35325:e=>{var t,o,n,r,i,a,s,c,p,h,l,u,d,f,m,g=!1;function v(){if(!g){g=!0;var e=navigator.userAgent,v=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Ice
1weasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),w=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(u=/\b(iPhone|iP[ao]d)/.exec(e),d=/\b(iP[ao]d)/.exec(e),h=/Android/i.exec(e),f=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),l=!!/Win64/.exec(e),v){(t=v[1]?parseFloat(v[1]):v[5]?parseFloat(v[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);a=y?parseFloat(y[1])+4:t,o=v[2]?parseFloat(v[2]):NaN,n=v[3]?parseFloat(v[3]):NaN,i=(r=v[4]?parseFloat(v[4]):NaN)&&(v=/(?:Chrome\/(\d+\.\d+))/.exec(e))&&v[1]?parseFloat(v[1]):NaN}else t=o=n=i=r=NaN;if(w){if(w[1]){var C=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);s=!C||parseFloat(C[1].replace("_","."))}else s=!1;c=!!w[2],p=!!w[3]}else s=c=p=!1}}var w={ie:function(){return v()||t},ieCompatibilityMode:function(){return v()||a>t},ie64:function(){return w.ie()&&l},firefox:function(){return v()||o},opera:function(){return v()||n},webkit:function(){return v()||r},safari:function(){return w.webkit()},chrome:function(){return v()||i},windows:function(){return v()||c},osx:function(){return v()||s},linux:function(){return v()||p},iphone:function(){return v()||u},mobile:function(){return v()||u||d||h||m},nativeApp:function(){return v()||f},android:function(){return v()||h},ipad:function(){return v()||d}};e.exports=w},42604:(e,t,o)=>{"use strict";o.d(t,{Ay:()=>v});var n=o(4902),r=o(14232),i=o(76966),a=o.n(i);function s(e,t,o,n,r){void 0===r&&(r=0);var i=f(t.width,t.height,r),a=i.width,s=i.height;return{x:c(e.x,a,o.width,n),y:c(e.y,s,o.height,n)}}function c(e,t,o,n){var r=t*n/2-o/2;return m(e,-r,r)}function p(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function h(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function l(e,t){return Math.min(e,Math.max(0,t))}function u(e,t){return t}function d(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function f(e,t,o){var n=o*Math.PI/180;return{width:Math.abs(Math.cos(n)*e)+Math.abs(Math.sin(n)*t),height:Math.abs(Math.sin(n)*e)+Math.abs(Math.cos(n)*t)}}function m(e,t,o){return Math.min(Math.max(e,t),o)}function g(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return"string"==typeof e&&!!(e.length>0)}).join(" ").trim()}var v=function(e){function t(){var o=null!==e&&e.apply(this,arguments)||this;return o.cropperRef=r.createRef(),o.imageRef=r.createRef(),o.videoRef=r.createRef(),o.containerPosition={x:0,y:0},o.containerRef=null,o.styleRef=null,o.containerRect=null,o.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},o.dragStartPosition={x:0,y:0},o.dragStartCrop={x:0,y:0},o.gestureZoomStart=0,o.gestureRotationStart=0,o.isTouching=!1,o.lastPinchDistance=0,o.lastPinchRotation=0,o.rafDragTimeout=null,o.rafPinchTimeout=null,o.wheelTimer=null,o.currentDoc="undefined"!=typeof document?document:null,o.currentWindow="undefined"!=typeof window?window:null,o.resizeObserver=null,o.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},o.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&o.containerRef){var e=!0;o.resizeObserver=new window.ResizeObserver(function(t){if(e){e=!1;return}o.computeSizes()}),o.resizeObserver.observe(o.containerRef)}},o.preventZoomSafari=function(e){return e.preventDefault()},o.cleanEvents=function(){o.currentDoc&&(o.currentDoc.removeEventListener("mousemove",o.onMouseMove),o.currentDoc.removeEventListener("mouseup",o.onDragStopped),o.currentDoc.removeEventListener("touchmove",o.onTouchMove),o.currentDoc.removeEventListener("touchend",o.onDragStopped),o.currentDoc.removeEventListener("gesturechange",o.onGestureChange),o.currentDoc.removeEventListener("gestureend",o.onGestureEnd),o.currentDoc.removeEventListener("scroll",o.onScroll))},o.clearScrollEvent=function(){o.containerRef&&o.containerRef.removeEventListener("wheel",o.onWheel),o.wheelTimer&&clearTimeout(o.wheelTimer)},o.onMediaLoad=function(){var e=o.computeSizes();e&&(o.emitCropData(),o.setInitialCrop(e)),o.props.onMediaLoaded&&o.props.onMediaLoaded(o.mediaSize)},o.setInitialCrop=function(e){if(o.props.initialCroppedAreaPercentages){var t,n,r,i,a,s,c,p=(t=o.props.initialCroppedAreaPercentages,n=o.mediaSize,r=o.props.rotation,i=o.props.minZoom,a=o.props.maxZoom,s=f(n.width,n.height,r),{crop:{x:(c=m(e.width/s.width*(100/t.width),i,a))*s.width/2-e.width/2-s.width*c*(t.x/100),y:c*s.height/2-e.height/2-s.height*c*(t.y/100)},zoom:c}),h=p.crop,l=p.zoom;o.props.onCropChange(h),o.props.onZoomChange&&o.props.onZoomChange(l)}else if(o.props.initialCroppedAreaPixels){var u,d,g,v,w,y,C,x,b,S=(u=o.props.initialCroppedAreaPixels,d=o.mediaSize,g=o.props.rotation,v=o.props.minZoom,w=o.props.maxZoom,void 0===g&&(g=0),y=f(d.naturalWi
1dth,d.naturalHeight,g),x=m((C=d.width>d.height?d.width/d.naturalWidth:d.height/d.naturalHeight,e.height>e.width?e.height/(u.height*C):e.width/(u.width*C)),v,w),b=e.height>e.width?e.height/u.height:e.width/u.width,{crop:{x:((y.width-u.width)/2-u.x)*b,y:((y.height-u.height)/2-u.y)*b},zoom:x}),h=S.crop,l=S.zoom;o.props.onCropChange(h),o.props.onZoomChange&&o.props.onZoomChange(l)}},o.computeSizes=function(){var e,t,r,i,a,s,c=o.imageRef.current||o.videoRef.current;if(c&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var p,h,l,u,d,m,g,v,w,y,C,x=o.containerRect.width/o.containerRect.height,b=(null==(e=o.imageRef.current)?void 0:e.naturalWidth)||(null==(t=o.videoRef.current)?void 0:t.videoWidth)||0,S=(null==(r=o.imageRef.current)?void 0:r.naturalHeight)||(null==(i=o.videoRef.current)?void 0:i.videoHeight)||0,R=c.offsetWidth<b||c.offsetHeight<S,z=b/S,D=void 0;if(R)switch(o.state.mediaObjectFit){default:case"contain":D=x>z?{width:o.containerRect.height*z,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/z};break;case"horizontal-cover":D={width:o.containerRect.width,height:o.containerRect.width/z};break;case"vertical-cover":D={width:o.containerRect.height*z,height:o.containerRect.height}}else D={width:c.offsetWidth,height:c.offsetHeight};o.mediaSize=(0,n.Cl)((0,n.Cl)({},D),{naturalWidth:b,naturalHeight:S}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var P=o.props.cropSize?o.props.cropSize:(p=o.mediaSize.width,h=o.mediaSize.height,l=o.containerRect.width,u=o.containerRect.height,d=o.props.aspect,void 0===(m=o.props.rotation)&&(m=0),v=(g=f(p,h,m)).width,w=g.height,(y=Math.min(v,l))>(C=Math.min(w,u))*d?{width:C*d,height:C}:{width:y,height:y/d});return((null==(a=o.state.cropSize)?void 0:a.height)!==P.height||(null==(s=o.state.cropSize)?void 0:s.width)!==P.width)&&o.props.onCropSizeChange&&o.props.onCropSizeChange(P),o.setState({cropSize:P},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(P),P}},o.saveContainerPosition=function(){if(o.containerRef){var e=o.containerRef.getBoundingClientRect();o.containerPosition={x:e.left,y:e.top}}},o.onMouseDown=function(e){o.currentDoc&&(e.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(e)))},o.onMouseMove=function(e){return o.onDrag(t.getMousePoint(e))},o.onScroll=function(e){o.currentDoc&&(e.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(e){o.currentDoc&&(o.isTouching=!0,(!o.props.onTouchRequest||o.props.onTouchRequest(e))&&(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),2===e.touches.length?o.onPinchStart(e):1===e.touches.length&&o.onDragStart(t.getTouchPoint(e.touches[0]))))},o.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?o.onPinchMove(e):1===e.touches.length&&o.onDrag(t.getTouchPoint(e.touches[0]))},o.onGestureStart=function(e){o.currentDoc&&(e.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(e){if(e.preventDefault(),!o.isTouching){var n=t.getMousePoint(e),r=o.gestureZoomStart-1+e.scale;if(o.setNewZoom(r,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var i=o.gestureRotationStart+e.rotation;o.props.onRotationChange(i)}}},o.onGestureEnd=function(e){o.cleanEvents()},o.onDragStart=function(e){var t,r;o.dragStartPosition={x:e.x,y:e.y},o.dragStartCrop=(0,n.Cl)({},o.props.crop),null==(r=(t=o.props).onInteractionStart)||r.call(t)},o.onDrag=function(e){var t=e.x,n=e.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&void 0!==t&&void 0!==n){var e=t-o.dragStartPosition.x,r=n-o.dragStartPosition.y,i={x:o.dragStartCrop.x+e,y:o.dragStartCrop.y+r},a=o.props.restrictPosition?s(i,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):i;o.props.onCropChange(a)}}))},o.onDragStopped=function(){var e,t;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),null==(t=(e=o.props).onInteractionEnd)||t.call(e)},o.onWheel=function(e){if(o.currentWindow&&(!o.props.onWheelRequest||o.props.onWheelRequest(e))){e.preventDefault();var n=t.getMousePoint(e),r=a()(e).pixelY,i=o.props.zoom-r*o.props.zoomSpeed/200;o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var e,t;return null==(t=(e=o.props).onInteractionStart)?void 0:t.call(e)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var e,t;return null==(t=(e=o.props).onInteractionEnd)?void 0:t.call(e)})},250)}},o.getPointOnContainer=function(e,t){var n=e.x,r=e.y;if(!o.containerRect)throw Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(n-t.x),y:o.containerRect.height/2-(r-t.y)}},o.getPointOnMedia=function(e){var t=e.x,n=e.y,r=o.props,i=r.crop,a=r.zoom;return{x:(t+i.x)/a,y:(n+i.y)/a}},o.setNewZoom=function(e,t,n){var r=(void 0===n?{}:n).shouldUpdatePosition;if(o.state.cropSize&&o.props.onZoomChange){var i=m(e,o.props.minZoom,o.props.maxZoom);if(void 0===r||r){var a=o.getPointOnContainer(t,o.containerPosition),c=o.getPointOnMedia(a),p={x:c.x*i-a.x,y:c.y*i-a.y},h=o.props.restrictPosition?s(p,o.mediaSize,o.state.cropSize,i,o.props.rotation):p;o.props.onCropChange(h)}o.props.onZoomChange(i)}},o.getCropData=function(){var e,t,r,i,a,c,p,h,d,m,g,v,w,y,C;return o.state.cropSize?(e=o.props.restrictPosition?s(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop,t=o.mediaSize,r=o.state.cropSize,i=o.getAspect(),a=o.props.zoom,c=o.props.rotation,p=o.props.restrictPosition,void 0===c&&(c=0),void 0===p&&(p=!0),h=p?l:u,d=f(t.width,t.height,c),m=f(t.naturalWi
1dth,t.naturalHeight,c),g={x:h(100,((d.width-r.width/a)/2-e.x/a)/d.width*100),y:h(100,((d.height-r.height/a)/2-e.y/a)/d.height*100),width:h(100,r.width/d.width*100/a),height:h(100,r.height/d.height*100/a)},v=Math.round(h(m.width,g.width*m.width/100)),w=Math.round(h(m.height,g.height*m.height/100)),y=m.width>=m.height*i?{width:Math.round(w*i),height:w}:{width:v,height:Math.round(v/i)},C=(0,n.Cl)((0,n.Cl)({},y),{x:Math.round(h(m.width-y.width,g.x*m.width/100)),y:Math.round(h(m.height-y.height,g.y*m.height/100))}),{croppedAreaPercentages:g,croppedAreaPixels:C}):null},o.emitCropData=function(){var e=o.getCropData();if(e){var t=e.croppedAreaPercentages,n=e.croppedAreaPixels;o.props.onCropComplete&&o.props.onCropComplete(t,n),o.props.onCropAreaChange&&o.props.onCropAreaChange(t,n)}},o.emitCropAreaChange=function(){var e=o.getCropData();if(e){var t=e.croppedAreaPercentages,n=e.croppedAreaPixels;o.props.onCropAreaChange&&o.props.onCropAreaChange(t,n)}},o.recomputeCropPosition=function(){if(o.state.cropSize){var e=o.props.restrictPosition?s(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;o.props.onCropChange(e),o.emitCropData()}},o.onKeyDown=function(e){var t,r,i=o.props,a=i.crop,c=i.onCropChange,p=i.keyboardStep,h=i.zoom,l=i.rotation,u=p;if(o.state.cropSize){e.shiftKey&&(u*=.2);var d=(0,n.Cl)({},a);switch(e.key){case"ArrowUp":d.y-=u,e.preventDefault();break;case"ArrowDown":d.y+=u,e.preventDefault();break;case"ArrowLeft":d.x-=u,e.preventDefault();break;case"ArrowRight":d.x+=u,e.preventDefault();break;default:return}o.props.restrictPosition&&(d=s(d,o.mediaSize,o.state.cropSize,h,l)),e.repeat||null==(r=(t=o.props).onInteractionStart)||r.call(t),c(d)}},o.onKeyUp=function(e){var t,n;switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":e.preventDefault();break;default:return}o.emitCropData(),null==(n=(t=o.props).onInteractionEnd)||n.call(t)},o}return(0,n.C6)(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}
1\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null==(e=this.resizeObserver)||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null==(t=this.styleRef.parentNode)||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null==(t=e.cropSize)?void 0:t.height)!==(null==(o=this.props.cropSize)?void 0:o.height)||(null==(n=e.cropSize)?void 0:n.width)!==(null==(r=this.props.cropSize)?void 0:r.width)?this.computeSizes():((null==(i=e.crop)?void 0:i.x)!==(null==(a=this.props.crop)?void 0:a.x)||(null==(s=e.crop)?void 0:s.y)!==(null==(c=this.props.crop)?void 0:c.y))&&this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null==(p=this.videoRef.current)||p.load());var t,o,n,r,i,a,s,c,p,h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,o=e.aspect;return t?t.width/t.height:o},t.prototype.getObjectFit=function(){var e,t,o,n;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var r=this.containerRect.width/this.containerRect.height;return((null==(e=this.imageRef.current)?void 0:e.naturalWidth)||(null==(t=this.videoRef.current)?void 0:t.videoWidth)||0)/((null==(o=this.imageRef.current)?void 0:o.naturalHeight)||(null==(n=this.videoRef.current)?void 0:n.videoHeight)||0)<r?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var o=t.getTouchPoint(e.touches[0]),n=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=p(o,n),this.lastPinchRotation=h(o,n),this.onDragStart(d(o,n))},t.prototype.onPinchMove=function(e){var o=this;if(this.currentDoc&&this.currentWindow){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),i=d(n,r);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var e=p(n,r),t=o.props.zoom*(e/o.lastPinchDistance);o.setNewZoom(t,i,{shouldUpdatePosition:!1}),o.lastPinchDistance=e;var a=h(n,r),s=o.props.rotation+(a-o.lastPinchRotation);o.props.onRotationChange&&o.props.onRotationChange(s),o.lastPinchRotation=a})}},t.prototype.render=function(){var e,t=this,o=this.props,i=o.image,a=o.video,s=o.mediaProps,c=o.cropperProps,p=o.transform,h=o.crop,l=h.x,u=h.y,d=o.rotation,f=o.zoom,m=o.cropShape,v=o.showGrid,w=o.roundCropAreaPixels,y=o.style,C=y.containerStyle,x=y.cropAreaStyle,b=y.mediaStyle,S=o.classes,R=S.containerClassName,z=S.cropAreaClassName,D=S.mediaClassName,P=null!=(e=this.state.mediaObjectFit)?e:this.getObjectFit();return r.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef
1=e},"data-testid":"container",style:C,className:g("reactEasyCrop_Container",R)},i?r.createElement("img",(0,n.Cl)({alt:"",className:g("reactEasyCrop_Image","contain"===P&&"reactEasyCrop_Contain","horizontal-cover"===P&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===P&&"reactEasyCrop_Cover_Vertical",D)},s,{src:i,ref:this.imageRef,style:(0,n.Cl)((0,n.Cl)({},b),{transform:p||"translate(".concat(l,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(f,")")}),onLoad:this.onMediaLoad})):a&&r.createElement("video",(0,n.Cl)({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:g("reactEasyCrop_Video","contain"===P&&"reactEasyCrop_Contain","horizontal-cover"===P&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===P&&"reactEasyCrop_Cover_Vertical",D)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,n.Cl)((0,n.Cl)({},b),{transform:p||"translate(".concat(l,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(f,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(e){return r.createElement("source",(0,n.Cl)({key:e.src},e))})),this.state.cropSize&&r.createElement("div",(0,n.Cl)({ref:this.cropperRef,style:(0,n.Cl)((0,n.Cl)({},x),{width:w?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:w?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:g("reactEasyCrop_CropArea","round"===m&&"reactEasyCrop_CropAreaRound",v&&"reactEasyCrop_CropAreaGrid",z)},c)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(r.Component)},76966:(e,t,o)=>{e.exports=o(16711)},84475:(e,t,o)=>{"use strict";o.d(t,{A:()=>f});var n=o(4902),r=o(37876),i=o(9804),a=o(22757),s=o(14232),c=o(32145),p=o(94976),h=o(42604);let l="img-crop",u=(0,s.forwardRef)((e,t)=>{let{cropperRef:o,zoomSlider:n,rotationSlider:i,aspectSlider:a,showReset:u,resetBtnText:d,modalImage:f,aspect:m,minZoom:g,maxZoom:v,minAspect:w,maxAspect:y,cropShape:C,showGrid:x,cropperProps:b}
1=e,[S,R]=(0,s.useState)(1),[z,D]=(0,s.useState)(0),[P,M]=(0,s.useState)(m),E=(0,s.useRef)(m);E.current!==m&&(E.current=m,M(m));let A=1!==S||0!==z||P!==m,O=()=>{R(1),D(0),M(m)},[j,N]=(0,s.useState)({x:0,y:0}),T=(0,s.useRef)({width:0,height:0,x:0,y:0}),W=(0,s.useCallback)((e,t)=>{T.current=t},[]);(0,s.useImperativeHandle)(t,()=>({rotation:z,cropPixelsRef:T,onReset:O}));let _="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",k="[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]",L="[flex:1]";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ay,Object.assign({},b,{ref:o,image:f,crop:j,zoom:S,rotation:z,aspect:P,minZoom:g,maxZoom:v,zoomWithScroll:n,cropShape:C,showGrid:x,onCropChange:N,onZoomChange:R,onRotationChange:D,onCropComplete:W,classes:{containerClassName:`${l}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${l}-media`}})),n&&(0,r.jsxs)("section",{className:`${l}-control ${l}-control-zoom ${_}`,children:[(0,r.jsx)("button",{className:k,onClick:()=>
1R(+(S-.1).toFixed(1)),disabled:S-.1<g,children:"ï¼"}),(0,r.jsx)(p.A,{className:L,min:g,max:v,step:.1,value:S,onChange:R}),(0,r.jsx)("button",{className:k,onClick:()=>R(+(S+.1).toFixed(1)),disabled:S+.1>v,children:"ï¼"})]}),i&&(0,r.jsxs)("section",{className:`${l}-control ${l}-control-rotation ${_}`,children:[(0,r.jsx)("button",{className:`${k} [font-size:16px]`,onClick:()=>D(z-1),disabled:-180===z,children:"âº"}),(0,r.jsx)(p.A,{className:L,min:-180,max:180,step:1,value:z,onChange:D}),(0,r.jsx)("button",{className:`${k} [font-size:16px]`,onClick:()=>D(z+1),disabled:180===z,children:"â»"})]}),a&&(0,r.jsxs)("section",{className:`${l}-control ${l}-control-aspect ${_}`,children:[(0,r.jsx)("button",{className:k,onClick:()=>M(+(P-.01).toFixed(2)),disabled:P-.01<w,children:"â"}),(0,r.jsx)(p.A,{className:L,min:w,max:y,step:.01,value:P,onChange:M}),(0,r.jsx)("button",{className:k,onClick:()=>M(+(P+.01).toFixed(2)),disabled:P+.01>y,children:"â"})]}),u&&(n||i||a)&&(0,r.jsx)(c.Ay,{className:"[position:absolute] [bottom:20px]",style:A?{}:{opacity:.3,pointerEvents:"none"},onClick:O,children:d})]})});var d=(0,s.memo)(u);!function(e,t){void 0===t&&(t={});var o=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("/*! tailwindcss v4.1.4 | MIT License | https://tailwindcss.com */.visible{visibility:visible}.\\!\\[position\\:relative\\]{position:relative!important}.\\[position\\:absolute\\]{position:absolute}.\\[bottom\\:20px\\]{bottom:20px}.container{width:100%}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[display\\:flex\\]{display:flex}.grid{display:grid}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.\\[width\\:100\\%\\]{width:100%}.\\[flex\\:1\\]{flex:1}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[align-items\\:center\\]{align-items:center}.\\[justify-content\\:center\\]{justify-content:center}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.disabled\\:\\[cursor\\:default\\]{&:disabled{cursor:default}}.disabled\\:\\[opacity\\:20\\%\\]{&:disabled{opacity:20%}}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]{&~section:first-of-type{margin-top:16px}}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]{&~section:last-of-type{margin-bottom:16px}}",{insertAt:"top"});let f=(0,s.forwardRef)((e,t)=>{let{quality:o=.4,fillColor:c="white",zoomSlider:p=!0,rotationSlider:h=!1,aspectSlider:u=!1,showReset:f=!1,resetText:m,aspect:g=1,minZoom:v=1,maxZoom:w=3,minAspect:y=.5,maxAspect:C=2,cropShape:x="rect",showGrid:b=!1,cropperProps:S,modalClassName:R,modalTitle:z,modalWidth:D,modalOk:P,modalCancel:M,onModalOk:E,onModalCancel:A,modalProps:O,beforeCrop:j,children:N}=e,T=(0,s.useRef)({});T.current.onModalOk=E,T.current.onModalCancel=A,T.current.beforeCrop=j;let W=(0,s.useRef)(null),_=(0,s.useCallback)(e=>{var t;let o=document.createElement("canvas"),n=o.getContext("2d"),r=((null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e))||document).querySelector(`.${l}-media`),{width:i,height:a,x:s,y:p}=W.current.cropPixelsRef.current;if(h&&0!==W.current.rotation){let{naturalWidth:e,naturalHeight:t}=r,h=W.current.rotation*(Math.PI/180),l=Math.abs(Math.sin(h)),u=Math.abs(Math.cos(h)),d=e*u+t*l,f=t*u+e*l;o.width=d,o.height=f,n.fillStyle=c,n.fillRect(0,0,d,f);let m=d/2,g=f/2;n.translate(m,g),n.rotate(h),n.translate(-m,-g);let v=(d-e)/2,w=(f-t)/2;n.drawImage(r,0,0,e,t,v,w,e,t);let y=n.getImageData(0,0,d,f);o.width=i,o.height=a,n.putImageData(y,-s,-p)}else o.width=i,o.height=a,n.fillStyle=c,n.fillRect(0,0,i,a),n.drawImage(r,s,p,i,a,0,0,i,a);return o},[c,h]),[k,L]=(0,s.useState)(""),F=(0,s.useRef)(void 0),I=(0,s.useRef)(void 0),Z=(0,s.useCallback)(e=>(0,n.sH)(void 0,[e],void 0,function*({beforeUpload:e,file:t,resolve:o,reject:n}){if("function"!=typeof e)return void o(t);try{let n=yield e(t,[t]);o(!1!==n&&(!0!==n&&n||t))}catch(e){n(e)}}),[]),H=(0,s.useCallback)(e=>(t,r)=>new Promise((i,s)=>(0,n.sH)(void 0,void 0,void 0,function*(){let c=t;if("function"==typeof T.current.beforeCrop)try{let o=yield T.current.beforeCrop(t,r);if(!1===o)return Z({beforeUpload:e,file:t,resolve:i,reject:s});!0!==o&&(c=o||t)}catch(o){return Z({beforeUpload:e,file:t,resolve:i,reject:s})}let p=new FileReader;p.addEventListener("load",()=>{"string"==typeof p.result&&L(p.result)}),p.readAsDataURL(c),F.current=()=>{var e,t;L(""),W.current.onReset();let o=!1;null==(t=(e=T.current).onModalCancel)||t.call(e,e=>{i(e),o=!0}
1),o||i(a.A.LIST_IGNORE)},I.current=t=>(0,n.sH)(void 0,void 0,void 0,function*(){L(""),W.current.onReset();let r=_(t.target),{type:a,name:p,uid:h}=c;r.toBlob(t=>(0,n.sH)(void 0,void 0,void 0,function*(){let o=new File([t],p,{type:a});Object.assign(o,{uid:h}),Z({beforeUpload:e,file:o,resolve:e=>{var t,o;i(e),null==(o=(t=T.current).onModalOk)||o.call(t,e)},reject:e=>{var t,o;s(e),null==(o=(t=T.current).onModalOk)||o.call(t,e)}})}),a,o)})})),[_,o,Z]),U=(0,s.useCallback)(e=>{let t=Array.isArray(e)?e[0]:e,o=t.props,{beforeUpload:r,accept:i}=o,a=(0,n.Tt)(o,["beforeUpload","accept"]);return Object.assign(Object.assign({},t),{props:Object.assign(Object.assign({},a),{accept:i||"image/*",beforeUpload:H(r)})})},[H]),G=(0,s.useMemo)(()=>{let e={};return void 0!==D&&(e.width=D),void 0!==P&&(e.okText=P),void 0!==M&&(e.cancelText=M),e},[M,P,D]),$=`${l}-modal${R?` ${R}`:""}`,V="zh-CN"===("undefined"==typeof window?"":window.navigator.language);return(0,r.jsxs)(r.Fragment,{children:[U(N),k&&(0,r.jsx)(i.A,Object.assign({},O,G,{open:!0,title:z||(V?"ç¼è¾å¾ç":"Edit image"),onCancel:F.current,onOk:I.current,wrapClassName:$,maskClosable:!1,destroyOnClose:!0,children:(0,r.jsx)(d,{ref:W,cropperRef:t,zoomSlider:p,rotationSlider:h,aspectSlider:u,showReset:f,resetBtnText:m||(V?"éç½®":"Reset"),modalImage:k,aspect:g,minZoom:v,maxZoom:w,minAspect:y,maxAspect:C,cropShape:x,showGrid:b,cropperProps:S})}))]})})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.