{"version":3,"file":"SmallEngineMotion.DhkHTiQH.mjs","names":["React.useId","React.useRef","React.useState"],"sources":["https:/framerusercontent.com/modules/DBd7ElHSdSn2TOtVJI7g/mRwEVZNcKKg33wi3SF0h/SmallEngineMotion.js"],"sourcesContent":["/**\n * Small Engine — three-piece hero animation.\n * Paste this whole file into a Framer Code Component.\n * Transparent background; exact geometry simplified from the supplied SVG.\n * The Framer canvas/export, reduced-motion preference and mobile are static.\n * Preview the page to see motion. No external assets or animation packages.\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 420\n * @framerIntrinsicHeight 380\n */export default function SmallEngineMotion({surface=\"dark\",bodyColor=\"#FFFFFF\",accentColor=\"#CC0000\",cycle=12,markScale=.9,animate=true,staticOnMobile=true,opacity=.9,style}){const isStaticRenderer=useIsStaticRenderer();const id=`se${React.useId().replace(/[^a-zA-Z0-9]/g,\"\")}`;const root=React.useRef(null);const[visible,setVisible]=React.useState(true);const[pageVisible,setPageVisible]=React.useState(true);// Pause when offscreen or in a background tab.\nReact.useEffect(()=>{const element=root.current;if(!element||typeof IntersectionObserver===\"undefined\")return;const observer=new IntersectionObserver(([entry])=>setVisible(entry.isIntersecting),{threshold:0});observer.observe(element);return()=>observer.disconnect();},[]);React.useEffect(()=>{const update=()=>setPageVisible(!document.hidden);update();document.addEventListener(\"visibilitychange\",update);return()=>document.removeEventListener(\"visibilitychange\",update);},[]);const ink=surface===\"dark\"?\"#FFFFFF\":surface===\"light\"?\"#302E39\":bodyColor;const enabled=animate&&!isStaticRenderer;const duration=Math.max(6,Math.min(30,cycle));const scale=Math.max(.4,Math.min(1,markScale));const frozen=`#${id} .se-piece { animation: none !important; transform: none !important; opacity: 1 !important; }`;return /*#__PURE__*/_jsxs(\"div\",{ref:root,id:id,\"aria-hidden\":\"true\",style:{width:\"100%\",height:\"100%\",...style,pointerEvents:\"none\",overflow:\"hidden\",background:\"transparent\",opacity},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                #${id} .se-piece {\n                    transform-box: fill-box;\n                    transform-origin: center;\n                    animation-duration: ${duration}s;\n                    animation-timing-function: cubic-bezier(.45, 0, .2, 1);\n                    animation-iteration-count: infinite;\n                    animation-play-state: ${visible&&pageVisible?\"running\":\"paused\"};\n                }\n                #${id} .se-upper { animation-name: ${id}Upper; }\n                #${id} .se-lower { animation-name: ${id}Lower; }\n                #${id} .se-signal { animation-name: ${id}Signal; }\n\n                @keyframes ${id}Upper {\n                    0%, 18%, 52%, 100% { transform: translate(0px, 0px) rotate(0deg); }\n                    34% { transform: translate(-5px, -4px) rotate(-10deg); }\n                }\n                @keyframes ${id}Lower {\n                    0%, 18%, 52%, 100% { transform: translate(0px, 0px) rotate(0deg); }\n                    34% { transform: translate(-5px, 4px) rotate(10deg); }\n                }\n                @keyframes ${id}Signal {\n                    0%, 18%, 76%, 100% { transform: translate(0px, 0px) scale(1); opacity: 1; }\n                    32% { transform: translate(8px, 0px) scale(.7); opacity: 0; }\n                    33% { transform: translate(-15px, 0px) scale(.16); opacity: 0; }\n                    44%, 52% { transform: translate(-15px, 0px) scale(.16); opacity: 1; }\n                }\n                ${!enabled?frozen:\"\"}\n                @media (prefers-reduced-motion: reduce) { ${frozen} }\n                ${staticOnMobile?`@media (max-width: 767px) { ${frozen} }`:\"\"}\n            `}),/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"-6 -7.5 48 50\",width:\"100%\",height:\"100%\",preserveAspectRatio:\"xMidYMid meet\",focusable:\"false\",style:{display:\"block\"},children:/*#__PURE__*/_jsxs(\"g\",{transform:`translate(18 17.5) scale(${scale}) translate(-18 -17.5)`,children:[/*#__PURE__*/_jsx(\"polygon\",{className:\"se-piece se-upper\",fill:ink,points:\"4.519531,17.097656 12.472656,6.171875 25.910156,4.75 17.960938,15.675781\"}),/*#__PURE__*/_jsx(\"polygon\",{className:\"se-piece se-lower\",fill:ink,points:\"4.792969,17.929688 12.746094,28.855469 26.183594,30.277344 18.234375,19.347656\"}),/*#__PURE__*/_jsx(\"polygon\",{className:\"se-piece se-signal\",fill:accentColor,points:\"26.523438,5.164062 32.011719,17.511719 26.523438,29.863281 21.035156,17.511719\"})]})})]});}addPropertyControls(SmallEngineMotion,{surface:{type:ControlType.Enum,title:\"Background\",options:[\"dark\",\"light\",\"custom\"],optionTitles:[\"On dark\",\"On light\",\"Custom\"],defaultValue:\"dark\",description:\"Chooses mark colour. The component itself stays transparent.\"},bodyColor:{type:ControlType.Color,title:\"Mark colour\",defaultValue:\"#FFFFFF\",hidden:props=>props.surface!==\"custom\"},accentColor:{type:ControlType.Color,title:\"Signal colour\",defaultValue:\"#CC0000\"},cycle:{type:ControlType.Number,title:\"Cycle\",min:6,max:30,step:1,unit:\"s\",defaultValue:12},markScale:{type:ControlType.Number,title:\"Mark scale\",min:.4,max:1,step:.01,defaultValue:.9},opacity:{type:ControlType.Number,title:\"Opacity\",min:.1,max:1,step:.05,defaultValue:.9},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:true},staticOnMobile:{type:ControlType.Boolean,title:\"Static mobile\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SmallEngineMotion\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"380\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"420\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmallEngineMotion.map"],"mappings":"8MAWG,SAAwB,EAAkB,CAAC,UAAQ,OAAO,YAAU,UAAU,cAAY,UAAU,QAAM,GAAG,YAAU,GAAG,UAAQ,GAAK,iBAAe,GAAK,UAAQ,GAAG,SAAO,CAAC,IAAM,E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