{"version":3,"file":"Github_button.DDELR0YA.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/RO5KFMp5PxQPrqED8yAW/XplW4dhtaT44J1hQ3eAj/Github_button.js"],"sourcesContent":["// import { useEffect, useState } from \"react\"\n// export default function Github_button() {\n//     const [starCount, setStarCount] = useState(null)\n//     useEffect(() => {\n//         // Fetch the GitHub star count\n//         fetch(\"https://api.github.com/repos/raga-ai-hub/RagaAI-Catalyst\")\n//             .then((response) => response.json())\n//             .then((data) => {\n//                 if (data.stargazers_count) {\n//                     setStarCount(formatStarCount(data.stargazers_count))\n//                 }\n//             })\n//         // Load GitHub buttons script\n//         const script = document.createElement(\"script\")\n//         script.src = \"https://buttons.github.io/buttons.js\"\n//         script.async = true\n//         script.defer = true\n//         document.body.appendChild(script)\n//         return () => {\n//             document.body.removeChild(script)\n//         }\n//     }, [])\n//     // Function to format star count (9.6K instead of 9604)\n//     function formatStarCount(count) {\n//         return count >= 1000\n//             ? (count / 1000).toFixed(1).replace(\".0\", \"\") + \"K\"\n//             : count\n//     }\n//     return (\n//         <a style={buttonStyle} target=\"_blank\" rel=\"noopener noreferrer\">\n//             <svg\n//                 xmlns=\"http://www.w3.org/2000/svg\"\n//                 viewBox=\"0 0 16 16\"\n//                 width=\"20\"\n//                 height=\"20\"\n//                 fill=\"currentColor\"\n//                 style={{ marginRight: \"5px\" }}\n//             >\n//                 <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.58.82-2.14-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.03 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.14 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0016 8c0-4.42-3.58-8-8-8z\" />\n//             </svg>\n//             <span style={textStyle}>We Are Open Source!</span>\n//             <span style={countStyle}>\n//                 {starCount !== null ? starCount : \"...\"} ⭐️\n//             </span>\n//         </a>\n//     )\n// }\n// // Styles based on your request\n// const buttonStyle = {\n//     display: \"flex\",\n//     alignItems: \"center\",\n//     gap: \"10px\",\n//     height: \"48px\",\n//     width: \"fit-content\",\n//     padding: \"0px 24px 0px 24px\",\n//     textDecoration: \"none\",\n//     backgroundColor: \"#ffffff\",\n//     color: \"#0031AD\",\n//     borderRadius: \"100px\",\n//     border: \"none\",\n//     cursor: \"pointer\",\n// }\n// const iconStyle = {\n//     width: \"24px\",\n//     height: \"24px\",\n// }\n// const textStyle = {\n//     fontSize: \"14px\",\n//     fontfamily: \"'Inter', sans-serif\",\n//     fontWeight: \"bold\",\n//     width: \"fit-content\",\n// }\n// const countStyle = {\n//     fontfamily: \"'Inter', sans-serif\",\n//     fontSize: \"14px\",\n//     fontWeight: \"bold\",\n//     width: \"fit-content\",\n// }\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export default function Github_button(){const[starCount,setStarCount]=useState(null);useEffect(()=>{// Fetch the GitHub star count\nfetch(\"https://api.github.com/repos/raga-ai-hub/RagaAI-Catalyst\").then(response=>response.json()).then(data=>{if(data.stargazers_count){setStarCount(formatStarCount(data.stargazers_count));}});// Load GitHub buttons script\nconst script=document.createElement(\"script\");script.src=\"https://buttons.github.io/buttons.js\";script.async=true;script.defer=true;document.body.appendChild(script);return()=>{document.body.removeChild(script);};},[]);// Function to format star count (9.6K instead of 9604)\nfunction formatStarCount(count){return count>=1e3?(count/1e3).toFixed(1).replace(\".0\",\"\")+\"K\":count;}return /*#__PURE__*/_jsxs(\"a\",{href:\"https://github.com/raga-ai-hub/RagaAI-Catalyst\",style:buttonStyle,target:\"_blank\",rel:\"noopener noreferrer\",children:[/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 16 16\",width:\"20\",height:\"20\",fill:\"currentColor\",style:{marginRight:\"5px\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.58.82-2.14-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.03 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.14 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0016 8c0-4.42-3.58-8-8-8z\"})}),/*#__PURE__*/_jsx(\"span\",{style:textStyle,children:\"We Are Open Source!\"}),/*#__PURE__*/_jsxs(\"span\",{style:countStyle,children:[starCount!==null?starCount:\"...\",\" ⭐️\"]})]});}// Styles based on your request\nconst buttonStyle={display:\"flex\",alignItems:\"center\",gap:\"10px\",height:\"48px\",width:\"fit-content\",padding:\"0px 24px\",textDecoration:\"none\",backgroundColor:\"#ffffff\",color:\"#0031AD\",borderRadius:\"100px\",border:\"none\",cursor:\"pointer\"};const textStyle={fontSize:\"14px\",fontFamily:\"'Inter', sans-serif\",fontWeight:\"bold\",width:\"fit-content\"};const countStyle={fontFamily:\"'Inter', sans-serif\",fontSize:\"14px\",fontWeight:\"bold\",width:\"fit-content\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Github_button\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Github_button.map"],"mappings":"0KA8E+F,SAAwB,GAAe,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,KAAK,CAAC,MAAc,CAClM,MAAM,2DAA2D,CAAC,KAAK,GAAU,EAAS,MAAM,CAAC,CAAC,KAAK,GAAM,CAAI,EAAK,kBAAkB,EAAa,EAAgB,EAAK,iBAAiB,CAAC,EAAI,CAChM,IAAM,EAAO,SAAS,cAAc,SAAS,CAAyH,MAAxH,GAAO,IAAI,uCAAuC,EAAO,MAAM,GAAK,EAAO,MAAM,GAAK,SAAS,KAAK,YAAY,EAAO,KAAW,CAAC,SAAS,KAAK,YAAY,EAAO,GAAK,EAAE,CAAC,CAC1N,SAAS,EAAgB,EAAM,CAAC,OAAO,GAAO,KAAK,EAAM,KAAK,QAAQ,EAAE,CAAC,QAAQ,KAAK,GAAG,CAAC,IAAI,EAAO,OAAoB,EAAM,IAAI,CAAC,KAAK,iDAAiD,MAAM,EAAY,OAAO,SAAS,IAAI,sBAAsB,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,6BAA6B,QAAQ,YAAY,MAAM,KAAK,OAAO,KAAK,KAAK,eAAe,MAAM,CAAC,YAAY,MAAM,CAAC,SAAsB,EAAK,OAAO,CAAC,EAAE,2jBAA2jB,CAAC,CAAC,CAAC,CAAc,EAAK,OAAO,CAAC,MAAM,EAAU,SAAS,sBAAsB,CAAC,CAAc,EAAM,OAAO,CAAC,MAAM,EAAW,SAAS,CAAC,IAAY,KAAe,MAAV,EAAgB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,wBAH7mC,IAAsC,CAIzF,EAAY,CAAC,QAAQ,OAAO,WAAW,SAAS,IAAI,OAAO,OAAO,OAAO,MAAM,cAAc,QAAQ,WAAW,eAAe,OAAO,gBAAgB,UAAU,MAAM,UAAU,aAAa,QAAQ,OAAO,OAAO,OAAO,UAAU,CAAO,EAAU,CAAC,SAAS,OAAO,WAAW,sBAAsB,WAAW,OAAO,MAAM,cAAc,CAAO,EAAW,CAAC,WAAW,sBAAsB,SAAS,OAAO,WAAW,OAAO,MAAM,cAAc"}