1import{n as F,t as E}from"./chunk-BElsZJyq.js";import{Mt as T,On as _i,_i as te,_n as Yy}from"./chunk-CHbQfUU8.js";import{k as lr}from"./chunk-DlGf_roQ.js";var y=(()=>{class r{constructor(){this.platformId=T(Yy)}set(e,t){if(lr(this.platformId))try{sessionStorage.setItem(e,JSON.stringify(t))}catch(i){console.error(`Error saving to sessionStorage`,i)}}get(e){if(!lr(this.platformId))return null;try{let t=sessionStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch(i){return t}}catch(t){return console.error(`Error getting value from sessionStorage`,t),null}}remove(e){lr(this.platformId)&&sessionStorage.removeItem(e)}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵprov=te({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();var b=(()=>{class r{constructor(){this.module=null,this.loading=null}load(){return this.module?Promise.resolve(this.module):(this.loading||(this.loading=import(`./chunk-DejTgtyW.js`).then(e=>this.module=e)),this.loading)}track(e,t={}){this.load().then(i=>i.track(e,t)).catch(()=>{})}identify(e){this.load().then(t=>{let i=new t.Identify;for(let[o,s]of Object.entries(e))s!=null&&i.set(o,s);t.identify(i)}).catch(()=>{})}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵprov=te({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();var k=(()=>{class r{get bridge(){return typeof window>`u`?null:window.webkit?.messageHandlers?.appsFlyer??null}isAvailable(){return this.bridge!==null}sendEvent(e,t){let i=this.bridge;if(i)try{i.postMessage({eventName:e,eventValues:t})}catch(o){console.error(`AppsFlyer bridge error:`,o)}}trackPurchase(e){let t=Number(e.revenue);if(!this.isValidRevenue(t)){this.warnInvalidRevenue(`af_purchase`,e.revenue);return}this.sendEvent(`af_purchase`,E({af_revenue:t,af_currency:`USD`},e.contentId?{af_content_id:e.contentId}:{}))}trackSubscribe(e){let t=Number(e.revenue);if(!this.isValidRevenue(t)){this.warnInvalidRevenue(`af_subscribe`,e.revenue);return}this.sendEvent(`af_subscribe`,E({af_revenue:t,af_currency:`USD`},e.subscriptionId?{af_subscription_id:e.subscriptionId}:{}))}isValidRevenue(e){return Number.isFinite(e)&&e>0}
1warnInvalidRevenue(e,t){this.isAvailable()&&console.warn(`AppsFlyer: ${e} skipped \u2014 invalid revenue`,t)}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵprov=te({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();var w=(()=>{class r{constructor(){this.document=T(_i),this.platformId=T(Yy),this.documentIsAccessible=lr(this.platformId)}static getCookieRegExp(e){let t=e.replace(/([[\]{}()|=;+?,.*^$\\])/gi,`\\$1`);return new RegExp(`(?:^`+t+`|;\\s*`+t+`)=(.*?)(?:;|$)`)}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch(t){return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),r.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.check(e)){e=encodeURIComponent(e);let i=r.getCookieRegExp(e).exec(this.document.cookie);return i?.[1]?r.safeDecodeURIComponent(i[1]):``}else return``}getAll(){if(!this.documentIsAccessible)return{};let e={},t=this.document;return t.cookie&&t.cookie!==``&&t.cookie.split(`;`).forEach(i=>{let[o,s]=i.split(`=`);e[r.safeDecodeURIComponent(o.replace(/^ /,``))]=r.safeDecodeURIComponent(s)}),e}set(e,t,i,o,s,p,g,A){if(!this.documentIsAccessible)return;if(typeof i==`number`||i instanceof Date||o||s||p||g){let h={expires:i,path:o,domain:s,secure:p,sameSite:g||`Lax`,partitioned:A};this.set(e,t,h);return}let f=encodeURIComponent(e)+`=`+encodeURIComponent(t)+`;`,n=i||{};if(n.expires)if(typeof n.expires==`number`){let h=new Date(new Date().getTime()+n.expires*1e3*60*60*24);f+=`Expires=`+h.toUTCString()+`;`}else f+=`Expires=`+n.expires.toUTCString()+`;`;n.path&&(f+=`Path=`+n.path+`;`),n.domain&&(f+=`Domain=`+n.domain+`;`),n.secure===!1&&n.sameSite===`None`&&(n.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),n.secure&&(f+=`Secure;`),n.sameSite||(n.sameSite=`Lax`),f+=`SameSite=`+n.sameSite+`;`,n.partitioned&&(f+=`Partitioned;`),this.document.cookie=f}delete(e,t,i,o,s=`Lax`){if(!this.documentIsAccessible)return;let p=new Date(`Thu, 01 Jan 1970 00:00:01 GMT`);this.set(e,``,{expires:p,path:t,domain:i,secure:o,sameSite:s})}deleteAll(e,t,i,o=`Lax`){if(!this.documentIsAccessible)return;let s=this.getAll();for(let p in s)s.hasOwnProperty(p)&&this.delete(p,e,t,i,o)}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵprov=te({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();var x=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_term`,`utm_content`];var S=(()=>{class r{constructor(){this.platformId=T(Yy),this.sessionStorageService=T(y),this.cookieService=T(w)}getAttributionPayload(){if(!lr(this.platformId))return{};let e={},t=this.sessionStorageService.get(`stl-advertising-tags`);if(Array.isArray(t))for(let o of x){let s=t.find(p=>p?.key===o)?.value;typeof s==`string`&&s&&(e[o]=s)}let i=this.cookieService.get(`exp_id`);return typeof i==`string`&&i&&(e.ab_test_id=i),e}getGaClientId(){if(!lr(this.platformId))return``;let e=this.cookieService.get(`_ga`);if(!e)return``;let t=e.split(`.`);return t.length>2?t.slice(2).join(`.`):``}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵprov=te({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();var z=(()=>{class r{constructor(){this.platformId=T(Yy),this.amplitude=T(b),this.attributionService=T(S),this.appsFlyer=T(k)}setEvent(e){if(lr(this.platformId)){let t=this.attributionService.getAttributionPayload(),i=F(E({},e),{event_properties:E(E({},t),e.event_properties??{})});try{this.trackAmplitude(i)}catch(o){console.error(`Amplitude tracking error:`,o)}this.forwardPurchaseToAppsFlyer(i),typeof window<`u`&&typeof window.dataLayer<`u`&&(window.dataLayer.push({event_properties:null}),window.dataLayer.push({user_properties:null}),window.dataLayer.push(i))}}trackAmplitude(e){e.event_name&&(e.user_properties&&typeof e.user_properties==`object`&&!Array.isArray(e.user_properties)&&this.amplitude.identify(e.user_properties),this.amplitude.track(e.event_name,e.event_properties||{}))}forwardPurchaseToAppsFlyer(e){if(e.event_name!==`purchase`)return;let t=e.event_properties??{};t.purchase_type===`subscription_purchase`?this.appsFlyer.trackSubscribe({revenue:t.price,subscriptionId:t.subscription_id}):this.appsFlyer.trackPurchase({revenue:t.price,contentId:t.lead_id})}static{this.ɵfac=function(t){return new(t||r)}}static{this.ɵprov=te({token:r,factory:r.ɵfac,providedIn:`root`})}}return r})();
1export{y as a,w as i,b as n,z as o,k as r,S as t};
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.