{"version":3,"file":"Back.Cg38e7hP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/cxUuMqk0Q1m5122fa86D/JeJhnJFB1Qi5anHom0xJ/Back.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";/**\n * @framerDisableUnlink\n */export function withBackNavigation(Component){return props=>{const handleClick=()=>{// Check if we can go back\nif(window.history&&window.history.length>1){// Try standard history API first\nwindow.history.back();}else if(document.referrer){// Fallback to referrer if available\nwindow.location.href=document.referrer;}else{// Final fallback - can be customized to go to home page or specific URL\ntry{// Try to go to parent path\nconst currentPath=window.location.pathname;const parentPath=currentPath.substring(0,currentPath.lastIndexOf(\"/\"));window.location.href=parentPath||\"/\";}catch(e){// Absolute fallback to root\nwindow.location.href=\"/\";}}};// Prevent default button behavior and add custom handler\nconst enhancedProps={...props,onClick:e=>{e.preventDefault();handleClick();// Preserve original onClick if it exists\nif(props.onClick){props.onClick(e);}},// Add better accessibility\nrole:\"button\",\"aria-label\":\"Go back\",// Ensure keyboard navigation works\nonKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();handleClick();}// Preserve original onKeyDown if it exists\nif(props.onKeyDown){props.onKeyDown(e);}},tabIndex:props.tabIndex||0};return /*#__PURE__*/_jsx(Component,{...enhancedProps});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withBackNavigation\":{\"type\":\"reactHoc\",\"name\":\"withBackNavigation\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Back.map"],"mappings":"kKAEG,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,MAAgB,CACtF,GAAG,EAAO,SAAS,EAAO,QAAQ,OAAO,EACzC,EAAO,QAAQ,MAAM,SAAU,SAAS,SACxC,EAAO,SAAS,KAAK,SAAS,cAC9B,GAAG,CACH,IAAM,EAAY,EAAO,SAAS,SAAe,EAAW,EAAY,UAAU,EAAE,EAAY,YAAY,IAAI,CAAC,CAAC,EAAO,SAAS,KAAK,GAAY,SAAa,CAChK,EAAO,SAAS,KAAK,MACf,EAAc,CAAC,GAAG,EAAM,QAAQ,GAAG,CAAC,EAAE,gBAAgB,CAAC,GAAa,CACvE,EAAM,SAAS,EAAM,QAAQ,EAAE,EAClC,KAAK,SAAS,aAAa,UAC3B,UAAU,GAAG,EAAI,EAAE,MAAM,SAAS,EAAE,MAAM,OAAK,EAAE,gBAAgB,CAAC,GAAa,EAC5E,EAAM,WAAW,EAAM,UAAU,EAAE,EAAI,SAAS,EAAM,UAAU,EAAE,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAc,CAAC,uBAbjF"}