{"version":3,"file":"AddiOSButtonID.CasmwsJt.mjs","names":["withUtmParams"],"sources":["https:/framerusercontent.com/modules/RpVqVsNdFfLUhO7LskWn/ekVoK3HswZ05r7QaPL7c/AddAndroidButtonID.js","https:/framerusercontent.com/modules/Q4PFPyLXtAFTcYrhZCdC/qbTNIUjebgtxc2pMo6L9/AddiOSButtonID.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function withUtmParams(Component){return props=>{let baseUrl=\"https://play.google.com/store/apps/details?id=com.tokoinc.tokotutor\";let href=\"https://play.google.com/store/apps/details?id=com.tokoinc.tokotutor&referrer=utm_source%3D{platform}%26utm_campaign%3D{creator_handle}\";try{const queryParams=window.location.search.replace(\"?\",\"\").split(\"&\");// Find the properties we want to use and template them in\nfor(var i=0;i<queryParams.length;i++){const keyAndValue=queryParams[i].split(\"=\");if(keyAndValue[0]==\"utm_source\"){href=href.replace(\"{platform}\",keyAndValue[1]);var platform=keyAndValue[1];}else if(keyAndValue[0]==\"utm_campaign\"){href=href.replace(\"{creator_handle}\",keyAndValue[1]);var creatorHandle=keyAndValue[1];props.className+=\" utm_campaign_\"+keyAndValue[1];}}}catch{}// Wrap the button in a link tag that attaches the UTM params,\n// and override the click behavior on the inner button div\n// Once Framer \"optimizes\" our code, the href attribute starts\n// being set at some earlier time, so even though it seems like\n// we should be able to set it to the same value as we use in\n// onClick, we cannot T_T\nreturn /*#__PURE__*/_jsx(\"a\",{href:baseUrl,target:\"_blank\",onClick:e=>{e.preventDefault();e.stopPropagation();window.amplitude.track(\"framer_download_button_clicked\",{utm_source:platform,utm_campaign:creatorHandle,button_id:\"download-button-android\"});window.open(href,\"_blank\");},style:{textDecoration:\"none\"},children:/*#__PURE__*/_jsx(Component,{...props,onclick:e=>{e.preventDefault();e.stopPropagation();},id:\"download-button-android\"},\"android-button\")});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withUtmParams\":{\"type\":\"reactHoc\",\"name\":\"withUtmParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AddAndroidButtonID.map","import{jsx as _jsx}from\"react/jsx-runtime\";export function withUtmParams(Component){return props=>{let baseUrl=\"https://apps.apple.com/app/apple-store/id1569893279?pt=123095106&mt=8\";let href=\"https://apps.apple.com/app/apple-store/id1569893279?pt=123095106&ct={creatorHandle}&mt=8\";try{const queryParams=window.location.search.replace(\"?\",\"\").split(\"&\");// Find the properties we want to use and template them in\nfor(var i=0;i<queryParams.length;i++){const keyAndValue=queryParams[i].split(\"=\");if(keyAndValue[0]==\"utm_campaign\"){href=href.replace(\"{creatorHandle}\",keyAndValue[1]);var creatorHandle=keyAndValue[1];}}}catch(e){}// Wrap the button in a link tag that attaches the UTM params,\n// and override the click behavior on the inner button div\n// Once Framer \"optimizes\" our code, the href attribute starts\n// being set at some earlier time, so even though it seems like\n// we should be able to set it to the same value as we use in\n// onClick, we cannot T_T\nreturn /*#__PURE__*/_jsx(\"a\",{href:baseUrl,target:\"_blank\",onClick:e=>{e.preventDefault();e.stopPropagation();window.amplitude.track(\"framer_download_button_clicked\",{utm_source:\"N/A\",utm_campaign:creatorHandle,button_id:\"download-button-ios\"});window.open(href,\"_blank\");},style:{textDecoration:\"none\"},children:/*#__PURE__*/_jsx(Component,{...props,onclick:e=>{e.preventDefault();e.stopPropagation();},id:\"download-button-ios\"},\"ios-button\")});};}// export function withUtmParamsAndFooterButtonClass(Component): ComponentType {\n//     return (props) => {\n//         props.className += \" footer-button\"\n//         props = addHrefToProps(props)\n//         return (\n//             <a\n//                 href={props.href}\n//                 target={\"_blank\"}\n//                 style={{\n//                     textDecoration: \"none\",\n//                 }}\n//             >\n//                 <Component\n//                     key=\"ios-button\"\n//                     {...props}\n//                     onclick={(e) => {\n//                         e.preventDefault()\n//                         e.stopPropagation()\n//                     }}\n//                     id=\"download-button-ios\"\n//                 />\n//             </a>\n//         )\n//     }\n// }\n\nexport const __FramerMetadata__ = {\"exports\":{\"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