{"version":3,"file":"KeyProfile.BfzcdVbE.mjs","names":["useRef","useState","useMemo"],"sources":["https:/framerusercontent.com/modules/8fRMWtUr4BVhlDkXVc6E/FiSYhKRUh3Fz2J90NmEq/KeyProfile.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useReducedMotion}from\"framer-motion\";import{useEffect,useMemo,useRef,useState,startTransition}from\"react\";const DEPTHS=[3,6,2,5,7,4,1,6,3,5,2,7,4,6,1,5,3,7,2,6,4,1,5,3];function bladePath(width,cuts){// blade drawn in pixel units: straight spine on top, bitting cuts along the bottom, pointed tip on the right\nconst w=Math.max(120,width);const top=8;const bottom=32;const bladeEnd=w-28;const usable=bladeEnd-24;const count=Math.max(3,Math.min(cuts,Math.floor(usable/44)));const step=usable/count;let d=`M 0 ${top} L ${bladeEnd} ${top} L ${w-1} 20 L ${bladeEnd} ${bottom}`;for(let i=0;i<count;i++){const right=bladeEnd-i*step;const land=step*.34;const depth=bottom-3-DEPTHS[i%DEPTHS.length]*2;const mid=right-land-(step-land)/2;d+=` L ${right-land} ${bottom} L ${mid} ${depth} L ${right-step} ${bottom}`;}d+=` L 0 ${bottom}`;return d;}/**\r\n * Key Profile Line\r\n *\r\n * @framerIntrinsicWidth 1200\r\n * @framerIntrinsicHeight 40\r\n *\r\n * @framerSupportedLayoutWidth any-prefer-fixed\r\n * @framerSupportedLayoutHeight any-prefer-fixed\r\n */export default function KeyProfile(props){const{color=\"#C8962E\",strokeWidth=1.25,cuts=28,showBow=true,drawIn=true,style}=props;const isStatic=useIsStaticRenderer();const reduce=useReducedMotion();const bladeRef=useRef(null);const[bw,setBw]=useState(1100);useEffect(()=>{const el=bladeRef.current;if(!el||typeof ResizeObserver===\"undefined\")return;const ro=new ResizeObserver(entries=>{const next=Math.round(entries[0].contentRect.width);if(next>0)startTransition(()=>setBw(next));});ro.observe(el);return()=>ro.disconnect();},[]);const d=useMemo(()=>bladePath(bw,Math.max(4,Math.min(40,Math.round(cuts)))),[bw,cuts]);const animate=drawIn&&!isStatic&&!reduce;const stroke={fill:\"none\",stroke:color,strokeWidth,strokeLinejoin:\"miter\"};return /*#__PURE__*/_jsxs(\"div\",{role:\"presentation\",\"aria-hidden\":\"true\",style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",minHeight:24,display:\"flex\",alignItems:\"center\",gap:0,overflow:\"hidden\"},children:[showBow&&/*#__PURE__*/_jsxs(\"svg\",{width:\"46\",height:\"40\",viewBox:\"0 0 46 40\",style:{flex:\"0 0 auto\",display:\"block\"},children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"19\",cy:\"20\",r:\"17\",...stroke}),/*#__PURE__*/_jsx(\"circle\",{cx:\"11\",cy:\"20\",r:\"4\",...stroke}),/*#__PURE__*/_jsx(\"path\",{d:\"M 36 12 L 46 12 M 36 28 L 46 28 M 40 12 L 40 28\",...stroke})]}),/*#__PURE__*/_jsx(\"div\",{ref:bladeRef,style:{flex:\"1 1 0\",minWidth:0,height:40},children:/*#__PURE__*/_jsx(\"svg\",{width:bw,height:40,viewBox:`0 0 ${bw} 40`,style:{display:\"block\",overflow:\"visible\",maxWidth:\"100%\"},children:animate?/*#__PURE__*/_jsx(motion.path,{d:d,...stroke,initial:{pathLength:0},whileInView:{pathLength:1},viewport:{once:true,amount:.6},transition:{duration:1.8,ease:[.22,1,.36,1]}},bw):/*#__PURE__*/_jsx(\"path\",{d:d,...stroke})})})]});}addPropertyControls(KeyProfile,{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#C8962E\"},strokeWidth:{type:ControlType.Number,title:\"Stroke\",defaultValue:1.25,min:.5,max:4,step:.25,unit:\"px\"},cuts:{type:ControlType.Number,title:\"Cuts\",defaultValue:28,min:4,max:40,step:1},showBow:{type:ControlType.Boolean,title:\"Bow\",defaultValue:true},drawIn:{type:ControlType.Boolean,title:\"Draw In\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KeyProfile\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"40\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"1200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./KeyProfile.map"],"mappings":"6QAAwT,SAAS,EAAU,EAAM,EAAK,CACtV,IAAM,EAAE,KAAK,IAAI,IAAI,CAAK,EAAoC,EAAS,EAAE,GAAS,EAAO,EAAS,GAAS,EAAM,KAAK,IAAI,EAAE,KAAK,IAAI,EAAK,KAAK,MAAM,EAAO,EAAE,CAAC,CAAC,EAAQ,EAAK,EAAO,EAAU,EAAE,WAAgB,EAAS,OAAY,EAAE,EAAE,QAAQ,EAAS,KAAY,IAAI,IAAI,EAAE,EAAE,EAAE,EAAM,IAAI,CAAC,IAAM,EAAM,EAAS,EAAE,EAAW,EAAK,EAAK,IAAU,EAAM,GAAS,EAAO,EAAE,EAAO,QAAQ,EAAQ,EAAI,EAAM,GAAM,EAAK,GAAM,EAAE,GAAG,MAAM,EAAM,EAAK,QAAe,EAAI,GAAG,EAAM,KAAK,EAAM,EAAK,IAAY,CAAqB,MAApB,IAAG,UAAwB,CAAE,CAQxgB,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,UAAU,cAAY,KAAK,OAAK,GAAG,UAAQ,GAAK,SAAO,GAAK,SAAO,EAAY,EAAS,EAAoB,EAAQ,EAAO,EAAiB,EAAQ,EAASA,EAAO,IAAI,EAAO,CAAC,EAAG,GAAOC,EAAS,IAAI,EAAE,MAAc,CAAC,IAAM,EAAG,EAAS,QAAQ,GAAG,CAAC,GAAI,OAAO,eAAiB,IAAY,OAAO,IAAM,EAAG,IAAI,eAAe,GAAS,CAAC,IAAM,EAAK,KAAK,MAAM,EAAQ,EAAE,CAAC,YAAY,KAAK,EA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