{"version":3,"file":"ScrollProgress.CXpPEF7P.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Qn5au7kp4FJQ61N5ZOQQ/zDy0SPgjrHF2ovpgmfq6/ScrollProgress.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useScroll,useSpring}from\"framer-motion\";/**\n * Scroll Progress\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 10\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ScrollProgress(props){const{trackColor,indicatorColor,borderRadius,alignment,inset,isFixed,zIndex}=props;const{scrollYProgress}=useScroll();const scaleX=useSpring(scrollYProgress,{stiffness:100,damping:30,restDelta:.001});const isHorizontal=true// Simplified as per prompt request for horizontal line\n;// Determine origin for scaling based on alignment\nlet originX=0;if(isHorizontal){if(alignment===\"center\")originX=.5;else if(alignment===\"end\")originX=1;}const containerStyle={width:\"100%\",height:\"100%\",minHeight:5,backgroundColor:trackColor,borderRadius:borderRadius,overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:alignment===\"start\"?\"flex-start\":alignment===\"end\"?\"flex-end\":\"center\",padding:inset};if(isFixed){Object.assign(containerStyle,{position:\"fixed\",top:0,left:0,right:0,zIndex:zIndex});}return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",backgroundColor:indicatorColor,borderRadius:Math.max(0,borderRadius-inset),scaleX,originX}})});}addPropertyControls(ScrollProgress,{isFixed:{type:ControlType.Boolean,title:\"Fixed Top\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},zIndex:{type:ControlType.Number,title:\"Z-Index\",defaultValue:999,min:0,hidden:props=>!props.isFixed},trackColor:{type:ControlType.Color,title:\"Track\",defaultValue:\"rgba(0,0,0,0.1)\"},indicatorColor:{type:ControlType.Color,title:\"Indicator\",defaultValue:\"#0099FF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:5,min:0,max:100},inset:{type:ControlType.Number,title:\"Inset\",defaultValue:0,min:0,max:20,displayStepper:true},alignment:{type:ControlType.Enum,title:\"Origin\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"start\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollProgress\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"10\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollProgress.map"],"mappings":"2NAQG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,iBAAe,eAAa,YAAU,QAAM,UAAQ,UAAQ,EAAW,CAAC,mBAAiB,EAAU,EAAQ,EAAO,EAAU,EAAgB,CAAC,UAAU,IAAI,QAAQ,GAAG,UAAU,IAAI,CAAC,EAEnP,EAAQ,EAAsB,IAAY,SAAS,EAAQ,GAAW,IAAY,QAAM,EAAQ,GAAG,IAAM,EAAe,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,EAAE,gBAAgB,EAAwB,eAAa,SAAS,SAAS,QAAQ,OAAO,WAAW,SAAS,eAAe,IAAY,QAAQ,aAAa,IAAY,MAAM,WAAW,SAAS,QAAQ,CAAK,EAAmG,OAA9F,GAAS,OAAO,OAAO,EAAe,CAAC,SAAS,QAAQ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAS,QAAM,CAAC,EAAuB,EAAK,MAAM,CAAC,MAAM,EAAe,SAAsB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,gBAAgB,EAAe,aAAa,KAAK,IAAI,EAAE,EAAa,CAAK,EAAE,SAAO,SAA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