{"version":3,"file":"DynamicPricing.rn_9UIux.mjs","names":["_jsx","__esmMin","init_jsx_runtime","c","useLocaleInfo","init_framer_B3LLf74D","withMonthlyHandoff","Component","props","activeLocale","lang","getLang","handleRedirect","postRedirect","baseUrl","withYearlyHandoff","withMonthlyHandoffPro","withMonthlyHandoffTax","withYearlyHandoffPro","withYearlyHandoffTax","init_DynamicPricing","code","url","params","queryString","key","value","form","input"],"sources":["https:/framerusercontent.com/modules/DWy8nFx1JiWtzbCWAq3T/LU0fGJuAAiOAao2eWP9L/DynamicPricing.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useLocaleInfo,useObserveData}from\"framer\";const baseUrl=\"https://app.jurilo.ch/v1/checkout\";const getLang=activeLocale=>{const code=activeLocale?.code?.toLowerCase()||\"\";if(code.startsWith(\"de\"))return\"de\";if(code.startsWith(\"fr\"))return\"fr\";return\"en\";};const postRedirect=(url,params)=>{const queryString=Object.entries(params).map(([key,value])=>`${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join(\"&\");console.log(\"Redirecting to:\",`${url}?${queryString}`);const form=document.createElement(\"form\");form.method=\"POST\";form.action=`${url}?${queryString}`;Object.entries(params).forEach(([key,value])=>{const input=document.createElement(\"input\");input.type=\"hidden\";input.name=key;input.value=value;form.appendChild(input);});document.body.appendChild(form);form.submit();};export function withSignupHandoff(Component){return props=>{const{activeLocale}=useLocaleInfo();const{valueOf}=useObserveData();const getLang=()=>{const code=activeLocale?.code?.toLowerCase()||\"\";if(code.startsWith(\"de\"))return\"de\";if(code.startsWith(\"fr\"))return\"fr\";return\"en\";};const lang=getLang();const variant=props.variant||\"\";const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}const params={lang};if(variant===\"Monthly\"){params.plan_frequency=\"Monthly\";}else if(variant===\"Yearly\"){params.plan_frequency=\"Yearly\";}else if(variant===\"Free\"){params.plan_frequency=\"Free\";}postRedirect(baseUrl,params);};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoff(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"unlimited\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoff(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\",recurring_plan:\"unlimited\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withFreeHandoff(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"10_ques\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoffStart(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"10_ques\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoffPro(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"unlimited\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoffTax(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\",recurring_plan:\"jurilo_tax_only\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withMonthlyHandoffEnterprise(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"monthly\",plan_category:\"business\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoffStart(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\",recurring_plan:\"10_ques\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoffPro(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\",recurring_plan:\"unlimited\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoffBusiness(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}export function withYearlyHandoffTax(Component){return props=>{const{activeLocale}=useLocaleInfo();const lang=getLang(activeLocale);const handleRedirect=e=>{if(e){e.preventDefault();e.stopPropagation();}postRedirect(baseUrl,{lang,plan_frequency:\"yearly\",plan_category:\"business\",recurring_plan:\"jurilo_tax_only\"});};return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleRedirect,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withYearlyHandoffStart\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoffStart\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoffPro\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoffPro\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYearlyHandoffTax\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoffTax\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSignupHandoff\":{\"type\":\"reactHoc\",\"name\":\"withSignupHandoff\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoffStart\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoffStart\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYearlyHandoff\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoff\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoffEnterprise\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoffEnterprise\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoffTax\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoffTax\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYearlyHandoffPro\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoffPro\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFreeHandoff\":{\"type\":\"reactHoc\",\"name\":\"withFreeHandoff\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyHandoff\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyHandoff\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYearlyHandoffBusiness\":{\"type\":\"reactHoc\",\"name\":\"withYearlyHandoffBusiness\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicPricing.map"],"mappings":"A,sJAAmkD,SAAgBM,EAAmBC,EAAU,CAAC,MAAOC,IAAO,CAAC,GAAK,CAACC,gBAAcL,EAAc,EAAQM,EAAKC,EAAQF,CAAY,EAAQG,EAAe,GAAG,CAAI,IAAG,EAAE,eAAe,EAAE,EAAE,gBAAgB,GAAGC,EAAaC,EAAQ,CAACJ,OAAK,eAAe,UAAU,cAAc,WAAW,eAAe,WAAW,CAAC,CAAE,EAAE,MAAoBV,gBAAKO,EAAU,CAAC,GAAGC,EAAM,SAASI,EAAe,QAAQA,EAAe,MAAM,CAAC,OAAO,UAAU,MAAM,MAAM,CAAC,CAAC,CAAE,CAAE,CAAC,SAAgBG,EAAkBR,EAAU,CAAC,MAAOC,IAAO,CAAC,GAAK,CAACC,gBAAcL,EAAc,EAAQM,EAAKC,EAAQF,CAAY,EAAQG,EAAe,GAAG,CAAI,IAAG,EAAE,eAAe,EAAE,EAAE,gBAAgB,GAAGC,EAAaC,EAAQ,CAACJ,OAAK,eAAe,SAAS,cAAc,WAAW,eAAe,WAAW,CAAC,CAAE,EAAE,MAAoBV,gBAAKO,EAAU,CAAC,GAAGC,EAAM,SAASI,EAAe,QAAQA,EAAe,MAAM,CAAC,OAAO,UAAU,MAAM,MAAM,CAAC,CAAC,CAAE,CAAE,CAAu3B,SAAgBI,EAAsBT,EAAU,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