{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/nBCYQf5hXk5kdmW7OIXm/zZHH95dNBZYPJPjB1eUm/CustomScrollbar.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,createContext,useContext,useMemo}from\"react\";// Theme context to avoid prop drilling and reduce rerenders\nconst ThemeContext=/*#__PURE__*/createContext(\"light\");// Memoized theme styles to prevent regeneration\nconst createThemeStyles=theme=>{const colors={light:{thumb:\"#C1C1C1\",track:\"#F1F1F1\",hover:\"#A1A1A1\",border:\"#E1E1E1\"},dark:{thumb:\"#4A4A4A\",track:\"#1A1A1A\",hover:\"#666666\",border:\"#333333\"}}[theme];return`\n        @supports selector(::-webkit-scrollbar) {\n            *::-webkit-scrollbar {\n                width: 8px;\n                border-left: 1px solid ${colors.border};\n            }\n            \n            *::-webkit-scrollbar-thumb {\n                background: ${colors.thumb};\n                border-radius: 4px;\n                transition: background 0.2s ease;\n                background-clip: padding-box;\n                border: 2px solid transparent;\n            }\n            \n            *::-webkit-scrollbar-thumb:hover {\n                background: ${colors.hover};\n                background-clip: padding-box;\n            }\n            \n            *::-webkit-scrollbar-track {\n                background: ${colors.track};\n                border-left: 1px solid ${colors.border};\n                padding: 2px;\n            }\n        }\n\n        * {\n            scrollbar-width: thin;\n            scrollbar-color: ${colors.thumb} ${colors.track};\n        }\n\n        .scroll-container {\n            -webkit-overflow-scrolling: touch;\n        }\n        \n        @supports (-webkit-overflow-scrolling: touch) {\n            .scroll-container::-webkit-scrollbar {\n                -webkit-appearance: none;\n                width: 8px;\n            }\n        }\n    `;};// Global theme provider that handles theme detection and updates\nexport const ThemeProvider=({children})=>{const[theme,setTheme]=useState(()=>{var _window_matchMedia,_window;// Run on initial render only\nif(typeof window===\"undefined\")return\"light\";const stored=localStorage.getItem(\"currentToggleState\");if(stored)return stored;return((_window_matchMedia=(_window=window).matchMedia)===null||_window_matchMedia===void 0?void 0:_window_matchMedia.call(_window,\"(prefers-color-scheme: dark)\").matches)?\"dark\":\"light\";});useEffect(()=>{// Theme change handlers\nconst handleStorage=e=>{if(e.key===\"currentToggleState\"){setTheme(e.newValue||(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"));}};const handleSystem=e=>{if(!localStorage.getItem(\"currentToggleState\")){setTheme(e.matches?\"dark\":\"light\");}};const mediaQuery=window.matchMedia(\"(prefers-color-scheme: dark)\");window.addEventListener(\"storage\",handleStorage);mediaQuery.addEventListener(\"change\",handleSystem);return()=>{window.removeEventListener(\"storage\",handleStorage);mediaQuery.removeEventListener(\"change\",handleSystem);};},[]);// Memoize styles to prevent regeneration\nconst styles=useMemo(()=>createThemeStyles(theme),[theme]);return /*#__PURE__*/_jsxs(ThemeContext.Provider,{value:theme,children:[/*#__PURE__*/_jsx(\"style\",{children:styles}),children]});};// Optimized HOC that doesn't manage theme state\nexport const withCustomScrollbar=Component=>{return props=>{const theme=useContext(ThemeContext);if(!theme){console.warn(\"withCustomScrollbar must be used within a ThemeProvider\");}return /*#__PURE__*/_jsx(Component,{...props});};};// Memoized base component\nconst BaseScrollableComponent=({children,className=\"\"})=>{const combinedClassName=useMemo(()=>`overflow-auto scroll-container ${className}`.trim(),[className]);return /*#__PURE__*/_jsx(\"div\",{className:combinedClassName,children:children});};export const ScrollableComponent=withCustomScrollbar(BaseScrollableComponent);\nexport const __FramerMetadata__ = {\"exports\":{\"ScrollableComponent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ThemeProvider\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCustomScrollbar\":{\"type\":\"reactHoc\",\"name\":\"withCustomScrollbar\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomScrollbar.map"],
  "mappings": "8DACA,IAAMA,EAA0BC,EAAc,OAAO,EAgD9C,IAAMC,EAAoBC,GAAmBC,IAAoBC,EAAWC,CAAY,GAAa,QAAQ,KAAK,yDAAyD,EAAuBC,EAAKJ,EAAU,CAAC,GAAGC,CAAK,CAAC,GAC5NI,EAAwB,CAAC,CAAC,SAAAC,EAAS,UAAAC,EAAU,EAAE,IAAI,CAAC,IAAMC,EAAkBC,EAAQ,IAAI,kCAAkCF,IAAY,KAAK,EAAE,CAACA,CAAS,CAAC,EAAE,OAAoBH,EAAK,MAAM,CAAC,UAAUI,EAAkB,SAASF,CAAQ,CAAC,CAAE,EAAeI,EAAoBX,EAAoBM,CAAuB",
  "names": ["ThemeContext", "z", "withCustomScrollbar", "Component", "props", "re", "ThemeContext", "p", "BaseScrollableComponent", "children", "className", "combinedClassName", "se", "ScrollableComponent"]
}
