{"version":3,"file":"shared-lib.DCVwsh8M.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","te","_e","p","c","init_jsx_runtime","ce","init_framer_BWFVvmND","useIsStaticRenderer","ControlType","addPropertyControls","BackToTop","props","isStatic","visible","setVisible","handleScroll","scrollThreshold","handleClick","shown","backgroundColor","iconColor","init_BackToTop"],"sources":["https:/framerusercontent.com/modules/EAboC1YNgh0LVMtHkFJM/6dDv8OjVZilMyyzGKR7e/BackToTop.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useState,startTransition}from\"react\";/**\n * Back to Top\n *\n * A floating button that appears after the visitor scrolls down, and smoothly\n * scrolls the page back to the top when clicked.\n *\n * @framerIntrinsicWidth 48\n * @framerIntrinsicHeight 48\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function BackToTop(props){const{backgroundColor=\"rgb(29, 70, 147)\",iconColor=\"rgb(244, 235, 221)\",scrollThreshold=400}=props;const isStatic=useIsStaticRenderer();const[visible,setVisible]=useState(false);useEffect(()=>{if(typeof window===\"undefined\"||isStatic)return;function handleScroll(){startTransition(()=>setVisible(window.scrollY>scrollThreshold));}handleScroll();window.addEventListener(\"scroll\",handleScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",handleScroll);},[isStatic,scrollThreshold]);function handleClick(){if(typeof window===\"undefined\")return;window.scrollTo({top:0,behavior:\"smooth\"});}const shown=isStatic||visible;return /*#__PURE__*/_jsx(\"div\",{role:\"button\",\"aria-label\":\"Back to top\",tabIndex:shown?0:-1,onClick:handleClick,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();handleClick();}},style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:\"50%\",background:backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",opacity:shown?1:0,pointerEvents:shown?\"auto\":\"none\",transition:\"opacity 0.25s ease\",boxShadow:\"0 4px 12px rgba(0,0,0,0.25)\"},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"22\",height:\"22\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:iconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"title\",{children:\"Scroll to top\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M12 19V5\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M5 12l7-7 7 7\"})]})});}addPropertyControls(BackToTop,{backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgb(29, 70, 147)\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"rgb(244, 235, 221)\"},scrollThreshold:{type:ControlType.Number,title:\"Scroll Threshold\",defaultValue:400,min:0,max:2e3,step:50,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackToTop\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"48\",\"framerIntrinsicHeight\":\"48\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BackToTop.map"],"mappings":"A,qNAWG,SAAwBe,EAAU,EAAM,CAAC,GAAK,CAAC,kBAAgB,mBAAmB,YAAU,qBAAqB,kBAAgB,KAAKC,EAAYC,EAASL,EAAoB,EAAO,CAACM,EAAQC,GAAYnB,EAAS,EAAK,EAAEU,MAAc,CAAC,GAAUN,IAAS,QAAaa,EAAS,OAAO,SAASG,GAAc,CAACf,MAAoBc,EAAWf,EAAO,QAAQiB,CAAe,CAAC,CAAE,CAA8E,OAA7ED,EAAa,EAAEhB,EAAO,iBAAiB,SAASgB,EAAa,CAAC,QAAQ,EAAI,CAAC,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