{"version":3,"file":"Scroll_progress_bar.BLdychHl.mjs","names":["React.forwardRef"],"sources":["https:/framerusercontent.com/modules/0WMAYsSVA8g53C8sT5KU/C04DKmptPpsEvu2NUh3O/TAkhVaEYf.js","https:/framerusercontent.com/modules/HvNHO2ScTr7HQzwUcSD4/gaG4psyF6bVtRqiDYWmW/Scroll_progress_bar.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 19.888 14.92 L 19.888 17.92 C 19.89 18.483 19.655 19.021 19.24 19.402 C 18.825 19.783 18.269 19.971 17.708 19.92 C 14.631 19.586 11.675 18.534 9.078 16.85 C 6.662 15.315 4.613 13.266 3.078 10.85 C 1.388 8.241 0.336 5.271 0.008 2.18 C -0.042 1.621 0.144 1.066 0.523 0.652 C 0.901 0.237 1.437 0.001 1.998 0 L 4.998 0 C 6.002 -0.01 6.858 0.726 6.998 1.72 C 7.125 2.68 7.36 3.623 7.698 4.53 C 7.973 5.261 7.797 6.085 7.248 6.64 L 5.978 7.91 C 7.402 10.414 9.475 12.487 11.978 13.91 L 13.248 12.64 C 13.803 12.091 14.627 11.915 15.358 12.19 C 16.265 12.529 17.208 12.763 18.168 12.89 C 19.174 13.032 19.913 13.905 19.888 14.92 Z\" fill=\"transparent\" height=\"19.928223630904675px\" id=\"tCa4p16mC\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" stroke=\"var(--43q7um, rgb(0,0,0))\" transform=\"translate(2.112 2)\" width=\"19.888748287219748px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({height,id,stroke,width,...props})=>{return{...props,UO5clYVeQ:stroke??props.UO5clYVeQ??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,UO5clYVeQ,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-rNbLA\",className),layoutId:layoutId,ref:ref,style:{\"--43q7um\":UO5clYVeQ,...style}});});const css=[`.framer-rNbLA { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--43q7um); mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"UO5clYVeQ\":\"stroke\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Phone\",\"color\":{\"type\":\"variable\",\"value\":\"43q7um\"},\"set\":{\"localId\":\"vectorSet/T8qKXkLfy\",\"id\":\"T8qKXkLfy\",\"moduleId\":\"fiHEoJwBMFnT6QLOcpPz\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-rNbLA\");Icon.displayName=\"Phone\";export default Icon;addPropertyControls(Icon,{UO5clYVeQ:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Stroke\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerVariables\":\"{\\\"UO5clYVeQ\\\":\\\"stroke\\\"}\",\"framerImmutableVariables\":\"true\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"24\",\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerDisableUnlink\":\"true\",\"framerVector\":\"{\\\"name\\\":\\\"Phone\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"43q7um\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/T8qKXkLfy\\\",\\\"id\\\":\\\"T8qKXkLfy\\\",\\\"moduleId\\\":\\\"fiHEoJwBMFnT6QLOcpPz\\\"}}\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// ScrollProgressBar.tsx\n// @framerSupportedLayoutWidth auto\n// @framerSupportedLayoutHeight auto\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{motion,useMotionValue}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function ScrollProgressBar({thickness,color,orientation,hPosition,vPosition}){const progress=useMotionValue(0);React.useEffect(()=>{const update=()=>{const doc=document.documentElement;const body=document.body;const scrollHeight=Math.max(body.scrollHeight,doc.scrollHeight,body.offsetHeight,doc.offsetHeight,body.clientHeight,doc.clientHeight);const viewport=doc.clientHeight;const max=Math.max(scrollHeight-viewport,1);const y=window.pageYOffset||doc.scrollTop||body.scrollTop||0;progress.set(Math.min(Math.max(y/max,0),1));};update();window.addEventListener(\"scroll\",update,{passive:true});window.addEventListener(\"resize\",update);return()=>{window.removeEventListener(\"scroll\",update);window.removeEventListener(\"resize\",update);};},[progress]);const t=Math.max(thickness,1);// Container style (fixed, full-page)\nconst container={position:\"fixed\",zIndex:9999,pointerEvents:\"none\"};let barStyle;if(orientation===\"horizontal\"){Object.assign(container,{left:0,right:0,height:t,top:hPosition===\"top\"?0:undefined,bottom:hPosition===\"bottom\"?0:undefined});barStyle={height:\"100%\",width:\"100%\",background:color,scaleX:progress,transformOrigin:\"0% 50%\",willChange:\"transform\"};}else{Object.assign(container,{top:0,bottom:0,width:t,left:vPosition===\"left\"?0:undefined,right:vPosition===\"right\"?0:undefined});barStyle={width:\"100%\",height:\"100%\",background:color,scaleY:progress,transformOrigin:\"50% 0%\",willChange:\"transform\"};}return /*#__PURE__*/_jsx(\"div\",{style:container,children:/*#__PURE__*/_jsx(motion.div,{style:barStyle})});}addPropertyControls(ScrollProgressBar,{thickness:{type:ControlType.Number,title:\"Thickness\",defaultValue:3,min:1,max:40,unit:\"px\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FF1212\"},orientation:{type:ControlType.Enum,title:\"Orientation\",options:[\"horizontal\",\"vertical\"],optionTitles:[\"Horizontal\",\"Vertical\"],defaultValue:\"horizontal\"},hPosition:{type:ControlType.Enum,title:\"Position\",options:[\"top\",\"bottom\"],optionTitles:[\"Top\",\"Bottom\"],defaultValue:\"top\",hidden:p=>p.orientation!==\"horizontal\"},vPosition:{type:ControlType.Enum,title:\"Position\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],defaultValue:\"left\",hidden:p=>p.orientation!==\"vertical\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollProgressBar\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Scroll_progress_bar.map"],"mappings":"8RAC0C,IAAsE,IAA4B,EAAqC,EAAK,klCAA0lC,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAO,IAAI,CAAC,GAAG,EAAc,WAAa,KAAG,CAAC,EAAe,EAAK,MAAM,CAAC,GAAG,EAAS,KAAG,CAAC,CAAE,CAAC,EAAQ,GAAU,CAAC,SAAO,KAAG,SAAO,QAAM,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAQ,EAAM,WAAW,cAAc,GAUvlD,EAAK,EAVmnDA,EAAiB,SAAS,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,UAAQ,YAAU,GA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