1import{a as O,b as I}from"./chunk-JVJEKDJ3.js";import{a as w}from"./chunk-C5XSVVFE.js";import{D as a,E as b,Ea as y,Ma as u,Na as T,b as v,k as r,m as s,n as l,o as i,u as p,v as S,y as k}from"./chunk-D3O2QND5.js";import{a as c,b as C}from"./chunk-7CGTOI24.js";var E=new s("SERVER_RUNTIME_ENV");var g="appMode";function N(n,e,t){if(T(n)){let d=O(t??void 0);return e.set(g,d),d}if(e.hasKey(g)){let d=e.get(g,"Dev");return e.remove(g),d}let o=typeof globalThis.location<"u"?globalThis.location.hostname:void 0;return I(o)??"Dev"}var f=class n{constructor(e,t,o){this.platformId=e;this.transferState=t;this.mode=N(this.platformId,this.transferState,o)}mode;static \u0275fac=function(t){return new(t||n)(l(a),l(b),l(E,8))};static \u0275prov=r({token:n,factory:n.\u0275fac,providedIn:"root"})};var R=new s("APP_MODE");function Y(){return{provide:R,useFactory:n=>n.mode,deps:[f]}}var h={storageKey:"xs.cookieConsent",version:"1",message:"We use cookies to improve your experience and understand how this site is used.",acceptLabel:"Accept",refuseLabel:"Refuse",privacyPolicy:{label:"Privacy policy"}},A=new s("XS_COOKIE_CONSENT_OPTIONS");var m=class n{document=i(p,{optional:!0});isBrowser=u(i(a));providedOptions=i(A,{optional:!0});
1acceptedSubject=new v;refusedSubject=new v;decisionState=k(null);options=this.resolveOptions();decision=this.decisionState.asReadonly();status=y(()=>this.decisionState()?.status??"pending");hasDecision=y(()=>this.decisionState()!==null);accepted$=this.acceptedSubject.asObservable();refused$=this.refusedSubject.asObservable();constructor(){this.decisionState.set(this.readStoredDecision())}accept(){let e=this.createDecision("accepted");return this.saveDecision(e),this.decisionState.set(e),this.acceptedSubject.next(e),this.options.onAccept?.(e),e}refuse(){let e=this.createDecision("refused");return this.saveDecision(e),this.decisionState.set(e),this.refusedSubject.next(e),this.options.onRefuse?.(e),e}reset(){try{this.getStorage()?.removeItem(this.options.storageKey)}catch{}this.decisionState.set(null)}resolveOptions(){return C(c(c({},h),this.providedOptions),{privacyPolicy:c(c({},h.privacyPolicy),this.providedOptions?.privacyPolicy)})}createDecision(e){return{status:e,decidedAt:new Date().toISOString(),version:this.options.version}}readStoredDecision(){let e;try{e=this.getStorage()?.getItem(this.options.storageKey)}catch{return null}if(e==null)return null;try{let t=JSON.parse(e);return!this.isStoredDecision(t)||t.version!==this.options.version?null:t}catch{return null}}saveDecision(e){try{this.getStorage()?.setItem(this.options.storageKey,JSON.stringify(e))}catch{return}}getStorage(){if(!this.isBrowser)return null;try{return this.document?.defaultView?.localStorage??globalThis.localStorage??null}catch{return null}}isStoredDecision(e){if(typeof e!="object"||e===null)return!1;let t=e,o=t.status;return(o==="accepted"||o==="refused")&&typeof t.decidedAt=="string"&&typeof t.version=="string"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=r({token:n,factory:n.\u0275fac,providedIn:"root"})};var X=new s("MARKETING_TRACKING_CONFIG",{factory:()=>({enabled:!0,googleAnalyticsMeasurementId:"G-VJ31R6ZWXY",allowTestEnvironment:!1})}),M=class n{document=i(p,{optional:!0});isBrowser=u(i(a));cookieConsentService=i(m);config=i(X);destroyRef=i(S);started=!1;analyticsEnabled=!1;start(){this.started||(this.started=!0,this.cookieConsentService.accepted$.pipe(w(this.destroyRef)).subscribe(()=>{this.enableAnalytics()}),this.cookieConsentService.status()==="accepted"&&this.enableAnalytics())}trackEvent(e,t={}){if(this.cookieConsentService.status()!=="accepted")return!1;let o=this.enableAnalytics();return o===null||o.gtag===void 0?!1:(o.gtag("event",e,t),!0)}enableAnalytics(){if(this.analyticsEnabled)return this.getBrowserWindow();let e=this.getBrowserWindow(),t=this.document;return e===null||t===null||t===void 0?null:(this.ensureGtag(e),this.ensureGoogleAnalyticsScript(t),e.gtag?.("consent","update",{ad_storage:"granted",analytics_storage:"granted"}),e.gtag?.("js",new Date),e.gtag?.("config",this.config.googleAnalyticsMeasurementId),this.analyticsEnabled=!0,e)}ensureGtag(e){e.dataLayer??=[],e.gtag??=(...t)=>{e.dataLayer?.push(t)}}ensureGoogleAnalyticsScript(e){let t=`google-analytics-${this.config.googleAnalyticsMeasurementId}`;if(e.getElementById(t)!==null)return;let o=e.createElement("script");o.id=t,o.async=!0,o.src=`https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(this.config.googleAnalyticsMeasurementId)}`,o.dataset.marketingTracking="google-analytics",e.head.appendChild(o)}getBrowserWindow(){let e=this.document?.defaultView;return!this.config.enabled||!this.isBrowser||e===null||e===void 0||this.isBlockedTestEnvironment(e)?null:e}isBlockedTestEnvironment(e){if(this.config.allowTestEnvironment)return!1;let t=globalThis.process?.env,o=e.navigator.userAgent.toLowerCase();return t?.NODE_ENV==="test"||t?.VITEST!==void 0||o.includes("jsdom")}static \u0275fac=function(t){return new(t||n)};static \u0275prov=r({token:n,factory:n.\u0275fac,providedIn:"root"})};export{A as a,m as b,R as c,Y as d,M as e};
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.