{"version":3,"file":"FloatingHeroImage.cMyLl0Mu.mjs","names":["React.useMemo","_Fragment"],"sources":["https:/framerusercontent.com/modules/5ejeQcgyl3pBwyWoLyOV/izK0IX14kF3n5nB1cQnE/FloatingHeroImage.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function FloatingHeroImage(props){const{image,overlay,borderRadius,fit,duration,speed,scaleFrom,scaleTo,moveX,moveY,motionStyle,alternate,paused}=props;const animationName=React.useMemo(()=>`floatingHero_${Math.random().toString(36).slice(2,10)}`,[]);const motionInset=Math.max(Math.abs(moveX),Math.abs(moveY))+32;const computedDuration=Math.max(1,duration/Math.max(speed,.1));const animationTimingFunction=\"ease-in-out\";const keyframes=motionStyle===\"pan\"?`\n                0% {\n                    transform: translate3d(0px, 0px, 0px) scale(${scaleFrom});\n                }\n                100% {\n                    transform: translate3d(${moveX}px, ${moveY}px, 0px) scale(${scaleFrom});\n                }\n            `:motionStyle===\"breathing\"?`\n                0% {\n                    transform: translate3d(0px, 0px, 0px) scale(${scaleFrom});\n                }\n                50% {\n                    transform: translate3d(${moveX}px, ${moveY}px, 0px) scale(${scaleTo});\n                }\n                100% {\n                    transform: translate3d(${moveX*.35}px, ${-moveY*.35}px, 0px) scale(${scaleFrom});\n                }\n            `:`\n                0% {\n                    transform: translate3d(0px, 0px, 0px) scale(${scaleFrom});\n                }\n                100% {\n                    transform: translate3d(${moveX}px, ${moveY}px, 0px) scale(${scaleTo});\n                }\n            `;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    @keyframes ${animationName} {\n                        ${keyframes}\n                    }\n                `}),/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",borderRadius,background:\"#111111\"},children:[image?.src?/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:-motionInset,animationName,animationDuration:`${computedDuration}s`,animationTimingFunction,animationIterationCount:\"infinite\",animationDirection:alternate?\"alternate\":\"normal\",animationPlayState:paused?\"paused\":\"running\",willChange:\"transform\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:\"\",style:{width:\"100%\",height:\"100%\",display:\"block\",objectFit:fit,pointerEvents:\"none\",userSelect:\"none\"}})}):null,/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:overlay,pointerEvents:\"none\"}})]})]});}FloatingHeroImage.defaultProps={overlay:\"linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.36) 100%)\",borderRadius:0,fit:\"cover\",duration:20,speed:1,scaleFrom:1,scaleTo:1.18,moveX:-28,moveY:16,motionStyle:\"pan-zoom\",alternate:false,paused:false};addPropertyControls(FloatingHeroImage,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},fit:{type:ControlType.Enum,title:\"Fit\",defaultValue:\"cover\",options:[\"cover\",\"contain\"],optionTitles:[\"Cover\",\"Contain\"]},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:20,min:2,max:160,step:1,unit:\"s\"},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.25,max:4,step:.05},scaleFrom:{type:ControlType.Number,title:\"Scale From\",defaultValue:1,min:.8,max:2,step:.01},scaleTo:{type:ControlType.Number,title:\"Scale To\",defaultValue:1.18,min:.8,max:2.4,step:.01},moveX:{type:ControlType.Number,title:\"Move X\",defaultValue:-28,min:-120,max:120,step:1},moveY:{type:ControlType.Number,title:\"Move Y\",defaultValue:16,min:-120,max:120,step:1},motionStyle:{type:ControlType.Enum,title:\"Motion\",defaultValue:\"pan-zoom\",options:[\"pan\",\"pan-zoom\",\"breathing\"],optionTitles:[\"Pan\",\"Pan + Zoom\",\"Breathing\"]},alternate:{type:ControlType.Boolean,title:\"Alternate\",defaultValue:false},paused:{type:ControlType.Boolean,title:\"Paused\",defaultValue:false},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:80,step:1},overlay:{type:ControlType.String,title:\"Overlay\",defaultValue:\"linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.36) 100%)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FloatingHeroImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FloatingHeroImage.map"],"mappings":"wLAA+J,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,QAAM,UAAQ,eAAa,MAAI,WAAS,QAAM,YAAU,UAAQ,QAAM,QAAM,cAAY,YAAU,UAAQ,EAAY,EAAcA,MAAkB,gBAAgB,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC,CAAO,EAAY,KAAK,IAAI,KAAK,IAAI,EAAM,CAAC,KAAK,IAAI,EAAM,CAAC,CAAC,GAAS,EAAiB,KAAK,IAAI,EAAE,EAAS,KAAK,IAAI,EAAM,GAAG,CAAC,CAwBxhB,OAAoB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS;iCAChE,EAAc;0BAzBojB,IAAc,MAAM;;kEAErjB,EAAU;;;6CAG/B,EAAM,MAAM,EAAM,iBAAiB,EAAU;;cAE5E,IAAc,YAAY;;kEAE0B,EAAU;;;6CAG/B,EAAM,MAAM,EAAM,iBAAiB,EAAQ;;;6CAG3C,EAAM,IAAI,MAAM,CAAC,EAAM,IAAI,iBAAiB,EAAU;;cAErF;;kEAEoD,EAAU;;;6CAG/B,EAAM,MAAM,EAAM,iBAAiB,EAAQ;;cAIpD;;kBAElB,CAAC,CAAc,EAAM,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,SAAS,WAAW,SAAS,SAAS,eAAa,WAAW,UAAU,CAAC,SAAS,CA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