{"version":3,"file":"QueryPropogator.aHcDDZb0.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/qfy86Y3ZrzeAYIYMlCSK/y4gf4CYkEWYyCX8MZfyb/QueryPropogator.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";export function withParentQueryParams(Component){return props=>{const{url}=props;const ref=useRef(null);const[src,setSrc]=useState(\"\");useEffect(()=>{const href=new URL(window.location.href);const params=href.searchParams;const currentLanguage=window.location.pathname.startsWith(\"/fr\")?\"fr-CA\":\"en\";if(!params.has(\"email\")||!params.has(\"token\")){window.location.href=\"https://www.ownr.co/\";}const src=new URL(`${url}?${params.toString()}&lang=${currentLanguage}`);setSrc(src.href);},[window.location]);return /*#__PURE__*/_jsx(Component,{...props,url:src,ref:ref});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withParentQueryParams\":{\"type\":\"reactHoc\",\"name\":\"withParentQueryParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./QueryPropogator.map"],"mappings":"8IAAwF,SAAgB,EAAsB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,OAAK,EAAY,EAAIA,EAAO,IAAI,EAAO,CAAC,EAAI,GAAQC,EAAS,EAAE,EAAkX,OAAhX,MAAc,CAA0C,IAAM,EAAO,IAAvC,IAAI,EAAO,SAAS,IAAsB,CAAC,CAAC,aAAmB,EAAgB,EAAO,SAAS,SAAS,WAAW,KAAK,EAAE,QAAQ,MAAQ,CAAC,EAAO,IAAI,OAAO,GAAG,CAAC,EAAO,IAAI,OAAO,KAAG,EAAO,SAAS,KAAK,wBAAwB,IAAM,EAAI,IAAI,IAAI,GAAG,EAAI,GAAG,EAAO,SAAS,EAAE,QAAQ,GAAiB,EAAE,EAAO,EAAI,IAAI,CAAE,EAAE,CAAC,EAAO,QAAQ,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,EAAQ,KAAG,CAAC,CAAE,CAAE,qBAAtmB,IAA6C"}