@d8a-tech/wt 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/dist/browser_entry.d.ts +1 -0
  4. package/dist/cookies/consent.d.ts +4 -0
  5. package/dist/cookies/cookie_jar.d.ts +48 -0
  6. package/dist/cookies/cookie_settings.d.ts +23 -0
  7. package/dist/cookies/d8a_cookies.d.ts +71 -0
  8. package/dist/cookies/identity.d.ts +89 -0
  9. package/dist/cookies/session_manager.d.ts +36 -0
  10. package/dist/ga4/consent_wire.d.ts +38 -0
  11. package/dist/ga4/gtag_mapper.d.ts +46 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.min.mjs +3 -0
  14. package/dist/index.min.mjs.map +7 -0
  15. package/dist/install.d.ts +23 -0
  16. package/dist/runtime/anon_cid.d.ts +13 -0
  17. package/dist/runtime/browser_context.d.ts +2 -0
  18. package/dist/runtime/config_resolver.d.ts +4 -0
  19. package/dist/runtime/consent_resolver.d.ts +7 -0
  20. package/dist/runtime/consent_update_ping.d.ts +10 -0
  21. package/dist/runtime/d8a_global.d.ts +11 -0
  22. package/dist/runtime/debug_logger.d.ts +6 -0
  23. package/dist/runtime/dispatcher.d.ts +18 -0
  24. package/dist/runtime/engagement_timer.d.ts +21 -0
  25. package/dist/runtime/enhanced_measurement.d.ts +14 -0
  26. package/dist/runtime/gtag_consent_bridge.d.ts +9 -0
  27. package/dist/runtime/linker.d.ts +53 -0
  28. package/dist/runtime/param_precedence.d.ts +27 -0
  29. package/dist/runtime/queue_consumer.d.ts +12 -0
  30. package/dist/runtime/runtime_names.d.ts +12 -0
  31. package/dist/runtime/state.d.ts +2 -0
  32. package/dist/runtime/uach.d.ts +31 -0
  33. package/dist/transport/send.d.ts +20 -0
  34. package/dist/types.d.ts +144 -0
  35. package/dist/utils/endpoint.d.ts +14 -0
  36. package/dist/utils/gtag_primitives.d.ts +8 -0
  37. package/dist/utils/is_record.d.ts +1 -0
  38. package/dist/utils/window_slots.d.ts +4 -0
  39. package/dist/web-tracker.min.js +3 -0
  40. package/dist/web-tracker.min.js.map +7 -0
  41. package/dist/wt.min.js +3 -0
  42. package/dist/wt.min.js.map +7 -0
  43. package/index.d.ts +167 -0
  44. package/package.json +62 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 d8a.tech
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # Web tracker
2
+
3
+ The d8a web tracker provides a GA4 gtag-style API that sends GA4 gtag-compatible requests directly to a d8a collector.
4
+
5
+ ## Installation (script tag)
6
+
7
+ The script-tag bundle auto-installs on load and supports optional `src` query parameters:
8
+
9
+ - `?l=<name>`: d8a queue name (data layer)
10
+ - `?g=<name>`: d8a global function name
11
+ - `?gl=<name>`: gtag/GTM consent queue name (defaults to `dataLayer`)
12
+
13
+ ```html
14
+ <script async src="https://global.t.d8a.tech/d/wt.min.js"></script>
15
+ <script>
16
+ window.d8aLayer = window.d8aLayer || [];
17
+ window.d8a = window.d8a || function(){d8aLayer.push(arguments);};
18
+
19
+ d8a("js", new Date());
20
+ d8a("config", "<property_id>", {
21
+ server_container_url: "https://example.org/d/c",
22
+ });
23
+ </script>
24
+ ```
25
+
26
+ ## Installation (npm module)
27
+
28
+ ```bash
29
+ npm install @d8a-tech/wt
30
+ ```
31
+
32
+ ```javascript
33
+ import { installD8a } from "@d8a-tech/wt";
34
+
35
+ // Optional overrides:
36
+ // - dataLayerName: d8a queue name (defaults to "d8aLayer")
37
+ // - globalName: d8a global function name (defaults to "d8a")
38
+ // - gtagDataLayerName: gtag/GTM consent queue name (defaults to "dataLayer")
39
+ installD8a();
40
+
41
+ const d8a = window.d8a;
42
+ if (!d8a) throw new Error("d8a is not installed");
43
+
44
+ d8a("js", new Date());
45
+ d8a("config", "<property_id>", {
46
+ server_container_url: "https://global.t.d8a.tech/<property_id>/d/c",
47
+ });
48
+ ```
49
+
50
+ ## Configuration precedence
51
+
52
+ When the same key is provided in multiple places, we resolve values as:
53
+
54
+ - Event params > config params > set params > browser defaults
55
+
56
+ ## Development
57
+
58
+ - Runtime source is ESM JavaScript in `src/` and types are shipped in `index.d.ts`.
59
+ - Tests use `tsx` (Node test runner compatibility):
60
+
61
+ ```bash
62
+ cd js/web-tracker
63
+ npm test
64
+ ```
65
+
66
+ ## Production build
67
+
68
+ This package can produce a single browser bundle:
69
+
70
+ - `dist/wt.min.js`: Script-tag bundle (auto-installs on load)
71
+ - `dist/index.min.mjs`: ESM bundle
72
+
73
+ Build:
74
+
75
+ ```bash
76
+ cd js/web-tracker
77
+ npm install
78
+ npm run build
79
+ ```
80
+
81
+ ## Examples (dev vs prod)
82
+
83
+ The `example/` directory contains two pages to quickly validate behavior in a browser:
84
+
85
+ - `example/index.html`: **dev/local** setup (served by Vite; imports from `../src/` and calls `installD8a()`).
86
+ - `example/prod.html`: **production-like** setup (loads `../dist/wt.min.js`, which auto-installs on load).
87
+
88
+ ### Dev example (no build step)
89
+
90
+ Run:
91
+
92
+ ```bash
93
+ cd js/web-tracker
94
+ npm install
95
+ npm run dev
96
+ ```
97
+
98
+ Then open the printed URL (Vite will serve `example/index.html` as `/`).
99
+
100
+ ### Prod-like example (requires build)
101
+
102
+ Run:
103
+
104
+ ```bash
105
+ cd js/web-tracker
106
+ npm install
107
+ npm run build
108
+ python3 -m http.server 8080
109
+ ```
110
+
111
+ Then open:
112
+
113
+ - `http://127.0.0.1:8080/example/prod.html`
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type ConsentStateLike = {
2
+ analytics_storage?: string;
3
+ };
4
+ export declare function canWriteAnalyticsCookies(consentState: ConsentStateLike): boolean;
@@ -0,0 +1,48 @@
1
+ type CookieMap = Map<string, string>;
2
+ type DocumentLike = {
3
+ cookie: string;
4
+ };
5
+ type WindowRefLike = {
6
+ document?: DocumentLike;
7
+ location?: {
8
+ protocol?: string;
9
+ hostname?: string;
10
+ };
11
+ };
12
+ type CookieSetOptions = {
13
+ path?: string;
14
+ domain?: string;
15
+ sameSite?: string;
16
+ secure?: boolean;
17
+ maxAgeSeconds?: number | null;
18
+ expires?: Date | null;
19
+ };
20
+ type CookieSetAttempt = {
21
+ candidate: string;
22
+ domain: string | null;
23
+ cookieStr: string;
24
+ before: string;
25
+ after: string;
26
+ readBack: string | undefined;
27
+ stuck: boolean;
28
+ };
29
+ type CookieSetResult = {
30
+ ok: boolean;
31
+ domain: string | null;
32
+ cookieStr: string | null;
33
+ attempts: CookieSetAttempt[];
34
+ };
35
+ declare function parseCookieHeader(header: unknown): CookieMap;
36
+ export { parseCookieHeader };
37
+ declare function buildSetCookieString(name: string, value: string, attrs: Record<string, unknown>): string;
38
+ export declare function createCookieJar({ windowRef }: {
39
+ windowRef: WindowRefLike;
40
+ }): {
41
+ get: (name: string) => string | undefined;
42
+ set: (name: string, value: string, opts?: CookieSetOptions) => CookieSetResult;
43
+ del: (name: string, opts?: CookieSetOptions) => CookieSetResult;
44
+ __internal: {
45
+ parseCookieHeader: typeof parseCookieHeader;
46
+ buildSetCookieString: typeof buildSetCookieString;
47
+ };
48
+ };
@@ -0,0 +1,23 @@
1
+ type DebugEnabledFn = (args: {
2
+ config: Record<string, unknown>;
3
+ setParams: Record<string, unknown>;
4
+ }) => boolean;
5
+ export type CookieSettings = {
6
+ cookieDomain: string;
7
+ cookiePrefix: string;
8
+ cookiePath: string;
9
+ cookieSameSite: "Lax" | "Strict" | "None";
10
+ cookieSecure: boolean;
11
+ cookieUpdate: boolean;
12
+ cookieMaxAgeSeconds: number;
13
+ forceCookieAttrsWrite: boolean;
14
+ debug: boolean;
15
+ };
16
+ export declare function resolveCookieSettings({ propertyCfg, setParams, https, state, isDebugEnabled, }: {
17
+ propertyCfg?: import("../types.ts").PropertyConfig;
18
+ setParams?: Record<string, unknown>;
19
+ https?: boolean;
20
+ state?: import("../types.ts").RuntimeState;
21
+ isDebugEnabled?: DebugEnabledFn;
22
+ }): CookieSettings;
23
+ export {};
@@ -0,0 +1,71 @@
1
+ declare function nowSeconds(nowMs: unknown): number;
2
+ export declare function applyCookiePrefix(cookiePrefix: unknown, cookieName: unknown): string;
3
+ export declare function buildD8aClientCookieName(cookiePrefix?: unknown): string;
4
+ export declare function buildD8aCookieName(propertyId: unknown, cookiePrefix?: unknown): string;
5
+ export declare function parseD8aClientCookie(value: unknown): {
6
+ cid: string;
7
+ } | null;
8
+ /**
9
+ * Generates the core cid parts (random + timestamp).
10
+ * Shared by both cookie-based and anonymous cid flows.
11
+ */
12
+ export declare function generateCidParts({ nowMs }?: {
13
+ nowMs?: unknown;
14
+ }): {
15
+ random: number;
16
+ timestampSec: number;
17
+ };
18
+ /**
19
+ * Formats cid parts into the canonical cid string.
20
+ */
21
+ export declare function formatCid({ random, timestampSec }: {
22
+ random: unknown;
23
+ timestampSec: unknown;
24
+ }): string;
25
+ export declare function buildD8aClientCookieValue({ nowMs }?: {
26
+ nowMs?: unknown;
27
+ }): string;
28
+ export declare function buildD8aClientCookieValueFromCid(cid: unknown): string | null;
29
+ export type SessionToken = {
30
+ key: string;
31
+ val: string;
32
+ raw?: string;
33
+ known: boolean;
34
+ };
35
+ declare function tokenizeSessionCookie(raw: unknown): SessionToken[] | null;
36
+ declare function detokenizeSessionCookie(tokens: SessionToken[]): string;
37
+ declare function getToken(tokens: SessionToken[], key: string): string | null;
38
+ declare function setToken(tokens: SessionToken[], key: string, val: unknown): void;
39
+ export declare function parseD8aSessionCookie(value: unknown): {
40
+ tokens: SessionToken[];
41
+ sid: number | null;
42
+ sct: number | null;
43
+ lastEventTs: number | null;
44
+ seg: number | null;
45
+ } | null;
46
+ /**
47
+ * Updates an existing session cookie tokens array or creates a new one.
48
+ *
49
+ * This is intentionally minimal in the current implementation:
50
+ * - inactivity timeout creates a new session (new `s`, increment `o`)
51
+ * - every event updates `t` and increments `j`
52
+ * - preserves unknown tokens and token order where possible
53
+ */
54
+ export declare function updateD8aSessionCookieTokens(existingTokens: SessionToken[] | null, { nowMs, sessionTimeoutMs }?: {
55
+ nowMs?: unknown;
56
+ sessionTimeoutMs?: unknown;
57
+ }): {
58
+ tokens: SessionToken[];
59
+ isNewSession: boolean;
60
+ };
61
+ export declare function serializeD8aSessionCookieTokens(tokens: SessionToken[]): string;
62
+ export declare const __internal: {
63
+ SESSION_PREFIX: string;
64
+ tokenizeSessionCookie: typeof tokenizeSessionCookie;
65
+ detokenizeSessionCookie: typeof detokenizeSessionCookie;
66
+ getToken: typeof getToken;
67
+ setToken: typeof setToken;
68
+ nowSeconds: typeof nowSeconds;
69
+ applyCookiePrefix: typeof applyCookiePrefix;
70
+ };
71
+ export {};
@@ -0,0 +1,89 @@
1
+ type CookieJarLike = {
2
+ get: (name: string) => string | undefined;
3
+ set: (name: string, value: string, opts?: Record<string, unknown>) => unknown;
4
+ };
5
+ type ConsentStateLike = {
6
+ analytics_storage?: string;
7
+ };
8
+ export declare function ensureClientId({ jar, consent, nowMs, cookieDomain, cookiePrefix, cookiePath, cookieSameSite, cookieSecure, cookieMaxAgeSeconds, cookieUpdate, forceCookieAttrsWrite, }?: {
9
+ jar?: CookieJarLike;
10
+ consent?: ConsentStateLike;
11
+ nowMs?: number;
12
+ cookieDomain?: string;
13
+ cookiePrefix?: string;
14
+ cookiePath?: string;
15
+ cookieSameSite?: string;
16
+ cookieSecure?: boolean;
17
+ cookieMaxAgeSeconds?: number;
18
+ cookieUpdate?: boolean;
19
+ forceCookieAttrsWrite?: boolean;
20
+ }): {
21
+ cid: string | null;
22
+ wrote: boolean;
23
+ };
24
+ /**
25
+ * Applies an explicit client id to the d8a client cookie, honoring cookie_update
26
+ * semantics: do not overwrite existing cookies when cookie_update=false,
27
+ * but still create missing cookies.
28
+ */
29
+ export declare function applyClientIdCookie({ jar, cid, consent, cookieDomain, cookiePrefix, cookiePath, cookieSameSite, cookieSecure, cookieMaxAgeSeconds, cookieUpdate, forceCookieAttrsWrite, }?: {
30
+ jar?: CookieJarLike;
31
+ cid?: unknown;
32
+ consent?: ConsentStateLike;
33
+ cookieDomain?: string;
34
+ cookiePrefix?: string;
35
+ cookiePath?: string;
36
+ cookieSameSite?: string;
37
+ cookieSecure?: boolean;
38
+ cookieMaxAgeSeconds?: number;
39
+ cookieUpdate?: boolean;
40
+ forceCookieAttrsWrite?: boolean;
41
+ }): {
42
+ cid: null;
43
+ wrote: boolean;
44
+ } | {
45
+ cid: string;
46
+ wrote: boolean;
47
+ };
48
+ /**
49
+ * Applies an explicit serialized session cookie value to a d8a per-property cookie,
50
+ * honoring cookie_update semantics: do not overwrite existing cookies when cookie_update=false,
51
+ * but still create missing cookies.
52
+ */
53
+ export declare function applySessionCookie({ jar, propertyId, value, consent, cookieDomain, cookiePrefix, cookiePath, cookieSameSite, cookieSecure, cookieMaxAgeSeconds, cookieUpdate, forceCookieAttrsWrite, }?: {
54
+ jar?: CookieJarLike;
55
+ propertyId?: string;
56
+ value?: unknown;
57
+ consent?: ConsentStateLike;
58
+ cookieDomain?: string;
59
+ cookiePrefix?: string;
60
+ cookiePath?: string;
61
+ cookieSameSite?: string;
62
+ cookieSecure?: boolean;
63
+ cookieMaxAgeSeconds?: number;
64
+ cookieUpdate?: boolean;
65
+ forceCookieAttrsWrite?: boolean;
66
+ }): {
67
+ wrote: boolean;
68
+ };
69
+ export declare function ensureSession({ jar, propertyId, consent, nowMs, cookieDomain, cookiePrefix, cookiePath, cookieSameSite, cookieSecure, cookieMaxAgeSeconds, cookieUpdate, forceCookieAttrsWrite, sessionTimeoutMs, }?: {
70
+ jar?: CookieJarLike;
71
+ propertyId?: string;
72
+ consent?: ConsentStateLike;
73
+ nowMs?: number;
74
+ cookieDomain?: string;
75
+ cookiePrefix?: string;
76
+ cookiePath?: string;
77
+ cookieSameSite?: string;
78
+ cookieSecure?: boolean;
79
+ cookieMaxAgeSeconds?: number;
80
+ cookieUpdate?: boolean;
81
+ forceCookieAttrsWrite?: boolean;
82
+ sessionTimeoutMs?: number;
83
+ }): {
84
+ sid: number | null;
85
+ sct: number | null;
86
+ isNewSession: boolean;
87
+ wrote: boolean;
88
+ };
89
+ export {};
@@ -0,0 +1,36 @@
1
+ import type { PropertyConfig, RuntimeState } from "../types.ts";
2
+ import type { CookieSettings } from "./cookie_settings.ts";
3
+ type CookieJarLike = {
4
+ get: (name: string) => string | undefined;
5
+ set: (name: string, value: string, opts?: {
6
+ domain?: string;
7
+ path?: string;
8
+ sameSite?: string;
9
+ secure?: boolean;
10
+ maxAgeSeconds?: number;
11
+ }) => {
12
+ ok?: boolean;
13
+ domain?: string | null;
14
+ cookieStr?: string | null;
15
+ attempts?: unknown[];
16
+ } | unknown;
17
+ };
18
+ /**
19
+ * Updates shared session tokens once per event and writes the same serialized
20
+ * session cookie value to each destination property cookie (when allowed).
21
+ *
22
+ * This preserves the current dispatcher behavior while making it testable and reusable.
23
+ */
24
+ export declare function updateAndWriteSharedSession({ state, destinations, jar, getPropertyConfig, resolveCookieSettings, sessionTimeoutMs, engagementTimeMs, engagedThresholdMs, nowMs, log, }: {
25
+ state: RuntimeState;
26
+ destinations: string[];
27
+ jar: CookieJarLike;
28
+ getPropertyConfig: (pid: string) => PropertyConfig;
29
+ resolveCookieSettings: (pcfg: PropertyConfig) => CookieSettings;
30
+ sessionTimeoutMs?: number;
31
+ engagementTimeMs?: number;
32
+ engagedThresholdMs?: number;
33
+ nowMs?: number;
34
+ log?: ((...args: unknown[]) => void) | null;
35
+ }): void;
36
+ export {};
@@ -0,0 +1,38 @@
1
+ import type { ConsentState } from "../types.ts";
2
+ /**
3
+ * Build `gcs` in the shape expected by the Google tag / GA4 collect wire format:
4
+ * `G1` + encode(ad_storage_state) + encode(analytics_storage_state)
5
+ */
6
+ export declare function buildGcs({ consent }: {
7
+ consent: ConsentState;
8
+ }): string;
9
+ /**
10
+ * Build `gcd` based on Consent Mode v2 state transitions.
11
+ *
12
+ * Uses the letter meanings described in Simo Ahava’s Consent Mode v2 guide:
13
+ * - `l`: not set
14
+ * - `p`: denied by default (no update)
15
+ * - `q`: denied by default and after update
16
+ * - `t`: granted by default (no update)
17
+ * - `r`: denied by default, granted after update
18
+ * - `m`: denied after update (no default)
19
+ * - `n`: granted after update (no default)
20
+ * - `u`: granted by default, denied after update
21
+ * - `v`: granted by default and after update
22
+ *
23
+ * Reference: https://www.simoahava.com/analytics/consent-mode-v2-google-tags/
24
+ *
25
+ * Note: The official `gcd` encoding contains more metadata than just the
26
+ * consent transitions. For our purposes we encode the transition letters for
27
+ * the 4 main consent signals and preserve the observed framing:
28
+ * - prefix: `13`
29
+ * - suffix: `l1`
30
+ *
31
+ * This ensures the known baselines match:
32
+ * - all denied (default denied, no update): `13p3p3p2p5l1`
33
+ * - all granted (default denied, update granted): `13r3r3r2r5l1`
34
+ */
35
+ export declare function buildGcd({ consentDefault, consentUpdate, }: {
36
+ consentDefault: ConsentState;
37
+ consentUpdate: ConsentState;
38
+ }): string;
@@ -0,0 +1,46 @@
1
+ import type { BrowserContext, ConsentState } from "../types.ts";
2
+ declare function toEpValue(v: unknown): string | null;
3
+ declare function toEpnValue(v: unknown): number | null;
4
+ export declare function encodeItemToPrValue(item: unknown): string;
5
+ /**
6
+ * Builds the query params for a GA4 gtag `/g/collect` request.
7
+ *
8
+ * This returns a URLSearchParams with already-stringified values. The caller is
9
+ * responsible for attaching it to a URL or sending as body.
10
+ */
11
+ export declare function buildGa4CollectQueryParams({ propertyId, eventName, eventParams, cookieHeader, clientId, userId, cookiePrefix, ignoreReferrer, browser, pageLoadMs, hitCounter, engagementTimeMs, uachParams, campaign, contentGroup, consentParams, debugMode, }: {
12
+ propertyId: string;
13
+ eventName: string;
14
+ eventParams: Record<string, unknown>;
15
+ cookieHeader: string;
16
+ clientId: string | null;
17
+ userId: string | null;
18
+ cookiePrefix: string;
19
+ ignoreReferrer: boolean;
20
+ browser: BrowserContext;
21
+ pageLoadMs: number | null;
22
+ hitCounter: number | null;
23
+ engagementTimeMs: number | null;
24
+ uachParams: Record<string, string> | null;
25
+ campaign: {
26
+ campaign_id?: string | null;
27
+ campaign_source?: string | null;
28
+ campaign_medium?: string | null;
29
+ campaign_name?: string | null;
30
+ campaign_term?: string | null;
31
+ campaign_content?: string | null;
32
+ } | null;
33
+ contentGroup: string | null;
34
+ consentParams: {
35
+ gcs?: string | null;
36
+ gcd?: string | null;
37
+ consent?: ConsentState;
38
+ } | null;
39
+ debugMode: boolean;
40
+ }): URLSearchParams;
41
+ export declare const __internal: {
42
+ ITEM_KEY_MAP: Record<string, string>;
43
+ toEpValue: typeof toEpValue;
44
+ toEpnValue: typeof toEpnValue;
45
+ };
46
+ export {};
@@ -0,0 +1 @@
1
+ export { installD8a } from "./install.ts";
@@ -0,0 +1,3 @@
1
+ /* web-tracker - built 2026-01-21T13:29:41.924Z */
2
+ function Y(e,n){return e[n]}function se(e,n,t){e[n]=t}function ae(e,n){let t=Y(e,n);if(Array.isArray(t))return t;let o=[];return se(e,n,o),o}function Ge({windowRef:e,dataLayerName:n="d8aLayer"}){let t=e;if(!t)throw new Error("createD8aGlobal: windowRef is required");function o(...r){ae(t,n).push(arguments)}return o.js=r=>o("js",r),o.config=(r,i)=>o("config",r,i),o.event=(r,i)=>o("event",r,i),o.set=(r,i)=>i===void 0?o("set",r):o("set",r,i),o.consent=(r,i)=>o("consent",r,i),o}function pn(){return{jsDate:null,pageLoadMs:null,propertyIds:[],propertyConfigs:{},primaryPropertyId:"",consent:{},consentDefault:{},consentUpdate:{},consentGtag:{},consentDefaultGtag:{},consentUpdateGtag:{},userId:null,set:{},linker:{domains:[]},incomingDl:null,events:[],__onEvent:null,__onConfig:null,__onSet:null,hitCounter:0,sessionEngagementMs:0,sessionEngaged:!1,anonCid:null,cookieAttrsSig:null,sharedSessionTokens:null,sharedSessionValue:null,emInstalled:!1,emSiteSearchFired:!1,__lastEffectiveAnalyticsStorage:void 0}}function ke(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{};return t&&Object.keys(t).length>0?t:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{}}function kn(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{},o=n!=null&&n.consentDefaultGtag&&typeof n.consentDefaultGtag=="object"?n.consentDefaultGtag:{},r=n!=null&&n.consentUpdateGtag&&typeof n.consentUpdateGtag=="object"?n.consentUpdateGtag:{};return t&&Object.keys(t).length>0||o&&Object.keys(o).length>0||r&&Object.keys(r).length>0?{consent:t,consentDefault:o,consentUpdate:r}:{consent:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{},consentDefault:n!=null&&n.consentDefault&&typeof n.consentDefault=="object"?n.consentDefault:{},consentUpdate:n!=null&&n.consentUpdate&&typeof n.consentUpdate=="object"?n.consentUpdate:{}}}function vt(e){if(typeof queueMicrotask=="function"){queueMicrotask(e);return}Promise.resolve().then(e)}function Ie(e){let n=typeof e=="function"?e():null;if(!n)return;let t=ke(e),o=t&&typeof t.analytics_storage=="string"?t.analytics_storage:void 0,r=n.__lastEffectiveAnalyticsStorage;if(r===void 0){n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitScheduled||(n.__consentPingInitScheduled=!0,vt(()=>{n.__consentPingInitDone=!0}));return}o!==r&&(n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitDone&&(!Array.isArray(n.propertyIds)||n.propertyIds.length===0||typeof n.__onEvent=="function"&&n.__onEvent("user_engagement",{consent_update:1})))}function R(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function yn(e){if(!R(e))return null;let n=e.user_id;if(typeof n!="string")return null;let t=n.trim();return t||null}function At(e){if(!R(e))return;let n=e.send_page_view;return typeof n=="boolean"?n:void 0}function Rt(e){return R(e)?e:{}}function Sn(e,n){if(!e||!R(n))return;let t={...e.linker||{domains:[]}},o=n.domains;if(Array.isArray(o)){let m=o.filter(f=>typeof f=="string"&&f.trim()).map(f=>f.trim());t.domains=m}let r=n.accept_incoming;typeof r=="boolean"&&(t.accept_incoming=r);let i=n.decorate_forms;typeof i=="boolean"&&(t.decorate_forms=i);let a=n.url_position,s=typeof a=="string"?a:"";(s==="query"||s==="fragment")&&(t.url_position=s),Array.isArray(t.domains)||(t.domains=[]),e.linker=t}function hn({windowRef:e,dataLayerName:n="d8aLayer"}){if(!e)throw new Error("createQueueConsumer: windowRef is required");let t=e,o=pn(),r=!1,i=null,a=!1;function s(l){let d=R(l)?l.length:null;return l&&typeof d=="number"&&typeof l!="string"?Array.from(l):Array.isArray(l)?l:null}function m(l){var p,c;let d=l[0],y=l[1],g=l[2];switch(String(d||"")){case"js":{o.jsDate=y instanceof Date?y:new Date(y),o.pageLoadMs==null&&o.jsDate instanceof Date&&!Number.isNaN(o.jsDate.getTime())&&(o.pageLoadMs=o.jsDate.getTime());return}case"config":{let k=String(y||"");if(!k)return;o.propertyIds.includes(k)||o.propertyIds.push(k),o.primaryPropertyId||(o.primaryPropertyId=k);let S=o.propertyConfigs[k]||{},b=R(g)?g:{};o.propertyConfigs[k]={...S,...b};let u=yn(b);u&&(o.userId=u),typeof o.__onConfig=="function"&&o.__onConfig(k,b),At(b)!==!1&&typeof o.__onEvent=="function"&&o.__onEvent("page_view",{send_to:k});return}case"consent":{let k=String(y||"");if(k==="default"||k==="update"){let S=Rt(g);k==="default"?o.consentDefault={...o.consentDefault||{},...S||{}}:o.consentUpdate={...o.consentUpdate||{},...S||{}},o.consent={...o.consentDefault||{},...o.consentUpdate||{}},Ie(()=>o)}return}case"set":{if(typeof y=="string"&&y.trim()){let k=y.trim();k==="linker"?Sn(o,g):o.set={...o.set||{},[k]:g},k==="user_id"&&typeof g=="string"&&g.trim()&&(o.userId=g.trim());let S={type:"field",field:k,value:g};(p=o.__onSet)==null||p.call(o,S);return}if(R(y)){o.set={...o.set||{},...y};let k=yn(y);k&&(o.userId=k),"linker"in y&&Sn(o,y.linker);let S={type:"object",obj:y};(c=o.__onSet)==null||c.call(o,S)}return}case"event":{let k=R(g)?g:{};o.events.push({name:String(y||""),params:k}),typeof o.__onEvent=="function"&&o.__onEvent(String(y||""),k);return}default:return}}function f(){let l=n,d=Y(t,l),y=Array.isArray(d)?d:ae(t,l);for(let g of y){let p=s(g);p&&m(p)}}function _(){let d=ae(t,n);if(d.__d8aQueueConsumerPatched){i=d.__d8aQueueConsumerOriginalPush||null,a=!1;return}i=d.push.bind(d),d.__d8aQueueConsumerOriginalPush=i,d.push=function(...g){let p=g[0],c=s(p);return c&&m(c),i(...g)},d.__d8aQueueConsumerPatched=!0,a=!0}function h(){r||(r=!0,f(),_())}return{start:h,getState:()=>o,setOnEvent:l=>{o.__onEvent=l},setOnConfig:l=>{o.__onConfig=l},setOnSet:l=>{o.__onSet=l},stop:()=>{if(!r)return;let d=Y(t,n);if(a&&i&&Array.isArray(d)){let y=d;y.push=i;try{delete y.__d8aQueueConsumerPatched,delete y.__d8aQueueConsumerOriginalPush}catch(g){}}r=!1}}}function Ve(e){return Math.floor((Number(e!=null?e:Date.now())||Date.now())/1e3)}function Ue(){return Math.floor(Math.random()*2147483647)}function He(e,n){let t=typeof e=="string"?e:"",o=String(n||"");return t?t.endsWith("_")&&o.startsWith("_")?`${t.slice(0,-1)}${o}`:`${t}${o}`:o}function ce(e){return He(e,"_d8a")}function ue(e,n){return He(n,`_d8a_${e}`)}function ne(e){let t=String(e||"").match(/^C1\.1\.([0-9]+)\.([0-9]+)$/);return t?{cid:`${t[1]}.${t[2]}`}:null}function ze({nowMs:e}={}){return{random:Ue(),timestampSec:Ve(e)}}function bn({random:e,timestampSec:n}){return`${e}.${n}`}function _n({nowMs:e}={}){let{random:n,timestampSec:t}=ze({nowMs:e});return`C1.1.${n}.${t}`}function Cn(e){let t=String(e||"").trim().match(/^([0-9]+)\.([0-9]+)$/);return t?`C1.1.${t[1]}.${t[2]}`:null}var Te="S1.1.",qe=new Set(["s","o","g","t","j","d"]);function xn(e){let n=String(e||"");return n.startsWith(Te)?n.slice(Te.length).split("$").map(i=>i.trim()).filter(Boolean).map(i=>{let a=i[0],s=i.slice(1);return{key:a,val:s,raw:i,known:qe.has(a)}}):null}function Ln(e){let n=e.map(t=>`${t.key}${t.val}`);return`${Te}${n.join("$")}`}function de(e,n){let t=e.find(o=>o.key===n);return t?t.val:null}function K(e,n,t){let o=e.findIndex(r=>r.key===n);o>=0?e[o]={...e[o],val:String(t),known:qe.has(n)}:e.push({key:n,val:String(t),known:qe.has(n)})}function wn(){let e=Ue().toString(36),n=Ue().toString(36),t=Ue().toString(36);return`${e}${n}${t}`}function fe(e){let n=xn(e);if(!n)return null;let t=de(n,"s"),o=de(n,"o"),r=de(n,"t"),i=de(n,"g"),a=t!=null?Number(t):NaN,s=o!=null?Number(o):NaN,m=r!=null?Number(r):NaN,f=i!=null?Number(i):NaN;return{tokens:n,sid:Number.isFinite(a)?a:null,sct:Number.isFinite(s)?s:null,lastEventTs:Number.isFinite(m)?m:null,seg:Number.isFinite(f)?f:null}}function je(e,{nowMs:n,sessionTimeoutMs:t}={}){var h,l,d;let o=Ve(n),r=Math.floor((Number(t!=null?t:1800*1e3)||0)/1e3),i=Array.isArray(e)&&e.length>0,a=i?e.map(y=>({...y})):[];if(!i)return K(a,"s",o),K(a,"o",1),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",wn()),{tokens:a,isNewSession:!0};let s=Number((h=de(a,"t"))!=null?h:NaN);if(!Number.isFinite(s)||o-s>r){let y=Number((l=de(a,"o"))!=null?l:NaN),g=Number.isFinite(y)?y+1:1;return K(a,"s",o),K(a,"o",g),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",wn()),{tokens:a,isNewSession:!0}}let _=Number((d=de(a,"j"))!=null?d:0);return K(a,"j",Number.isFinite(_)?_+1:1),K(a,"t",o),{tokens:a,isNewSession:!1}}function Ke(e){return Ln(e)}var We={SESSION_PREFIX:Te,tokenizeSessionCookie:xn,detokenizeSessionCookie:Ln,getToken:de,setToken:K,nowSeconds:Ve,applyCookiePrefix:He};function vn(e){let n=String(e||"").trim();if(!n)return["none"];let t=n.split(".");if(t.length===4){let r=t[t.length-1];if(String(Number(r))===r)return["none"]}let o=[];for(let r=t.length-2;r>=0;r-=1)o.push(t.slice(r).join("."));return o.push("none"),o}function An(e){return String(e).replace(/\/+$/,"")}function ye(e){let n=new Map,t=String(e||"");if(!t)return n;for(let o of t.split(";")){let r=o.trim();if(!r)continue;let i=r.indexOf("=");if(i<0)continue;let a=r.slice(0,i).trim(),s=r.slice(i+1).trim();a&&n.set(a,s)}return n}function Pt(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function Rn(e,n,t){let o=[];return o.push(`${e}=${n}`),t.path&&o.push(`Path=${String(t.path)}`),t.expires&&o.push(`Expires=${t.expires.toUTCString()}`),t.maxAgeSeconds!=null&&o.push(`Max-Age=${String(t.maxAgeSeconds)}`),t.sameSite&&o.push(`SameSite=${String(t.sameSite)}`),t.domain&&o.push(`Domain=${String(t.domain)}`),t.secure&&o.push("Secure"),o.join("; ")}function Dt(e){return e&&(e==="none"?null:e.startsWith(".")?e:`.${e}`)}function Me({windowRef:e}){let n=e;if(!(n!=null&&n.document))throw new Error("createCookieJar: windowRef.document is required");let t=n.document;function o(){var s;return ye((s=n.document)==null?void 0:s.cookie)}function r(s){return o().get(s)}function i(s,m,f={}){var v,D,N;let _=f.path||"/",h=Pt(n),l=f.sameSite||"Lax",d=!h&&String(l).toLowerCase()==="none"?"Lax":l,y=f.secure!=null?!!f.secure&&h:h,g=(v=f.maxAgeSeconds)!=null?v:null,p=(D=f.expires)!=null?D:null,c={path:_,sameSite:d,secure:y,maxAgeSeconds:g,expires:p},k=f.domain||"auto",S=String(((N=n.location)==null?void 0:N.hostname)||""),b=k==="auto"?vn(S):[k],u=[];for(let M of b){let x=Dt(M),U=Rn(s,m,{...c,domain:x}),E=String(t.cookie||"");t.cookie=U;let H=String(t.cookie||""),z=E!==H||r(s)===m;if(u.push({candidate:M,domain:M==="none"?null:x,cookieStr:U,before:E,after:H,readBack:r(s),stuck:z}),z)return{ok:!0,domain:M==="none"?null:x,cookieStr:U,attempts:u}}return{ok:!1,domain:null,cookieStr:null,attempts:u}}function a(s,m={}){return i(s,"deleted",{...m,expires:new Date(0)})}return{get:r,set:i,del:a,__internal:{parseCookieHeader:ye,buildSetCookieString:Rn}}}var Pn=new Set(["value","tax","shipping"]),Dn={item_id:"id",item_name:"nm",affiliation:"af",coupon:"cp",discount:"ds",index:"lp",item_brand:"br",item_category:"ca",item_category2:"c2",item_category3:"c3",item_category4:"c4",item_category5:"c5",item_list_id:"li",item_list_name:"ln",item_variant:"va",location_id:"lo",price:"pr",quantity:"qt",promotion_id:"pi",promotion_name:"pn"};function Nt(e){return!!e&&typeof e=="object"}function he(e){return e==null?null:typeof e=="string"?e:typeof e=="boolean"?e?"1":"0":typeof e=="number"?String(e):Array.isArray(e)?e.join(","):String(e)}function Et(e){if(typeof e=="number")return e;if(typeof e=="boolean")return e?1:0;if(typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:null}return null}function Se(e,n,t){t!=null&&e.set(`ep.${n}`,String(t))}function Nn(e,n,t){t!=null&&e.set(`epn.${n}`,String(t))}function It(e){let n=Nt(e)?e:{},t=[],o=[];for(let[i,a]of Object.entries(Dn)){if(!(i in n))continue;let s=n[i],m=he(s);m!=null&&t.push(`${a}${m}`)}let r=0;for(let i of Object.keys(n)){if(i in Dn)continue;let a=n[i],s=he(a);s!=null&&(o.push(`k${r}${i}`),o.push(`v${r}${s}`),r+=1)}return[...t,...o].join("~")}function En({propertyId:e,eventName:n,eventParams:t,cookieHeader:o,clientId:r,userId:i,cookiePrefix:a,ignoreReferrer:s,browser:m,pageLoadMs:f,hitCounter:_,engagementTimeMs:h,uachParams:l,campaign:d,contentGroup:y,consentParams:g,debugMode:p}){let c=new URLSearchParams;c.set("v","2"),c.set("tid",String(e||"")),c.set("en",String(n||"")),p===!0&&c.set("_dbg","1"),f!=null&&c.set("_p",String(f)),_!=null&&c.set("_s",String(_)),h!=null&&c.set("_et",String(h));let k=ye(o);if(r!=null&&String(r))c.set("cid",String(r));else{let x=ne(k.get(ce(a)));x!=null&&x.cid&&c.set("cid",x.cid)}typeof i=="string"&&i.trim()&&c.set("uid",i.trim());let S=d||{};typeof S.campaign_id=="string"&&S.campaign_id.trim()&&c.set("ci",S.campaign_id.trim()),typeof S.campaign_source=="string"&&S.campaign_source.trim()&&c.set("cs",S.campaign_source.trim()),typeof S.campaign_medium=="string"&&S.campaign_medium.trim()&&c.set("cm",S.campaign_medium.trim()),typeof S.campaign_name=="string"&&S.campaign_name.trim()&&c.set("cn",S.campaign_name.trim()),typeof S.campaign_term=="string"&&S.campaign_term.trim()&&c.set("ct",S.campaign_term.trim()),typeof S.campaign_content=="string"&&S.campaign_content.trim()&&c.set("cc",S.campaign_content.trim()),typeof y=="string"&&y.trim()&&Se(c,"content_group",y.trim());let b=ue(e,a),u=fe(k.get(b));(u==null?void 0:u.sid)!=null?c.set("sid",String(u.sid)):c.set("sid",String(Math.floor(Date.now()/1e3))),(u==null?void 0:u.sct)!=null?c.set("sct",String(u.sct)):c.set("sct","1"),(u==null?void 0:u.seg)!=null&&c.set("seg",String(u.seg));let v=m;if(v.dl&&c.set("dl",String(v.dl)),v.dt&&c.set("dt",String(v.dt)),s===!0&&c.set("ir","1"),c.set("dr",String(v.dr)),v.ul&&c.set("ul",String(v.ul)),v.sr&&c.set("sr",String(v.sr)),l)for(let[x,U]of Object.entries(l))U==null||U===""||c.set(x,String(U));g&&(g.gcs&&c.set("gcs",String(g.gcs)),g.gcd&&c.set("gcd",String(g.gcd)));let D=t||{};p===!0&&!Object.prototype.hasOwnProperty.call(D,"debug_mode")&&Se(c,"debug_mode","1");let N=D.currency;typeof N=="string"&&c.set("cu",N),D.transaction_id!=null&&Se(c,"transaction_id",he(D.transaction_id)),D.coupon!=null&&Se(c,"coupon",he(D.coupon)),D.customer_type!=null&&Se(c,"customer_type",he(D.customer_type));for(let x of Pn)D[x]!=null&&Nn(c,x,Et(D[x]));let M=D.items;if(Array.isArray(M)){let x=M.slice(0,200);for(let U=0;U<x.length;U+=1){let E=It(x[U]);E&&c.set(`pr${U+1}`,E)}}for(let x of Object.keys(D)){if(x==="items"||x==="currency"||x==="transaction_id"||x==="coupon"||x==="customer_type"||Pn.has(x)||x==="user_id"||x==="client_id"||x==="campaign_id"||x==="campaign_source"||x==="campaign_medium"||x==="campaign_name"||x==="campaign_term"||x==="campaign_content"||x==="page_location"||x==="page_title"||x==="page_referrer"||x==="content_group"||x==="ignore_referrer"||x==="language"||x==="screen_resolution"||x==="cookie_domain"||x==="cookie_expires"||x==="cookie_flags"||x==="cookie_path"||x==="cookie_prefix"||x==="cookie_update"||x==="send_page_view"||x==="send_to")continue;let U=D[x];typeof U=="number"?Nn(c,x,U):Se(c,x,he(U))}return c}function Ut(e){return/^https?:\/\//i.test(String(e||""))}function Qe(e){if(typeof e=="string"&&Ut(e))return Qe({server_container_url:e});let t=((e&&typeof e=="object"?e:{}).server_container_url||"").trim();if(!t)throw new Error("server_container_url is required");return An(t)}function In(e){let n=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.href)||"")}catch(m){return""}})(),t=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.title)||"")}catch(m){return""}})(),o=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.referrer)||"")}catch(m){return""}})(),r=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.hostname)||"")}catch(m){return""}})(),i=(()=>{var s;try{return String(((s=e==null?void 0:e.navigator)==null?void 0:s.language)||"").toLowerCase()}catch(m){return""}})(),a=(()=>{var s,m;try{let f=(s=e==null?void 0:e.screen)==null?void 0:s.width,_=(m=e==null?void 0:e.screen)==null?void 0:m.height;if(typeof f=="number"&&typeof _=="number")return`${f}x${_}`}catch(f){}return""})();return{dl:n,dt:t,dr:o,dh:r,ul:i,sr:a}}function Tt(e){return new Promise(n=>setTimeout(n,e))}function Wt(e){return e===429||e>=500}async function Un({url:e,windowRef:n,useBeacon:t,maxRetries:o=1,initialBackoffMs:r=200}){var h;let i=n,a=(h=i==null?void 0:i.navigator)==null?void 0:h.sendBeacon;if(t&&typeof a=="function")try{return a.call(i.navigator,e),{ok:!0,via:"beacon"}}catch(l){}let s=i==null?void 0:i.fetch;if(typeof s!="function")throw new Error("fetch is not available");let m={method:"POST",keepalive:!0,credentials:"include",cache:"no-store",redirect:"follow",mode:"no-cors"},f=0,_=r;for(;;){f+=1;try{let l=await s.call(i,e,m),d=typeof(l==null?void 0:l.status)=="number"?l.status:0;if(!Wt(d))return{ok:!0,via:"fetch",status:d}}catch(l){}if(f>o)return{ok:!1,via:"fetch",status:null};await Tt(_),_*=2}}function Re(e){return String((e||{}).analytics_storage||"").toLowerCase()!=="denied"}var Je=2*365*24*60*60;function Ye({jar:e,consent:n,nowMs:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:f=!0,forceCookieAttrsWrite:_=!1}={}){let h=ce(r),l=e==null?void 0:e.get(h),d=ne(l);if(d!=null&&d.cid)return Re(n||{})?f===!1&&!_?{cid:d.cid,wrote:!1}:(e==null||e.set(h,String(l||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:d.cid,wrote:!0}):{cid:d.cid,wrote:!1};let y=_n({nowMs:t}),g=ne(y),p=(g==null?void 0:g.cid)||null;return Re(n||{})?f===!1&&l?{cid:p,wrote:!1}:(e==null||e.set(h,y,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p,wrote:!0}):{cid:p,wrote:!1}}function Tn({jar:e,cid:n,consent:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:f=!0,forceCookieAttrsWrite:_=!1}={}){let h=typeof n=="string"?n.trim():String(n||"").trim(),l=Cn(h);if(!l)return{cid:null,wrote:!1};let d=ce(r),y=e==null?void 0:e.get(d),g=ne(y),p=(g==null?void 0:g.cid)||null;return Re(t||{})?y&&f===!1?_?(e==null||e.set(d,String(y||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p||h,wrote:!0}):{cid:p||h,wrote:!1}:(e==null||e.set(d,l,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:h,wrote:!0}):{cid:h,wrote:!1}}function Wn({jar:e,propertyId:n,value:t,consent:o,cookieDomain:r="auto",cookiePrefix:i="",cookiePath:a="/",cookieSameSite:s="Lax",cookieSecure:m=void 0,cookieMaxAgeSeconds:f=Je,cookieUpdate:_=!0,forceCookieAttrsWrite:h=!1}={}){var p;let l=String(n||"");if(!l)return{wrote:!1};let d=String(t||"");if(!((p=fe(d))!=null&&p.tokens))return{wrote:!1};let y=ue(l,i),g=e==null?void 0:e.get(y);return Re(o||{})?g&&_===!1?h?(e==null||e.set(y,String(g||""),{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:f}),{wrote:!0}):{wrote:!1}:(e==null||e.set(y,d,{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:f}),{wrote:!0}):{wrote:!1}}var Mt=["platform","platformVersion","architecture","model","bitness","fullVersionList","wow64","mobile"];function $n(e){e.d8a_tag_data=e.d8a_tag_data||{};let n=e.d8a_tag_data,t=n.uach_store;return R(t)||(n.uach_store={}),n.uach_store}function $t(e){let n=e.navigator;if(!R(n))return!1;let t=n.userAgentData;return R(t)?typeof t.getHighEntropyValues=="function":!1}function Bn(e){return $n(e).uach||null}function On(e){if(!$t(e))return null;let n=$n(e);return n.uach_promise||(n.uach_promise=e.navigator.userAgentData.getHighEntropyValues(Mt).then(t=>(n.uach=n.uach||t,n.uach))),n.uach_promise}function Mn(e){return encodeURIComponent(String(e||""))}function Fn(e){if(!e)return null;let n={};return e.architecture&&(n.uaa=String(e.architecture)),e.bitness&&(n.uab=String(e.bitness)),Array.isArray(e.fullVersionList)&&(n.uafvl=e.fullVersionList.map(t=>`${Mn(t.brand||"")};${Mn(t.version||"")}`).join("|")),n.uamb=e.mobile?"1":"0",e.model&&(n.uam=String(e.model)),e.platform&&(n.uap=String(e.platform)),e.platformVersion&&(n.uapv=String(e.platformVersion)),n.uaw=e.wow64?"1":"0",n}function Gn(e){switch(e){case 1:return"1";case 2:case 4:return"0";default:return"-"}}function qn(e){return String(e||"").toLowerCase()==="denied"?2:1}function Vn({consent:e}){let n=e||{},t=qn(n.ad_storage),o=qn(n.analytics_storage);return`G1${Gn(t)}${Gn(o)}`}function Hn({consentDefault:e,consentUpdate:n}){let t=e||{},o=n||{};function r(m){let f=String(m||"").toLowerCase();return f==="granted"?"granted":f==="denied"?"denied":null}function i(m,f){let _=r(m),h=r(f);return!_&&!h?"l":_==="denied"&&!h?"p":_==="granted"&&!h?"t":!_&&h==="denied"?"m":!_&&h==="granted"?"n":_==="denied"&&h==="denied"?"q":_==="granted"&&h==="granted"?"v":_==="denied"&&h==="granted"?"r":_==="granted"&&h==="denied"?"u":"l"}let a=[["ad_storage","3"],["analytics_storage","3"],["ad_user_data","2"],["ad_personalization","5"]],s="13";for(let[m,f]of a)s+=`${i(t[m],o[m])}${f}`;return s+="l1",s}function zn(){let e=ze({nowMs:Date.now()});return bn(e)}function jn({windowRef:e,state:n}){return n?(typeof n.anonCid=="string"&&n.anonCid||(n.anonCid=zn()),n.anonCid):zn()}function Kn({windowRef:e,nowMs:n=()=>Date.now()}={}){if(!e)throw new Error("createEngagementTimer: windowRef is required");let t=e,o=!1,r=!0,i=!0,a=!0,s=null,m=0;function f(){var u;try{if(typeof t.hasFocus=="function")return!!t.hasFocus();if(typeof((u=t.document)==null?void 0:u.hasFocus)=="function")return!!t.document.hasFocus()}catch(v){}return!0}function _(){var u,v;try{if(typeof((u=t.document)==null?void 0:u.hidden)=="boolean")return!t.document.hidden;if(typeof((v=t.document)==null?void 0:v.visibilityState)=="string")return t.document.visibilityState!=="hidden"}catch(D){}return!0}function h(){return r&&i&&a}function l(){let u=n();if(s!=null){let v=Math.max(0,u-s);m+=v,s=u}h()?s==null&&(s=u):s=null}function d(){l(),r=!0,l()}function y(){l(),r=!1,l()}function g(){l(),i=_(),l()}function p(){l(),a=!0,l()}function c(){l(),a=!1,l()}function k(){var u;o||(o=!0,r=f(),i=_(),a=!0,l(),typeof t.addEventListener=="function"&&(t.addEventListener("focus",d),t.addEventListener("blur",y),t.addEventListener("pageshow",p),t.addEventListener("pagehide",c)),typeof((u=t.document)==null?void 0:u.addEventListener)=="function"&&t.document.addEventListener("visibilitychange",g))}function S(){return l(),m|0}function b(){l();let u=m|0;return m=0,s=h()?n():null,u}return{start:k,peek:S,getAndReset:b,__internal:{sync:l}}}function te(e){let n=typeof e=="function"?e():null;return Array.isArray(n==null?void 0:n.propertyIds)&&n.propertyIds.length>0?n.propertyIds.slice():[]}function ee(e,n){var r;let t=typeof e=="function"?e():null,o=(r=t==null?void 0:t.propertyConfigs)==null?void 0:r[n];return o&&typeof o=="object"?o:{}}function we(e){let n=typeof e=="function"?e():null;return n!=null&&n.set&&typeof n.set=="object"?n.set:{}}function Qn({enabled:e}){return{enabled:e===!0,log:(...n)=>{if(e===!0)try{console.log(...n)}catch(t){}}}}function Jn({key:e,eventParams:n,config:t,setParams:o}){let r=n||{},i=t||{},a=o||{};return Object.prototype.hasOwnProperty.call(r,e)&&r[e]!=null?r[e]:Object.prototype.hasOwnProperty.call(i,e)&&i[e]!=null?i[e]:Object.prototype.hasOwnProperty.call(a,e)&&a[e]!=null?a[e]:null}function Q({key:e,eventParams:n,config:t,setParams:o}){let r=Jn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="string"&&r.trim()?r.trim():null}function Xe({key:e,eventParams:n,config:t,setParams:o}){let r=Jn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="boolean"?r:null}function Bt(e){let n=typeof e=="string"?e:"";if(!n.trim())return{};let t=n.split(";").map(r=>r.trim()).filter(Boolean),o={};for(let r of t){let i=r.toLowerCase();if(i==="secure"&&(o.secure=!0),i.startsWith("samesite=")){let s=r.split("=").slice(1).join("=").trim().toLowerCase();s==="lax"&&(o.sameSite="Lax"),s==="strict"&&(o.sameSite="Strict"),s==="none"&&(o.sameSite="None")}}return o}function be({propertyCfg:e,setParams:n,https:t,state:o,isDebugEnabled:r}){var U,E,H,z,J,T,oe;let i=R(e)?e:{},a=R(n)?n:{},s=(U=i.cookie_domain)!=null?U:a.cookie_domain,m=typeof s=="string"&&s.trim()?s:s==null?"auto":String(s),f=(E=i.cookie_prefix)!=null?E:a.cookie_prefix,_=typeof f=="string"?f:"",h=(H=i.cookie_path)!=null?H:a.cookie_path,l=typeof h=="string"&&h.trim()?h:"/",d=(z=i.cookie_update)!=null?z:a.cookie_update,y=typeof d=="boolean"?d:!0,g=(J=i.cookie_expires)!=null?J:a.cookie_expires,p=Number.isFinite(Number(g))?Number(g):null,c=p!=null?p:2*365*24*60*60,k=(oe=(T=i.cookie_flags)!=null?T:a.cookie_flags)!=null?oe:"",S=Bt(k),b=S.sameSite||"Lax",u=t===!0&&S.secure===!0?!0:t===!0,v=typeof r=="function"?r({config:i,setParams:a}):!1,D=JSON.stringify({domain:m,prefix:_,path:l,sameSite:b,secure:u,maxAgeSeconds:c}),N=`${_}|${m}|${l}`;o&&!o.cookieAttrsSig&&(o.cookieAttrsSig={});let x=(o!=null&&o.cookieAttrsSig?o.cookieAttrsSig[N]:void 0)!==D;return o!=null&&o.cookieAttrsSig&&(o.cookieAttrsSig[N]=D),{cookieDomain:m,cookiePrefix:_,cookiePath:l,cookieSameSite:b,cookieSecure:u,cookieUpdate:y,cookieMaxAgeSeconds:c,forceCookieAttrsWrite:x,debug:v}}function Ze(e){return R(e)?{ok:e.ok,domain:e.domain,cookieStr:e.cookieStr,attempts:e.attempts}:{}}function Yn({state:e,destinations:n,jar:t,getPropertyConfig:o,resolveCookieSettings:r,sessionTimeoutMs:i,engagementTimeMs:a,engagedThresholdMs:s,nowMs:m,log:f}){var p,c,k;if(!e||!Array.isArray(n)||n.length===0||!t||typeof o!="function"||typeof r!="function")return;let _=Number.isFinite(Number(m))?Number(m):Date.now(),h=Array.isArray(e.sharedSessionTokens)?e.sharedSessionTokens:null;if(!h)for(let S of n){let b=o(S),u=r(b),v=ue(S,u.cookiePrefix),D=t.get(v),N=fe(D);if(N!=null&&N.tokens){h=N.tokens;break}}let l=je(h||null,{nowMs:_,sessionTimeoutMs:i});l.isNewSession&&(e.sessionEngagementMs=0,e.sessionEngaged=!1);let d=We.getToken(l.tokens,"g");e.sessionEngagementMs=(Number(e.sessionEngagementMs)||0)+(Number(a)||0),!e.sessionEngaged&&Number(s)>0&&e.sessionEngagementMs>=Number(s)&&(We.setToken(l.tokens,"g",1),e.sessionEngaged=!0);let y=We.getToken(l.tokens,"g"),g=l.isNewSession||d!==y;e.sharedSessionTokens=l.tokens,e.sharedSessionValue=Ke(l.tokens);for(let S of n){let b=o(S),u=r(b),v=ue(S,u.cookiePrefix),D=t.get(v);if(!D){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(p=u.cookieMaxAgeSeconds)!=null?p:void 0});u.debug&&(f==null||f("[d8a] set session cookie (create)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.cookieUpdate===!0||g){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(c=u.cookieMaxAgeSeconds)!=null?c:void 0});u.debug&&(f==null||f("[d8a] set session cookie (value+attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.forceCookieAttrsWrite){let N=t.set(v,D,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(k=u.cookieMaxAgeSeconds)!=null?k:void 0});u.debug&&(f==null||f("[d8a] set session cookie (attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}u.debug&&(f==null||f("[d8a] set session cookie (no write)",{pid:S,cookieName:v,reason:"cookie_update=false and session value unchanged and force_cookie_attrs_write=false",cookieUpdate:u.cookieUpdate,shouldWriteSessionValue:g,forceCookieAttrsWrite:u.forceCookieAttrsWrite,cookieReadBack:t.get(v)}))}}function Ot(e){return typeof e=="string"&&e.trim()?[e.trim()]:Array.isArray(e)?e.filter(n=>typeof n=="string"&&n.trim()).map(n=>String(n).trim()):null}function Xn({windowRef:e,getState:n}){let t=e;if(!t)throw new Error("createDispatcher: windowRef is required");let o=[],r=null,i=!1,a=Me({windowRef:t});On(t);let s=Kn({windowRef:t});s.start();let m=1e4;function f(){let S=te(n)[0]||"";return S?ee(n,S):{}}function _({config:k,setParams:S}){let b=R(k)?k:{},u=R(S)?S:{};return b.debug_mode===!0||u.debug_mode===!0}function h(){var k;try{return String(((k=t==null?void 0:t.location)==null?void 0:k.protocol)||"").toLowerCase()==="https:"}catch(S){return!1}}function l(){let k=n();return k?k.pageLoadMs!=null?k.pageLoadMs:k.jsDate instanceof Date&&!Number.isNaN(k.jsDate.getTime())?(k.pageLoadMs=k.jsDate.getTime(),k.pageLoadMs):(k.pageLoadMs=Date.now(),k.pageLoadMs):null}function d(k,S){var v;o.push({name:k,params:S||{}});let b=f(),u=Number((v=b==null?void 0:b.max_batch_size)!=null?v:25);if(o.length>=u){g({useBeacon:!1});return}y()}function y(){var b;if(r!=null)return;let k=f(),S=Number((b=k==null?void 0:k.flush_interval_ms)!=null?b:1e3);r=t.setTimeout(()=>{r=null,g({useBeacon:!1})},S)}async function g({useBeacon:k}){var q,W,$,P,j,re,V,ve,Z,X;if(r!=null&&(t.clearTimeout(r),r=null),o.length===0)return{sent:0};let S=te(n),b=S[0]||"",u=b?ee(n,b):{},v=Number((q=u==null?void 0:u.max_batch_size)!=null?q:25),D=o.splice(0,v),N=ke(n),M=kn(n),x=u.session_timeout_ms,U=typeof x=="number"?x:1800*1e3,E=n(),H=l(),z=String((N==null?void 0:N.analytics_storage)||"").toLowerCase(),J=z==="denied",T=E!=null&&E.set&&typeof E.set=="object"?E.set:{},oe=h(),le=_({config:u,setParams:T}),w=($=(W=u==null?void 0:u.session_engagement_time_sec)!=null?W:T==null?void 0:T.session_engagement_time_sec)!=null?$:10,C=Number.isFinite(Number(w))?Number(w):10,L=Math.max(0,Math.floor(C*1e3)),A=Qn({enabled:le});A.log("[d8a] flush",{href:String(((P=t==null?void 0:t.location)==null?void 0:P.href)||""),propertyIds:S,analyticsStorage:z||"(unset)",analyticsDenied:J,cookieHeader:String(((j=t==null?void 0:t.document)==null?void 0:j.cookie)||"")});function I(ge){return be({propertyCfg:ge,setParams:T,https:oe,state:E,isDebugEnabled:_})}let B=0;for(let ge of D){let ie=R(ge.params)?ge.params:{},Pe=Ot(ie.send_to),De=Pe||S;if(!De||De.length===0)continue;let F={...ie};delete F.send_to;let Oe=s.getAndReset();!J&&E&&Yn({state:E,destinations:De,jar:a,getPropertyConfig:Ae=>ee(n,Ae),resolveCookieSettings:I,sessionTimeoutMs:U,engagementTimeMs:Oe,engagedThresholdMs:L,nowMs:Date.now(),log:A.enabled?A.log:null}),E&&(E.hitCounter=(E.hitCounter||0)+1);let Ne=[];for(let Ae of De){let G=ee(n,Ae),kt=Qe(G),O=I(G),yt=Q({key:"user_id",eventParams:F,config:G,setParams:T}),St=Q({key:"client_id",eventParams:F,config:G,setParams:T}),ht=Xe({key:"debug_mode",eventParams:F,config:G,setParams:T})===!0,wt={campaign_id:Q({key:"campaign_id",eventParams:F,config:G,setParams:T}),campaign_source:Q({key:"campaign_source",eventParams:F,config:G,setParams:T}),campaign_medium:Q({key:"campaign_medium",eventParams:F,config:G,setParams:T}),campaign_name:Q({key:"campaign_name",eventParams:F,config:G,setParams:T}),campaign_term:Q({key:"campaign_term",eventParams:F,config:G,setParams:T}),campaign_content:Q({key:"campaign_content",eventParams:F,config:G,setParams:T})},bt=Q({key:"content_group",eventParams:F,config:G,setParams:T}),_t=Xe({key:"ignore_referrer",eventParams:F,config:G,setParams:T})===!0,pe={...In(t)},un=Q({key:"page_location",eventParams:F,config:G,setParams:T}),fn=Q({key:"page_title",eventParams:F,config:G,setParams:T}),ln=Q({key:"page_referrer",eventParams:F,config:G,setParams:T}),dn=Q({key:"language",eventParams:F,config:G,setParams:T}),gn=Q({key:"screen_resolution",eventParams:F,config:G,setParams:T});if(un&&(pe.dl=un),fn&&(pe.dt=fn),ln!=null&&(pe.dr=ln),dn&&(pe.ul=dn),gn&&(pe.sr=gn),!J)if(O.debug){let Fe=ce(O.cookiePrefix),mn=a.get(Fe),Ee=Ye({jar:a,consent:N,cookieDomain:O.cookieDomain,cookiePrefix:O.cookiePrefix,cookiePath:O.cookiePath,cookieSameSite:O.cookieSameSite,cookieSecure:O.cookieSecure,cookieMaxAgeSeconds:(re=O.cookieMaxAgeSeconds)!=null?re:void 0,cookieUpdate:O.cookieUpdate,forceCookieAttrsWrite:O.forceCookieAttrsWrite}),Lt=Ee!=null&&Ee.wrote?mn?"attrs update":"create":"no write";A.log(`[d8a] set client cookie (${Lt})`,{pid:Ae,cookiePrefix:O.cookiePrefix,result:Ee,cookieName:Fe,cookieBefore:mn,cookieReadBack:a.get(Fe),documentCookie:String(((V=t==null?void 0:t.document)==null?void 0:V.cookie)||"")})}else Ye({jar:a,consent:N,cookieDomain:O.cookieDomain,cookiePrefix:O.cookiePrefix,cookiePath:O.cookiePath,cookieSameSite:O.cookieSameSite,cookieSecure:O.cookieSecure,cookieMaxAgeSeconds:(ve=O.cookieMaxAgeSeconds)!=null?ve:void 0,cookieUpdate:O.cookieUpdate,forceCookieAttrsWrite:O.forceCookieAttrsWrite});let Ct=En({propertyId:Ae,eventName:ge.name,eventParams:F,cookieHeader:J?"":String(((Z=t.document)==null?void 0:Z.cookie)||""),clientId:St||(J?jn({windowRef:t,state:E}):null),userId:yt,cookiePrefix:O.cookiePrefix,browser:pe,ignoreReferrer:_t,pageLoadMs:H!=null?Number(H):null,hitCounter:(X=E==null?void 0:E.hitCounter)!=null?X:null,engagementTimeMs:Oe!=null?Number(Oe):null,uachParams:Fn(Bn(t)),campaign:wt,contentGroup:bt||null,consentParams:{gcs:Vn({consent:M.consent}),gcd:Hn({consentDefault:M.consentDefault,consentUpdate:M.consentUpdate})},debugMode:ht}),xt=`${kt}?${Ct.toString()}`;Ne.push(Un({url:xt,windowRef:t,useBeacon:k}))}Ne.length>0&&(await Promise.all(Ne),B+=Ne.length)}return o.length>0&&y(),{sent:B}}function p({useBeacon:k=!1}={}){return g({useBeacon:k===!0})}function c(){var k;t!=null&&t.addEventListener&&(i||(i=!0,t.addEventListener("pagehide",()=>{try{te(n).length>0&&s.peek()>0&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}),(k=t.document)!=null&&k.addEventListener&&t.document.addEventListener("visibilitychange",()=>{if(t.document.hidden){try{te(n).length>0&&s.peek()>=m&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}})))}return{enqueueEvent:d,flush:g,flushNow:p,attachLifecycleFlush:c}}function _e(e){return typeof e=="string"?e:""}function en(e,n){var t;try{let o=R(e)?e:null,r=o&&R(o.currentScript)?o.currentScript:null,i=_e(r==null?void 0:r.src);if(!i)return"";let a=o&&R(o.location)?_e((t=o.location)==null?void 0:t.href):"",s=new URL(i,a||void 0);return _e(s.searchParams.get(n))}catch(o){return""}}function Zn({windowRef:e,dataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=_e(e==null?void 0:e.d8aDataLayerName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"l");return o.trim()?o.trim():"d8aLayer"}function et({windowRef:e,globalName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=_e(e==null?void 0:e.d8aGlobalName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"g");return o.trim()?o.trim():"d8a"}function nt({windowRef:e,gtagDataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=_e(e==null?void 0:e.d8aGtagDataLayerName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"gl");return o.trim()?o.trim():"dataLayer"}var $e="__d8aConsentBridgeHubs";function Ft(e){return R(e)}function nn(e,n){if(!e)return null;let t=String(n||"dataLayer"),o=Y(e,$e),r=Ft(o)?o:{};(!o||o!==r)&&se(e,$e,r);let i=r[t];if(i&&typeof i=="object")return i;let a={subscribers:new Set,originalPush:null,patched:!1,dataLayerName:t};return r[t]=a,a}function tt({windowRef:e,getState:n,dataLayerName:t="dataLayer"}){if(!e)throw new Error("createGtagConsentBridge: windowRef is required");let o=e;if(!o)throw new Error("createGtagConsentBridge: windowRef is required");if(typeof n!="function")throw new Error("createGtagConsentBridge: getState is required");let r=!1,i=null;function a(d){let y=R(d)?d.length:null;if(d&&typeof y=="number"&&typeof d!="string")try{return Array.from(d)}catch(g){return null}return Array.isArray(d)?d:null}function s({action:d,patch:y}){let g=n();if(g){if(d==="default")g.consentDefaultGtag={...g.consentDefaultGtag||{},...y||{}};else if(d==="update")g.consentUpdateGtag={...g.consentUpdateGtag||{},...y||{}};else return;g.consentGtag={...g.consentDefaultGtag||{},...g.consentUpdateGtag||{}},Ie(n)}}function m(d){let[y,g,p]=d;if(y!=="consent")return null;let c=String(g||"");return c!=="default"&&c!=="update"||!R(p)?null:["consent",c,p]}function f(d){let y=m(d);if(!y)return;let[,g,p]=y;s({action:g,patch:p})}function _(){let y=Y(o,t);if(Array.isArray(y))for(let g of y){let p=a(g);p&&f(p)}}function h(){let d=t,y=ae(o,d),g=nn(o,d);g&&(g.patched||(g.originalPush=y.push.bind(y),y.push=function(...c){let k=c[0],S=a(k);if(S)for(let b of g.subscribers)try{b(S)}catch(u){}return g.originalPush(...c)},g.patched=!0,y.__d8aConsentBridgePatched=!0))}function l(){if(r)return;r=!0;let d=nn(o,t);d&&(d.subscribers.add(f),i=()=>{d.subscribers.delete(f)},_(),h())}return{start:l,stop:()=>{if(!r)return;let d=t,y=nn(o,d);if(!y)return;typeof i=="function"&&i(),i=null;let g=Y(o,d);if(y.subscribers.size===0&&y.originalPush&&Array.isArray(g)){let p=g;p.push=y.originalPush,y.originalPush=null,y.patched=!1;try{delete p.__d8aConsentBridgePatched;let c=Y(o,$e),k=R(c)?c:null;k&&(delete k[d],Object.keys(k).length===0&&se(o,$e,void 0))}catch(c){}}r=!1}}}function ot(e,n=[]){return Array.isArray(e)?e.map(t=>String(t).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(t=>t.trim()).filter(Boolean):n}function Gt(e,n){try{return new URL(String(e||""),n?String(n):void 0)}catch(t){return null}}function qt(e){let n=e;for(let t=0;t<100&&n;t+=1){let o=R(n)?n:null,r=String((o==null?void 0:o.tagName)||"").toLowerCase();if(r==="a"||r==="area")return n;n=(o==null?void 0:o.parentNode)||null}return null}function me(e,n){if(!e)return null;let t=R(e)?e:null;try{if(typeof(t==null?void 0:t.getAttribute)=="function"){let r=t.getAttribute(n);if(r!=null)return r}}catch(r){}let o=t?t[n]:null;return o!=null?String(o):null}function Vt(e){let n=String((e==null?void 0:e.protocol)||"").toLowerCase();return n==="http:"||n==="https:"}function Ht(e,n){let t=String(e||"").toLowerCase(),o=String(n||"").toLowerCase().replace(/^\./,"");return!t||!o?!1:t===o||t.endsWith(`.${o}`)}function zt(e){return String((e==null?void 0:e.pathname)||"").split("/").filter(Boolean).slice(-1)[0]||""}function jt(e){let n=String(e||""),t=n.lastIndexOf(".");return t<0?"":n.slice(t+1).toLowerCase()}function tn(e){return String(e||"").replace(/\s+/g," ").trim()}function Kt(e){let n=me(e,"id");return tn(n)||null}function Qt(e){let n=me(e,"className")||me(e,"class");return tn(n)||null}function Jt(e){let n=me(e,"textContent")||me(e,"innerText");return tn(n)||null}function rt({windowRef:e,getState:n,dispatcher:t}){let o=e;if(!o)throw new Error("createEnhancedMeasurement: windowRef is required");if(typeof n!="function")throw new Error("createEnhancedMeasurement: getState is required");if(!t)throw new Error("createEnhancedMeasurement: dispatcher is required");function r(p,c){let k=p[c];return typeof k=="boolean"?k:void 0}function i(p,c){return p[c]}function a({propertyId:p,key:c,defaultValue:k}){let S=we(n),b=ee(n,p),u=r(b,c);if(u!=null)return u;let v=r(S,c);return v!=null?v:k}function s({propertyId:p,key:c,defaultList:k}){let S=we(n),b=ee(n,p),u=i(b,c),v=i(S,c);return u!=null?ot(u,k):v!=null?ot(v,k):k}function m(){let p=n();return!p||p.emInstalled?!1:(p.emInstalled=!0,!0)}function f(){let p=n();return!p||p.emSiteSearchFired?!1:(p.emSiteSearchFired=!0,!0)}function _(){var u;let p=te(n);if(p.length===0||!f())return;let c=String(((u=o==null?void 0:o.location)==null?void 0:u.search)||"");if(!c||c==="?")return;let k=new URLSearchParams(c.startsWith("?")?c.slice(1):c),S=["q","s","search","query","keyword"],b=new Map;for(let v of p){if(!a({propertyId:v,key:"site_search_enabled",defaultValue:!0}))continue;let N=s({propertyId:v,key:"site_search_query_params",defaultList:S}),M="";for(let U of N){let E=k.get(U);if(E&&String(E).trim()){M=String(E).trim();break}}if(!M)continue;let x=b.get(M)||[];x.push(v),b.set(M,x)}for(let[v,D]of b.entries())t.enqueueEvent("view_search_results",{search_term:v,send_to:D})}function h({propertyId:p,linkHostname:c}){var b;if(!a({propertyId:p,key:"outbound_clicks_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"outbound_exclude_domains",defaultList:[String(((b=o==null?void 0:o.location)==null?void 0:b.hostname)||"")]});for(let u of S)if(Ht(c,u))return!1;return!0}function l({propertyId:p,ext:c}){if(!a({propertyId:p,key:"file_downloads_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"file_download_extensions",defaultList:["pdf","doc","docx","xls","xlsx","ppt","pptx","csv","txt","rtf","zip","rar","7z","dmg","exe","apk"]}),b=new Set(S.map(u=>String(u).toLowerCase().replace(/^\./,"")));return!!c&&b.has(String(c).toLowerCase().replace(/^\./,""))}function d(p){var J,T,oe;let c=te(n);if(c.length===0)return;let k=R(p)?p.target:null,S=qt(k);if(!S)return;let b=me(S,"href");if(!b)return;let u=Gt(b,String(((J=o==null?void 0:o.location)==null?void 0:J.href)||""));if(!u||!Vt(u))return;let v=String(u.href||""),D=String(u.hostname||""),N=Kt(S),M=Qt(S),x=Jt(S),U=zt(u)||me(S,"download")||"",E=jt(U),H=[],z=[];for(let le of c)l({propertyId:le,ext:E})&&H.push(le),h({propertyId:le,linkHostname:D})&&z.push(le);if(H.length>0){t.enqueueEvent("file_download",{link_url:v,...N?{link_id:N}:{},...M?{link_classes:M}:{},...x?{link_text:x}:{},file_name:U,file_extension:E,send_to:H}),(T=t.flushNow)==null||T.call(t,{useBeacon:!1});return}z.length>0&&(t.enqueueEvent("click",{link_url:v,...N?{link_id:N}:{},...M?{link_classes:M}:{},link_domain:D,outbound:"1",send_to:z}),(oe=t.flushNow)==null||oe.call(t,{useBeacon:!1}))}function y(){var c;if(!m())return;try{_(),!((c=n())!=null&&c.emSiteSearchFired)&&typeof(o==null?void 0:o.setTimeout)=="function"&&o.setTimeout(()=>{try{_()}catch(k){}},0)}catch(k){}let p=o==null?void 0:o.document;p&&typeof p.addEventListener=="function"&&(p.addEventListener("click",d,!0),p.addEventListener("auxclick",d,!0))}function g(){try{_()}catch(p){}}return{start:y,onConfig:g}}var Ce="_dl",dt="1",xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",an="=",on=null;function Yt(){if(on)return on;let e={};for(let n=0;n<xe.length;n+=1)e[xe[n]]=n;return e[an]=64,e["."]=64,on=e,e}function Xt(e){try{if(typeof TextEncoder!="undefined")return new TextEncoder().encode(e)}catch(t){}let n=new Uint8Array(e.length);for(let t=0;t<e.length;t+=1)n[t]=e.charCodeAt(t)&255;return n}function Zt(e){try{if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e)}catch(t){}let n="";for(let t=0;t<e.length;t+=1)n+=String.fromCharCode(e[t]);return n}function eo(e){let n=Xt(e),t=[];for(let o=0;o<n.length;o+=3){let r=o+1<n.length,i=o+2<n.length,a=n[o],s=r?n[o+1]:0,m=i?n[o+2]:0,f=a>>2,_=(a&3)<<4|s>>4,h=(s&15)<<2|m>>6,l=m&63;i||(l=64,r||(h=64)),t.push(xe[f],xe[_],h===64?an:xe[h],l===64?an:xe[l])}return t.join("").replace(/=+$/,"")}function no(e){let n=String(e||""),t=Yt(),o=[],r=0;function i(a){for(;r<n.length;){let s=n.charAt(r++),m=t[s];if(m!=null)return m;if(!/^[\s\xa0]*$/.test(s))throw new Error(`Invalid base64 char: ${s}`)}return a}for(;;){let a=i(-1),s=i(0),m=i(64),f=i(64);if(f===64&&a===-1)break;o.push((a<<2|s>>4)&255),m!==64&&(o.push((s<<4&240|m>>2)&255),f!==64&&o.push((m<<6&192|f)&255))}return Zt(new Uint8Array(o))}function gt(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function to(e){let n=Array.isArray(e==null?void 0:e.domains)?e.domains.filter(o=>typeof o=="string"):[],t=n.length>0;return{domains:n,accept_incoming:typeof(e==null?void 0:e.accept_incoming)=="boolean"?e.accept_incoming:t,decorate_forms:typeof(e==null?void 0:e.decorate_forms)=="boolean"?e.decorate_forms:!1,url_position:(e==null?void 0:e.url_position)==="fragment"?"fragment":"query"}}function cn(e){let n=String(e||"").match(/([^?#]+)(\?[^#]*)?(#.*)?/);return n?{base:n[1]||"",query:n[2]||"",fragment:n[3]||""}:{base:String(e||""),query:"",fragment:""}}function Le(e,n){let t=String(e||""),o=t.startsWith(n)?t.slice(1):t,r=[];if(!o)return r;for(let i of o.split("&")){let a=i.trim();if(!a)continue;let s=a.indexOf("=");if(s<0){r.push([decodeURIComponent(a),""]);continue}let m=decodeURIComponent(a.slice(0,s)),f=decodeURIComponent(a.slice(s+1));r.push([m,f])}return r}function Be(e,n){if(!e||e.length===0)return"";let t=e.map(([o,r])=>`${encodeURIComponent(o)}=${encodeURIComponent(r)}`).join("&");return n+t}function oo(e,n){let{query:t,fragment:o}=cn(e);for(let[r,i]of Le(t,"?"))if(r===n)return{value:i,where:"query"};for(let[r,i]of Le(o,"#"))if(r===n)return{value:i,where:"fragment"};return{value:null,where:null}}function it(e,n){let{base:t,query:o,fragment:r}=cn(e),i=Le(o,"?").filter(([s])=>s!==n),a=Le(r,"#").filter(([s])=>s!==n);return`${t}${Be(i,"?")}${Be(a,"#")}`}function rn(e,n,t,o){let{base:r,query:i,fragment:a}=cn(e);if(o==="fragment"){let m=Le(a,"#").filter(([f])=>f!==n);return m.push([n,t]),`${r}${i}${Be(m,"#")}`}let s=Le(i,"?").filter(([m])=>m!==n);return s.push([n,t]),`${r}${Be(s,"?")}${a}`}function st(e,n){try{let t=new URL(e,n||"https://example.invalid/");return String(t.hostname||"")}catch(t){let o=String(e||"").match(/^https?:\/\/([^/]+)/i);return o?String(o[1]||""):""}}function at(e,n){let t=String(e||"");if(!t)return!1;for(let o of n){let r=String(o||"").trim();if(r&&t.indexOf(r)>=0)return!0}return!1}var sn=null;function ro(){if(sn)return sn;let e=new Array(256);for(let n=0;n<256;n+=1){let t=n;for(let o=0;o<8;o+=1)t=t&1?t>>>1^3988292384:t>>>1;e[n]=t>>>0}return sn=e,e}function io(e){let n=ro(),t=4294967295;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r);t=t>>>8^n[(t^i)&255]}return((t^4294967295)>>>0).toString(36)}function mt({payload:e,offset:n,windowRef:t}){var s,m,f,_;let o=String(((s=t.navigator)==null?void 0:s.userAgent)||"")||String(((m=t==null?void 0:t.navigator)==null?void 0:m.userAgent)||""),r=new Date().getTimezoneOffset(),i=String(((f=t.navigator)==null?void 0:f.language)||"")||String(((_=t.navigator)==null?void 0:_.userLanguage)||""),a=Math.floor(Date.now()/6e4)-(Number(n)||0);return io([o,r,i,a,e].join("*"))}function ct({cookies:e,ts:n,windowRef:t}){let o=[];o.push(["ts",String(n)]);for(let[m,f]of Object.entries(e||{}))m&&f!=null&&o.push([m,String(f)]);let r=o.slice(1).sort((m,f)=>m[0].localeCompare(f[0])),a=[o[0],...r].map(([m,f])=>`${m}*${eo(f)}`).join("*"),s=mt({payload:a,offset:0,windowRef:t});return`${dt}*${s}*${a}`}function ut({value:e,windowRef:n,ttlMs:t=120*1e3}){let o=String(e||"");if(!o)return null;let r=o.split("*").filter(g=>g!=="");if(r.length<5)return null;let i=r[0],a=r[1];if(i!==dt)return null;let s=r.slice(2),m=s.join("*"),f=!1;for(let g=0;g<3;g+=1)if(mt({payload:m,offset:g,windowRef:n})===a){f=!0;break}if(!f)return null;let _=s,h={};for(let g=0;g+1<_.length;g+=2){let p=_[g],c=_[g+1];if(p)try{h[p]=no(c||"")}catch(k){h[p]=decodeURIComponent(c||"")}}let l=Number(h.ts);if(!Number.isFinite(l))return null;let d=Date.now()-l;if(!(d>=0&&d<=t))return null;let y={};for(let[g,p]of Object.entries(h))g!=="ts"&&g&&p!=null&&(y[g]=String(p));return{ts:l,cookies:y}}var ft="__d8a_linker_coordinator";function lt({getStates:e,windowRef:n}){let t=gt(n),o={},r=new Map;for(let i of e){let a=i(),s=we(i),m=te(i);if(m&&m.length>0){for(let _ of m){let h=ee(i,_),l=be({propertyCfg:h,setParams:s,https:t,state:a}),d=ue(_,l.cookiePrefix);o[d]||(o[d]={kind:"session",name:d,propertyId:_,settings:l,getState:i}),r.has(l.cookiePrefix)||r.set(l.cookiePrefix,{settings:l,getState:i})}continue}let f=be({propertyCfg:{},setParams:s,https:t,state:a});r.has(f.cookiePrefix)||r.set(f.cookiePrefix,{settings:f,getState:i})}for(let[i,a]of r.entries()){let s=ce(i);o[s]||(o[s]={kind:"client",name:s,settings:a.settings,getState:a.getState})}return o}function so({windowRef:e}){let n=e;if(!n)throw new Error("createSharedLinkerCoordinator: windowRef is required");let t=Me({windowRef:n}),o=new Set;function r(){for(let w of o.values())try{let C=w();if(C!=null&&C.set&&C.set.debug_mode===!0)return!0;let L=C==null?void 0:C.propertyConfigs;if(L&&typeof L=="object"){for(let A of Object.values(L))if(R(A)&&A.debug_mode===!0)return!0}}catch(C){}return!1}function i(...w){if(r())try{console.log("[d8a][linker]",...w)}catch(C){}}let a=0,s=new Set,m=null,f=null,_=null,h=null,l=!1,d=!1,y=null;function g(){return Array.from(o.values())}function p(){let w=Array.from(s.values()).sort(),C=w.length>0;return{domains:w,accept_incoming:m?m.value:C,decorate_forms:f?f.value:!1,url_position:_?_.value:"query"}}function c(w){if(!R(w))return;a+=1;let C=w.domains;if(Array.isArray(C))for(let q of C){if(typeof q!="string")continue;let W=q.trim();W&&s.add(W)}let L=w.accept_incoming;typeof L=="boolean"&&(m={value:L,rev:a});let A=w.decorate_forms;typeof A=="boolean"&&(f={value:A,rev:a});let I=w.url_position,B=typeof I=="string"?I:"";(B==="query"||B==="fragment")&&(_={value:B,rev:a})}function k(w){c(w)}function S(w){o.add(w);try{k(w().linker)}catch(C){}return()=>{o.delete(w)}}function b(w){var A,I;if(!w)return;let C=String(((A=n.location)==null?void 0:A.href)||"");if(!C)return;let L=it(C,Ce);if(L!==C&&typeof((I=n.history)==null?void 0:I.replaceState)=="function"){try{n.history.replaceState({},"",L)}catch(B){}n.location&&(n.location.href=L)}}function u(){var I;let w=String(((I=n.location)==null?void 0:I.href)||"");if(!w)return;let{value:C,where:L}=oo(w,Ce);if(!C)return;let A=ut({value:C,windowRef:n});A&&(h=A,i("parsed incoming _dl",{cookieNames:Object.keys(A.cookies||{}),ts:A.ts,where:L})),b(L)}function v(){var I,B,q;let w=lt({getStates:g(),windowRef:n}),C=String(((I=n.document)==null?void 0:I.cookie)||""),L=ye(C),A={};for(let W of Object.values(w)){let $=L.get(W.name);$&&(W.kind==="client"&&!((B=ne($))!=null&&B.cid)||W.kind==="session"&&!((q=fe($))!=null&&q.tokens)||(A[W.name]=$))}return A}function D(){let w=p();if(!w.domains||w.domains.length===0)return null;let C=v();if(!C||Object.keys(C).length===0)return null;let L=Date.now();return ct({cookies:C,ts:L,windowRef:n})}function N(w){var I;let C=p();if(!C.domains||C.domains.length===0)return w;let L=D();if(!L)return w;let A=st(w,String(((I=n.location)==null?void 0:I.href)||""));return at(A,C.domains)?rn(w,Ce,L,C.url_position):w}function M(w){if(!R(w))return;let C=typeof w.href=="string"?w.href:null;if(!C)return;let L=N(C);if(L!==C)try{w.href=L}catch(A){}}function x(w){var W,$,P;if(!R(w))return;let C=p();if(!C.decorate_forms)return;let L=typeof w.action=="string"?w.action:"";if(!L)return;let A=D();if(!A)return;let I=st(L,String(((W=n.location)==null?void 0:W.href)||""));if(!at(I,C.domains))return;let B=typeof w.method=="string"?w.method.toLowerCase():"";if(C.url_position==="query"&&B==="get"){let j=Array.isArray(w.childNodes)?w.childNodes:[],re=!1;for(let V of j)if(R(V)&&String(V.name||"")===Ce){try{V.value=A}catch(ve){}re=!0;break}if(!re&&typeof(($=n.document)==null?void 0:$.createElement)=="function")try{let V=n.document.createElement("input");V.setAttribute("type","hidden"),V.setAttribute("name",Ce),V.setAttribute("value",A),(P=w.appendChild)==null||P.call(w,V)}catch(V){}return}let q=rn(L,Ce,A,C.url_position);if(q!==L)try{w.action=q}catch(j){}}function U(w,C){let L=w;for(let A=0;A<8;A+=1){if(!L||typeof L!="object")return null;let I=String(L.tagName||"").toUpperCase();if(C.includes(I))return L;L=L.parentElement||L.parentNode||null}return null}function E(w){let C=R(w)?w.target:null,L=U(C,["A"]);L&&M(L)}function H(w){let C=R(w)?w.target:null,L=U(C,["A"]);L&&M(L)}function z(w){let C=R(w)?w.target:null,L=U(C,["FORM"]);L&&x(L)}function J(){if(!p().accept_incoming||!h)return;let C=g(),L=C[0]||null,A=L?ke(L):{};if(String((A==null?void 0:A.analytics_storage)||"").toLowerCase()==="denied"){let W=null;for(let $ of Object.values(h.cookies)){let P=ne($);if(P!=null&&P.cid){W=P.cid;break}}if(W)for(let $ of C)try{$().anonCid=W,$().incomingDl=null}catch(P){}h=null;return}let B=lt({getStates:C,windowRef:n}),q=!1;for(let W of Object.keys(h.cookies||{}))if(B[W]){q=!0;break}if(q){for(let[W,$]of Object.entries(h.cookies||{})){let P=B[W];if(P){if(P.kind==="client"){let j=ne($);if(!(j!=null&&j.cid))continue;let re=t.get(P.name);Tn({jar:t,cid:j.cid,consent:A,cookieDomain:P.settings.cookieDomain,cookiePrefix:P.settings.cookiePrefix,cookiePath:P.settings.cookiePath,cookieSameSite:P.settings.cookieSameSite,cookieSecure:P.settings.cookieSecure,cookieMaxAgeSeconds:P.settings.cookieMaxAgeSeconds,cookieUpdate:P.settings.cookieUpdate,forceCookieAttrsWrite:P.settings.forceCookieAttrsWrite});let V=t.get(P.name);i("applied client cookie",{name:P.name,cid:j.cid,cookieUpdate:P.settings.cookieUpdate,before:re,after:V}),delete h.cookies[W];continue}if(P.kind==="session"){let j=P.getState(),re=we(P.getState),V=gt(n),ve=ee(P.getState,P.propertyId),Z=be({propertyCfg:ve,setParams:re,https:V,state:j}),X=fe($),ge=t.get(P.name),ie=Wn({jar:t,propertyId:P.propertyId,value:$,consent:A,cookieDomain:Z.cookieDomain,cookiePrefix:Z.cookiePrefix,cookiePath:Z.cookiePath,cookieSameSite:Z.cookieSameSite,cookieSecure:Z.cookieSecure,cookieMaxAgeSeconds:Z.cookieMaxAgeSeconds,cookieUpdate:Z.cookieUpdate,forceCookieAttrsWrite:Z.forceCookieAttrsWrite}),Pe=t.get(P.name);i("applied session cookie",{name:P.name,propertyId:P.propertyId,cookieUpdate:Z.cookieUpdate,wrote:(ie==null?void 0:ie.wrote)===!0,sid:X==null?void 0:X.sid,sct:X==null?void 0:X.sct,before:ge,after:Pe}),ie!=null&&ie.wrote&&(X!=null&&X.tokens)&&(j.sharedSessionTokens=X.tokens,j.sharedSessionValue=String($||""),i("seeded shared session state",{propertyId:P.propertyId})),delete h.cookies[W]}}}if(!h.cookies||Object.keys(h.cookies).length===0){for(let W of C)try{W().incomingDl=null}catch($){}h=null}}}function T(){var L;if(d)return;let w=(L=n.HTMLFormElement)==null?void 0:L.prototype,C=w==null?void 0:w.submit;typeof C=="function"&&(y=C,w.submit=function(){try{x(this)}catch(I){}return C.call(this)},d=!0)}function oe(){var w,C,L,A,I,B;l||(l=!0,u(),J(),(C=(w=n.document)==null?void 0:w.addEventListener)==null||C.call(w,"mousedown",E),(A=(L=n.document)==null?void 0:L.addEventListener)==null||A.call(L,"keyup",H),(B=(I=n.document)==null?void 0:I.addEventListener)==null||B.call(I,"submit",z),T())}function le(){var w,C,L,A,I,B,q;if(l&&(l=!1,(C=(w=n.document)==null?void 0:w.removeEventListener)==null||C.call(w,"mousedown",E),(A=(L=n.document)==null?void 0:L.removeEventListener)==null||A.call(L,"keyup",H),(B=(I=n.document)==null?void 0:I.removeEventListener)==null||B.call(I,"submit",z),d)){let W=(q=n.HTMLFormElement)==null?void 0:q.prototype;if(W&&y)try{W.submit=y}catch($){}d=!1,y=null}}return{start:oe,stop:le,applyIncomingIfReady:J,registerRuntime:S,updateConfigPatch:c,__internal:{encodeDl:ct,decodeDl:ut,decorateUrlIfNeeded:N,stripParamFromUrl:it,setParamInUrl:rn,resolveLinkerConfig:to}}}function ao({windowRef:e}){let n=e,t=Y(n,ft);if(t)return t;let o=so({windowRef:n});return se(n,ft,o),o}function pt({windowRef:e,getState:n}){let t=ao({windowRef:e}),o=t.registerRuntime(n);return{start:()=>t.start(),stop:()=>o(),applyIncomingIfReady:()=>t.applyIncomingIfReady(),updateConfigPatch:r=>t.updateConfigPatch(r),__internal:t.__internal}}function co({windowRef:e=window,dataLayerName:n,globalName:t,gtagDataLayerName:o}={}){let r=e;if(!r)throw new Error("installD8a: window is required");r.d8a_tag_data=r.d8a_tag_data||{};let i=r.d8a_tag_data,a=Zn({windowRef:r,dataLayerName:n}),s=et({windowRef:r,globalName:t}),m=nt({windowRef:r,gtagDataLayerName:o});i.__d8aInstallResults||(i.__d8aInstallResults={}),i.__d8aInstallResultsByDataLayer||(i.__d8aInstallResultsByDataLayer={});let f=i.__d8aInstallResults,_=i.__d8aInstallResultsByDataLayer,h=`${a}|${s}`;if(f[h])return f[h];ae(r,a);let l=_[a]||null;if(l){typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let b={consumer:l.consumer,dispatcher:l.dispatcher,dataLayerName:a,globalName:s};return f[h]=b,b}typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let d=hn({windowRef:r,dataLayerName:a}),y=[];d.setOnConfig((b,u)=>{for(let v of y)v(b,u)});let g=[];d.setOnSet(b=>{for(let u of g)u(b)});let p=Xn({windowRef:r,getState:d.getState});p.attachLifecycleFlush(),d.setOnEvent((b,u)=>{p.enqueueEvent(b,u)});let c=pt({windowRef:r,getState:d.getState});c.start(),g.push(b=>{var u;b&&typeof b=="object"&&b.type==="field"&&b.field==="linker"&&c.updateConfigPatch(b.value),b&&typeof b=="object"&&b.type==="object"&&c.updateConfigPatch((u=b==null?void 0:b.obj)==null?void 0:u.linker),c.applyIncomingIfReady()}),y.push(()=>c.applyIncomingIfReady());let k=tt({windowRef:r,getState:d.getState,dataLayerName:m});d.start(),k.start();try{let b=rt({windowRef:r,getState:d.getState,dispatcher:p});y.push(()=>b.onConfig()),b.start()}catch(b){}let S={consumer:d,dispatcher:p,dataLayerName:a,globalName:s};return f[h]=S,_[a]=S,S}export{co as installD8a};
3
+ //# sourceMappingURL=index.min.mjs.map