{"version":3,"file":"FixReload.CfAJkvBQ.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","window","oe","c","init_jsx_runtime","init_framer_BisrWwwE","DataObserverContext","HighlightCurrent","event","cleanedHref","props","\"href\"","baseDomain","currentParams","finalUrl","currentFullPath","targetUrl","withHighlightCurrent","C","init_FixReload"],"sources":["https:/framerusercontent.com/modules/mK1xzB5Lc1GbhtWcTDxk/koR3ITMHtmDWxAzWRxk9/FixReload.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function HighlightCurrent(props){return{onClick(event){event.preventDefault();event.stopPropagation();const rawHref=props[\"href\"]||\"\";const cleanedHref=rawHref.replace(/^\\.{1,2}\\//,\"\");const baseDomain=window.location.origin;const currentParams=window.location.search;let finalUrl=\"\";// ✅ Build final URL dynamically\nif(cleanedHref.startsWith(\"project-gallery\")){finalUrl=baseDomain+\"/academy/project-gallery\"+cleanedHref.replace(\"project-gallery\",\"\")+currentParams;}else{finalUrl=baseDomain+\"/academy/project-gallery/\"+cleanedHref+currentParams;}// ✅ Compare full paths\nconst currentFullPath=window.location.pathname+window.location.search;const targetUrl=new URL(finalUrl);const targetPath=targetUrl.pathname+targetUrl.search;// ✅ Same page → scroll to top\nif(currentFullPath===targetPath){window.scrollTo({top:0,behavior:\"smooth\"});return;}// console.log(finalUrl)\nwindow.open(finalUrl,\"_self\");}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withHighlightCurrent(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...HighlightCurrent(props)});};}withHighlightCurrent.displayName=\"HighlightCurrent\";\nexport const __FramerMetadata__ = {\"exports\":{\"withHighlightCurrent\":{\"type\":\"reactHoc\",\"name\":\"withHighlightCurrent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HighlightCurrent\":{\"type\":\"override\",\"name\":\"HighlightCurrent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FixReload.map"],"mappings":"A,iLAA2C,SAAgBW,EAAiB,EAAM,CAAC,MAAM,CAAC,QAAQ,EAAM,CAACC,EAAM,eAAe,EAAEA,EAAM,gBAAgB,EAAkC,IAAMC,GAAxBC,EAAMC,MAAS,GAAA,CAA6B,QAAQ,aAAa,EAAE,EAAQC,EAAWX,EAAO,SAAS,OAAaY,EAAcZ,EAAO,SAAS,OAAWa,EAAS,GAC3U,AAA2JA,EAAxJL,EAAY,WAAW,iBAAiB,EAAYG,EAAW,2BAA2BH,EAAY,QAAQ,kBAAkB,EAAE,EAAEI,EAA6BD,EAAW,4BAA4BH,EAAYI,EACvN,IAAME,EAAgBd,EAAO,SAAS,SAASA,EAAO,SAAS,OAAae,EAAU,IAAI,IAAIF,CAAQ,EACnGC,IADsHC,EAAU,SAASA,EAAU,OACrHf,EAAO,SAAS,CAAC,IAAI,EAAE,SAAS,QAAQ,CAAC,EAC1EA,EAAO,KAAKa,EAAS,OAAO,CAAE,CAAC,CAAE,CAAoJ,SAAgBG,EAAqB,EAAE,CAAC,MAAO,KAAQf,EAA+BN,CAAuC,EAASC,EAAKqB,EAAE,CAAC,GAAGR,EAAM,GAAGH,EAAiBG,CAAK,CAAC,CAAC,EAAI,C,8CAAC,EAAqB,YAAY,kB"}