{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/tzo10ZXmmHvNbI1ilcIG/gEvIQtUCIa7VqMNRCq8J/pathTraceSection.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useRef,useEffect,useState}from\"react\";export function SVGPathTracer(props){const svgRef=useRef(null);const[pathLength,setPathLength]=useState(0);const[svgAttributes,setSvgAttributes]=useState({});const[pathData,setPathData]=useState(\"\");useEffect(()=>{if(props.svgString&&svgRef.current){const parser=new DOMParser;const svgDoc=parser.parseFromString(props.svgString,\"image/svg+xml\");const svgElement=svgDoc.documentElement;const path=svgElement.querySelector(\"path\");if(path){setPathData(path.getAttribute(\"d\")||\"\");const attributes={};Array.from(svgElement.attributes).forEach(attr=>{attributes[attr.name]=attr.value;});setSvgAttributes(attributes);const length=path.getTotalLength();setPathLength(length);}}},[props.svgString]);const getAnimationCSS=()=>{if(props.animationType===\"stop\")return\"\";const duration=props.duration/1e3// Convert to seconds\n;const delay=props.delay/1e3// Convert to seconds\n;const sectionLength=props.sectionLength/100*pathLength;switch(props.animationType){case\"once\":return`\n          @keyframes drawPath {\n            0% {\n              stroke-dasharray: ${sectionLength} ${pathLength};\n              stroke-dashoffset: ${pathLength};\n            }\n            ${((pathLength-sectionLength)/pathLength*100).toFixed(2)}% {\n              stroke-dasharray: ${sectionLength} ${pathLength};\n              stroke-dashoffset: ${sectionLength};\n            }\n            100% {\n              stroke-dasharray: 0.1 ${pathLength};\n              stroke-dashoffset: 0;\n            }\n          }\n          .animated-path {\n            animation: drawPath ${duration}s linear forwards;\n          }\n        `;case\"looped\":return`\n          @keyframes drawPath {\n            to {\n              stroke-dashoffset: 0;\n            }\n          }\n          .animated-path {\n            animation: drawPath ${duration}s linear infinite;\n            animation-delay: ${delay}s;\n          }\n        `;case\"mirrored\":return`\n          @keyframes drawPath {\n            0%, 100% {\n              stroke-dashoffset: ${pathLength};\n            }\n            50% {\n              stroke-dashoffset: ${sectionLength};\n            }\n          }\n          .animated-path {\n            animation: drawPath ${duration*2}s linear infinite;\n            animation-delay: ${delay}s;\n          }\n        `;}};const sectionLength=props.sectionLength/100*pathLength;const getPathStyle=()=>{if(props.animationType===\"stop\"){return{strokeDasharray:`${pathLength} ${pathLength}`,strokeDashoffset:pathLength,visibility:\"hidden\"};}else if(props.animationType===\"once\"){return{strokeDasharray:`${sectionLength} ${pathLength}`,strokeDashoffset:pathLength};}else{return{strokeDasharray:`${sectionLength} ${pathLength-sectionLength}`,strokeDashoffset:pathLength};}};return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},children:/*#__PURE__*/_jsxs(\"svg\",{...svgAttributes,ref:svgRef,children:[/*#__PURE__*/_jsx(\"style\",{children:getAnimationCSS()}),/*#__PURE__*/_jsx(\"g\",{dangerouslySetInnerHTML:{__html:props.svgString}}),/*#__PURE__*/_jsx(\"path\",{className:\"animated-path\",d:pathData,stroke:props.color,strokeWidth:props.strokeWidth,strokeLinecap:props.endType,strokeLinejoin:props.endType,fill:\"none\",style:getPathStyle()})]})});}// ... (rest of the code remains the same)\naddPropertyControls(SVGPathTracer,{svgString:{type:ControlType.String,title:\"SVG String\"},color:{type:ControlType.Color,defaultValue:\"#00BCE5\",title:\"Moving Section Color\"},strokeWidth:{type:ControlType.Number,min:1,max:50,step:1,defaultValue:18,title:\"Stroke Width\"},sectionLength:{type:ControlType.Number,min:1,max:100,step:1,defaultValue:20,title:\"Moving Section Length (%)\"},duration:{type:ControlType.Number,min:100,max:2e4,step:100,defaultValue:5e3,title:\"Animation Duration (milliseconds)\"},endType:{type:ControlType.Enum,options:[\"round\",\"butt\"],defaultValue:\"round\",title:\"Section End Type\"},animationType:{type:ControlType.Enum,options:[\"once\",\"looped\",\"mirrored\",\"stop\"],defaultValue:\"looped\",title:\"Animation Type\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"SVGPathTracer\":{\"type\":\"reactComponent\",\"name\":\"SVGPathTracer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./pathTraceSection.map"],
  "mappings": "yJAAAA,IAAiK,SAASC,EAAcC,EAAM,CAAC,IAAMC,EAAOC,EAAO,IAAI,EAAO,CAACC,EAAWC,CAAa,EAAEC,EAAS,CAAC,EAAO,CAACC,EAAcC,CAAgB,EAAEF,EAAS,CAAC,CAAC,EAAO,CAACG,EAASC,CAAW,EAAEJ,EAAS,EAAE,EAAEK,EAAU,IAAI,CAAC,GAAGV,EAAM,WAAWC,EAAO,QAAQ,CAAiG,IAAMU,EAAzF,IAAI,YAA8B,gBAAgBX,EAAM,UAAU,eAAe,EAA0B,gBAAsBY,EAAKD,EAAW,cAAc,MAAM,EAAE,GAAGC,EAAK,CAACH,EAAYG,EAAK,aAAa,GAAG,GAAG,EAAE,EAAE,IAAMC,EAAW,CAAC,EAAE,MAAM,KAAKF,EAAW,UAAU,EAAE,QAAQG,GAAM,CAACD,EAAWC,EAAK,IAAI,EAAEA,EAAK,KAAM,CAAC,EAAEP,EAAiBM,CAAU,EAAE,IAAME,EAAOH,EAAK,eAAe,EAAER,EAAcW,CAAM,GAAI,EAAE,CAACf,EAAM,SAAS,CAAC,EAAE,IAAMgB,EAAgB,IAAI,CAAC,GAAGhB,EAAM,gBAAgB,OAAO,MAAM,GAAG,IAAMiB,EAASjB,EAAM,SAAS,IAC16BkB,EAAMlB,EAAM,MAAM,IAClBmB,EAAcnB,EAAM,cAAc,IAAIG,EAAW,OAAOH,EAAM,cAAc,CAAC,IAAI,OAAO,MAAM;AAAA;AAAA;AAAA,kCAGnEmB,KAAiBhB;AAAA,mCAChBA;AAAA;AAAA,gBAEnBA,EAAWgB,GAAehB,EAAW,KAAK,QAAQ,CAAC;AAAA,kCACjCgB,KAAiBhB;AAAA,mCAChBgB;AAAA;AAAA;AAAA,sCAGGhB;AA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AM,sBAAsB,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,aAAa,GAAG,MAAM,cAAc,EAAE,cAAc,CAAC,KAAKA,EAAY,OAAO,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,aAAa,GAAG,MAAM,2BAA2B,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,aAAa,IAAI,MAAM,mCAAmC,EAAE,QAAQ,CAAC,KAAKA,EAAY,KAAK,QAAQ,CAAC,QAAQ,MAAM,EAAE,aAAa,QAAQ,MAAM,kBAAkB,EAAE,cAAc,CAAC,KAAKA,EAAY,KAAK,QAAQ,CAAC,OAAO,SAAS,WAAW,MAAM,EAAE,aAAa,SAAS,MAAM,gBAAgB,CAAC,CAAC",
  "names": ["init_ssg_sandbox_shims", "SVGPathTracer", "props", "svgRef", "pe", "pathLength", "setPathLength", "ye", "svgAttributes", "setSvgAttributes", "pathData", "setPathData", "ue", "svgElement", "path", "attributes", "attr", "length", "getAnimationCSS", "duration", "delay", "sectionLength", "getPathStyle", "p", "u", "addPropertyControls", "ControlType"]
}
