1import{_ as y}from"./preload-helper.HSqu0jaV.js";import{W as $,a as U}from"./pricingPlans.Dnj_JUgs.js";import{a as P}from"./api.BHycuhUV.js";import{s as k,m as S}from"./promo.nFd-tqTL.js";import{s as f,g as h}from"./cookies.DkyKcOY2.js";import{w as i,c as r}from"./clickbankAffiliateCookies.CNgpa8-u.js";import"./index.BTOJGUUe.js";import"./index.DVdFC_dc.js";import"./vanilla.C8mgCs67.js";import"./shallow.BzacZErD.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"c903637f06ddc8bfdbbeb4c281d9ce484cfbb31a"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5e591891-9466-49ef-9288-ef61f43487cb",e._sentryDebugIdIdentifier="sentry-dbid-5e591891-9466-49ef-9288-ef61f43487cb")}catch{}})();console.log("Promo Script Loaded");async function I(){try{const t=new URLSearchParams(window.location.search).get("testpromo")||void 0,[a,n]=await P("v2/static/current_promo",t?{testpromo:t}:void 0);if(a||!n.promo)return;const o=n.promo;if(t){const p=new Date;p.setDate(p.getDate()+2),o.end_time=p.toString(),o.is_active=!0}if(!o.is_active){k(void 0);return}const m=o.image_text_options?.cropped,v=o.end_time?Math.floor(new Date(o.end_time).getTime()/1e3):0,l=new URLSearchParams,d=window.location.pathname.split("/")[1];d&&d in $&&l.set("courseSlug",d);const w=window.location.pathname.match(/\/[^\/]+\/rocket-[^\/]+-level-(\d+)$/)?.at(1);w&&l.set("level",w);const g=l.toString(),u=g?`&${g}`:"",C={title:o.title,couponCode:o.coupon_code,subtitle:o.subtitle,backgroundColor:m?.backgroundColor||"white",textColor:m?.color||"black",modalImageUrl:`https://app.rocketlanguages.com/api/v2/static/promo/_functions/generate-image/${o.coupon_code.toUpperCase()}?type=banner${u}`,bannerImageUrl:`https://app.rocketlanguages.com/api/v2/static/promo/_functions/generate-image/${o.coupon_code.toUpperCase()}?type=cropped${u}`,expiresAtEpochSeconds:v,totalUnits:o.total_units,currentUnits:o.current_units,reminderUnits:o.reminder_units,endTimeISO:o.end_time};k(C)}catch{}finally{S()}}await I();const L=[/^https:\/\/hop\.clickbank\.net\/\?.+$/i,/^https:\/\/rocketlang\.pay\.clickbank\.net\/\?.+$/i];function R(e){return L.some(t=>t.test(e))}const c=new URLSearchParams(window.location.search),s=Object.fromEntries(c);console.log("Affiliate System Loaded");E(s);(s.hop_redirect||s.landing||s.hop)&&D(s);function E(e){const t="global";if(e.aff&&i({kind:"aff",value:String(e.aff)}),e.tid&&i({kind:"tid",value:String(e.tid)}),e.cjevent&&(f({key:"cje",value:String(e.cjevent),days:390}),f({key:"CJ_EVENT",value:String(e.cjevent)}),f({key:"CJ_PUBLISHER",value:String(e.publisher||"unknown")}),r({kind:"aff",scope:t})),e.hop){const o=String(e.hop);i({kind:"hop",scope:t,value:o}),r({kind:"aff"}),r({kind:"tid"}),r({kind:"aff",scope:t}),r({kind:"tid",scope:t})}const a=h("xdomain_aff");a&&i({kind:"aff",value:a});const n=h("xdomain_tid");n&&i({kind:"tid",value:n})}function b(e){let t=e.replace(/^\/+/,"");if(t.includes("http")||(t=`https://www.rocketlanguages.com/${t.trim()}`),!R(t)){console.warn("Blocked redirect to non-whitelisted URL",t);return}window.location.replace(t)}function _(e,t){switch(t){case"order":case"pricing":window.location.replace(`https://www.rocketlanguages.com/pricing?language=${e}`);break;case"freetrial":window.location.replace(`https://www.rocketlanguages.com/${e}`);break;case"sales":window.location.replace(`https://www.rocketlanguages.com/${e}/rocket-${e}-premium`);break;case"level2":window.location.replace(`https://www.rocketlanguages.com/${e}/rocket-${e}-level-2`);break;case"level3":window.location.replace(`https://www.rocketlanguages.com/${e}/rocket-${e}-level-3`);break;case"travelogues":window.location.replace(`https://www.rocketlanguages.com/${e}/rocket-${e}-play-the-part`);break;case"playthepart":window.location.replace(`https://www.rocketlanguages.com/${e}/rocket-${e}-play-the-part`);break;default:document.body.style.display="block";break}}function D(e){if(e.hop_redirect){b(String(e.hop_redirect));return}const t=(()=>{if(c.has("course"))return c.get("course");if(c.has("language"))return c.get("language");const a=new URL(window.location.href);for(const n of U)if(a.pathname.startsWith("/"+n))return n;return null})();if(e.landing){const a=String(e.landing);
1decodeURIComponent(a).includes("/")&&!decodeURIComponent(a).includes("http")?b(a):_(t||"spanish",a);return}e.hop&&t&&_(t,"freetrial")}const T=document.body?.dataset.hideZendesk==="1";T||y(()=>import("./zendesk.DtP4lB_y.js"),[]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.