PageSourceSearch

https://app.dapta.ai/chunk-5YSAYTAR.js

js dapta.ai collected 2026-09-29 00:03:28 UTC 2,205 bytes, 1 lines download raw bytes

1import{U as h,a as u}from"./chunk-PZHDZNOO.js";import{aa as i,ea as l}from"./chunk-NMIDHYRA.js";import{k as c}from"./chunk-ZOCHBAGS.js";var E=(()=>{let e=class e{constructor(){this.iamAuthService=l(h)}captureFromUrl(){try{let t=new URLSearchParams(window.location.search),a={};if(e.UPSELL_PARAM_KEYS.forEach(s=>{let n=t.get(s);n&&(a[s]=n)}),Object.keys(a).length===0)return null;let r={params:a,capturedAt:Date.now(),landingUrl:window.location.href};return localStorage.setItem(e.STORAGE_KEY,JSON.stringify(r)),r}catch(t){return console.warn("[UpsellUtmService] Failed to capture upsell UTMs:",t),null}}cleanParamsFromUrl(){try{let t=new URL(window.location.href),a=!1;if(e.UPSELL_PARAM_KEYS.forEach(n=>{t.searchParams.has(n)&&(t.searchParams.delete(n),a=!0)}),!a)return;let r=t.searchParams.toString(),s=`${t.pathname}${r?`?${r}`:""}${t.hash}`;window.history.replaceState(window.history.state,"",s)}catch(t){console.warn("[UpsellUtmService] Failed to clean upsell params from URL:",t)}}get(){try{let t=localStorage.getItem(e.STORAGE_KEY);if(!t)return null;let a=JSON.parse(t);return!a?.params||Date.now()-a.capturedAt>e.TTL_MS?(this.clear(),null):a}catch{return this.clear(),null}}has(){return this.get()!==null}clear(){try{localStorage.removeItem(e.STORAGE_KEY)}catch{}}fireUpsellConversion(t){return c(this,null,function*(){let a=this.get();if(!a)return;let r=this.iamAuthService.ngxsAuthState?.workspaceAccountId??"",s={account_name:this.iamAuthService.ngxsAuthState?.accountDetailsWorkspace?.name,user_name:this.iamAuthService.ngxsAuthState?.user?.name,user_email:this.iamAuthService.ngxsAuthState?.user?.email,params:a.params,from_plan:t.fromPlan,to_plan:t.toPlan,account_id:r},n={"x-api-key":u.UPSELL_UTMS_API_KEY,"Content-Type":"application/json"};yield fetch("https://api.dapta.ai/api/8f5211b70a46e83b/save_upsell_utms",{method:"POST",headers:n,body:JSON.stringify(s)})})}};e.STORAGE_KEY="upsell_utms",e.REDIRECT_KEY="upsell_redirect",e.TTL_MS=1440*60*1e3,e.UPSELL_PARAM_KEYS=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id"],e.\u0275fac=function(a){return new(a||e)},e.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"});let o=e;return o})();export{E as a};

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.