1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,165608,t=>{"use strict";let e="default",i={default:{key:"default",label:"Default home",description:"Campaign-first overview â the standard agency home."},sales:{key:"sales",label:"Sales home",description:"Pipeline-first home (deals, forecast, tasks) rendered on the Home tab."},sales_pipeline:{key:"sales_pipeline",label:"Sales pipeline",description:"Skip the Home tab and land directly on the Sales pipeline.",href:"/dashboard/user/sales/pipeline"},talent_management:{key:"talent_management",label:"Talent home",description:"Creator-roster-first home for talent management."}},r=Object.values(i);t.s(["DEFAULT_HOME_VIEW",0,e,"HOME_VIEW_OPTIONS",0,r,"getHomeView",0,function(t){return i[t]||i[e]}])},468094,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"}))});t.s(["ArrowTrendingUpIcon",0,i],468094)},334152,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 0 0 .75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 0 0-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0 1 12 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 0 1-.673-.38m0 0A2.18 2.18 0 0 1 3 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 0 1 3.413-.387m7.5 0V5.25A2.25 2.25 0 0 0 13.5 3h-3a2.25 2.25 0 0 0-2.25 2.25v.894m7.5 0a48.667 48.667 0 0 0-7.5 0M12 12.75h.008v.008H12v-.008Z"}))});t.s(["BriefcaseIcon",0,i],334152)},259792,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z"}))});t.s(["BuildingOffice2Icon",0,i],259792)},163341,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))});t.s(["ChartBarIcon",0,i],163341)},27661,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32
10 0 1 12 3Z"}))});t.s(["FunnelIcon",0,i],27661)},255615,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))});t.s(["HomeIcon",0,i],255615)},862536,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z"}))});t.s(["IdentificationIcon",0,i],862536)},491160,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))});t.s(["PencilSquareIcon",0,i],491160)},685249,t=>{"use strict";var e=t.i(271645);let i=e.forwardRef(function({title:t,titleId:i,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":i},r),t?e.createElement("title",{id:i},t):null,e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))});t.s(["ShieldCheckIcon",0,i],685249)},600652,(t,e,i)=>{var r,o,n,s,a,h,c,l,p,u,d,m,f,g,v,w=!1;function b(){if(!w){w=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Ice
1weasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),i=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(m=/\b(iPhone|iP[ao]d)/.exec(t),f=/\b(iP[ao]d)/.exec(t),u=/Android/i.exec(t),g=/FBAN\/\w+;/i.exec(t),v=/Mobile/i.exec(t),d=!!/Win64/.exec(t),e){(r=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN)&&document&&document.documentMode&&(r=document.documentMode);var b=/(?:Trident\/(\d+.\d+))/.exec(t);h=b?parseFloat(b[1])+4:r,o=e[2]?parseFloat(e[2]):NaN,n=e[3]?parseFloat(e[3]):NaN,a=(s=e[4]?parseFloat(e[4]):NaN)&&(e=/(?:Chrome\/(\d+\.\d+))/.exec(t))&&e[1]?parseFloat(e[1]):NaN}else r=o=n=a=s=NaN;if(i){if(i[1]){var C=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);c=!C||parseFloat(C[1].replace("_","."))}else c=!1;l=!!i[2],p=!!i[3]}else c=l=p=!1}}var C={ie:function(){return b()||r},ieCompatibilityMode:function(){return b()||h>r},ie64:function(){return C.ie()&&d},firefox:function(){return b()||o},opera:function(){return b()||n},webkit:function(){return b()||s},safari:function(){return C.webkit()},chrome:function(){return b()||a},windows:function(){return b()||l},osx:function(){return b()||c},linux:function(){return b()||p},iphone:function(){return b()||m},mobile:function(){return b()||m||f||u||v},nativeApp:function(){return b()||g},android:function(){return b()||u},ipad:function(){return b()||f}};e.exports=C},410316,(t,e,i)=>{"use strict";var r=!!("u">typeof window&&window.document&&window.document.createElement);e.exports={canUseDOM:r,canUseWorkers:"u">typeof Worker,canUseEventListeners:r&&!!(window.addEventListener||window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r}},433418,(t,e,i)=>{"use strict";var r,o=t.r(410316);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var i="on"+t,n=i in document;if(!n){var s=document.createElement("div");s.setAttribute(i,"return;"),n="function"==typeof s[i]}return!n&&r&&"wheel"===t&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}},952545,(t,e,i)=>{"use strict";var r=t.r(600652),o=t.r(433418);function n(t){var e=0,i=0,r=0,o=0;return"detail"in t&&(i=t.detail),"wheelDelta"in t&&(i=-t.wheelDelta/120),"wheelDeltaY"in t&&(i=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=i,i=0),r=10*e,o=10*i,"deltaY"in t&&(o=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||o)&&t.deltaMode&&(1==t.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!e&&(e=r<1?-1:1),o&&!i&&(i=o<1?-1:1),{spinX:e,spinY:i,pixelX:r,pixelY:o}}n.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=n},699733,(t,e,i)=>{e.exports=t.r(952545)},936450,t=>{"use strict";var e=t.i(271645),i=t.i(699733);function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,r)}return i}function n(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach(function(e){!function(t,e,i){var o;(o=function(t,e){if("object"!=r(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=r(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==r(o)?o:o+"")in t)?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function s(t,e,i,r,o=0){let{width:n,height:h}=d(e.width,e.height,o);return{x:a(t.x,n,i.width,r),y:a(t.y,h,i.height,r)}}function a(t,e,i,r){let o=Math.abs(e*r/2-i/2);return m(t,-o,o)}function h(t,e){return Math.sqrt(Math.pow(t.y-e.y,2)+Math.pow(t.x-e.x,2))}function c(t,e){return 180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI}function l(t,e){return Math.min(t,Math.max(0,e))}function p(t,e){return e}function u(t,e){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function d(t,e,i){let r=i*Math.PI/180;return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}function m(t,e,i){return Math.min(Math.max(t,e),i)}function f(...t){return t.filter(t=>"string"==typeof t&&!!(t.length>0)).join(" ").trim()}var g=class t extends e.Component{constructor(...r){super(...r),this.cropperRef=e.createRef(),this.imageRef=e.createRef(),this.videoRef=e.createRef(),this.containerPosition={x:0,y:0}
1,this.containerRef=null,this.styleRef=null,this.containerRect=null,this.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},this.dragStartPosition={x:0,y:0},this.dragStartCrop={x:0,y:0},this.gestureZoomStart=0,this.gestureRotationStart=0,this.isTouching=!1,this.lastPinchDistance=0,this.lastPinchRotation=0,this.rafDragTimeout=null,this.rafPinchTimeout=null,this.wheelTimer=null,this.resizeEmitTimer=null,this.currentDoc="u">typeof document?document:null,this.currentWindow="u">typeof window?window:null,this.resizeObserver=null,this.previousCropSize=null,this.isInitialized=!1,this.dragInteractionSource=null,this.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},this.initResizeObserver=()=>{if(void 0===window.ResizeObserver||!this.containerRef)return;let t=!0;this.resizeObserver=new window.ResizeObserver(e=>{if(t){t=!1;return}this.computeSizes({isResizeTriggered:!0})}),this.resizeObserver.observe(this.containerRef)},this.onWindowResize=()=>{this.computeSizes({isResizeTriggered:!0})},this.preventZoomSafari=t=>t.preventDefault(),this.cleanEvents=()=>{this.currentDoc&&(this.currentDoc.removeEventListener("mousemove",this.onMouseMove),this.currentDoc.removeEventListener("mouseup",this.onDragStopped),this.currentDoc.removeEventListener("touchmove",this.onTouchMove),this.currentDoc.removeEventListener("touchend",this.onDragStopped),this.currentDoc.removeEventListener("gesturechange",this.onGestureChange),this.currentDoc.removeEventListener("gestureend",this.onGestureEnd),this.currentDoc.removeEventListener("scroll",this.onScroll))},this.clearScrollEvent=()=>{this.containerRef&&this.containerRef.removeEventListener("wheel",this.onWheel),this.wheelTimer&&clearTimeout(this.wheelTimer)},this.onMediaLoad=()=>{let t=this.computeSizes();t&&(this.previousCropSize=t,this.emitCropData(),this.setInitialCrop(t),this.isInitialized=!0),this.props.onMediaLoaded&&this.props.onMediaLoaded(this.mediaSize)},this.setInitialCrop=t=>{if(this.props.initialCroppedAreaPercentages){var e,i,r,o,n;let s,a,{crop:h,zoom:c}=(e=this.props.initialCroppedAreaPercentages,i=this.mediaSize,r=this.props.rotation,o=this.props.minZoom,n=this.props.maxZoom,s=d(i.width,i.height,r),{crop:{x:(a=m(t.width/s.width*(100/e.width),o,n))*s.width/2-t.width/2-s.width*a*(e.x/100),y:a*s.height/2-t.height/2-s.height*a*(e.y/100)},zoom:a});this.props.onCropChange(h),this.props.onZoomChange&&this.props.onZoomChange(c)}else if(this.props.initialCroppedAreaPixels){let{crop:e,zoom:i}=function(t,e,i=0,r,o,n){let s,a=d(e.naturalWidth,e.naturalHeight,i),h=m((s=e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight,r.height>r.width?r.height/(t.height*s):r.width/(t.width*s)),o,n),c=r.height>r.width?r.height/t.height:r.width/t.width;return{crop:{x:((a.width-t.width)/2-t.x)*c,y:((a.height-t.height)/2-t.y)*c},zoom:h}}(this.props.initialCroppedAreaPixels,this.mediaSize,this.props.rotation,t,this.props.minZoom,this.props.maxZoom);this.props.onCropChange(e),this.props.onZoomChange&&this.props.onZoomChange(i)}},this.computeSizes=({isResizeTriggered:t=!1}={})=>{let e=this.imageRef.current||this.videoRef.current;if(e&&this.containerRef){var i,r,o,s,a,h;let c;this.containerRect=this.containerRef.getBoundingClientRect(),this.saveContainerPosition();let l=this.containerRect.width/this.containerRect.height,p=(null==(i=this.imageRef.current)?void 0:i.naturalWidth)||(null==(r=this.videoRef.current)?void 0:r.videoWidth)||0,u=(null==(o=this.imageRef.current)?void 0:o.naturalHeight)||(null==(s=this.videoRef.current)?void 0:s.videoHeight)||0,m=e.offsetWidth<p||e.offsetHeight<u,f=p/u;if(m)switch(this.state.mediaObjectFit){default:case"contain":c=l>f?{width:this.containerRect.height*f,height:this.containerRect.height}:{width:this.containerRect.width,height:this.containerRect.width/f};break;case"horizontal-cover":c={width:this.containerRect.width,height:this.containerRect.width/f};break;case"vertical-cover":c={width:this.containerRect.height*f,height:this.containerRect.height}}else c={width:e.offsetWidth,height:e.offsetHeight};this.mediaSize=n(n({},c),{},{naturalWidth:p,naturalHeight:u}),this.props.setMediaSize&&this.props.setMediaSize(this.mediaSize);
1let g=this.props.cropSize?this.props.cropSize:function(t,e,i,r,o,n=0){let{width:s,height:a}=d(t,e,n),h=Math.min(s,i),c=Math.min(a,r);return h>c*o?{width:c*o,height:c}:{width:h,height:h/o}}(this.mediaSize.width,this.mediaSize.height,this.containerRect.width,this.containerRect.height,this.props.aspect,this.props.rotation);return((null==(a=this.state.cropSize)?void 0:a.height)!==g.height||(null==(h=this.state.cropSize)?void 0:h.width)!==g.width)&&this.props.onCropSizeChange&&this.props.onCropSizeChange(g),this.setState({cropSize:g},()=>this.recomputeCropPosition({isResizeTriggered:t})),this.props.setCropSize&&this.props.setCropSize(g),g}},this.saveContainerPosition=()=>{if(this.containerRef){let t=this.containerRef.getBoundingClientRect();this.containerPosition={x:t.left,y:t.top}}},this.onMouseDown=e=>{this.currentDoc&&(e.preventDefault(),this.currentDoc.addEventListener("mousemove",this.onMouseMove),this.currentDoc.addEventListener("mouseup",this.onDragStopped),this.saveContainerPosition(),this.onDragStart(t.getMousePoint(e),"mouse"))},this.onMouseMove=e=>this.onDrag(t.getMousePoint(e)),this.onScroll=t=>{this.currentDoc&&(t.preventDefault(),this.saveContainerPosition())},this.onTouchStart=e=>{!this.currentDoc||(this.isTouching=!0,(!this.props.onTouchRequest||this.props.onTouchRequest(e))&&(this.currentDoc.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.currentDoc.addEventListener("touchend",this.onDragStopped),this.saveContainerPosition(),2===e.touches.length?this.onPinchStart(e):1===e.touches.length&&this.onDragStart(t.getTouchPoint(e.touches[0]),"touch")))},this.onTouchMove=e=>{e.preventDefault(),2===e.touches.length?this.onPinchMove(e):1===e.touches.length&&this.onDrag(t.getTouchPoint(e.touches[0]))},this.onGestureStart=t=>{this.currentDoc&&(t.preventDefault(),this.currentDoc.addEventListener("gesturechange",this.onGestureChange),this.currentDoc.addEventListener("gestureend",this.onGestureEnd),this.gestureZoomStart=this.props.zoom,this.gestureRotationStart=this.props.rotation)},this.onGestureChange=e=>{if(e.preventDefault(),this.isTouching)return;let i=t.getMousePoint(e),r=this.gestureZoomStart-1+e.scale;if(this.setNewZoom(r,i,{shouldUpdatePosition:!0}),this.props.onRotationChange){let t=this.gestureRotationStart+e.rotation;this.props.onRotationChange(t)}},this.onGestureEnd=t=>{this.cleanEvents()},this.onDragStart=({x:t,y:e},i)=>{var r,o;this.dragStartPosition={x:t,y:e},this.dragStartCrop=n({},this.props.crop),this.dragInteractionSource=i,null==(r=(o=this.props).onInteractionStart)||r.call(o,{source:i})},this.onDrag=({x:t,y:e})=>{this.currentWindow&&(this.rafDragTimeout&&this.currentWindow.cancelAnimationFrame(this.rafDragTimeout),this.rafDragTimeout=this.currentWindow.requestAnimationFrame(()=>{if(!this.state.cropSize||void 0===t||void 0===e)return;let i=t-this.dragStartPosition.x,r=e-this.dragStartPosition.y,o={x:this.dragStartCrop.x+i,y:this.dragStartCrop.y+r},n=this.props.restrictPosition?s(o,this.mediaSize,this.state.cropSize,this.props.zoom,this.props.rotation):o;this.props.onCropChange(n)}))},this.onDragStopped=()=>{var t,e,i;this.isTouching=!1,this.cleanEvents(),this.emitCropData(),null==(t=(e=this.props).onInteractionEnd)||t.call(e,{source:null!=(i=this.dragInteractionSource)?i:"mouse"}),this.dragInteractionSource=null},this.onWheel=e=>{if(!this.currentWindow||this.props.onWheelRequest&&!this.props.onWheelRequest(e))return;e.preventDefault();let r=t.getMousePoint(e),{pixelY:o}=(0,i.default)(e),n=this.props.zoom-o*this.props.zoomSpeed/200;this.setNewZoom(n,r,{shouldUpdatePosition:!0}),this.state.hasWheelJustStarted||this.setState({hasWheelJustStarted:!0},()=>{var t,e;return null==(t=(e=this.props).onInteractionStart)?void 0:t.call(e,{source:"wheel"})}),this.wheelTimer&&clearTimeout(this.wheelTimer),this.wheelTimer=this.currentWindow.setTimeout(()=>this.setState({hasWheelJustStarted:!1},()=>{var t,e;return null==(t=(e=this.props).onInteractionEnd)?void 0:t.call(e,{source:"wheel"})}),250)},this.getPointOnContainer=({x:t,y:e},i)=>{if(!this.containerRect)throw Error("The Cropper is not mounted");return{x:this.containerRect.width/2-(t-i.x),y:this.containerRect.height/2-(e-i.y)}},this.getPointOnMedia=({x:t,y:e})=>{let{crop:i,zoom:r}=this.props;return{x:(t+i.x)/r,y:(e+i.y)/r}},this.setNewZoom=(t,e,{shouldUpdatePosition:i=!0}={})=>
1{if(!this.state.cropSize||!this.props.onZoomChange)return;let r=m(t,this.props.minZoom,this.props.maxZoom);if(i){let t=this.getPointOnContainer(e,this.containerPosition),i=this.getPointOnMedia(t),o={x:i.x*r-t.x,y:i.y*r-t.y},n=this.props.restrictPosition?s(o,this.mediaSize,this.state.cropSize,r,this.props.rotation):o;this.props.onCropChange(n)}this.props.onZoomChange(r)},this.getCropData=()=>this.state.cropSize?function(t,e,i,r,o,s=0,a=!0){let h=a?l:p,c=d(e.width,e.height,s),u=d(e.naturalWidth,e.naturalHeight,s),m={x:h(100,((c.width-i.width/o)/2-t.x/o)/c.width*100),y:h(100,((c.height-i.height/o)/2-t.y/o)/c.height*100),width:h(100,i.width/c.width*100/o),height:h(100,i.height/c.height*100/o)},f=Math.round(h(u.width,m.width*u.width/100)),g=Math.round(h(u.height,m.height*u.height/100)),v=u.width>=u.height*r?{width:Math.round(g*r),height:g}:{width:f,height:Math.round(f/r)};return{croppedAreaPercentages:m,croppedAreaPixels:n(n({},v),{},{x:Math.round(h(u.width-v.width,m.x*u.width/100)),y:Math.round(h(u.height-v.height,m.y*u.height/100))})}}(this.props.restrictPosition?s(this.props.crop,this.mediaSize,this.state.cropSize,this.props.zoom,this.props.rotation):this.props.crop,this.mediaSize,this.state.cropSize,this.getAspect(),this.props.zoom,this.props.rotation,this.props.restrictPosition):null,this.emitCropData=()=>{this.resizeEmitTimer&&(clearTimeout(this.resizeEmitTimer),this.resizeEmitTimer=null);let t=this.getCropData();if(!t)return;let{croppedAreaPercentages:e,croppedAreaPixels:i}=t;this.props.onCropComplete&&this.props.onCropComplete(e,i),this.props.onCropAreaChange&&this.props.onCropAreaChange(e,i)},this.emitCropAreaChange=()=>{let t=this.getCropData();if(!t)return;let{croppedAreaPercentages:e,croppedAreaPixels:i}=t;this.props.onCropAreaChange&&this.props.onCropAreaChange(e,i)},this.recomputeCropPosition=({isResizeTriggered:t=!1}={})=>{var e,i;if(!this.state.cropSize)return;let r=this.props.crop;if(this.isInitialized&&(null==(e=this.previousCropSize)?void 0:e.width)&&(null==(i=this.previousCropSize)?void 0:i.height)&&(Math.abs(this.previousCropSize.width-this.state.cropSize.width)>1e-6||Math.abs(this.previousCropSize.height-this.state.cropSize.height)>1e-6)){let t=this.state.cropSize.width/this.previousCropSize.width,e=this.state.cropSize.height/this.previousCropSize.height;r={x:this.props.crop.x*t,y:this.props.crop.y*e}}let o=this.props.restrictPosition?s(r,this.mediaSize,this.state.cropSize,this.props.zoom,this.props.rotation):r;this.previousCropSize=this.state.cropSize,this.props.onCropChange(o),t?this.debouncedEmitCropData():this.emitCropData()},this.debouncedEmitCropData=()=>{this.currentWindow&&(this.resizeEmitTimer&&clearTimeout(this.resizeEmitTimer),this.resizeEmitTimer=this.currentWindow.setTimeout(()=>{this.emitCropData()},250))},this.onKeyDown=t=>{let{crop:e,onCropChange:i,keyboardStep:r,zoom:o,rotation:a}=this.props,h=r;if(!this.state.cropSize)return;t.shiftKey&&(h*=.2);let c=n({},e);switch(t.key){case"ArrowUp":c.y-=h,t.preventDefault();break;case"ArrowDown":c.y+=h,t.preventDefault();break;case"ArrowLeft":c.x-=h,t.preventDefault();break;case"ArrowRight":c.x+=h,t.preventDefault();break;default:return}if(this.props.restrictPosition&&(c=s(c,this.mediaSize,this.state.cropSize,o,a)),!t.repeat){var l,p;null==(l=(p=this.props).onInteractionStart)||l.call(p,{source:"keyboard"})}i(c)},this.onKeyUp=t=>{var e,i;switch(t.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":t.preventDefault();break;default:return}this.emitCropData(),null==(e=(i=this.props).onInteractionEnd)||e.call(i,{source:"keyboard"})}}componentDidMount(){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.onWindowResize),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 max-width: unset; /* prevent global img/video reset rules from constraining the cropper media */\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))}componentWillUnmount(){var t,e;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.onWindowResize),null==(t=this.resizeObserver)||t.disconnect(),this.resizeEmitTimer&&clearTimeout(this.resizeEmitTimer),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null==(e=this.styleRef.parentNode)||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())}componentDidUpdate(t){var e,i,r,o,n,s,a,h,c;t.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):t.aspect!==this.props.aspect||t.objectFit!==this.props.objectFit?this.computeSizes():t.zoom!==this.props.zoom?this.recomputeCropPosition():(null==(e=t.cropSize)?void 0:e.height)!==(null==(i=this.props.cropSize)?void 0:i.height)||(null==(r=t.cropSize)?void 0:r.width)!==(null==(o=this.props.cropSize)?void 0:o.width)?this.computeSizes():((null==(n=t.crop)?void 0:n.x)!==(null==(s=this.props.crop)?void 0:s.x)||(null==(a=t.crop)?void 0:a.y)!==(null==(h=this.props.crop)?void 0:h.y))&&this.emitCropAreaChange(),t.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),t.video!==this.props.video&&(null==(c=this.videoRef.current)||c.load());let l=this.getObjectFit();l!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:l},this.computeSizes)}getAspect(){let{cropSize:t,aspect:e}=this.props;return t?t.width/t.height:e}getObjectFit(){if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){var t,e,i,r;this.containerRect=this.containerRef.getBoundingClientRect();let o=this.containerRect.width/this.containerRect.height;return((null==(t=this.imageRef.current)?void 0:t.naturalWidth)||(null==(e=this.videoRef.current)?void 0:e.videoWidth)||0)/((null==(i=this.imageRef.current)?void 0:i.naturalHeight)||(null==(r=this.videoRef.current)?void 0:r.videoHeight)||0)<o?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit}onPinchStart(e){let i=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=h(i,r),this.lastPinchRotation=c(i,r),this.onDragStart(u(i,r),"touch")}onPinchMove(e){if(!this.currentDoc||!this.currentWindow)return;let i=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),o=u(i,r);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(()=>{let t=h(i,r),e=this.props.zoom*(t/this.lastPinchDistance);this.setNewZoom(e,o,{shouldUpdatePosition:!1}),this.lastPinchDistance=t;let n=c(i,r),s=this.props.rotation+(n-this.lastPinchRotation);this.props.onRotationChange&&this.props.onRotationChange(s),this.lastPinchRotation=n})}render(){var t;let{image:i,video:r,mediaProps:o,cropperProps:s,transform:a,crop:{x:h,y:c},rotation:l,zoom:p,cropShape:u,showGrid:d,roundCropAreaPixels:m,style:{containerStyle:g,cropAreaStyle:v,mediaStyle:w},classes:{containerClassName:b,cropAreaClassName:C,mediaClassName:S}}=this.props,y=null!=(t=this.state.mediaObjectFit)?t:this.getObjectFit();return e.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:t=>this.containerRef=t,"data-testid":"container",style:g,className:f("reactEasyCrop_Container",b)},i?e.createElement("img",n(n({alt:"",className:f("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical",S)},o),{},{src:i,ref:this.imageRef,style:n(n({},w),{},{transform:a||`translate(${h}px, ${c}px) rotate(${l}deg) scale(${p})`}),onLoad:this.onMediaLoad}
1)):r&&e.createElement("video",n(n({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:f("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical",S)},o),{},{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:n(n({},w),{},{transform:a||`translate(${h}px, ${c}px) rotate(${l}deg) scale(${p})`}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map(t=>e.createElement("source",n({key:t.src},t)))),this.state.cropSize&&e.createElement("div",n({ref:this.cropperRef,style:n(n({},v),{},{width:m?Math.round(this.state.cropSize.width):this.state.cropSize.width,height:m?Math.round(this.state.cropSize.height):this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:f("reactEasyCrop_CropArea","round"===u&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",C)},s)))}};g.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},g.getMousePoint=t=>({x:Number(t.clientX),y:Number(t.clientY)}),g.getTouchPoint=t=>({x:Number(t.clientX),y:Number(t.clientY)}),t.s(["default",0,g])}]);
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.