{"version":3,"file":"SmartStoreLink.BuuGi-5J.mjs","names":["__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","init_jsx_runtime","J","navigator","isAndroid","ua","isIOS","withSmartStoreLink","rest","props","handleClick","onClick","event","ANDROID_URL","IOS_URL","Component","style","withStoreRedirect","init_SmartStoreLink"],"sources":["https:/framerusercontent.com/modules/PxKENAqw0WxiAg1Y7lHB/cAmQRCRA0oNp40XTgVZd/SmartStoreLink.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";const IOS_URL=\"https://apps.apple.com/app/rippla-influencer-collabs/id6755340730\";const ANDROID_URL=\"https://play.google.com/store/apps/details?id=com.rippla.app\";function isAndroid(ua){return/android/i.test(ua);}function isIOS(ua){return/iphone|ipad|ipod/i.test(ua)||typeof navigator!==\"undefined\"&&navigator.platform===\"MacIntel\"&&navigator.maxTouchPoints>1;}// Click: opens Google Play on Android, App Store everywhere else (iPhone, iPad, desktop fallback)\nexport function withSmartStoreLink(Component){return /*#__PURE__*/forwardRef(function SmartStoreLink(props,ref){const{style,onClick,...rest}=props;const handleClick=event=>{onClick?.(event);if(typeof window===\"undefined\")return;const ua=window.navigator.userAgent||\"\";window.location.href=isAndroid(ua)?ANDROID_URL:IOS_URL;};return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,onClick:handleClick,style:{...style,cursor:\"pointer\"}});});}// On mount: phones go straight to their store (used on /get-app, the QR target). Desktop stays on the page.\nexport function withStoreRedirect(Component){return /*#__PURE__*/forwardRef(function StoreRedirect(props,ref){useEffect(()=>{if(typeof window===\"undefined\")return;const ua=window.navigator.userAgent||\"\";if(isAndroid(ua))window.location.replace(ANDROID_URL);else if(isIOS(ua))window.location.replace(IOS_URL);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withStoreRedirect\":{\"type\":\"reactHoc\",\"name\":\"withStoreRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSmartStoreLink\":{\"type\":\"reactHoc\",\"name\":\"withSmartStoreLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmartStoreLink.map"],"mappings":"A,yIAAsP,SAASQ,EAAU,EAAG,CAAC,MAAM,WAAW,KAAKC,CAAE,CAAE,CAAC,SAASC,EAAM,EAAG,CAAC,MAAM,oBAAoB,KAAKD,CAAE,GAAUF,IAAY,QAAaA,EAAU,WAAW,YAAYA,EAAU,eAAe,CAAE,CAC3b,SAAgBI,EAAmB,EAAU,CAAC,MAAoB,gBAAW,SAAwB,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,UAAQ,GAAGC,GAAMC,EAAYC,EAAY,GAAO,CAAkB,GAAjBC,IAAUC,CAAK,EAAYf,IAAS,OAAY,OAAO,IAAMQ,EAAGR,EAAO,UAAU,WAAW,GAAG,EAAO,SAAS,KAAKO,EAAUC,CAAE,EAAEQ,EAAYC,CAAQ,EAAE,MAAoB,gBAAKC,EAAU,CAAC,GAAGP,EAAS,MAAI,QAAQE,EAAY,MAAM,CAAC,GAAGM,EAAM,OAAO,SAAS,CAAC,CAAC,CAAE,CAAC,CAAE,CACpb,SAAgBC,EAAkB,EAAU,CAAC,MAAoB,gBAAW,SAAuB,EAAM,EAAI,CAA6M,OAA5MjB,MAAc,CAAC,GAAUH,IAAS,OAAY,OAAO,IAAMQ,EAAGR,EAAO,UAAU,WAAW,GAAMO,EAAUC,CAAE,EAAER,EAAO,SAAS,QAAQgB,CAAW,EAAUP,EAAMD,CAAE,GAAER,EAAO,SAAS,QAAQiB,CAAO,CAAE,EAAE,CAAC,CAAC,EAAsB,gBAAKC,EAAU,CAAC,GAAGN,EAAU,KAAG,CAAC,CAAE,CAAC,CAAE,C,kDAF3R,EAAQ,oEAA0E,EAAY,8D"}