@adv-re/segment-wrapper 5.0.0-beta.2 → 5.0.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.
package/README.md CHANGED
@@ -86,6 +86,9 @@ await analytics.identify('user-123', {
86
86
  import {initConfig} from '@adv-re/segment-wrapper'
87
87
 
88
88
  initConfig({
89
+ // Segment API Key
90
+ key: 'xOoVeB57iXT3X1ehtxLk0Ipte3eIYTZw',
91
+
89
92
  // User ID Configuration
90
93
  userIdPrefix: 'fc-',
91
94
 
package/dist/index.d.mts CHANGED
@@ -8,6 +8,9 @@ interface SegmentAnalytics {
8
8
  track: (event: string, properties?: Record<string, unknown>, options?: AnalyticsOptions, callback?: AnalyticsCallback) => void;
9
9
  page: (name?: string, properties?: Record<string, unknown>, options?: AnalyticsOptions, callback?: AnalyticsCallback) => void;
10
10
  identify: (userId: string | number, traits?: Record<string, unknown>, options?: AnalyticsOptions, callback?: AnalyticsCallback) => void;
11
+ load?: (key: string, options?: {
12
+ integrations?: IntegrationsObject;
13
+ }) => void;
11
14
  reset: () => void;
12
15
  ready: (callback: () => void) => void;
13
16
  addSourceMiddleware?: (middleware: SourceMiddlewareFunction) => void;
@@ -222,6 +225,10 @@ type ContextEnhancer = (context: ContextObject) => ContextObject | Promise<Conte
222
225
  * Segment Wrapper configuration object
223
226
  */
224
227
  interface SegmentWrapperConfig {
228
+ /**
229
+ * Segment write key for analytics initialization
230
+ */
231
+ key?: string;
225
232
  /**
226
233
  * User ID prefix to prepend to all user identifications
227
234
  */
@@ -838,4 +845,6 @@ declare const removeStorageItem: (key: string, type?: StorageType) => void;
838
845
  * Modern TypeScript abstraction layer on top of the Segment Analytics library.
839
846
  */
840
847
 
841
- export { type AdobeConfig, type AdobeRepository, type AdobeVisitor, type AdobeVisitorData$1 as AdobeVisitorData, type AnalyticsCallback, type GdprPrivacyValue as AnalyticsGdprPrivacyValue, type AnalyticsOptions, type AnonymousIdCheckResult, type BorosTcfCookie, type CampaignDetails, type ConfigGetter, type ConfigKey, type ConfigSetter, type ContextEnhancer, type ContextObject, type CookieOptions, type DefaultContextProperties, type DestinationMiddlewareFunction, type DestinationMiddlewareParams, EVENTS, type ExternalId, type GDPRPrivacyValue, type GDPRState, type GetCampaignDetailsOptions, type GetXandrIdOptions, type HashAlgorithm, type HashedEmail, type IntegrationsObject, type MPIConfig, type MiddlewarePayload, type NeededPurposes, type PageContext, type PageData, type STCParams, type ScreenInfo, type SegmentAnalytics, type SegmentUser, type SegmentWrapperConfig, type SourceMiddlewareFunction, type SourceMiddlewareParams, type Storage, type StorageType, type TCData, type TCFApi, type TCFApiVersion, type TCFCallback, type TCFCommand, TCFEvents, type UniversalIdData, type UniversalIdEvent, type UniversalIdEventDetail, type UniversalIdListener, UserGDPR, type UserTraits, type WindowWithMPI, type WindowWithSegmentWrapper, type XandrId, type XandrRepository, checkAnonymousId, clearConfig, createUniversalId, _default as default, getAdobeMCVisitorID, getAdobeVisitorData, getCampaignDetails, getConfig, getStorageItem, getUniversalId, hashEmail, initConfig, isClient, normalizeEmail, readCookie, removeCookie, removeStorageItem, saveCookie, setConfig, setStorageItem, storage, toCookieDomain, trackingTagsTypes };
848
+ declare const init: () => void;
849
+
850
+ export { type AdobeConfig, type AdobeRepository, type AdobeVisitor, type AdobeVisitorData$1 as AdobeVisitorData, type AnalyticsCallback, type GdprPrivacyValue as AnalyticsGdprPrivacyValue, type AnalyticsOptions, type AnonymousIdCheckResult, type BorosTcfCookie, type CampaignDetails, type ConfigGetter, type ConfigKey, type ConfigSetter, type ContextEnhancer, type ContextObject, type CookieOptions, type DefaultContextProperties, type DestinationMiddlewareFunction, type DestinationMiddlewareParams, EVENTS, type ExternalId, type GDPRPrivacyValue, type GDPRState, type GetCampaignDetailsOptions, type GetXandrIdOptions, type HashAlgorithm, type HashedEmail, type IntegrationsObject, type MPIConfig, type MiddlewarePayload, type NeededPurposes, type PageContext, type PageData, type STCParams, type ScreenInfo, type SegmentAnalytics, type SegmentUser, type SegmentWrapperConfig, type SourceMiddlewareFunction, type SourceMiddlewareParams, type Storage, type StorageType, type TCData, type TCFApi, type TCFApiVersion, type TCFCallback, type TCFCommand, TCFEvents, type UniversalIdData, type UniversalIdEvent, type UniversalIdEventDetail, type UniversalIdListener, UserGDPR, type UserTraits, type WindowWithMPI, type WindowWithSegmentWrapper, type XandrId, type XandrRepository, checkAnonymousId, clearConfig, createUniversalId, _default as default, getAdobeMCVisitorID, getAdobeVisitorData, getCampaignDetails, getConfig, getStorageItem, getUniversalId, hashEmail, init, initConfig, isClient, normalizeEmail, readCookie, removeCookie, removeStorageItem, saveCookie, setConfig, setStorageItem, storage, toCookieDomain, trackingTagsTypes };
package/dist/index.d.ts CHANGED
@@ -8,6 +8,9 @@ interface SegmentAnalytics {
8
8
  track: (event: string, properties?: Record<string, unknown>, options?: AnalyticsOptions, callback?: AnalyticsCallback) => void;
9
9
  page: (name?: string, properties?: Record<string, unknown>, options?: AnalyticsOptions, callback?: AnalyticsCallback) => void;
10
10
  identify: (userId: string | number, traits?: Record<string, unknown>, options?: AnalyticsOptions, callback?: AnalyticsCallback) => void;
11
+ load?: (key: string, options?: {
12
+ integrations?: IntegrationsObject;
13
+ }) => void;
11
14
  reset: () => void;
12
15
  ready: (callback: () => void) => void;
13
16
  addSourceMiddleware?: (middleware: SourceMiddlewareFunction) => void;
@@ -222,6 +225,10 @@ type ContextEnhancer = (context: ContextObject) => ContextObject | Promise<Conte
222
225
  * Segment Wrapper configuration object
223
226
  */
224
227
  interface SegmentWrapperConfig {
228
+ /**
229
+ * Segment write key for analytics initialization
230
+ */
231
+ key?: string;
225
232
  /**
226
233
  * User ID prefix to prepend to all user identifications
227
234
  */
@@ -838,4 +845,6 @@ declare const removeStorageItem: (key: string, type?: StorageType) => void;
838
845
  * Modern TypeScript abstraction layer on top of the Segment Analytics library.
839
846
  */
840
847
 
841
- export { type AdobeConfig, type AdobeRepository, type AdobeVisitor, type AdobeVisitorData$1 as AdobeVisitorData, type AnalyticsCallback, type GdprPrivacyValue as AnalyticsGdprPrivacyValue, type AnalyticsOptions, type AnonymousIdCheckResult, type BorosTcfCookie, type CampaignDetails, type ConfigGetter, type ConfigKey, type ConfigSetter, type ContextEnhancer, type ContextObject, type CookieOptions, type DefaultContextProperties, type DestinationMiddlewareFunction, type DestinationMiddlewareParams, EVENTS, type ExternalId, type GDPRPrivacyValue, type GDPRState, type GetCampaignDetailsOptions, type GetXandrIdOptions, type HashAlgorithm, type HashedEmail, type IntegrationsObject, type MPIConfig, type MiddlewarePayload, type NeededPurposes, type PageContext, type PageData, type STCParams, type ScreenInfo, type SegmentAnalytics, type SegmentUser, type SegmentWrapperConfig, type SourceMiddlewareFunction, type SourceMiddlewareParams, type Storage, type StorageType, type TCData, type TCFApi, type TCFApiVersion, type TCFCallback, type TCFCommand, TCFEvents, type UniversalIdData, type UniversalIdEvent, type UniversalIdEventDetail, type UniversalIdListener, UserGDPR, type UserTraits, type WindowWithMPI, type WindowWithSegmentWrapper, type XandrId, type XandrRepository, checkAnonymousId, clearConfig, createUniversalId, _default as default, getAdobeMCVisitorID, getAdobeVisitorData, getCampaignDetails, getConfig, getStorageItem, getUniversalId, hashEmail, initConfig, isClient, normalizeEmail, readCookie, removeCookie, removeStorageItem, saveCookie, setConfig, setStorageItem, storage, toCookieDomain, trackingTagsTypes };
848
+ declare const init: () => void;
849
+
850
+ export { type AdobeConfig, type AdobeRepository, type AdobeVisitor, type AdobeVisitorData$1 as AdobeVisitorData, type AnalyticsCallback, type GdprPrivacyValue as AnalyticsGdprPrivacyValue, type AnalyticsOptions, type AnonymousIdCheckResult, type BorosTcfCookie, type CampaignDetails, type ConfigGetter, type ConfigKey, type ConfigSetter, type ContextEnhancer, type ContextObject, type CookieOptions, type DefaultContextProperties, type DestinationMiddlewareFunction, type DestinationMiddlewareParams, EVENTS, type ExternalId, type GDPRPrivacyValue, type GDPRState, type GetCampaignDetailsOptions, type GetXandrIdOptions, type HashAlgorithm, type HashedEmail, type IntegrationsObject, type MPIConfig, type MiddlewarePayload, type NeededPurposes, type PageContext, type PageData, type STCParams, type ScreenInfo, type SegmentAnalytics, type SegmentUser, type SegmentWrapperConfig, type SourceMiddlewareFunction, type SourceMiddlewareParams, type Storage, type StorageType, type TCData, type TCFApi, type TCFApiVersion, type TCFCallback, type TCFCommand, TCFEvents, type UniversalIdData, type UniversalIdEvent, type UniversalIdEventDetail, type UniversalIdListener, UserGDPR, type UserTraits, type WindowWithMPI, type WindowWithSegmentWrapper, type XandrId, type XandrRepository, checkAnonymousId, clearConfig, createUniversalId, _default as default, getAdobeMCVisitorID, getAdobeVisitorData, getCampaignDetails, getConfig, getStorageItem, getUniversalId, hashEmail, init, initConfig, isClient, normalizeEmail, readCookie, removeCookie, removeStorageItem, saveCookie, setConfig, setStorageItem, storage, toCookieDomain, trackingTagsTypes };
package/dist/index.js CHANGED
@@ -1531,6 +1531,7 @@ __export(index_exports, {
1531
1531
  getStorageItem: () => getStorageItem,
1532
1532
  getUniversalId: () => getUniversalId,
1533
1533
  hashEmail: () => hashEmail,
1534
+ init: () => init,
1534
1535
  initConfig: () => initConfig,
1535
1536
  isClient: () => isClient,
1536
1537
  normalizeEmail: () => normalizeEmail,
@@ -1800,6 +1801,25 @@ function initTcfTracking() {
1800
1801
  }
1801
1802
  });
1802
1803
  }
1804
+ var onConsentSuccess = (cb) => {
1805
+ if (!isClient) {
1806
+ return;
1807
+ }
1808
+ window.__tcfapi?.("addEventListener", TCF_API_VERSION, (tcData, success) => {
1809
+ const COOKIE_CONSENT = 1;
1810
+ const ADVERTISING_CONSENT = 3;
1811
+ const DEVICE_CONSENT = 8;
1812
+ const PROFILING_CONSENT = 10;
1813
+ function isRequestConsentsFinished(tcData2) {
1814
+ return tcData2?.eventStatus === "useractioncomplete" || tcData2?.eventStatus === "tcloaded";
1815
+ }
1816
+ if (success && isRequestConsentsFinished(tcData)) {
1817
+ const consents = tcData?.purpose?.consents || {};
1818
+ const hasFullConsent = consents[COOKIE_CONSENT] && consents[ADVERTISING_CONSENT] && consents[DEVICE_CONSENT] && consents[PROFILING_CONSENT];
1819
+ cb(hasFullConsent);
1820
+ }
1821
+ });
1822
+ };
1803
1823
 
1804
1824
  // src/utils/cookies.ts
1805
1825
  var ONE_YEAR = 31536e3;
@@ -1976,7 +1996,7 @@ var decorateContextWithNeededData = async ({
1976
1996
  ...context,
1977
1997
  ...!isGdprAccepted && { ip: "0.0.0.0" },
1978
1998
  ...getExternalIds({ context, xandrId }),
1979
- clientVersion: `segment-wrapper@${"5.0.0-beta.2"}`,
1999
+ clientVersion: `segment-wrapper@${"5.0.0"}`,
1980
2000
  gdpr_privacy: gdprPrivacyValueAnalytics,
1981
2001
  gdpr_privacy_advertising: gdprPrivacyValueAdvertising,
1982
2002
  integrations: {
@@ -2293,6 +2313,10 @@ var userScreenInfo = ({ payload, next }) => {
2293
2313
  density: window.devicePixelRatio
2294
2314
  }
2295
2315
  };
2316
+ payload.obj.properties = {
2317
+ ...payload.obj.properties,
2318
+ screen_resolution: `${window.innerWidth}x${window.innerHeight}`
2319
+ };
2296
2320
  next(payload);
2297
2321
  };
2298
2322
 
@@ -2507,6 +2531,27 @@ var removeStorageItem = (key, type = "localStorage") => {
2507
2531
  };
2508
2532
 
2509
2533
  // src/index.ts
2534
+ var init = () => {
2535
+ onConsentSuccess((hasFullConsent) => {
2536
+ const key = getConfig("key");
2537
+ if (!key) {
2538
+ console.warn("[segment-wrapper] Segment write key is not configured.");
2539
+ return;
2540
+ }
2541
+ if (!window.analytics?.load) {
2542
+ console.warn("[segment-wrapper] analytics.load is not available. ");
2543
+ return;
2544
+ }
2545
+ if (hasFullConsent) {
2546
+ window.analytics.load(key);
2547
+ } else {
2548
+ window.analytics.load(key, {
2549
+ integrations: { All: false, "Segment.io": true, "Google Analytics 4 Web": true }
2550
+ });
2551
+ }
2552
+ });
2553
+ };
2554
+ init();
2510
2555
  initTcfTracking();
2511
2556
  try {
2512
2557
  getUserDataAndNotify();
@@ -2545,6 +2590,7 @@ var index_default = segmentWrapper_default;
2545
2590
  getStorageItem,
2546
2591
  getUniversalId,
2547
2592
  hashEmail,
2593
+ init,
2548
2594
  initConfig,
2549
2595
  isClient,
2550
2596
  normalizeEmail,
package/dist/index.mjs CHANGED
@@ -252,6 +252,25 @@ function initTcfTracking() {
252
252
  }
253
253
  });
254
254
  }
255
+ var onConsentSuccess = (cb) => {
256
+ if (!isClient) {
257
+ return;
258
+ }
259
+ window.__tcfapi?.("addEventListener", TCF_API_VERSION, (tcData, success) => {
260
+ const COOKIE_CONSENT = 1;
261
+ const ADVERTISING_CONSENT = 3;
262
+ const DEVICE_CONSENT = 8;
263
+ const PROFILING_CONSENT = 10;
264
+ function isRequestConsentsFinished(tcData2) {
265
+ return tcData2?.eventStatus === "useractioncomplete" || tcData2?.eventStatus === "tcloaded";
266
+ }
267
+ if (success && isRequestConsentsFinished(tcData)) {
268
+ const consents = tcData?.purpose?.consents || {};
269
+ const hasFullConsent = consents[COOKIE_CONSENT] && consents[ADVERTISING_CONSENT] && consents[DEVICE_CONSENT] && consents[PROFILING_CONSENT];
270
+ cb(hasFullConsent);
271
+ }
272
+ });
273
+ };
255
274
 
256
275
  // src/utils/cookies.ts
257
276
  var ONE_YEAR = 31536e3;
@@ -428,7 +447,7 @@ var decorateContextWithNeededData = async ({
428
447
  ...context,
429
448
  ...!isGdprAccepted && { ip: "0.0.0.0" },
430
449
  ...getExternalIds({ context, xandrId }),
431
- clientVersion: `segment-wrapper@${"5.0.0-beta.2"}`,
450
+ clientVersion: `segment-wrapper@${"5.0.0"}`,
432
451
  gdpr_privacy: gdprPrivacyValueAnalytics,
433
452
  gdpr_privacy_advertising: gdprPrivacyValueAdvertising,
434
453
  integrations: {
@@ -745,6 +764,10 @@ var userScreenInfo = ({ payload, next }) => {
745
764
  density: window.devicePixelRatio
746
765
  }
747
766
  };
767
+ payload.obj.properties = {
768
+ ...payload.obj.properties,
769
+ screen_resolution: `${window.innerWidth}x${window.innerHeight}`
770
+ };
748
771
  next(payload);
749
772
  };
750
773
 
@@ -959,6 +982,27 @@ var removeStorageItem = (key, type = "localStorage") => {
959
982
  };
960
983
 
961
984
  // src/index.ts
985
+ var init = () => {
986
+ onConsentSuccess((hasFullConsent) => {
987
+ const key = getConfig("key");
988
+ if (!key) {
989
+ console.warn("[segment-wrapper] Segment write key is not configured.");
990
+ return;
991
+ }
992
+ if (!window.analytics?.load) {
993
+ console.warn("[segment-wrapper] analytics.load is not available. ");
994
+ return;
995
+ }
996
+ if (hasFullConsent) {
997
+ window.analytics.load(key);
998
+ } else {
999
+ window.analytics.load(key, {
1000
+ integrations: { All: false, "Segment.io": true, "Google Analytics 4 Web": true }
1001
+ });
1002
+ }
1003
+ });
1004
+ };
1005
+ init();
962
1006
  initTcfTracking();
963
1007
  try {
964
1008
  getUserDataAndNotify();
@@ -997,6 +1041,7 @@ export {
997
1041
  getStorageItem,
998
1042
  getUniversalId,
999
1043
  hashEmail,
1044
+ init,
1000
1045
  initConfig,
1001
1046
  isClient,
1002
1047
  normalizeEmail,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adv-re/segment-wrapper",
3
- "version": "5.0.0-beta.2",
3
+ "version": "5.0.0",
4
4
  "description": "Modern TypeScript abstraction layer on top of the Segment library",
5
5
  "sideEffects": [
6
6
  "./src/utils/patchAnalytics.ts",
package/umd/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var ri=Object.create;var Ot=Object.defineProperty;var oi=Object.getOwnPropertyDescriptor;var ai=Object.getOwnPropertyNames;var si=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var ui=(s,d)=>()=>(d||s((d={exports:{}}).exports,d),d.exports);var di=(s,d,p,_)=>{if(d&&typeof d=="object"||typeof d=="function")for(let S of ai(d))!ci.call(s,S)&&S!==p&&Ot(s,S,{get:()=>d[S],enumerable:!(_=oi(d,S))||_.enumerable});return s};var li=(s,d,p)=>(p=s!=null?ri(si(s)):{},di(d||!s||!s.__esModule?Ot(p,"default",{value:s,enumerable:!0}):p,s));var wt=ui(()=>{"use strict";var cr=(function(){"use strict";function s(t){"@babel/helpers - typeof";return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function d(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function p(){return{callbacks:{},add:function(t,r){this.callbacks[t]=this.callbacks[t]||[];var o=this.callbacks[t].push(r)-1,i=this;return function(){i.callbacks[t].splice(o,1)}},execute:function(t,r){if(this.callbacks[t]){r=r===void 0?[]:r,r=r instanceof Array?r:[r];try{for(;this.callbacks[t].length;){var o=this.callbacks[t].shift();typeof o=="function"?o.apply(null,r):o instanceof Array&&o[1].apply(o[0],r)}delete this.callbacks[t]}catch{}}},executeAll:function(t,r){(r||t&&!N.isObjectEmpty(t))&&Object.keys(this.callbacks).forEach(function(o){var i=t[o]!==void 0?t[o]:"";this.execute(o,i)},this)},hasCallbacks:function(){return!!Object.keys(this.callbacks).length}}}function _(t,r,o){var i=t?.[r];return i===void 0?o:i}function S(t){for(var r=/^\d+$/,o=0,i=t.length;o<i;o++)if(!r.test(t[o]))return!1;return!0}function P(t,r){for(;t.length<r.length;)t.push("0");for(;r.length<t.length;)r.push("0")}function L(t,r){for(var o=0;o<t.length;o++){var i=parseInt(t[o],10),c=parseInt(r[o],10);if(i>c)return 1;if(c>i)return-1}return 0}function x(t,r){if(t===r)return 0;var o=t.toString().split("."),i=r.toString().split(".");return S(o.concat(i))?(P(o,i),L(o,i)):NaN}function de(t){return t===Object(t)&&Object.keys(t).length===0}function ve(t){return typeof t=="function"||t instanceof Array&&t.length}function Ae(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};this.log=Be("log",t,r),this.warn=Be("warn",t,r),this.error=Be("error",t,r)}function je(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.isEnabled,o=t.cookieName,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=i.cookies;return r&&o&&c?{remove:function(){c.remove(o)},get:function(){var l=c.get(o),f={};try{f=JSON.parse(l)}catch{f={}}return f},set:function(l,f){f=f||{},c.set(o,JSON.stringify(l),{domain:f.optInCookieDomain||"",cookieLifetime:f.optInStorageExpiry||3419e4,expires:!0})}}:{get:Ee,set:Ee,remove:Ee}}function me(t){this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}function De(){function t(O,V){var J=We(O);return J.length?J.every(function(fe){return!!V[fe]}):Gn(V)}function r(){ie(z),H(le.COMPLETE),j(A.status,A.permissions),e.set(A.permissions,{optInCookieDomain:I,optInStorageExpiry:C}),w.execute(Dt)}function o(O){return function(V,J){if(!Ye(V))throw new Error("[OptIn] Invalid category(-ies). Please use the `OptIn.Categories` enum.");return H(le.CHANGED),Object.assign(z,yt(We(V),O)),J||r(),A}}var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.doesOptInApply,l=i.previousPermissions,f=i.preOptInApprovals,h=i.isOptInStorageEnabled,I=i.optInCookieDomain,C=i.optInStorageExpiry,m=i.isIabContext,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=b.cookies,v=Yn(l);At(v,"Invalid `previousPermissions`!"),At(f,"Invalid `preOptInApprovals`!");var e=je({isEnabled:!!h,cookieName:"adobeujs-optin"},{cookies:M}),A=this,j=Nn(A),w=It(),G=St(v),Y=St(f),X=e.get(),$={},U=(function(O,V){return Ke(O)||V&&Ke(V)?le.COMPLETE:le.PENDING})(G,X),ne=(function(O,V,J){var fe=yt(Pe,!c);return c?Object.assign({},fe,O,V,J):fe})(Y,G,X),z=Hn(ne),H=function(O){return U=O},ie=function(O){return ne=O};A.deny=o(!1),A.approve=o(!0),A.denyAll=A.deny.bind(A,Pe),A.approveAll=A.approve.bind(A,Pe),A.isApproved=function(O){return t(O,A.permissions)},A.isPreApproved=function(O){return t(O,Y)},A.fetchPermissions=function(O){var V=arguments.length>1&&arguments[1]!==void 0&&arguments[1],J=V?A.on(le.COMPLETE,O):Ee;return!c||c&&A.isComplete||f?O(A.permissions):V||w.add(Dt,function(){return O(A.permissions)}),J},A.complete=function(){A.status===le.CHANGED&&r()},A.registerPlugin=function(O){if(!O||!O.name||typeof O.onRegister!="function")throw new Error($n);$[O.name]||($[O.name]=O,O.onRegister.call(O,A))},A.execute=qn($),Object.defineProperties(A,{permissions:{get:function(){return ne}},status:{get:function(){return U}},Categories:{get:function(){return _e}},doesOptInApply:{get:function(){return!!c}},isPending:{get:function(){return A.status===le.PENDING}},isComplete:{get:function(){return A.status===le.COMPLETE}},__plugins:{get:function(){return Object.keys($)}},isIabContext:{get:function(){return m}}})}function ot(t,r){function o(){c=null,t.call(t,new me("The call took longer than you wanted!"))}function i(){c&&(clearTimeout(c),t.apply(t,arguments))}if(r===void 0)return t;var c=setTimeout(o,r);return i}function at(){if(window.__cmp)return window.__cmp;var t=window;if(t===window.top)return void Re.error("__cmp not found");for(var r;!r;){t=t.parent;try{t.frames.__cmpLocator&&(r=t)}catch{}if(t===window.top)break}if(!r)return void Re.error("__cmp not found");var o={};return window.__cmp=function(i,c,l){var f=Math.random()+"",h={__cmpCall:{command:i,parameter:c,callId:f}};o[f]=l,r.postMessage(h,"*")},window.addEventListener("message",function(i){var c=i.data;if(typeof c=="string")try{c=JSON.parse(i.data)}catch{}if(c.__cmpReturn){var l=c.__cmpReturn;o[l.callId]&&(o[l.callId](l.returnValue,l.success),delete o[l.callId])}},!1),window.__cmp}function ln(){var t=this;t.name="iabPlugin",t.version="0.0.1";var r=It(),o={allConsentData:null},i=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o[I]=C};t.fetchConsentData=function(I){var C=I.callback,m=I.timeout,b=ot(C,m);c({callback:b})},t.isApproved=function(I){var C=I.callback,m=I.category,b=I.timeout;if(o.allConsentData)return C(null,h(m,o.allConsentData.vendorConsents,o.allConsentData.purposeConsents));var M=ot(function(v){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=e.vendorConsents,j=e.purposeConsents;C(v,h(m,A,j))},b);c({category:m,callback:M})},t.onRegister=function(I){var C=Object.keys(He),m=function(b){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=M.purposeConsents,e=M.gdprApplies,A=M.vendorConsents;!b&&e&&A&&v&&(C.forEach(function(j){var w=h(j,A,v);I[w?"approve":"deny"](j,!0)}),I.complete())};t.fetchConsentData({callback:m})};var c=function(I){var C=I.callback;if(o.allConsentData)return C(null,o.allConsentData);r.add("FETCH_CONSENT_DATA",C);var m={};f(function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=b.purposeConsents,v=b.gdprApplies,e=b.vendorConsents;arguments.length>1&&arguments[1]&&(m={purposeConsents:M,gdprApplies:v,vendorConsents:e},i("allConsentData",m)),l(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};arguments.length>1&&arguments[1]&&(m.consentString=A.consentData,i("allConsentData",m)),r.execute("FETCH_CONSENT_DATA",[null,o.allConsentData])})})},l=function(I){var C=at();C&&C("getConsentData",null,I)},f=function(I){var C=Xn(He),m=at();m&&m("getVendorConsents",C,I)},h=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=!!C[He[I]];return b&&(function(){return Vn[I].every(function(M){return m[M]})})()}}var k=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Object.assign=Object.assign||function(t){for(var r,o,i=1;i<arguments.length;++i){o=arguments[i];for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t};var Oe,ke,fn={HANDSHAKE:"HANDSHAKE",GETSTATE:"GETSTATE",PARENTSTATE:"PARENTSTATE"},gn={MCMID:"MCMID",MCAID:"MCAID",MCAAMB:"MCAAMB",MCAAMLH:"MCAAMLH",MCOPTOUT:"MCOPTOUT",CUSTOMERIDS:"CUSTOMERIDS"},pn={MCMID:"getMarketingCloudVisitorID",MCAID:"getAnalyticsVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",ALLFIELDS:"getVisitorValues"},mn={CUSTOMERIDS:"getCustomerIDs"},_n={MCMID:"getMarketingCloudVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",MCAID:"getAnalyticsVisitorID",CUSTOMERIDS:"getCustomerIDs",ALLFIELDS:"getVisitorValues"},Cn={MC:"MCMID",A:"MCAID",AAM:"MCAAMB"},hn={MCMID:"MCMID",MCOPTOUT:"MCOPTOUT",MCAID:"MCAID",MCAAMLH:"MCAAMLH",MCAAMB:"MCAAMB"},In={UNKNOWN:0,AUTHENTICATED:1,LOGGED_OUT:2},yn={GLOBAL:"global"},Z={MESSAGES:fn,STATE_KEYS_MAP:gn,ASYNC_API_MAP:pn,SYNC_API_MAP:mn,ALL_APIS:_n,FIELDGROUP_TO_FIELD:Cn,FIELDS:hn,AUTH_STATE:In,OPT_OUT:yn},st=Z.STATE_KEYS_MAP,Sn=function(t){function r(){}function o(i,c){var l=this;return function(){var f=t(0,i),h={};return h[i]=f,l.setStateAndPublish(h),c(f),f}}this.getMarketingCloudVisitorID=function(i){i=i||r;var c=this.findField(st.MCMID,i),l=o.call(this,st.MCMID,i);return c!==void 0?c:l()},this.getVisitorValues=function(i){this.getMarketingCloudVisitorID(function(c){i({MCMID:c})})}},vn=Z.MESSAGES,ct=Z.ASYNC_API_MAP,ut=Z.SYNC_API_MAP,An=function(){function t(){}function r(c,l){var f=this;return function(){return f.callbackRegistry.add(c,l),f.messageParent(vn.GETSTATE),""}}function o(c){this[ct[c]]=function(l){l=l||t;var f=this.findField(c,l),h=r.call(this,c,l);return f!==void 0?f:h()}}function i(c){this[ut[c]]=function(){return this.findField(c,t)||{}}}Object.keys(ct).forEach(o,this),Object.keys(ut).forEach(i,this)},dt=Z.ASYNC_API_MAP,Dn=function(){Object.keys(dt).forEach(function(t){this[dt[t]]=function(r){this.callbackRegistry.add(t,r)}},this)},N=(function(t,r){return r={exports:{}},t(r,r.exports),r.exports})(function(t,r){r.isObjectEmpty=function(i){return i===Object(i)&&Object.keys(i).length===0},r.isValueEmpty=function(i){return i===""||r.isObjectEmpty(i)};var o=function(){var i=navigator.appName,c=navigator.userAgent;return i==="Microsoft Internet Explorer"||c.indexOf("MSIE ")>=0||c.indexOf("Trident/")>=0&&c.indexOf("Windows NT 6")>=0};r.getIeVersion=function(){return document.documentMode?document.documentMode:o()?7:null},r.encodeAndBuildRequest=function(i,c){return i.map(encodeURIComponent).join(c)},r.isObject=function(i){return i!==null&&s(i)==="object"&&Array.isArray(i)===!1},r.defineGlobalNamespace=function(){return window.adobe=r.isObject(window.adobe)?window.adobe:{},window.adobe},r.pluck=function(i,c){return c.reduce(function(l,f){return i[f]&&(l[f]=i[f]),l},Object.create(null))},r.parseOptOut=function(i,c,l){c||(c=l,i.d_optout&&i.d_optout instanceof Array&&(c=i.d_optout.join(",")));var f=parseInt(i.d_ottl,10);return isNaN(f)&&(f=7200),{optOut:c,d_ottl:f}},r.normalizeBoolean=function(i){var c=i;return i==="true"?c=!0:i==="false"&&(c=!1),c}}),En=(N.isObjectEmpty,N.isValueEmpty,N.getIeVersion,N.encodeAndBuildRequest,N.isObject,N.defineGlobalNamespace,N.pluck,N.parseOptOut,N.normalizeBoolean,p),bn=Z.MESSAGES,Tn={0:"prefix",1:"orgID",2:"state"},lt=function(t,r){this.parse=function(o){try{var i={};return o.data.split("|").forEach(function(c,l){c!==void 0&&(i[Tn[l]]=l!==2?c:JSON.parse(c))}),i}catch{}},this.isInvalid=function(o){var i=this.parse(o);if(!i||Object.keys(i).length<2)return!0;var c=t!==i.orgID,l=!r||o.origin!==r,f=Object.keys(bn).indexOf(i.prefix)===-1;return c||l||f},this.send=function(o,i,c){var l=i+"|"+t;c&&c===Object(c)&&(l+="|"+JSON.stringify(c));try{o.postMessage(l,r)}catch{}}},ft=Z.MESSAGES,Mn=function(t,r,o,i){function c(w){Object.assign(v,w)}function l(w){Object.assign(v.state,w),Object.assign(v.state.ALLFIELDS,w),v.callbackRegistry.executeAll(v.state)}function f(w){if(!j.isInvalid(w)){A=!1;var G=j.parse(w);v.setStateAndPublish(G.state)}}function h(w){!A&&e&&(A=!0,j.send(i,w))}function I(){c(new Sn(o._generateID)),v.getMarketingCloudVisitorID(),v.callbackRegistry.executeAll(v.state,!0),k.removeEventListener("message",C)}function C(w){if(!j.isInvalid(w)){var G=j.parse(w);A=!1,k.clearTimeout(v._handshakeTimeout),k.removeEventListener("message",C),c(new An(v)),k.addEventListener("message",f),v.setStateAndPublish(G.state),v.callbackRegistry.hasCallbacks()&&h(ft.GETSTATE)}}function m(){e&&postMessage?(k.addEventListener("message",C),h(ft.HANDSHAKE),v._handshakeTimeout=setTimeout(I,250)):I()}function b(){k.s_c_in||(k.s_c_il=[],k.s_c_in=0),v._c="Visitor",v._il=k.s_c_il,v._in=k.s_c_in,v._il[v._in]=v,k.s_c_in++}function M(){function w(G){G.indexOf("_")!==0&&typeof o[G]=="function"&&(v[G]=function(){})}Object.keys(o).forEach(w),v.getSupplementalDataID=o.getSupplementalDataID,v.isAllowed=function(){return!0}}var v=this,e=r.whitelistParentDomain;v.state={ALLFIELDS:{}},v.version=o.version,v.marketingCloudOrgID=t,v.cookieDomain=o.cookieDomain||"",v._instanceType="child";var A=!1,j=new lt(t,e);v.callbackRegistry=En(),v.init=function(){b(),M(),c(new Dn(v)),m()},v.findField=function(w,G){if(v.state[w]!==void 0)return G(v.state[w]),v.state[w]},v.messageParent=h,v.setStateAndPublish=l},we=Z.MESSAGES,gt=Z.ALL_APIS,On=Z.ASYNC_API_MAP,kn=Z.FIELDGROUP_TO_FIELD,wn=function(t,r){function o(){var C={};return Object.keys(gt).forEach(function(m){var b=gt[m],M=t[b]();N.isValueEmpty(M)||(C[m]=M)}),C}function i(){var C=[];return t._loading&&Object.keys(t._loading).forEach(function(m){if(t._loading[m]){var b=kn[m];C.push(b)}}),C.length?C:null}function c(C){return function m(b){var M=i();if(M){var v=On[M[0]];t[v](m,!0)}else C()}}function l(C,m){var b=o();r.send(C,m,b)}function f(C){I(C),l(C,we.HANDSHAKE)}function h(C){c(function(){l(C,we.PARENTSTATE)})()}function I(C){function m(M){b.call(t,M),r.send(C,we.PARENTSTATE,{CUSTOMERIDS:t.getCustomerIDs()})}var b=t.setCustomerIDs;t.setCustomerIDs=m}return function(C){r.isInvalid(C)||(r.parse(C).prefix===we.HANDSHAKE?f:h)(C.source)}},Pn=function(t,r){function o(f){return function(h){i[f]=h,c++,c===l&&r(i)}}var i={},c=0,l=Object.keys(t).length;Object.keys(t).forEach(function(f){var h=t[f];if(h.fn){var I=h.args||[];I.unshift(o(f)),h.fn.apply(h.context||null,I)}})},he={get:function(t){t=encodeURIComponent(t);var r=(";"+document.cookie).split(" ").join(";"),o=r.indexOf(";"+t+"="),i=o<0?o:r.indexOf(";",o+1);return o<0?"":decodeURIComponent(r.substring(o+2+t.length,i<0?r.length:i))},set:function(t,r,o){var i=_(o,"cookieLifetime"),c=_(o,"expires"),l=_(o,"domain"),f=_(o,"secure"),h=f?"Secure":"";if(c&&i!=="SESSION"&&i!=="NONE"){var I=r!==""?parseInt(i||0,10):-60;if(I)c=new Date,c.setTime(c.getTime()+1e3*I);else if(c===1){c=new Date;var C=c.getYear();c.setYear(C+2+(C<1900?1900:0))}}else c=0;return t&&i!=="NONE"?(document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+"; path=/;"+(c?" expires="+c.toGMTString()+";":"")+(l?" domain="+l+";":"")+h,this.get(t)===r):0},remove:function(t,r){var o=_(r,"domain");o=o?" domain="+o+";":"",document.cookie=encodeURIComponent(t)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"+o}},pt=function(t){var r;!t&&k.location&&(t=k.location.hostname),r=t;var o,i=r.split(".");for(o=i.length-2;o>=0;o--)if(r=i.slice(o).join("."),he.set("test","cookie",{domain:r}))return he.remove("test",{domain:r}),r;return""},mt={compare:x,isLessThan:function(t,r){return x(t,r)<0},areVersionsDifferent:function(t,r){return x(t,r)!==0},isGreaterThan:function(t,r){return x(t,r)>0},isEqual:function(t,r){return x(t,r)===0}},_t=!!k.postMessage,Ge={postMessage:function(t,r,o){var i=1;r&&(_t?o.postMessage(t,r.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):r&&(o.location=r.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+t))},receiveMessage:function(t,r){var o;try{_t&&(t&&(o=function(i){if(typeof r=="string"&&i.origin!==r||Object.prototype.toString.call(r)==="[object Function]"&&r(i.origin)===!1)return!1;t(i)}),k.addEventListener?k[t?"addEventListener":"removeEventListener"]("message",o):k[t?"attachEvent":"detachEvent"]("onmessage",o))}catch{}}},Rn=function(t){var r,o,i="0123456789",c="",l="",f=8,h=10,I=10;if(t==1){for(i+="ABCDEF",r=0;16>r;r++)o=Math.floor(Math.random()*f),c+=i.substring(o,o+1),o=Math.floor(Math.random()*f),l+=i.substring(o,o+1),f=16;return c+"-"+l}for(r=0;19>r;r++)o=Math.floor(Math.random()*h),c+=i.substring(o,o+1),r===0&&o==9?h=3:((r==1||r==2)&&h!=10&&2>o||2<r)&&(h=10),o=Math.floor(Math.random()*I),l+=i.substring(o,o+1),r===0&&o==9?I=3:((r==1||r==2)&&I!=10&&2>o||2<r)&&(I=10);return c+l},Ln=function(t,r){return{corsMetadata:(function(){var o="none",i=!0;return typeof XMLHttpRequest<"u"&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?o="XMLHttpRequest":typeof XDomainRequest<"u"&&XDomainRequest===Object(XDomainRequest)&&(i=!1),Object.prototype.toString.call(k.HTMLElement).indexOf("Constructor")>0&&(i=!1)),{corsType:o,corsCookiesEnabled:i}})(),getCORSInstance:function(){return this.corsMetadata.corsType==="none"?null:new k[this.corsMetadata.corsType]},fireCORS:function(o,i,c){function l(I){var C;try{if((C=JSON.parse(I))!==Object(C))return void f.handleCORSError(o,null,"Response is not JSON")}catch(v){return void f.handleCORSError(o,v,"Error parsing response as JSON")}try{for(var m=o.callback,b=k,M=0;M<m.length;M++)b=b[m[M]];b(C)}catch(v){f.handleCORSError(o,v,"Error forming callback function")}}var f=this;i&&(o.loadErrorHandler=i);try{var h=this.getCORSInstance();h.open("get",o.corsUrl+"&ts="+new Date().getTime(),!0),this.corsMetadata.corsType==="XMLHttpRequest"&&(h.withCredentials=!0,h.timeout=t.loadTimeout,h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),h.onreadystatechange=function(){this.readyState===4&&this.status===200&&l(this.responseText)}),h.onerror=function(I){f.handleCORSError(o,I,"onerror")},h.ontimeout=function(I){f.handleCORSError(o,I,"ontimeout")},h.send(),t._log.requests.push(o.corsUrl)}catch(I){this.handleCORSError(o,I,"try-catch")}},handleCORSError:function(o,i,c){t.CORSErrors.push({corsData:o,error:i,description:c}),o.loadErrorHandler&&(c==="ontimeout"?o.loadErrorHandler(!0):o.loadErrorHandler(!1))}}},K={POST_MESSAGE_ENABLED:!!k.postMessage,DAYS_BETWEEN_SYNC_ID_CALLS:1,MILLIS_PER_DAY:864e5,ADOBE_MC:"adobe_mc",ADOBE_MC_SDID:"adobe_mc_sdid",VALID_VISITOR_ID_REGEX:/^[0-9a-fA-F\-]+$/,ADOBE_MC_TTL_IN_MIN:5,VERSION_REGEX:/vVersion\|((\d+\.)?(\d+\.)?(\*|\d+))(?=$|\|)/,FIRST_PARTY_SERVER_COOKIE:"s_ecid"},xn=function(t,r){var o=k.document;return{THROTTLE_START:3e4,MAX_SYNCS_LENGTH:649,throttleTimerSet:!1,id:null,onPagePixels:[],iframeHost:null,getIframeHost:function(i){if(typeof i=="string"){var c=i.split("/");return c[0]+"//"+c[2]}},subdomain:null,url:null,getUrl:function(){var i,c="http://fast.",l="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(o.location.origin);return this.subdomain||(this.subdomain="nosubdomainreturned"),t.loadSSL&&(c=t.idSyncSSLUseAkamai?"https://fast.":"https://"),i=c+this.subdomain+".demdex.net/dest5.html"+l,this.iframeHost=this.getIframeHost(i),this.id="destination_publishing_iframe_"+this.subdomain+"_"+t.idSyncContainerID,i},checkDPIframeSrc:function(){var i="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(o.location.href);typeof t.dpIframeSrc=="string"&&t.dpIframeSrc.length&&(this.id="destination_publishing_iframe_"+(t._subdomain||this.subdomain||new Date().getTime())+"_"+t.idSyncContainerID,this.iframeHost=this.getIframeHost(t.dpIframeSrc),this.url=t.dpIframeSrc+i)},idCallNotProcesssed:null,doAttachIframe:!1,startedAttachingIframe:!1,iframeHasLoaded:null,iframeIdChanged:null,newIframeCreated:null,originalIframeHasLoadedAlready:null,iframeLoadedCallbacks:[],regionChanged:!1,timesRegionChanged:0,sendingMessages:!1,messages:[],messagesPosted:[],messagesReceived:[],messageSendingInterval:K.POST_MESSAGE_ENABLED?null:100,onPageDestinationsFired:[],jsonForComparison:[],jsonDuplicates:[],jsonWaiting:[],jsonProcessed:[],canSetThirdPartyCookies:!0,receivedThirdPartyCookiesNotification:!1,readyToAttachIframePreliminary:function(){return!(t.idSyncDisableSyncs||t.disableIdSyncs||t.idSyncDisable3rdPartySyncing||t.disableThirdPartyCookies||t.disableThirdPartyCalls)},readyToAttachIframe:function(){return this.readyToAttachIframePreliminary()&&(this.doAttachIframe||t._doAttachIframe)&&(this.subdomain&&this.subdomain!=="nosubdomainreturned"||t._subdomain)&&this.url&&!this.startedAttachingIframe},attachIframe:function(){function i(){f=o.createElement("iframe"),f.sandbox="allow-scripts allow-same-origin",f.title="Adobe ID Syncing iFrame",f.id=l.id,f.name=l.id+"_name",f.style.cssText="display: none; width: 0; height: 0;",f.src=l.url,l.newIframeCreated=!0,c(),o.body.appendChild(f)}function c(h){f.addEventListener("load",function(){f.className="aamIframeLoaded",l.iframeHasLoaded=!0,l.fireIframeLoadedCallbacks(h),l.requestToProcess()})}this.startedAttachingIframe=!0;var l=this,f=o.getElementById(this.id);f?f.nodeName!=="IFRAME"?(this.id+="_2",this.iframeIdChanged=!0,i()):(this.newIframeCreated=!1,f.className!=="aamIframeLoaded"?(this.originalIframeHasLoadedAlready=!1,c("The destination publishing iframe already exists from a different library, but hadn't loaded yet.")):(this.originalIframeHasLoadedAlready=!0,this.iframeHasLoaded=!0,this.iframe=f,this.fireIframeLoadedCallbacks("The destination publishing iframe already exists from a different library, and had loaded alresady."),this.requestToProcess())):i(),this.iframe=f},fireIframeLoadedCallbacks:function(i){this.iframeLoadedCallbacks.forEach(function(c){typeof c=="function"&&c({message:i||"The destination publishing iframe was attached and loaded successfully."})}),this.iframeLoadedCallbacks=[]},requestToProcess:function(i){function c(){f.jsonForComparison.push(i),f.jsonWaiting.push(i),f.processSyncOnPage(i)}var l,f=this;if(i===Object(i)&&i.ibs)if(l=JSON.stringify(i.ibs||[]),this.jsonForComparison.length){var h,I,C,m=!1;for(h=0,I=this.jsonForComparison.length;h<I;h++)if(C=this.jsonForComparison[h],l===JSON.stringify(C.ibs||[])){m=!0;break}m?this.jsonDuplicates.push(i):c()}else c();if((this.receivedThirdPartyCookiesNotification||!K.POST_MESSAGE_ENABLED||this.iframeHasLoaded)&&this.jsonWaiting.length){var b=this.jsonWaiting.shift();this.process(b),this.requestToProcess()}t.idSyncDisableSyncs||t.disableIdSyncs||!this.iframeHasLoaded||!this.messages.length||this.sendingMessages||(this.throttleTimerSet||(this.throttleTimerSet=!0,setTimeout(function(){f.messageSendingInterval=K.POST_MESSAGE_ENABLED?null:150},this.THROTTLE_START)),this.sendingMessages=!0,this.sendMessages())},getRegionAndCheckIfChanged:function(i,c){var l=t._getField("MCAAMLH"),f=i.d_region||i.dcs_region;return l?f&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",f),parseInt(l,10)!==f&&(this.regionChanged=!0,this.timesRegionChanged++,t._setField("MCSYNCSOP",""),t._setField("MCSYNCS",""),l=f)):(l=f)&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",l)),l||(l=""),l},processSyncOnPage:function(i){var c,l,f,h;if((c=i.ibs)&&c instanceof Array&&(l=c.length))for(f=0;f<l;f++)h=c[f],h.syncOnPage&&this.checkFirstPartyCookie(h,"","syncOnPage")},process:function(i){var c,l,f,h,I,C=encodeURIComponent,m=!1;if((c=i.ibs)&&c instanceof Array&&(l=c.length))for(m=!0,f=0;f<l;f++)h=c[f],I=[C("ibs"),C(h.id||""),C(h.tag||""),N.encodeAndBuildRequest(h.url||[],","),C(h.ttl||""),"","",h.fireURLSync?"true":"false"],h.syncOnPage||(this.canSetThirdPartyCookies?this.addMessage(I.join("|")):h.fireURLSync&&this.checkFirstPartyCookie(h,I.join("|")));m&&this.jsonProcessed.push(i)},checkFirstPartyCookie:function(i,c,l){var f=l==="syncOnPage",h=f?"MCSYNCSOP":"MCSYNCS";t._readVisitor();var I,C,m=t._getField(h),b=!1,M=!1,v=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);m?(I=m.split("*"),C=this.pruneSyncData(I,i.id,v),b=C.dataPresent,M=C.dataValid,b&&M||this.fireSync(f,i,c,I,h,v)):(I=[],this.fireSync(f,i,c,I,h,v))},pruneSyncData:function(i,c,l){var f,h,I,C=!1,m=!1;for(h=0;h<i.length;h++)f=i[h],I=parseInt(f.split("-")[1],10),f.match("^"+c+"-")?(C=!0,l<I?m=!0:(i.splice(h,1),h--)):l>=I&&(i.splice(h,1),h--);return{dataPresent:C,dataValid:m}},manageSyncsSize:function(i){if(i.join("*").length>this.MAX_SYNCS_LENGTH)for(i.sort(function(c,l){return parseInt(c.split("-")[1],10)-parseInt(l.split("-")[1],10)});i.join("*").length>this.MAX_SYNCS_LENGTH;)i.shift()},fireSync:function(i,c,l,f,h,I){var C=this;if(i){if(c.tag==="img"){var m,b,M,v,e=c.url,A=t.loadSSL?"https:":"http:";for(m=0,b=e.length;m<b;m++){M=e[m],v=/^\/\//.test(M);var j=new Image;j.addEventListener("load",(function(w,G,Y,X){return function(){C.onPagePixels[w]=null,t._readVisitor();var $,U=t._getField(h),ne=[];if(U){$=U.split("*");var z,H,ie;for(z=0,H=$.length;z<H;z++)ie=$[z],ie.match("^"+G.id+"-")||ne.push(ie)}C.setSyncTrackingData(ne,G,Y,X)}})(this.onPagePixels.length,c,h,I)),j.src=(v?A:"")+M,this.onPagePixels.push(j)}}}else this.addMessage(l),this.setSyncTrackingData(f,c,h,I)},addMessage:function(i){var c=encodeURIComponent,l=c(t._enableErrorReporting?"---destpub-debug---":"---destpub---");this.messages.push((K.POST_MESSAGE_ENABLED?"":l)+i)},setSyncTrackingData:function(i,c,l,f){i.push(c.id+"-"+(f+Math.ceil(c.ttl/60/24))),this.manageSyncsSize(i),t._setField(l,i.join("*"))},sendMessages:function(){var i,c=this,l="",f=encodeURIComponent;this.regionChanged&&(l=f("---destpub-clear-dextp---"),this.regionChanged=!1),this.messages.length?K.POST_MESSAGE_ENABLED?(i=l+f("---destpub-combined---")+this.messages.join("%01"),this.postMessage(i),this.messages=[],this.sendingMessages=!1):(i=this.messages.shift(),this.postMessage(l+i),setTimeout(function(){c.sendMessages()},this.messageSendingInterval)):this.sendingMessages=!1},postMessage:function(i){Ge.postMessage(i,this.url,this.iframe.contentWindow),this.messagesPosted.push(i)},receiveMessage:function(i){var c,l=/^---destpub-to-parent---/;typeof i=="string"&&l.test(i)&&(c=i.replace(l,"").split("|"),c[0]==="canSetThirdPartyCookies"&&(this.canSetThirdPartyCookies=c[1]==="true",this.receivedThirdPartyCookiesNotification=!0,this.requestToProcess()),this.messagesReceived.push(i))},processIDCallData:function(i){(this.url==null||i.subdomain&&this.subdomain==="nosubdomainreturned")&&(typeof t._subdomain=="string"&&t._subdomain.length?this.subdomain=t._subdomain:this.subdomain=i.subdomain||"",this.url=this.getUrl()),i.ibs instanceof Array&&i.ibs.length&&(this.doAttachIframe=!0),this.readyToAttachIframe()&&(t.idSyncAttachIframeOnWindowLoad?(r.windowLoaded||o.readyState==="complete"||o.readyState==="loaded")&&this.attachIframe():this.attachIframeASAP()),typeof t.idSyncIDCallResult=="function"?t.idSyncIDCallResult(i):this.requestToProcess(i),typeof t.idSyncAfterIDCallResult=="function"&&t.idSyncAfterIDCallResult(i)},canMakeSyncIDCall:function(i,c){return t._forceSyncIDCall||!i||c-i>K.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function i(){c.startedAttachingIframe||(o.body?c.attachIframe():setTimeout(i,30))}var c=this;i()}}},Ct={audienceManagerServer:{},audienceManagerServerSecure:{},cookieDomain:{},cookieLifetime:{},cookieName:{},doesOptInApply:{},disableThirdPartyCalls:{},discardTrackingServerECID:{},idSyncAfterIDCallResult:{},idSyncAttachIframeOnWindowLoad:{},idSyncContainerID:{},idSyncDisable3rdPartySyncing:{},disableThirdPartyCookies:{},idSyncDisableSyncs:{},disableIdSyncs:{},idSyncIDCallResult:{},idSyncSSLUseAkamai:{},isCoopSafe:{},isIabContext:{},isOptInStorageEnabled:{},loadSSL:{},loadTimeout:{},marketingCloudServer:{},marketingCloudServerSecure:{},optInCookieDomain:{},optInStorageExpiry:{},overwriteCrossDomainMCIDAndAID:{},preOptInApprovals:{},previousPermissions:{},resetBeforeVersion:{},sdidParamExpiry:{},serverState:{},sessionCookieName:{},secureCookie:{},takeTimeoutMetrics:{},trackingServer:{},trackingServerSecure:{},whitelistIframeDomains:{},whitelistParentDomain:{}},ht={getConfigNames:function(){return Object.keys(Ct)},getConfigs:function(){return Ct},normalizeConfig:function(t){return typeof t!="function"?t:t()}},Nn=function(t){var r={};return t.on=function(o,i,c){if(!i||typeof i!="function")throw new Error("[ON] Callback should be a function.");r.hasOwnProperty(o)||(r[o]=[]);var l=r[o].push({callback:i,context:c})-1;return function(){r[o].splice(l,1),r[o].length||delete r[o]}},t.off=function(o,i){r.hasOwnProperty(o)&&(r[o]=r[o].filter(function(c){if(c.callback!==i)return c}))},t.publish=function(o){if(r.hasOwnProperty(o)){var i=[].slice.call(arguments,1);r[o].slice(0).forEach(function(c){c.callback.apply(c.context,i)})}},t.publish},le={PENDING:"pending",CHANGED:"changed",COMPLETE:"complete"},_e={AAM:"aam",ADCLOUD:"adcloud",ANALYTICS:"aa",CAMPAIGN:"campaign",ECID:"ecid",LIVEFYRE:"livefyre",TARGET:"target",MEDIA_ANALYTICS:"mediaaa"},He=(Oe={},d(Oe,_e.AAM,565),d(Oe,_e.ECID,565),Oe),Vn=(ke={},d(ke,_e.AAM,[1,2,5]),d(ke,_e.ECID,[1,2,5]),ke),Pe=(function(t){return Object.keys(t).map(function(r){return t[r]})})(_e),It=function(){var t={};return t.callbacks=Object.create(null),t.add=function(r,o){if(!ve(o))throw new Error("[callbackRegistryFactory] Make sure callback is a function or an array of functions.");t.callbacks[r]=t.callbacks[r]||[];var i=t.callbacks[r].push(o)-1;return function(){t.callbacks[r].splice(i,1)}},t.execute=function(r,o){if(t.callbacks[r]){o=o===void 0?[]:o,o=o instanceof Array?o:[o];try{for(;t.callbacks[r].length;){var i=t.callbacks[r].shift();typeof i=="function"?i.apply(null,o):i instanceof Array&&i[1].apply(i[0],o)}delete t.callbacks[r]}catch{}}},t.executeAll=function(r,o){(o||r&&!de(r))&&Object.keys(t.callbacks).forEach(function(i){var c=r[i]!==void 0?r[i]:"";t.execute(i,c)},t)},t.hasCallbacks=function(){return!!Object.keys(t.callbacks).length},t},Fn=function(){},Un=function(t){var r=window,o=r.console;return!!o&&typeof o[t]=="function"},Be=function(t,r,o){return o()?function(){if(Un(t)){for(var i=arguments.length,c=new Array(i),l=0;l<i;l++)c[l]=arguments[l];console[t].apply(console,[r].concat(c))}}:Fn},jn=Ae,Re=new jn("[ADOBE OPT-IN]"),Le=function(t,r){return s(t)===r},We=function(t,r){return t instanceof Array?t:Le(t,"string")?[t]:r||[]},Gn=function(t){var r=Object.keys(t);return!!r.length&&r.every(function(o){return t[o]===!0})},Ye=function(t){return!(!t||Bn(t))&&We(t).every(function(r){return Pe.indexOf(r)>-1})},yt=function(t,r){return t.reduce(function(o,i){return o[i]=r,o},{})},Hn=function(t){return JSON.parse(JSON.stringify(t))},Bn=function(t){return Object.prototype.toString.call(t)==="[object Array]"&&!t.length},St=function(t){if(vt(t))return t;try{return JSON.parse(t)}catch{return{}}},Ke=function(t){return t===void 0||(vt(t)?Ye(Object.keys(t)):Wn(t))},Wn=function(t){try{var r=JSON.parse(t);return!!t&&Le(t,"string")&&Ye(Object.keys(r))}catch{return!1}},vt=function(t){return t!==null&&Le(t,"object")&&Array.isArray(t)===!1},Ee=function(){},Yn=function(t){return Le(t,"function")?t():t},At=function(t,r){Ke(t)||Re.error("".concat(r))},Kn=function(t){return Object.keys(t).map(function(r){return t[r]})},Xn=function(t){return Kn(t).filter(function(r,o,i){return i.indexOf(r)===o})},qn=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=r.command,i=r.params,c=i===void 0?{}:i,l=r.callback,f=l===void 0?Ee:l;if(!o||o.indexOf(".")===-1)throw new Error("[OptIn.execute] Please provide a valid command.");try{var h=o.split("."),I=t[h[0]],C=h[1];if(!I||typeof I[C]!="function")throw new Error("Make sure the plugin and API name exist.");var m=Object.assign(c,{callback:f});I[C].call(I,m)}catch(b){Re.error("[execute] Something went wrong: "+b.message)}}};me.prototype=Object.create(Error.prototype),me.prototype.constructor=me;var Dt="fetchPermissions",$n="[OptIn#registerPlugin] Plugin is invalid.";De.Categories=_e,De.TimeoutError=me;var Xe=Object.freeze({OptIn:De,IabPlugin:ln}),zn=function(t,r){t.publishDestinations=function(o){var i=arguments[1],c=arguments[2];try{c=typeof c=="function"?c:o.callback}catch{c=function(){}}var l=r;if(!l.readyToAttachIframePreliminary())return void c({error:"The destination publishing iframe is disabled in the Visitor library."});if(typeof o=="string"){if(!o.length)return void c({error:"subdomain is not a populated string."});if(!(i instanceof Array&&i.length))return void c({error:"messages is not a populated array."});var f=!1;if(i.forEach(function(m){typeof m=="string"&&m.length&&(l.addMessage(m),f=!0)}),!f)return void c({error:"None of the messages are populated strings."})}else{if(!N.isObject(o))return void c({error:"Invalid parameters passed."});var h=o;if(typeof(o=h.subdomain)!="string"||!o.length)return void c({error:"config.subdomain is not a populated string."});var I=h.urlDestinations;if(!(I instanceof Array&&I.length))return void c({error:"config.urlDestinations is not a populated array."});var C=[];I.forEach(function(m){N.isObject(m)&&(m.hideReferrer?m.message&&l.addMessage(m.message):C.push(m))}),(function m(){C.length&&setTimeout(function(){var b=new Image,M=C.shift();b.src=M.url,l.onPageDestinationsFired.push(M),m()},100)})()}l.iframe?(c({message:"The destination publishing iframe is already attached and loaded."}),l.requestToProcess()):!t.subdomain&&t._getField("MCMID")?(l.subdomain=o,l.doAttachIframe=!0,l.url=l.getUrl(),l.readyToAttachIframe()?(l.iframeLoadedCallbacks.push(function(m){c({message:"Attempted to attach and load the destination publishing iframe through this API call. Result: "+(m.message||"no result")})}),l.attachIframe()):c({error:"Encountered a problem in attempting to attach and load the destination publishing iframe through this API call."})):l.iframeLoadedCallbacks.push(function(m){c({message:"Attempted to attach and load the destination publishing iframe through normal Visitor API processing. Result: "+(m.message||"no result")})})}},Jn=function t(r){function o(ne,z){return ne>>>z|ne<<32-z}for(var i,c,l=Math.pow,f=l(2,32),h="",I=[],C=8*r.length,m=t.h=t.h||[],b=t.k=t.k||[],M=b.length,v={},e=2;M<64;e++)if(!v[e]){for(i=0;i<313;i+=e)v[i]=e;m[M]=l(e,.5)*f|0,b[M++]=l(e,1/3)*f|0}for(r+="\x80";r.length%64-56;)r+="\0";for(i=0;i<r.length;i++){if((c=r.charCodeAt(i))>>8)return;I[i>>2]|=c<<(3-i)%4*8}for(I[I.length]=C/f|0,I[I.length]=C,c=0;c<I.length;){var A=I.slice(c,c+=16),j=m;for(m=m.slice(0,8),i=0;i<64;i++){var w=A[i-15],G=A[i-2],Y=m[0],X=m[4],$=m[7]+(o(X,6)^o(X,11)^o(X,25))+(X&m[5]^~X&m[6])+b[i]+(A[i]=i<16?A[i]:A[i-16]+(o(w,7)^o(w,18)^w>>>3)+A[i-7]+(o(G,17)^o(G,19)^G>>>10)|0);m=[$+((o(Y,2)^o(Y,13)^o(Y,22))+(Y&m[1]^Y&m[2]^m[1]&m[2]))|0].concat(m),m[4]=m[4]+$|0}for(i=0;i<8;i++)m[i]=m[i]+j[i]|0}for(i=0;i<8;i++)for(c=3;c+1;c--){var U=m[i]>>8*c&255;h+=(U<16?0:"")+U.toString(16)}return h},Et=function(t,r){return r!=="SHA-256"&&r!=="SHA256"&&r!=="sha256"&&r!=="sha-256"||(t=Jn(t)),t},bt=function(t){return String(t).trim().toLowerCase()},Qn=Xe.OptIn;N.defineGlobalNamespace(),window.adobe.OptInCategories=Qn.Categories;var qe=function(t,r,o){function i(n){var a=n;return function(u){var g=u||Y.location.href;try{var y=e._extractParamFromUri(g,a);if(y)return B.parsePipeDelimetedKeyValues(y)}catch{}}}function c(n){function a(u,g,y){u&&u.match(K.VALID_VISITOR_ID_REGEX)&&(y===U&&(G=!0),g(u))}a(n[U],e.setMarketingCloudVisitorID,U),e._setFieldExpire(O,-1),a(n[H],e.setAnalyticsVisitorID)}function l(n){n=n||{},e._supplementalDataIDCurrent=n.supplementalDataIDCurrent||"",e._supplementalDataIDCurrentConsumed=n.supplementalDataIDCurrentConsumed||{},e._supplementalDataIDLast=n.supplementalDataIDLast||"",e._supplementalDataIDLastConsumed=n.supplementalDataIDLastConsumed||{}}function f(n){function a(y,D,E){return E=E&&(E+="|"),E+=y+"="+encodeURIComponent(D)}function u(y,D){var E=D[0],R=D[1];return R!=null&&R!==V&&(y=a(E,R,y)),y}var g=n.reduce(u,"");return(function(y){var D=B.getTimestampInSeconds();return y=y&&(y+="|"),y+="TS="+D})(g)}function h(n){var a=n.minutesToLive,u="";return(e.idSyncDisableSyncs||e.disableIdSyncs)&&(u=u||"Error: id syncs have been disabled"),typeof n.dpid=="string"&&n.dpid.length||(u=u||"Error: config.dpid is empty"),typeof n.url=="string"&&n.url.length||(u=u||"Error: config.url is empty"),a===void 0?a=20160:(a=parseInt(a,10),(isNaN(a)||a<=0)&&(u=u||"Error: config.minutesToLive needs to be a positive number")),{error:u,ttl:a}}function I(){return!!e.configs.doesOptInApply&&!(A.optIn.isComplete&&C())}function C(){return e.configs.doesOptInApply&&e.configs.isIabContext?A.optIn.isApproved(A.optIn.Categories.ECID)&&w:A.optIn.isApproved(A.optIn.Categories.ECID)}function m(){[["getMarketingCloudVisitorID"],["setCustomerIDs",void 0],["getAnalyticsVisitorID"],["getAudienceManagerLocationHint"],["getLocationHint"],["getAudienceManagerBlob"]].forEach(function(n){var a=n[0],u=n.length===2?n[1]:"",g=e[a];e[a]=function(y){return C()&&e.isAllowed()?g.apply(e,arguments):(typeof y=="function"&&e._callCallback(y,[u]),u)}})}function b(n,a){if(w=!0,n)throw new Error("[IAB plugin] : "+n);a.gdprApplies&&(j=a.consentString),e.init(),v()}function M(){A.optIn.isComplete&&(A.optIn.isApproved(A.optIn.Categories.ECID)?e.configs.isIabContext?A.optIn.execute({command:"iabPlugin.fetchConsentData",callback:b}):(e.init(),v()):(m(),v()))}function v(){A.optIn.off("complete",M)}if(!o||o.split("").reverse().join("")!==t)throw new Error("Please use `Visitor.getInstance` to instantiate Visitor.");var e=this,A=window.adobe,j="",w=!1,G=!1;e.version="4.6.0";var Y=k,X=Y.Visitor;X.version=e.version,X.AuthState=Z.AUTH_STATE,X.OptOut=Z.OPT_OUT,Y.s_c_in||(Y.s_c_il=[],Y.s_c_in=0),e._c="Visitor",e._il=Y.s_c_il,e._in=Y.s_c_in,e._il[e._in]=e,Y.s_c_in++,e._instanceType="regular",e._log={requests:[]},e.marketingCloudOrgID=t,e.cookieName="AMCV_"+t,e.sessionCookieName="AMCVS_"+t,e.cookieDomain=pt(),e.loadSSL=!0,e.loadTimeout=3e4,e.CORSErrors=[],e.marketingCloudServer=e.audienceManagerServer="dpm.demdex.net",e.sdidParamExpiry=30;var $=null,U="MCMID",ne="MCIDTS",z="A",H="MCAID",ie="AAM",O="MCAAMB",V="NONE",J=function(n){return!Object.prototype[n]},fe=Ln(e);e.FIELDS=Z.FIELDS,e.cookieRead=function(n){return he.get(n)},e.cookieWrite=function(n,a,u){var g=e.cookieLifetime?(""+e.cookieLifetime).toUpperCase():"",y=!1;return e.configs&&e.configs.secureCookie&&location.protocol==="https:"&&(y=!0),he.set(n,""+a,{expires:u,domain:e.cookieDomain,cookieLifetime:g,secure:y})},e.resetState=function(n){n?e._mergeServerState(n):l()},e._isAllowedDone=!1,e._isAllowedFlag=!1,e.isAllowed=function(){return e._isAllowedDone||(e._isAllowedDone=!0,(e.cookieRead(e.cookieName)||e.cookieWrite(e.cookieName,"T",1))&&(e._isAllowedFlag=!0)),e.cookieRead(e.cookieName)==="T"&&e._helpers.removeCookie(e.cookieName),e._isAllowedFlag},e.setMarketingCloudVisitorID=function(n){e._setMarketingCloudFields(n)},e._use1stPartyMarketingCloudServer=!1,e.getMarketingCloudVisitorID=function(n,a){e.marketingCloudServer&&e.marketingCloudServer.indexOf(".demdex.net")<0&&(e._use1stPartyMarketingCloudServer=!0);var u=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=u.url;return e._getRemoteField(U,g,n,a,u)};var ni=function(n,a){var u={};e.getMarketingCloudVisitorID(function(){a.forEach(function(g){u[g]=e._getField(g,!0)}),a.indexOf("MCOPTOUT")!==-1?e.isOptedOut(function(g){u.MCOPTOUT=g,n(u)},null,!0):n(u)},!0)};e.getVisitorValues=function(n,a){var u={MCMID:{fn:e.getMarketingCloudVisitorID,args:[!0],context:e},MCOPTOUT:{fn:e.isOptedOut,args:[void 0,!0],context:e},MCAID:{fn:e.getAnalyticsVisitorID,args:[!0],context:e},MCAAMLH:{fn:e.getAudienceManagerLocationHint,args:[!0],context:e},MCAAMB:{fn:e.getAudienceManagerBlob,args:[!0],context:e}},g=a&&a.length?N.pluck(u,a):u;a&&a.indexOf("MCAID")===-1?ni(n,a):Pn(g,n)},e._currentCustomerIDs={},e._customerIDsHashChanged=!1,e._newCustomerIDsHash="",e.setCustomerIDs=function(n,a){function u(){e._customerIDsHashChanged=!1}if(!e.isOptedOut()&&n){if(!N.isObject(n)||N.isObjectEmpty(n))return!1;e._readVisitor();var g,y,D;for(g in n)if(J(g)&&(y=n[g],a=y.hasOwnProperty("hashType")?y.hashType:a,y))if(s(y)==="object"){var E={};if(y.id){if(a){if(!(D=Et(bt(y.id),a)))return;y.id=D,E.hashType=a}E.id=y.id}y.authState!=null&&(E.authState=y.authState),e._currentCustomerIDs[g]=E}else if(a){if(!(D=Et(bt(y),a)))return;e._currentCustomerIDs[g]={id:D,hashType:a}}else e._currentCustomerIDs[g]={id:y};var R=e.getCustomerIDs(),T=e._getField("MCCIDH"),q="";T||(T=0);for(g in R)J(g)&&(y=R[g],q+=(q?"|":"")+g+"|"+(y.id?y.id:"")+(y.authState?y.authState:""));e._newCustomerIDsHash=String(e._hash(q)),e._newCustomerIDsHash!==T&&(e._customerIDsHashChanged=!0,e._mapCustomerIDs(u))}},e.getCustomerIDs=function(){e._readVisitor();var n,a,u={};for(n in e._currentCustomerIDs)J(n)&&(a=e._currentCustomerIDs[n],a.id&&(u[n]||(u[n]={}),u[n].id=a.id,a.authState!=null?u[n].authState=a.authState:u[n].authState=X.AuthState.UNKNOWN,a.hashType&&(u[n].hashType=a.hashType)));return u},e.setAnalyticsVisitorID=function(n){e._setAnalyticsFields(n)},e.getAnalyticsVisitorID=function(n,a,u){if(!B.isTrackingServerPopulated()&&!u)return e._callCallback(n,[""]),"";var g="";if(u||(g=e.getMarketingCloudVisitorID(function(se){e.getAnalyticsVisitorID(n,!0)})),g||u){var y=u?e.marketingCloudServer:e.trackingServer,D="";e.loadSSL&&(u?e.marketingCloudServerSecure&&(y=e.marketingCloudServerSecure):e.trackingServerSecure&&(y=e.trackingServerSecure));var E={};if(y){var R="http"+(e.loadSSL?"s":"")+"://"+y+"/id",T="d_visid_ver="+e.version+"&mcorgid="+encodeURIComponent(e.marketingCloudOrgID)+(g?"&mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":""),q=["s_c_il",e._in,"_set"+(u?"MarketingCloud":"Analytics")+"Fields"];D=R+"?"+T+"&callback=s_c_il%5B"+e._in+"%5D._set"+(u?"MarketingCloud":"Analytics")+"Fields",E.corsUrl=R+"?"+T,E.callback=q}return E.url=D,e._getRemoteField(u?U:H,D,n,a,E)}return""},e.getAudienceManagerLocationHint=function(n,a){if(e.getMarketingCloudVisitorID(function(D){e.getAudienceManagerLocationHint(n,!0)})){var u=e._getField(H);if(!u&&B.isTrackingServerPopulated()&&(u=e.getAnalyticsVisitorID(function(D){e.getAudienceManagerLocationHint(n,!0)})),u||!B.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),y=g.url;return e._getRemoteField("MCAAMLH",y,n,a,g)}}return""},e.getLocationHint=e.getAudienceManagerLocationHint,e.getAudienceManagerBlob=function(n,a){if(e.getMarketingCloudVisitorID(function(D){e.getAudienceManagerBlob(n,!0)})){var u=e._getField(H);if(!u&&B.isTrackingServerPopulated()&&(u=e.getAnalyticsVisitorID(function(D){e.getAudienceManagerBlob(n,!0)})),u||!B.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),y=g.url;return e._customerIDsHashChanged&&e._setFieldExpire(O,-1),e._getRemoteField(O,y,n,a,g)}}return""},e._supplementalDataIDCurrent="",e._supplementalDataIDCurrentConsumed={},e._supplementalDataIDLast="",e._supplementalDataIDLastConsumed={},e.getSupplementalDataID=function(n,a){e._supplementalDataIDCurrent||a||(e._supplementalDataIDCurrent=e._generateID(1));var u=e._supplementalDataIDCurrent;return e._supplementalDataIDLast&&!e._supplementalDataIDLastConsumed[n]?(u=e._supplementalDataIDLast,e._supplementalDataIDLastConsumed[n]=!0):u&&(e._supplementalDataIDCurrentConsumed[n]&&(e._supplementalDataIDLast=e._supplementalDataIDCurrent,e._supplementalDataIDLastConsumed=e._supplementalDataIDCurrentConsumed,e._supplementalDataIDCurrent=u=a?"":e._generateID(1),e._supplementalDataIDCurrentConsumed={}),u&&(e._supplementalDataIDCurrentConsumed[n]=!0)),u};var xe=!1;e._liberatedOptOut=null,e.getOptOut=function(n,a){var u=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=u.url;if(C())return e._getRemoteField("MCOPTOUT",g,n,a,u);if(e._registerCallback("liberatedOptOut",n),e._liberatedOptOut!==null)return e._callAllCallbacks("liberatedOptOut",[e._liberatedOptOut]),xe=!1,e._liberatedOptOut;if(xe)return null;xe=!0;var y="liberatedGetOptOut";return u.corsUrl=u.corsUrl.replace(/dpm\.demdex\.net\/id\?/,"dpm.demdex.net/optOutStatus?"),u.callback=[y],k[y]=function(D){if(D===Object(D)){var E,R,T=N.parseOptOut(D,E,V);E=T.optOut,R=1e3*T.d_ottl,e._liberatedOptOut=E,setTimeout(function(){e._liberatedOptOut=null},R)}e._callAllCallbacks("liberatedOptOut",[E]),xe=!1},fe.fireCORS(u),null},e.isOptedOut=function(n,a,u){a||(a=X.OptOut.GLOBAL);var g=e.getOptOut(function(y){var D=y===X.OptOut.GLOBAL||y.indexOf(a)>=0;e._callCallback(n,[D])},u);return g?g===X.OptOut.GLOBAL||g.indexOf(a)>=0:null},e._fields=null,e._fieldsExpired=null,e._hash=function(n){var a,u,g=0;if(n)for(a=0;a<n.length;a++)u=n.charCodeAt(a),g=(g<<5)-g+u,g&=g;return g},e._generateID=Rn,e._generateLocalMID=function(){var n=e._generateID(0);return ae.isClientSideMarketingCloudVisitorID=!0,n},e._callbackList=null,e._callCallback=function(n,a){try{typeof n=="function"?n.apply(Y,a):n[1].apply(n[0],a)}catch{}},e._registerCallback=function(n,a){a&&(e._callbackList==null&&(e._callbackList={}),e._callbackList[n]==null&&(e._callbackList[n]=[]),e._callbackList[n].push(a))},e._callAllCallbacks=function(n,a){if(e._callbackList!=null){var u=e._callbackList[n];if(u)for(;u.length>0;)e._callCallback(u.shift(),a)}},e._addQuerystringParam=function(n,a,u,g){var y=encodeURIComponent(a)+"="+encodeURIComponent(u),D=B.parseHash(n),E=B.hashlessUrl(n);if(E.indexOf("?")===-1)return E+"?"+y+D;var R=E.split("?"),T=R[0]+"?",q=R[1];return T+B.addQueryParamAtLocation(q,y,g)+D},e._extractParamFromUri=function(n,a){var u=new RegExp("[\\?&#]"+a+"=([^&#]*)"),g=u.exec(n);if(g&&g.length)return decodeURIComponent(g[1])},e._parseAdobeMcFromUrl=i(K.ADOBE_MC),e._parseAdobeMcSdidFromUrl=i(K.ADOBE_MC_SDID),e._attemptToPopulateSdidFromUrl=function(n){var a=e._parseAdobeMcSdidFromUrl(n),u=1e9;a&&a.TS&&(u=B.getTimestampInSeconds()-a.TS),a&&a.SDID&&a.MCORGID===t&&u<e.sdidParamExpiry&&(e._supplementalDataIDCurrent=a.SDID,e._supplementalDataIDCurrentConsumed.SDID_URL_PARAM=!0)},e._attemptToPopulateIdsFromUrl=function(){var n=e._parseAdobeMcFromUrl();if(n&&n.TS){var a=B.getTimestampInSeconds(),u=a-n.TS;if(Math.floor(u/60)>K.ADOBE_MC_TTL_IN_MIN||n.MCORGID!==t)return;c(n)}},e._mergeServerState=function(n){if(n)try{if(n=(function(u){return B.isObject(u)?u:JSON.parse(u)})(n),n[e.marketingCloudOrgID]){var a=n[e.marketingCloudOrgID];(function(u){B.isObject(u)&&e.setCustomerIDs(u)})(a.customerIDs),l(a.sdid)}}catch{throw new Error("`serverState` has an invalid format.")}},e._timeout=null,e._loadData=function(n,a,u,g){a=e._addQuerystringParam(a,"d_fieldgroup",n,1),g.url=e._addQuerystringParam(g.url,"d_fieldgroup",n,1),g.corsUrl=e._addQuerystringParam(g.corsUrl,"d_fieldgroup",n,1),ae.fieldGroupObj[n]=!0,g===Object(g)&&g.corsUrl&&fe.corsMetadata.corsType==="XMLHttpRequest"&&fe.fireCORS(g,u,n)},e._clearTimeout=function(n){e._timeout!=null&&e._timeout[n]&&(clearTimeout(e._timeout[n]),e._timeout[n]=0)},e._settingsDigest=0,e._getSettingsDigest=function(){if(!e._settingsDigest){var n=e.version;e.audienceManagerServer&&(n+="|"+e.audienceManagerServer),e.audienceManagerServerSecure&&(n+="|"+e.audienceManagerServerSecure),e._settingsDigest=e._hash(n)}return e._settingsDigest},e._readVisitorDone=!1,e._readVisitor=function(){if(!e._readVisitorDone){e._readVisitorDone=!0;var n,a,u,g,y,D,E=e._getSettingsDigest(),R=!1,T=e.cookieRead(e.cookieName),q=new Date;if(T||G||e.discardTrackingServerECID||(T=e.cookieRead(K.FIRST_PARTY_SERVER_COOKIE)),e._fields==null&&(e._fields={}),T&&T!=="T")for(T=T.split("|"),T[0].match(/^[\-0-9]+$/)&&(parseInt(T[0],10)!==E&&(R=!0),T.shift()),T.length%2==1&&T.pop(),n=0;n<T.length;n+=2)a=T[n].split("-"),u=a[0],g=T[n+1],a.length>1?(y=parseInt(a[1],10),D=a[1].indexOf("s")>0):(y=0,D=!1),R&&(u==="MCCIDH"&&(g=""),y>0&&(y=q.getTime()/1e3-60)),u&&g&&(e._setField(u,g,1),y>0&&(e._fields["expire"+u]=y+(D?"s":""),(q.getTime()>=1e3*y||D&&!e.cookieRead(e.sessionCookieName))&&(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[u]=!0)));!e._getField(H)&&B.isTrackingServerPopulated()&&(T=e.cookieRead("s_vi"))&&(T=T.split("|"),T.length>1&&T[0].indexOf("v1")>=0&&(g=T[1],n=g.indexOf("["),n>=0&&(g=g.substring(0,n)),g&&g.match(K.VALID_VISITOR_ID_REGEX)&&e._setField(H,g)))}},e._appendVersionTo=function(n){var a="vVersion|"+e.version,u=n?e._getCookieVersion(n):null;return u?mt.areVersionsDifferent(u,e.version)&&(n=n.replace(K.VERSION_REGEX,a)):n+=(n?"|":"")+a,n},e._writeVisitor=function(){var n,a,u=e._getSettingsDigest();for(n in e._fields)J(n)&&e._fields[n]&&n.substring(0,6)!=="expire"&&(a=e._fields[n],u+=(u?"|":"")+n+(e._fields["expire"+n]?"-"+e._fields["expire"+n]:"")+"|"+a);u=e._appendVersionTo(u),e.cookieWrite(e.cookieName,u,1)},e._getField=function(n,a){return e._fields==null||!a&&e._fieldsExpired&&e._fieldsExpired[n]?null:e._fields[n]},e._setField=function(n,a,u){e._fields==null&&(e._fields={}),e._fields[n]=a,u||e._writeVisitor()},e._getFieldList=function(n,a){var u=e._getField(n,a);return u?u.split("*"):null},e._setFieldList=function(n,a,u){e._setField(n,a?a.join("*"):"",u)},e._getFieldMap=function(n,a){var u=e._getFieldList(n,a);if(u){var g,y={};for(g=0;g<u.length;g+=2)y[u[g]]=u[g+1];return y}return null},e._setFieldMap=function(n,a,u){var g,y=null;if(a){y=[];for(g in a)J(g)&&(y.push(g),y.push(a[g]))}e._setFieldList(n,y,u)},e._setFieldExpire=function(n,a,u){var g=new Date;g.setTime(g.getTime()+1e3*a),e._fields==null&&(e._fields={}),e._fields["expire"+n]=Math.floor(g.getTime()/1e3)+(u?"s":""),a<0?(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[n]=!0):e._fieldsExpired&&(e._fieldsExpired[n]=!1),u&&(e.cookieRead(e.sessionCookieName)||e.cookieWrite(e.sessionCookieName,"1"))},e._findVisitorID=function(n){return n&&(s(n)==="object"&&(n=n.d_mid?n.d_mid:n.visitorID?n.visitorID:n.id?n.id:n.uuid?n.uuid:""+n),n&&(n=n.toUpperCase())==="NOTARGET"&&(n=V),n&&(n===V||n.match(K.VALID_VISITOR_ID_REGEX))||(n="")),n},e._setFields=function(n,a){if(e._clearTimeout(n),e._loading!=null&&(e._loading[n]=!1),ae.fieldGroupObj[n]&&ae.setState(n,!1),n==="MC"){ae.isClientSideMarketingCloudVisitorID!==!0&&(ae.isClientSideMarketingCloudVisitorID=!1);var u=e._getField(U);if(!u||e.overwriteCrossDomainMCIDAndAID){if(!(u=s(a)==="object"&&a.mid?a.mid:e._findVisitorID(a))){if(e._use1stPartyMarketingCloudServer&&!e.tried1stPartyMarketingCloudServer)return e.tried1stPartyMarketingCloudServer=!0,void e.getAnalyticsVisitorID(null,!1,!0);u=e._generateLocalMID()}e._setField(U,u)}u&&u!==V||(u=""),s(a)==="object"&&((a.d_region||a.dcs_region||a.d_blob||a.blob)&&e._setFields(ie,a),e._use1stPartyMarketingCloudServer&&a.mid&&e._setFields(z,{id:a.id})),e._callAllCallbacks(U,[u])}if(n===ie&&s(a)==="object"){var g=604800;a.id_sync_ttl!=null&&a.id_sync_ttl&&(g=parseInt(a.id_sync_ttl,10));var y=re.getRegionAndCheckIfChanged(a,g);e._callAllCallbacks("MCAAMLH",[y]);var D=e._getField(O);(a.d_blob||a.blob)&&(D=a.d_blob,D||(D=a.blob),e._setFieldExpire(O,g),e._setField(O,D)),D||(D=""),e._callAllCallbacks(O,[D]),!a.error_msg&&e._newCustomerIDsHash&&e._setField("MCCIDH",e._newCustomerIDsHash)}if(n===z){var E=e._getField(H);E&&!e.overwriteCrossDomainMCIDAndAID||(E=e._findVisitorID(a),E?E!==V&&e._setFieldExpire(O,-1):E=V,e._setField(H,E)),E&&E!==V||(E=""),e._callAllCallbacks(H,[E])}if(e.idSyncDisableSyncs||e.disableIdSyncs)re.idCallNotProcesssed=!0;else{re.idCallNotProcesssed=!1;var R={};R.ibs=a.ibs,R.subdomain=a.subdomain,re.processIDCallData(R)}if(a===Object(a)){var T,q;C()&&e.isAllowed()&&(T=e._getField("MCOPTOUT"));var se=N.parseOptOut(a,T,V);T=se.optOut,q=se.d_ottl,e._setFieldExpire("MCOPTOUT",q,!0),e._setField("MCOPTOUT",T),e._callAllCallbacks("MCOPTOUT",[T])}},e._loading=null,e._getRemoteField=function(n,a,u,g,y){var D,E="",R=B.isFirstPartyAnalyticsVisitorIDCall(n),T={MCAAMLH:!0,MCAAMB:!0};if(C()&&e.isAllowed())if(e._readVisitor(),E=e._getField(n,T[n]===!0),(function(){return(!E||e._fieldsExpired&&e._fieldsExpired[n])&&(!e.disableThirdPartyCalls||R)})()){if(n===U||n==="MCOPTOUT"?D="MC":n==="MCAAMLH"||n===O?D=ie:n===H&&(D=z),D)return!a||e._loading!=null&&e._loading[D]||(e._loading==null&&(e._loading={}),e._loading[D]=!0,e._loadData(D,a,function(q){if(!e._getField(n)){q&&ae.setState(D,!0);var se="";n===U?se=e._generateLocalMID():D===ie&&(se={error_msg:"timeout"}),e._setFields(D,se)}},y)),e._registerCallback(n,u),E||(a||e._setFields(D,{id:V}),"")}else E||(n===U?(e._registerCallback(n,u),E=e._generateLocalMID(),e.setMarketingCloudVisitorID(E)):n===H?(e._registerCallback(n,u),E="",e.setAnalyticsVisitorID(E)):(E="",g=!0));return n!==U&&n!==H||E!==V||(E="",g=!0),u&&g&&e._callCallback(u,[E]),E},e._setMarketingCloudFields=function(n){e._readVisitor(),e._setFields("MC",n)},e._mapCustomerIDs=function(n){e.getAudienceManagerBlob(n,!0)},e._setAnalyticsFields=function(n){e._readVisitor(),e._setFields(z,n)},e._setAudienceManagerFields=function(n){e._readVisitor(),e._setFields(ie,n)},e._getAudienceManagerURLData=function(n){var a=e.audienceManagerServer,u="",g=e._getField(U),y=e._getField(O,!0),D=e._getField(H),E=D&&D!==V?"&d_cid_ic=AVID%01"+encodeURIComponent(D):"";if(e.loadSSL&&e.audienceManagerServerSecure&&(a=e.audienceManagerServerSecure),a){var R,T,q=e.getCustomerIDs();if(q)for(R in q)J(R)&&(T=q[R],E+="&d_cid_ic="+encodeURIComponent(R)+"%01"+encodeURIComponent(T.id?T.id:"")+(T.authState?"%01"+T.authState:""));n||(n="_setAudienceManagerFields");var se="http"+(e.loadSSL?"s":"")+"://"+a+"/id",Mt="d_visid_ver="+e.version+(j&&se.indexOf("demdex.net")!==-1?"&gdpr=1&gdpr_force=1&gdpr_consent="+j:"")+"&d_rtbd=json&d_ver=2"+(!g&&e._use1stPartyMarketingCloudServer?"&d_verify=1":"")+"&d_orgid="+encodeURIComponent(e.marketingCloudOrgID)+"&d_nsid="+(e.idSyncContainerID||0)+(g?"&d_mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":"")+($===!0?"&d_coop_safe=1":$===!1?"&d_coop_unsafe=1":"")+(y?"&d_blob="+encodeURIComponent(y):"")+E,ii=["s_c_il",e._in,n];return u=se+"?"+Mt+"&d_cb=s_c_il%5B"+e._in+"%5D."+n,{url:u,corsUrl:se+"?"+Mt,callback:ii}}return{url:u}},e.appendVisitorIDsTo=function(n){try{var a=[[U,e._getField(U)],[H,e._getField(H)],["MCORGID",e.marketingCloudOrgID]];return e._addQuerystringParam(n,K.ADOBE_MC,f(a))}catch{return n}},e.appendSupplementalDataIDTo=function(n,a){if(!(a=a||e.getSupplementalDataID(B.generateRandomString(),!0)))return n;try{var u=f([["SDID",a],["MCORGID",e.marketingCloudOrgID]]);return e._addQuerystringParam(n,K.ADOBE_MC_SDID,u)}catch{return n}};var B={parseHash:function(n){var a=n.indexOf("#");return a>0?n.substr(a):""},hashlessUrl:function(n){var a=n.indexOf("#");return a>0?n.substr(0,a):n},addQueryParamAtLocation:function(n,a,u){var g=n.split("&");return u=u??g.length,g.splice(u,0,a),g.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(n,a,u){if(n!==H)return!1;var g;return a||(a=e.trackingServer),u||(u=e.trackingServerSecure),!(typeof(g=e.loadSSL?u:a)!="string"||!g.length)&&g.indexOf("2o7.net")<0&&g.indexOf("omtrdc.net")<0},isObject:function(n){return!!(n&&n===Object(n))},removeCookie:function(n){he.remove(n,{domain:e.cookieDomain})},isTrackingServerPopulated:function(){return!!e.trackingServer||!!e.trackingServerSecure},getTimestampInSeconds:function(){return Math.round(new Date().getTime()/1e3)},parsePipeDelimetedKeyValues:function(n){return n.split("|").reduce(function(a,u){var g=u.split("=");return a[g[0]]=decodeURIComponent(g[1]),a},{})},generateRandomString:function(n){n=n||5;for(var a="",u="abcdefghijklmnopqrstuvwxyz0123456789";n--;)a+=u[Math.floor(Math.random()*u.length)];return a},normalizeBoolean:function(n){return n==="true"||n!=="false"&&n},parseBoolean:function(n){return n==="true"||n!=="false"&&null},replaceMethodsWithFunction:function(n,a){for(var u in n)n.hasOwnProperty(u)&&typeof n[u]=="function"&&(n[u]=a);return n}};e._helpers=B;var re=xn(e,X);e._destinationPublishing=re,e.timeoutMetricsLog=[];var ae={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(n,a){switch(n){case"MC":a===!1?this.MCIDCallTimedOut!==!0&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=a;break;case z:a===!1?this.AnalyticsIDCallTimedOut!==!0&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=a;break;case ie:a===!1?this.AAMIDCallTimedOut!==!0&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=a}}};e.isClientSideMarketingCloudVisitorID=function(){return ae.isClientSideMarketingCloudVisitorID},e.MCIDCallTimedOut=function(){return ae.MCIDCallTimedOut},e.AnalyticsIDCallTimedOut=function(){return ae.AnalyticsIDCallTimedOut},e.AAMIDCallTimedOut=function(){return ae.AAMIDCallTimedOut},e.idSyncGetOnPageSyncInfo=function(){return e._readVisitor(),e._getField("MCSYNCSOP")},e.idSyncByURL=function(n){if(!e.isOptedOut()){var a=h(n||{});if(a.error)return a.error;var u,g,y=n.url,D=encodeURIComponent,E=re;return y=y.replace(/^https:/,"").replace(/^http:/,""),u=N.encodeAndBuildRequest(["",n.dpid,n.dpuuid||""],","),g=["ibs",D(n.dpid),"img",D(y),a.ttl,"",u],E.addMessage(g.join("|")),E.requestToProcess(),"Successfully queued"}},e.idSyncByDataSource=function(n){if(!e.isOptedOut())return n===Object(n)&&typeof n.dpuuid=="string"&&n.dpuuid.length?(n.url="//dpm.demdex.net/ibs:dpid="+n.dpid+"&dpuuid="+n.dpuuid,e.idSyncByURL(n)):"Error: config or config.dpuuid is empty"},zn(e,re),e._getCookieVersion=function(n){n=n||e.cookieRead(e.cookieName);var a=K.VERSION_REGEX.exec(n);return a&&a.length>1?a[1]:null},e._resetAmcvCookie=function(n){var a=e._getCookieVersion();a&&!mt.isLessThan(a,n)||B.removeCookie(e.cookieName)},e.setAsCoopSafe=function(){$=!0},e.setAsCoopUnsafe=function(){$=!1},(function(){if(e.configs=Object.create(null),B.isObject(r))for(var n in r)J(n)&&(e[n]=r[n],e.configs[n]=r[n])})(),m();var Tt;e.init=function(){I()&&(A.optIn.fetchPermissions(M,!0),!A.optIn.isApproved(A.optIn.Categories.ECID))||Tt||(Tt=!0,(function(){if(B.isObject(r)){e.idSyncContainerID=e.idSyncContainerID||0,$=typeof e.isCoopSafe=="boolean"?e.isCoopSafe:B.parseBoolean(e.isCoopSafe),e.resetBeforeVersion&&e._resetAmcvCookie(e.resetBeforeVersion),e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl(),e._readVisitor();var n=e._getField(ne),a=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);e.idSyncDisableSyncs||e.disableIdSyncs||!re.canMakeSyncIDCall(n,a)||(e._setFieldExpire(O,-1),e._setField(ne,a)),e.getMarketingCloudVisitorID(),e.getAudienceManagerLocationHint(),e.getAudienceManagerBlob(),e._mergeServerState(e.serverState)}else e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl()})(),(function(){if(!e.idSyncDisableSyncs&&!e.disableIdSyncs){re.checkDPIframeSrc();var n=function(){var a=re;a.readyToAttachIframe()&&a.attachIframe()};Y.addEventListener("load",function(){X.windowLoaded=!0,n()});try{Ge.receiveMessage(function(a){re.receiveMessage(a.data)},re.iframeHost)}catch{}}})(),(function(){e.whitelistIframeDomains&&K.POST_MESSAGE_ENABLED&&(e.whitelistIframeDomains=e.whitelistIframeDomains instanceof Array?e.whitelistIframeDomains:[e.whitelistIframeDomains],e.whitelistIframeDomains.forEach(function(n){var a=new lt(t,n),u=wn(e,a);Ge.receiveMessage(u,n)}))})())}};qe.config=ht,k.Visitor=qe;var Ie=qe,Zn=function(t){if(N.isObject(t))return Object.keys(t).filter(function(r){return t[r]!==""}).reduce(function(r,o){var i=ht.normalizeConfig(t[o]),c=N.normalizeBoolean(i);return r[o]=c,r},Object.create(null))},ei=Xe.OptIn,ti=Xe.IabPlugin;return Ie.getInstance=function(t,r){if(!t)throw new Error("Visitor requires Adobe Marketing Cloud Org ID.");t.indexOf("@")<0&&(t+="@AdobeOrg");var o=(function(){var C=k.s_c_il;if(C)for(var m=0;m<C.length;m++){var b=C[m];if(b&&b._c==="Visitor"&&b.marketingCloudOrgID===t)return b}})();if(o)return o;var i=Zn(r);(function(C){k.adobe.optIn=k.adobe.optIn||(function(){var m=N.pluck(C,["doesOptInApply","previousPermissions","preOptInApprovals","isOptInStorageEnabled","optInStorageExpiry","isIabContext"]),b=C.optInCookieDomain||C.cookieDomain;b=b||pt(),b=b===window.location.hostname?"":b,m.optInCookieDomain=b;var M=new ei(m,{cookies:he});if(m.isIabContext&&m.doesOptInApply){var v=new ti(window.__cmp);M.registerPlugin(v)}return M})()})(i||{});var c=t,l=c.split("").reverse().join(""),f=new Ie(t,null,l);N.isObject(i)&&i.cookieDomain&&(f.cookieDomain=i.cookieDomain),(function(){k.s_c_il.splice(--k.s_c_in,1)})();var h=N.getIeVersion();if(typeof h=="number"&&h<10)return f._helpers.replaceMethodsWithFunction(f,function(){});var I=(function(){try{return k.self!==k.parent}catch{return!0}})()&&!(function(C){return C.cookieWrite("TEST_AMCV_COOKIE","T",1),C.cookieRead("TEST_AMCV_COOKIE")==="T"&&(C._helpers.removeCookie("TEST_AMCV_COOKIE"),!0)})(f)&&k.parent?new Mn(t,i,f,k.parent):new Ie(t,i,l);return f=null,I.init(),I},(function(){function t(){Ie.windowLoaded=!0}k.addEventListener?k.addEventListener("load",t):k.attachEvent&&k.attachEvent("onload",t),Ie.codeLoadEnd=new Date().getTime()})(),Ie})()});var ye="__mpi",te=typeof window<"u",kt=()=>te?window:void 0;function W(s){let p=kt()?.[ye]?.segmentWrapper||{};return s?p[s]:p}var ge=(s,d)=>{let p=kt();if(!p){console.warn("[segment-wrapper] Cannot set config in non-browser environment");return}p[ye]=p[ye]||{},p[ye].segmentWrapper=p[ye].segmentWrapper||{},p[ye].segmentWrapper[s]=d};var be,$e=()=>({ADOBE_ORG_ID:window.__SEGMENT_WRAPPER?.ADOBE_ORG_ID,DEFAULT_DEMDEX_VERSION:window.__SEGMENT_WRAPPER?.DEFAULT_DEMDEX_VERSION??"3.3.0",TIME_BETWEEN_RETRIES:window.__SEGMENT_WRAPPER?.TIME_BETWEEN_RETRIES??15,TIMES_TO_RETRY:window.__SEGMENT_WRAPPER?.TIMES_TO_RETRY??80,SERVERS:{trackingServer:window.__SEGMENT_WRAPPER?.TRACKING_SERVER,trackingServerSecure:window.__SEGMENT_WRAPPER?.TRACKING_SERVER}}),Pt=()=>{let s=$e();if(window.Visitor&&s.ADOBE_ORG_ID)return window.Visitor.getInstance(s.ADOBE_ORG_ID,s.SERVERS)},fi=s=>s?.getMarketingCloudVisitorID(),Rt=()=>{let s=Pt(),d=$e(),p=s?.version??d.DEFAULT_DEMDEX_VERSION,{trackingServer:_}=d.SERVERS;return Promise.resolve({trackingServer:_,version:p})},Lt=()=>{if(be)return Promise.resolve(be);let s=$e();return new Promise(d=>{function p(_){if(_===0)return d("");let S=Pt();be=fi(S),be?d(be):window.setTimeout(()=>p(--_),s.TIME_BETWEEN_RETRIES)}p(s.TIMES_TO_RETRY)})},gi=async()=>(await Promise.resolve().then(()=>li(wt())),Lt()),Ne=async()=>{let s=W("getCustomAdobeVisitorId");return typeof s=="function"?s():W("importAdobeVisitorId")===!0?gi():Lt()};var pi="borosTcf",mi=2,_i={channel:"GDPR"},xt={analytics:[1,8,10],advertising:[3]},ze={LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"},Ci="CMP Submitted",ee={ACCEPTED:"accepted",DECLINED:"declined",UNKNOWN:"unknown"},ce={listeners:[],value:void 0,addListener:s=>ce.listeners.push(s),get:()=>ce.value,set:s=>{let{analytics:d,advertising:p}=s||{};ce.value={analytics:d,advertising:p},ce.listeners.forEach(_=>_(s)),ce.listeners=[]}};function hi(s){if(!te)return null;let p=new RegExp(s+"=([^;]+)").exec(document.cookie);return p!==null?unescape(p[1]):null}var Ii=()=>{if(W("initialized"))return!1;let s=!!window.__tcfapi;return s||console.warn("[tcfTracking] window.__tcfapi is not available on client and TCF won't be tracked."),s},yi=s=>xt.analytics.every(d=>s[`${d}`]),Si=s=>xt.advertising.every(d=>s[`${d}`]),vi=({gdprPrivacy:s})=>{let d=s.analytics===ee.ACCEPTED,p=s.advertising===ee.ACCEPTED;return Ve.track(Ci,{..._i,...W("tcfTrackDefaultProperties")||{},google_consents:{analytics_storage:d?"granted":"denied",ad_storage:p?"granted":"denied",ad_user_data:p?"granted":"denied",ad_personalization:p?"granted":"denied"}},{gdpr_privacy:s.analytics,gdpr_privacy_advertising:s.advertising})},Se=()=>{let s=ce.get();return s!==void 0?Promise.resolve(s):new Promise(d=>{ce.addListener(p=>d(p))})},Nt=()=>ce.get(),Ce=s=>s?.analytics===ee.ACCEPTED,Vt=s=>{let d=yi(s),p=Si(s),_=d?ee.ACCEPTED:ee.DECLINED,S=p?ee.ACCEPTED:ee.DECLINED;return ce.set({analytics:_,advertising:S}),{analytics:_,advertising:S}},Ft=()=>{let s=hi(pi);if(s)try{let{purpose:d}=JSON.parse(window.atob(s)),{consents:p}=d;return p}catch(d){console.error(d);return}},Ai=()=>{let s=Ft();s&&Vt(s)},Di=()=>{let s=Ft();ge("isFirstVisit",!s)};function Je(){if(te){if(Ai(),Di(),!Ii()){ce.get()?.analytics===void 0&&ce.set({analytics:ee.UNKNOWN,advertising:ee.UNKNOWN});return}ge("initialized",!0),window.__tcfapi?.("addEventListener",mi,({eventStatus:s,purpose:d},p)=>{if(!p)return Promise.resolve();if(s===ze.USER_ACTION_COMPLETE||s===ze.LOADED){let{consents:_}=d,S=Vt(_);if(s===ze.USER_ACTION_COMPLETE){let{analytics:P,advertising:L}=S;vi({gdprPrivacy:{analytics:P,advertising:L}})}}})}}function Ut(s){if(typeof document>"u")return null;let p=new RegExp(`${s}=([^;]+)`).exec(document.cookie);return p!==null?unescape(p[1]):null}function jt(s,d,p={}){if(typeof document>"u"||typeof window>"u")return;let{maxAge:_=31536e3,path:S="/",reduceDomain:P=!0,sameSite:L="Lax"}=p,x=P?Ht():window.location.hostname,de=[`${s}=${d}`,`domain=${x}`,`path=${S}`,`max-age=${_}`,`SameSite=${L}`].join(";");document.cookie=de}function Gt(s,d={}){if(typeof document>"u"||typeof window>"u")return;let{path:p="/",reduceDomain:_=!0}=d,S=_?Ht():window.location.hostname;document.cookie=`${s}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${p}; domain=${S}`}var Ht=s=>{let d=s!==void 0?s:typeof window<"u"?window.location.hostname:"",p=".",_=d.split(p).reverse();if(_.length===1)return _[0];let S=[];for(let P of _)if(S.push(P),P.length>3)break;return`${p}${S.reverse().join(p)}`};var Ei="https://secure.adnxs.com/getuidj?consent=1",Qe="adit-xandr-id",bi=0;function Ti(){return te?window.fetch(Ei,{credentials:"include"}).then(s=>s.json()).then(s=>s?.uid).catch(()=>null):Promise.resolve(null)}function Bt({gdprPrivacyValueAdvertising:s}){if(!te)return null;if(s!==ee.ACCEPTED)return Gt(Qe),null;let d=S=>S!==null&&Number(S)>bi,p=Ut(Qe),_=d(p);return _||Ti().then(S=>{typeof S=="string"&&jt(Qe,S)}),ge("xandrId",p),_?p:null}var Mi={platform:"web"},Oi={All:!1},ki={All:!0},wi=s=>{let d=W("userIdPrefix");return d&&(typeof s=="number"||typeof s=="string"&&!s.startsWith(d))?`${d}${s}`:s},Ze=()=>({...Mi,...W("defaultProperties")}),Pi=async({gdprPrivacyValue:s,event:d})=>{let p=Ce(s),_;try{p&&(_=await Ne())}catch(P){console.error(P)}return{...Ri({isGdprAccepted:p,event:d}),"Adobe Analytics":_?{marketingCloudVisitorId:_}:!0,"Google Analytics 4 Web":!0}},Ri=({isGdprAccepted:s,event:d})=>d==="CMP Submitted"?ki:s?{}:Oi,Li=({context:s,xandrId:d})=>{let p=W("sendXandrId")!==!1,_=d&&parseInt(d)!==0;if(!p||!_)return{};let x=[...Array.isArray(s?.externalIds)?s.externalIds:[],{collection:"users",encoding:"none",id:d,type:"xandr_id"}];return{externalIds:x.filter(({id:ve,type:Ae},je)=>je===x.findIndex(({id:me,type:De})=>ve===me&&Ae===De))}},et=async({event:s="",context:d={}})=>{let p=await Se(),{analytics:_,advertising:S}=p||{},P=Ce(p),[L,x]=await Promise.all([Pi({gdprPrivacyValue:p,event:s}),Bt({gdprPrivacyValueAdvertising:S})]);return P||(d.integrations={...d.integrations??{},Personas:!1,Webhooks:!0,Webhook:!0}),{...d,...!P&&{ip:"0.0.0.0"},...Li({context:d,xandrId:x}),clientVersion:"segment-wrapper@5.0.0-beta.2",gdpr_privacy:_,gdpr_privacy_advertising:S,integrations:{...d.integrations,...L}}},Wt=(s,d,p={},_)=>new Promise(S=>{(async()=>{let L=await et({context:p,event:s}),x={...Ze(),...d},de=async(...ve)=>{_&&_(...ve);let[Ae]=await Promise.all([Se()]);Ce(Ae),S()};window.analytics.track(s,x,{...L,context:{integrations:{...L.integrations}}},de)})()}),xi=async(s,d,p,_)=>{let S=await Se(),P=wi(s);return window.analytics.identify(P,Ce(S)?d:{},p,_)},Ni=(s,d,p={},_)=>(p.isPageTrack=!0,Wt(s??"",d,p,_)),Vi=()=>Promise.resolve(window.analytics.reset()),Ve={page:Ni,identify:xi,track:Wt,reset:Vi};var Kt="__mpi_patch";function Yt(){let{track:s}=window.analytics;window.analytics.track=(...d)=>{let[p,_,S,P]=d,L={...Ze(),..._};return et({context:S,event:p}).then(x=>{s.call(window.analytics,p,L,x,P)}),window.analytics},window.analytics[Kt]=!0}te&&(window.analytics?window.analytics[Kt]||(window.analytics.initialized?Yt():window.analytics.ready(Yt)):console.warn("[segment-wrapper] Segment Analytics is not loaded so patch is not applied."));var tt={spaReferrer:"",referrer:""},Fe={getDocumentReferrer:()=>document.referrer,getActualLocation:()=>{let{origin:s,pathname:d}=window.location;return`${s}${d}`},getActualQueryString:()=>{let{search:s}=window.location;return s}},Xt=({isPageTrack:s=!1}={})=>{let{referrer:d,spaReferrer:p}=tt;return(s?d:p)||Fe.getDocumentReferrer()},Fi=()=>{tt.spaReferrer=Xt({isPageTrack:!0}),tt.referrer=Fe.getActualLocation()},qt=({payload:s,next:d})=>{let{obj:{context:p}}=s,{isPageTrack:_}=p,S=Xt({isPageTrack:_});s.obj.context={...p,page:{...p.page,referrer:S}},_&&Fi(),d(s)};var Te={QUERY:"stc",SPLIT_SYMBOL:"-",CAMPAIGN_SPLIT_SYMBOL:":"},Ui="utm_campaign",ji="utm_medium",Gi="utm_source",Hi="utm_content",Bi="utm_id",Wi="utm_term",Yi={aff:"affiliate",dis:"display",em:"email",met:"paid-metasearch",sem:"paid-search",rt:"display",sm:"social-media",sp:"paid-social",pn:"push-notification",cs:"cross-sites"},Ki="na",Xi={medium:null,source:null,campaign:null},qi={STC:"stc",UTM:"utm"},$t=({needsTransformation:s=!0}={})=>{let{medium:d,source:p,campaign:_,content:S,term:P}=$i();if(!d||!p||!_)return null;let[L,x]=_.split(Te.CAMPAIGN_SPLIT_SYMBOL);if(!L&&!x)return null;let de=typeof S<"u"&&S!==Ki;return{campaign:{medium:s&&Yi[d]||d,...typeof x<"u"&&{id:L},name:x??L,source:p,...de&&{content:S},...typeof P<"u"&&{term:P}}}};function $i(){let s=Fe.getActualQueryString(),d=new URLSearchParams(s);return W("trackingTagsType")===qi.UTM?zi(d):zt(d)}function zt(s){if(!Jt(s))return Xi;let d=s.get(Te.QUERY),[p,_,S,P,L]=d?.split(Te.SPLIT_SYMBOL)||[];return{medium:p,source:_,campaign:S,content:P,term:L}}function Jt(s){return s.has(Te.QUERY)}function zi(s){let d=s.get(Bi),p=s.get(Ui),_=s.get(ji),S=s.get(Gi),P=s.get(Hi),L=s.get(Wi),x=d?`${d}${Te.CAMPAIGN_SPLIT_SYMBOL}${p}`:p;return(!_||!S||!x)&&Jt(s)?zt(s):{campaign:x,medium:_,source:S,content:P??void 0,term:L??void 0}}var Qt=({payload:s,next:d})=>{let p=$t();s.obj.context={...s.obj.context,...p},d(s)};var Zt=({payload:s,next:d})=>{let p=Nt();if(p){let{analytics:_,advertising:S}=p,P=_===ee.ACCEPTED,L=S===ee.ACCEPTED;s.obj.properties={...s.obj.properties,google_consents:{analytics_storage:P?"granted":"denied",ad_storage:L?"granted":"denied",ad_user_data:L?"granted":"denied",ad_personalization:L?"granted":"denied"}}}d(s)};var Ji={platform:"web"},en=({payload:s,next:d})=>{let p=W("defaultContext")||{};s.obj.context={...Ji,...p,...s.obj.context},d(s)};var Qi=()=>{let s=null;return({payload:d,next:p})=>{try{let{obj:_}=d,{event:S,type:P}=_;if(P!=="track"){p(d);return}if(typeof S=="string"&&S.endsWith("Viewed")){let{page_name:L,page_type:x}=_.properties||{};s={name:L,type:x},p(d);return}if(!s){p(d);return}p({...d,obj:{..._,properties:{..._.properties,page_name_origin:s.name,page_type:_.properties?.page_type||s.type}}})}catch(_){console.error(_),p(d)}}},tn=Qi();var nn=({payload:s,next:d})=>{s.obj.context={...s.obj.context,screen:{height:window.innerHeight,width:window.innerWidth,density:window.devicePixelRatio}},d(s)};var Zi=s=>{let d=W("isUserTraitsEnabled"),p=window.analytics.user?.(),_=Ce(s),S=p?.id();return{anonymousId:p?.anonymousId(),...S&&{userId:S},..._&&d&&p?.traits()||{}}},rn=async({payload:s,next:d})=>{let p=await Se(),_;try{_=Zi(p)}catch(S){console.error(S)}s.obj.context={...s.obj.context,traits:{...s.obj.context.traits||{},..._}},d(s)};for(on=[],Ue=0;Ue<64;)on[Ue]=0|4294967296*Math.sin(++Ue%Math.PI);var on,Ue;for(oe=18,Me=[],nt=[];oe>1;oe--)for(F=oe;F<320;)Me[F+=oe]=1;var F,oe,Me,nt;function Q(s,d){return 4294967296*Math.pow(s,1/d)|0}for(F=0;F<64;)Me[++oe]||(nt[F]=Q(oe,2),Me[F++]=Q(oe,3));function ue(s,d){return s>>>d|s<<-d}function an(s){var d=nt.slice(oe=F=0,8),p=[],_=unescape(encodeURI(s))+"\x80",S=_.length;for(p[s=--S/4+2|15]=8*S;~S;)p[S>>2]|=_.charCodeAt(S)<<8*~S--;for(S=[];oe<s;oe+=16){for(Q=d.slice();F<64;Q.unshift(_+(ue(_=Q[0],2)^ue(_,13)^ue(_,22))+(_&Q[1]^Q[1]&Q[2]^Q[2]&_)))Q[3]+=_=0|(S[F]=F<16?~~p[F+oe]:(ue(_=S[F-2],17)^ue(_,19)^_>>>10)+S[F-7]+(ue(_=S[F-15],7)^ue(_,18)^_>>>3)+S[F-16])+Q.pop()+(ue(_=Q[4],6)^ue(_,11)^ue(_,25))+(_&Q[5]^~_&Q[6])+Me[F++];for(F=8;F;)d[--F]+=Q[F]}for(_="";F<64;)_+=(d[F>>3]>>4*(7-F++)&15).toString(16);return _}var er=/\.|\+.*$/g;function tr(s){if(typeof s!="string")return"";let p=s.toLowerCase().split(/@/);if(p.length!==2)return"";let[_,S]=p;return`${_.replace(er,"")}@${S}`}function sn(s){let d=tr(s);return d?an(d):""}var nr="USER_DATA_READY",ir=()=>W("universalId"),rr=()=>{let s=ir();if(s)return it(),s;let d=W("userEmail");if(d)return s=sn(d),or(s),it(),s;it()},cn=()=>{if(!te)return;let s=rr(),d=W("userEmail");if(typeof window<"u"&&typeof window.dispatchEvent=="function"){let p=new CustomEvent(nr,{detail:{universalId:s,userEmail:d}});window.dispatchEvent(p)}return{universalId:s,userEmail:d}},it=()=>{ge("universalIdInitialized",!0)},or=s=>{ge("universalId",s)};var un=()=>{if(typeof window>"u")return;let s=window,d=s.analytics;if(!d){console.warn("[segment-wrapper] Analytics is not available");return}let p=s.__SEGMENT_WRAPPER?.SEGMENT_ID_USER_WITHOUT_CONSENTS??"anonymous_user";d.user?.()?.anonymousId()===p&&"setAnonymousId"in d&&typeof d.setAnonymousId=="function"&&d.setAnonymousId(null)};Je();try{cn()}catch(s){console.error("[segment-wrapper] UniversalID could not be initialized",s)}var dn=()=>{let s=W("experimentalPageDataMiddleware");window.analytics.addSourceMiddleware?.(rn),window.analytics.addSourceMiddleware?.(en),window.analytics.addSourceMiddleware?.(Zt),window.analytics.addSourceMiddleware?.(Qt),window.analytics.addSourceMiddleware?.(nn),window.analytics.addSourceMiddleware?.(qt),s&&window.analytics.addSourceMiddleware?.(tn)};te&&window.analytics&&(window.analytics.ready(un),window.analytics.addSourceMiddleware?dn():window.analytics.ready(dn));var rt=Ve;var pe=window;pe.sui=pe.sui||{};pe.sui.analytics=pe.sui.analytics||rt;pe.sui.analytics.getAdobeVisitorData=pe.sui.analytics.getAdobeVisitorData||Rt;pe.sui.analytics.getAdobeMCVisitorID=pe.sui.analytics.getAdobeMCVisitorID||Ne;var ho=rt;})();
1
+ "use strict";(()=>{var ai=Object.create;var Mt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var ci=Object.getOwnPropertyNames;var ui=Object.getPrototypeOf,di=Object.prototype.hasOwnProperty;var li=(s,d)=>()=>(d||s((d={exports:{}}).exports,d),d.exports);var fi=(s,d,p,_)=>{if(d&&typeof d=="object"||typeof d=="function")for(let y of ci(d))!di.call(s,y)&&y!==p&&Mt(s,y,{get:()=>d[y],enumerable:!(_=si(d,y))||_.enumerable});return s};var gi=(s,d,p)=>(p=s!=null?ai(ui(s)):{},fi(d||!s||!s.__esModule?Mt(p,"default",{value:s,enumerable:!0}):p,s));var wt=li(()=>{"use strict";var dr=(function(){"use strict";function s(t){"@babel/helpers - typeof";return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function d(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function p(){return{callbacks:{},add:function(t,r){this.callbacks[t]=this.callbacks[t]||[];var o=this.callbacks[t].push(r)-1,i=this;return function(){i.callbacks[t].splice(o,1)}},execute:function(t,r){if(this.callbacks[t]){r=r===void 0?[]:r,r=r instanceof Array?r:[r];try{for(;this.callbacks[t].length;){var o=this.callbacks[t].shift();typeof o=="function"?o.apply(null,r):o instanceof Array&&o[1].apply(o[0],r)}delete this.callbacks[t]}catch{}}},executeAll:function(t,r){(r||t&&!x.isObjectEmpty(t))&&Object.keys(this.callbacks).forEach(function(o){var i=t[o]!==void 0?t[o]:"";this.execute(o,i)},this)},hasCallbacks:function(){return!!Object.keys(this.callbacks).length}}}function _(t,r,o){var i=t?.[r];return i===void 0?o:i}function y(t){for(var r=/^\d+$/,o=0,i=t.length;o<i;o++)if(!r.test(t[o]))return!1;return!0}function w(t,r){for(;t.length<r.length;)t.push("0");for(;r.length<t.length;)r.push("0")}function L(t,r){for(var o=0;o<t.length;o++){var i=parseInt(t[o],10),c=parseInt(r[o],10);if(i>c)return 1;if(c>i)return-1}return 0}function N(t,r){if(t===r)return 0;var o=t.toString().split("."),i=r.toString().split(".");return y(o.concat(i))?(w(o,i),L(o,i)):NaN}function $(t){return t===Object(t)&&Object.keys(t).length===0}function me(t){return typeof t=="function"||t instanceof Array&&t.length}function Ae(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};this.log=Be("log",t,r),this.warn=Be("warn",t,r),this.error=Be("error",t,r)}function Ge(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.isEnabled,o=t.cookieName,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=i.cookies;return r&&o&&c?{remove:function(){c.remove(o)},get:function(){var l=c.get(o),f={};try{f=JSON.parse(l)}catch{f={}}return f},set:function(l,f){f=f||{},c.set(o,JSON.stringify(l),{domain:f.optInCookieDomain||"",cookieLifetime:f.optInStorageExpiry||3419e4,expires:!0})}}:{get:De,set:De,remove:De}}function _e(t){this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}function Ee(){function t(M,V){var Q=We(M);return Q.length?Q.every(function(fe){return!!V[fe]}):Bn(V)}function r(){re(J),B(le.COMPLETE),j(A.status,A.permissions),e.set(A.permissions,{optInCookieDomain:I,optInStorageExpiry:C}),P.execute(Et)}function o(M){return function(V,Q){if(!Ye(V))throw new Error("[OptIn] Invalid category(-ies). Please use the `OptIn.Categories` enum.");return B(le.CHANGED),Object.assign(J,St(We(V),M)),Q||r(),A}}var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.doesOptInApply,l=i.previousPermissions,f=i.preOptInApprovals,h=i.isOptInStorageEnabled,I=i.optInCookieDomain,C=i.optInStorageExpiry,m=i.isIabContext,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=T.cookies,v=Xn(l);At(v,"Invalid `previousPermissions`!"),At(f,"Invalid `preOptInApprovals`!");var e=Ge({isEnabled:!!h,cookieName:"adobeujs-optin"},{cookies:O}),A=this,j=Fn(A),P=It(),H=yt(v),Y=yt(f),X=e.get(),z={},U=(function(M,V){return Ke(M)||V&&Ke(V)?le.COMPLETE:le.PENDING})(H,X),ie=(function(M,V,Q){var fe=St(Pe,!c);return c?Object.assign({},fe,M,V,Q):fe})(Y,H,X),J=Wn(ie),B=function(M){return U=M},re=function(M){return ie=M};A.deny=o(!1),A.approve=o(!0),A.denyAll=A.deny.bind(A,Pe),A.approveAll=A.approve.bind(A,Pe),A.isApproved=function(M){return t(M,A.permissions)},A.isPreApproved=function(M){return t(M,Y)},A.fetchPermissions=function(M){var V=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Q=V?A.on(le.COMPLETE,M):De;return!c||c&&A.isComplete||f?M(A.permissions):V||P.add(Et,function(){return M(A.permissions)}),Q},A.complete=function(){A.status===le.CHANGED&&r()},A.registerPlugin=function(M){if(!M||!M.name||typeof M.onRegister!="function")throw new Error(Jn);z[M.name]||(z[M.name]=M,M.onRegister.call(M,A))},A.execute=zn(z),Object.defineProperties(A,{permissions:{get:function(){return ie}},status:{get:function(){return U}},Categories:{get:function(){return Ce}},doesOptInApply:{get:function(){return!!c}},isPending:{get:function(){return A.status===le.PENDING}},isComplete:{get:function(){return A.status===le.COMPLETE}},__plugins:{get:function(){return Object.keys(z)}},isIabContext:{get:function(){return m}}})}function ot(t,r){function o(){c=null,t.call(t,new _e("The call took longer than you wanted!"))}function i(){c&&(clearTimeout(c),t.apply(t,arguments))}if(r===void 0)return t;var c=setTimeout(o,r);return i}function at(){if(window.__cmp)return window.__cmp;var t=window;if(t===window.top)return void Re.error("__cmp not found");for(var r;!r;){t=t.parent;try{t.frames.__cmpLocator&&(r=t)}catch{}if(t===window.top)break}if(!r)return void Re.error("__cmp not found");var o={};return window.__cmp=function(i,c,l){var f=Math.random()+"",h={__cmpCall:{command:i,parameter:c,callId:f}};o[f]=l,r.postMessage(h,"*")},window.addEventListener("message",function(i){var c=i.data;if(typeof c=="string")try{c=JSON.parse(i.data)}catch{}if(c.__cmpReturn){var l=c.__cmpReturn;o[l.callId]&&(o[l.callId](l.returnValue,l.success),delete o[l.callId])}},!1),window.__cmp}function gn(){var t=this;t.name="iabPlugin",t.version="0.0.1";var r=It(),o={allConsentData:null},i=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o[I]=C};t.fetchConsentData=function(I){var C=I.callback,m=I.timeout,T=ot(C,m);c({callback:T})},t.isApproved=function(I){var C=I.callback,m=I.category,T=I.timeout;if(o.allConsentData)return C(null,h(m,o.allConsentData.vendorConsents,o.allConsentData.purposeConsents));var O=ot(function(v){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=e.vendorConsents,j=e.purposeConsents;C(v,h(m,A,j))},T);c({category:m,callback:O})},t.onRegister=function(I){var C=Object.keys(He),m=function(T){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=O.purposeConsents,e=O.gdprApplies,A=O.vendorConsents;!T&&e&&A&&v&&(C.forEach(function(j){var P=h(j,A,v);I[P?"approve":"deny"](j,!0)}),I.complete())};t.fetchConsentData({callback:m})};var c=function(I){var C=I.callback;if(o.allConsentData)return C(null,o.allConsentData);r.add("FETCH_CONSENT_DATA",C);var m={};f(function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=T.purposeConsents,v=T.gdprApplies,e=T.vendorConsents;arguments.length>1&&arguments[1]&&(m={purposeConsents:O,gdprApplies:v,vendorConsents:e},i("allConsentData",m)),l(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};arguments.length>1&&arguments[1]&&(m.consentString=A.consentData,i("allConsentData",m)),r.execute("FETCH_CONSENT_DATA",[null,o.allConsentData])})})},l=function(I){var C=at();C&&C("getConsentData",null,I)},f=function(I){var C=$n(He),m=at();m&&m("getVendorConsents",C,I)},h=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=!!C[He[I]];return T&&(function(){return Un[I].every(function(O){return m[O]})})()}}var k=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Object.assign=Object.assign||function(t){for(var r,o,i=1;i<arguments.length;++i){o=arguments[i];for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t};var Me,ke,pn={HANDSHAKE:"HANDSHAKE",GETSTATE:"GETSTATE",PARENTSTATE:"PARENTSTATE"},mn={MCMID:"MCMID",MCAID:"MCAID",MCAAMB:"MCAAMB",MCAAMLH:"MCAAMLH",MCOPTOUT:"MCOPTOUT",CUSTOMERIDS:"CUSTOMERIDS"},_n={MCMID:"getMarketingCloudVisitorID",MCAID:"getAnalyticsVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",ALLFIELDS:"getVisitorValues"},Cn={CUSTOMERIDS:"getCustomerIDs"},hn={MCMID:"getMarketingCloudVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",MCAID:"getAnalyticsVisitorID",CUSTOMERIDS:"getCustomerIDs",ALLFIELDS:"getVisitorValues"},In={MC:"MCMID",A:"MCAID",AAM:"MCAAMB"},Sn={MCMID:"MCMID",MCOPTOUT:"MCOPTOUT",MCAID:"MCAID",MCAAMLH:"MCAAMLH",MCAAMB:"MCAAMB"},yn={UNKNOWN:0,AUTHENTICATED:1,LOGGED_OUT:2},vn={GLOBAL:"global"},ee={MESSAGES:pn,STATE_KEYS_MAP:mn,ASYNC_API_MAP:_n,SYNC_API_MAP:Cn,ALL_APIS:hn,FIELDGROUP_TO_FIELD:In,FIELDS:Sn,AUTH_STATE:yn,OPT_OUT:vn},st=ee.STATE_KEYS_MAP,An=function(t){function r(){}function o(i,c){var l=this;return function(){var f=t(0,i),h={};return h[i]=f,l.setStateAndPublish(h),c(f),f}}this.getMarketingCloudVisitorID=function(i){i=i||r;var c=this.findField(st.MCMID,i),l=o.call(this,st.MCMID,i);return c!==void 0?c:l()},this.getVisitorValues=function(i){this.getMarketingCloudVisitorID(function(c){i({MCMID:c})})}},En=ee.MESSAGES,ct=ee.ASYNC_API_MAP,ut=ee.SYNC_API_MAP,Dn=function(){function t(){}function r(c,l){var f=this;return function(){return f.callbackRegistry.add(c,l),f.messageParent(En.GETSTATE),""}}function o(c){this[ct[c]]=function(l){l=l||t;var f=this.findField(c,l),h=r.call(this,c,l);return f!==void 0?f:h()}}function i(c){this[ut[c]]=function(){return this.findField(c,t)||{}}}Object.keys(ct).forEach(o,this),Object.keys(ut).forEach(i,this)},dt=ee.ASYNC_API_MAP,Tn=function(){Object.keys(dt).forEach(function(t){this[dt[t]]=function(r){this.callbackRegistry.add(t,r)}},this)},x=(function(t,r){return r={exports:{}},t(r,r.exports),r.exports})(function(t,r){r.isObjectEmpty=function(i){return i===Object(i)&&Object.keys(i).length===0},r.isValueEmpty=function(i){return i===""||r.isObjectEmpty(i)};var o=function(){var i=navigator.appName,c=navigator.userAgent;return i==="Microsoft Internet Explorer"||c.indexOf("MSIE ")>=0||c.indexOf("Trident/")>=0&&c.indexOf("Windows NT 6")>=0};r.getIeVersion=function(){return document.documentMode?document.documentMode:o()?7:null},r.encodeAndBuildRequest=function(i,c){return i.map(encodeURIComponent).join(c)},r.isObject=function(i){return i!==null&&s(i)==="object"&&Array.isArray(i)===!1},r.defineGlobalNamespace=function(){return window.adobe=r.isObject(window.adobe)?window.adobe:{},window.adobe},r.pluck=function(i,c){return c.reduce(function(l,f){return i[f]&&(l[f]=i[f]),l},Object.create(null))},r.parseOptOut=function(i,c,l){c||(c=l,i.d_optout&&i.d_optout instanceof Array&&(c=i.d_optout.join(",")));var f=parseInt(i.d_ottl,10);return isNaN(f)&&(f=7200),{optOut:c,d_ottl:f}},r.normalizeBoolean=function(i){var c=i;return i==="true"?c=!0:i==="false"&&(c=!1),c}}),bn=(x.isObjectEmpty,x.isValueEmpty,x.getIeVersion,x.encodeAndBuildRequest,x.isObject,x.defineGlobalNamespace,x.pluck,x.parseOptOut,x.normalizeBoolean,p),On=ee.MESSAGES,Mn={0:"prefix",1:"orgID",2:"state"},lt=function(t,r){this.parse=function(o){try{var i={};return o.data.split("|").forEach(function(c,l){c!==void 0&&(i[Mn[l]]=l!==2?c:JSON.parse(c))}),i}catch{}},this.isInvalid=function(o){var i=this.parse(o);if(!i||Object.keys(i).length<2)return!0;var c=t!==i.orgID,l=!r||o.origin!==r,f=Object.keys(On).indexOf(i.prefix)===-1;return c||l||f},this.send=function(o,i,c){var l=i+"|"+t;c&&c===Object(c)&&(l+="|"+JSON.stringify(c));try{o.postMessage(l,r)}catch{}}},ft=ee.MESSAGES,kn=function(t,r,o,i){function c(P){Object.assign(v,P)}function l(P){Object.assign(v.state,P),Object.assign(v.state.ALLFIELDS,P),v.callbackRegistry.executeAll(v.state)}function f(P){if(!j.isInvalid(P)){A=!1;var H=j.parse(P);v.setStateAndPublish(H.state)}}function h(P){!A&&e&&(A=!0,j.send(i,P))}function I(){c(new An(o._generateID)),v.getMarketingCloudVisitorID(),v.callbackRegistry.executeAll(v.state,!0),k.removeEventListener("message",C)}function C(P){if(!j.isInvalid(P)){var H=j.parse(P);A=!1,k.clearTimeout(v._handshakeTimeout),k.removeEventListener("message",C),c(new Dn(v)),k.addEventListener("message",f),v.setStateAndPublish(H.state),v.callbackRegistry.hasCallbacks()&&h(ft.GETSTATE)}}function m(){e&&postMessage?(k.addEventListener("message",C),h(ft.HANDSHAKE),v._handshakeTimeout=setTimeout(I,250)):I()}function T(){k.s_c_in||(k.s_c_il=[],k.s_c_in=0),v._c="Visitor",v._il=k.s_c_il,v._in=k.s_c_in,v._il[v._in]=v,k.s_c_in++}function O(){function P(H){H.indexOf("_")!==0&&typeof o[H]=="function"&&(v[H]=function(){})}Object.keys(o).forEach(P),v.getSupplementalDataID=o.getSupplementalDataID,v.isAllowed=function(){return!0}}var v=this,e=r.whitelistParentDomain;v.state={ALLFIELDS:{}},v.version=o.version,v.marketingCloudOrgID=t,v.cookieDomain=o.cookieDomain||"",v._instanceType="child";var A=!1,j=new lt(t,e);v.callbackRegistry=bn(),v.init=function(){T(),O(),c(new Tn(v)),m()},v.findField=function(P,H){if(v.state[P]!==void 0)return H(v.state[P]),v.state[P]},v.messageParent=h,v.setStateAndPublish=l},we=ee.MESSAGES,gt=ee.ALL_APIS,wn=ee.ASYNC_API_MAP,Pn=ee.FIELDGROUP_TO_FIELD,Rn=function(t,r){function o(){var C={};return Object.keys(gt).forEach(function(m){var T=gt[m],O=t[T]();x.isValueEmpty(O)||(C[m]=O)}),C}function i(){var C=[];return t._loading&&Object.keys(t._loading).forEach(function(m){if(t._loading[m]){var T=Pn[m];C.push(T)}}),C.length?C:null}function c(C){return function m(T){var O=i();if(O){var v=wn[O[0]];t[v](m,!0)}else C()}}function l(C,m){var T=o();r.send(C,m,T)}function f(C){I(C),l(C,we.HANDSHAKE)}function h(C){c(function(){l(C,we.PARENTSTATE)})()}function I(C){function m(O){T.call(t,O),r.send(C,we.PARENTSTATE,{CUSTOMERIDS:t.getCustomerIDs()})}var T=t.setCustomerIDs;t.setCustomerIDs=m}return function(C){r.isInvalid(C)||(r.parse(C).prefix===we.HANDSHAKE?f:h)(C.source)}},Ln=function(t,r){function o(f){return function(h){i[f]=h,c++,c===l&&r(i)}}var i={},c=0,l=Object.keys(t).length;Object.keys(t).forEach(function(f){var h=t[f];if(h.fn){var I=h.args||[];I.unshift(o(f)),h.fn.apply(h.context||null,I)}})},Ie={get:function(t){t=encodeURIComponent(t);var r=(";"+document.cookie).split(" ").join(";"),o=r.indexOf(";"+t+"="),i=o<0?o:r.indexOf(";",o+1);return o<0?"":decodeURIComponent(r.substring(o+2+t.length,i<0?r.length:i))},set:function(t,r,o){var i=_(o,"cookieLifetime"),c=_(o,"expires"),l=_(o,"domain"),f=_(o,"secure"),h=f?"Secure":"";if(c&&i!=="SESSION"&&i!=="NONE"){var I=r!==""?parseInt(i||0,10):-60;if(I)c=new Date,c.setTime(c.getTime()+1e3*I);else if(c===1){c=new Date;var C=c.getYear();c.setYear(C+2+(C<1900?1900:0))}}else c=0;return t&&i!=="NONE"?(document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+"; path=/;"+(c?" expires="+c.toGMTString()+";":"")+(l?" domain="+l+";":"")+h,this.get(t)===r):0},remove:function(t,r){var o=_(r,"domain");o=o?" domain="+o+";":"",document.cookie=encodeURIComponent(t)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"+o}},pt=function(t){var r;!t&&k.location&&(t=k.location.hostname),r=t;var o,i=r.split(".");for(o=i.length-2;o>=0;o--)if(r=i.slice(o).join("."),Ie.set("test","cookie",{domain:r}))return Ie.remove("test",{domain:r}),r;return""},mt={compare:N,isLessThan:function(t,r){return N(t,r)<0},areVersionsDifferent:function(t,r){return N(t,r)!==0},isGreaterThan:function(t,r){return N(t,r)>0},isEqual:function(t,r){return N(t,r)===0}},_t=!!k.postMessage,je={postMessage:function(t,r,o){var i=1;r&&(_t?o.postMessage(t,r.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):r&&(o.location=r.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+t))},receiveMessage:function(t,r){var o;try{_t&&(t&&(o=function(i){if(typeof r=="string"&&i.origin!==r||Object.prototype.toString.call(r)==="[object Function]"&&r(i.origin)===!1)return!1;t(i)}),k.addEventListener?k[t?"addEventListener":"removeEventListener"]("message",o):k[t?"attachEvent":"detachEvent"]("onmessage",o))}catch{}}},Nn=function(t){var r,o,i="0123456789",c="",l="",f=8,h=10,I=10;if(t==1){for(i+="ABCDEF",r=0;16>r;r++)o=Math.floor(Math.random()*f),c+=i.substring(o,o+1),o=Math.floor(Math.random()*f),l+=i.substring(o,o+1),f=16;return c+"-"+l}for(r=0;19>r;r++)o=Math.floor(Math.random()*h),c+=i.substring(o,o+1),r===0&&o==9?h=3:((r==1||r==2)&&h!=10&&2>o||2<r)&&(h=10),o=Math.floor(Math.random()*I),l+=i.substring(o,o+1),r===0&&o==9?I=3:((r==1||r==2)&&I!=10&&2>o||2<r)&&(I=10);return c+l},xn=function(t,r){return{corsMetadata:(function(){var o="none",i=!0;return typeof XMLHttpRequest<"u"&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?o="XMLHttpRequest":typeof XDomainRequest<"u"&&XDomainRequest===Object(XDomainRequest)&&(i=!1),Object.prototype.toString.call(k.HTMLElement).indexOf("Constructor")>0&&(i=!1)),{corsType:o,corsCookiesEnabled:i}})(),getCORSInstance:function(){return this.corsMetadata.corsType==="none"?null:new k[this.corsMetadata.corsType]},fireCORS:function(o,i,c){function l(I){var C;try{if((C=JSON.parse(I))!==Object(C))return void f.handleCORSError(o,null,"Response is not JSON")}catch(v){return void f.handleCORSError(o,v,"Error parsing response as JSON")}try{for(var m=o.callback,T=k,O=0;O<m.length;O++)T=T[m[O]];T(C)}catch(v){f.handleCORSError(o,v,"Error forming callback function")}}var f=this;i&&(o.loadErrorHandler=i);try{var h=this.getCORSInstance();h.open("get",o.corsUrl+"&ts="+new Date().getTime(),!0),this.corsMetadata.corsType==="XMLHttpRequest"&&(h.withCredentials=!0,h.timeout=t.loadTimeout,h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),h.onreadystatechange=function(){this.readyState===4&&this.status===200&&l(this.responseText)}),h.onerror=function(I){f.handleCORSError(o,I,"onerror")},h.ontimeout=function(I){f.handleCORSError(o,I,"ontimeout")},h.send(),t._log.requests.push(o.corsUrl)}catch(I){this.handleCORSError(o,I,"try-catch")}},handleCORSError:function(o,i,c){t.CORSErrors.push({corsData:o,error:i,description:c}),o.loadErrorHandler&&(c==="ontimeout"?o.loadErrorHandler(!0):o.loadErrorHandler(!1))}}},K={POST_MESSAGE_ENABLED:!!k.postMessage,DAYS_BETWEEN_SYNC_ID_CALLS:1,MILLIS_PER_DAY:864e5,ADOBE_MC:"adobe_mc",ADOBE_MC_SDID:"adobe_mc_sdid",VALID_VISITOR_ID_REGEX:/^[0-9a-fA-F\-]+$/,ADOBE_MC_TTL_IN_MIN:5,VERSION_REGEX:/vVersion\|((\d+\.)?(\d+\.)?(\*|\d+))(?=$|\|)/,FIRST_PARTY_SERVER_COOKIE:"s_ecid"},Vn=function(t,r){var o=k.document;return{THROTTLE_START:3e4,MAX_SYNCS_LENGTH:649,throttleTimerSet:!1,id:null,onPagePixels:[],iframeHost:null,getIframeHost:function(i){if(typeof i=="string"){var c=i.split("/");return c[0]+"//"+c[2]}},subdomain:null,url:null,getUrl:function(){var i,c="http://fast.",l="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(o.location.origin);return this.subdomain||(this.subdomain="nosubdomainreturned"),t.loadSSL&&(c=t.idSyncSSLUseAkamai?"https://fast.":"https://"),i=c+this.subdomain+".demdex.net/dest5.html"+l,this.iframeHost=this.getIframeHost(i),this.id="destination_publishing_iframe_"+this.subdomain+"_"+t.idSyncContainerID,i},checkDPIframeSrc:function(){var i="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(o.location.href);typeof t.dpIframeSrc=="string"&&t.dpIframeSrc.length&&(this.id="destination_publishing_iframe_"+(t._subdomain||this.subdomain||new Date().getTime())+"_"+t.idSyncContainerID,this.iframeHost=this.getIframeHost(t.dpIframeSrc),this.url=t.dpIframeSrc+i)},idCallNotProcesssed:null,doAttachIframe:!1,startedAttachingIframe:!1,iframeHasLoaded:null,iframeIdChanged:null,newIframeCreated:null,originalIframeHasLoadedAlready:null,iframeLoadedCallbacks:[],regionChanged:!1,timesRegionChanged:0,sendingMessages:!1,messages:[],messagesPosted:[],messagesReceived:[],messageSendingInterval:K.POST_MESSAGE_ENABLED?null:100,onPageDestinationsFired:[],jsonForComparison:[],jsonDuplicates:[],jsonWaiting:[],jsonProcessed:[],canSetThirdPartyCookies:!0,receivedThirdPartyCookiesNotification:!1,readyToAttachIframePreliminary:function(){return!(t.idSyncDisableSyncs||t.disableIdSyncs||t.idSyncDisable3rdPartySyncing||t.disableThirdPartyCookies||t.disableThirdPartyCalls)},readyToAttachIframe:function(){return this.readyToAttachIframePreliminary()&&(this.doAttachIframe||t._doAttachIframe)&&(this.subdomain&&this.subdomain!=="nosubdomainreturned"||t._subdomain)&&this.url&&!this.startedAttachingIframe},attachIframe:function(){function i(){f=o.createElement("iframe"),f.sandbox="allow-scripts allow-same-origin",f.title="Adobe ID Syncing iFrame",f.id=l.id,f.name=l.id+"_name",f.style.cssText="display: none; width: 0; height: 0;",f.src=l.url,l.newIframeCreated=!0,c(),o.body.appendChild(f)}function c(h){f.addEventListener("load",function(){f.className="aamIframeLoaded",l.iframeHasLoaded=!0,l.fireIframeLoadedCallbacks(h),l.requestToProcess()})}this.startedAttachingIframe=!0;var l=this,f=o.getElementById(this.id);f?f.nodeName!=="IFRAME"?(this.id+="_2",this.iframeIdChanged=!0,i()):(this.newIframeCreated=!1,f.className!=="aamIframeLoaded"?(this.originalIframeHasLoadedAlready=!1,c("The destination publishing iframe already exists from a different library, but hadn't loaded yet.")):(this.originalIframeHasLoadedAlready=!0,this.iframeHasLoaded=!0,this.iframe=f,this.fireIframeLoadedCallbacks("The destination publishing iframe already exists from a different library, and had loaded alresady."),this.requestToProcess())):i(),this.iframe=f},fireIframeLoadedCallbacks:function(i){this.iframeLoadedCallbacks.forEach(function(c){typeof c=="function"&&c({message:i||"The destination publishing iframe was attached and loaded successfully."})}),this.iframeLoadedCallbacks=[]},requestToProcess:function(i){function c(){f.jsonForComparison.push(i),f.jsonWaiting.push(i),f.processSyncOnPage(i)}var l,f=this;if(i===Object(i)&&i.ibs)if(l=JSON.stringify(i.ibs||[]),this.jsonForComparison.length){var h,I,C,m=!1;for(h=0,I=this.jsonForComparison.length;h<I;h++)if(C=this.jsonForComparison[h],l===JSON.stringify(C.ibs||[])){m=!0;break}m?this.jsonDuplicates.push(i):c()}else c();if((this.receivedThirdPartyCookiesNotification||!K.POST_MESSAGE_ENABLED||this.iframeHasLoaded)&&this.jsonWaiting.length){var T=this.jsonWaiting.shift();this.process(T),this.requestToProcess()}t.idSyncDisableSyncs||t.disableIdSyncs||!this.iframeHasLoaded||!this.messages.length||this.sendingMessages||(this.throttleTimerSet||(this.throttleTimerSet=!0,setTimeout(function(){f.messageSendingInterval=K.POST_MESSAGE_ENABLED?null:150},this.THROTTLE_START)),this.sendingMessages=!0,this.sendMessages())},getRegionAndCheckIfChanged:function(i,c){var l=t._getField("MCAAMLH"),f=i.d_region||i.dcs_region;return l?f&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",f),parseInt(l,10)!==f&&(this.regionChanged=!0,this.timesRegionChanged++,t._setField("MCSYNCSOP",""),t._setField("MCSYNCS",""),l=f)):(l=f)&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",l)),l||(l=""),l},processSyncOnPage:function(i){var c,l,f,h;if((c=i.ibs)&&c instanceof Array&&(l=c.length))for(f=0;f<l;f++)h=c[f],h.syncOnPage&&this.checkFirstPartyCookie(h,"","syncOnPage")},process:function(i){var c,l,f,h,I,C=encodeURIComponent,m=!1;if((c=i.ibs)&&c instanceof Array&&(l=c.length))for(m=!0,f=0;f<l;f++)h=c[f],I=[C("ibs"),C(h.id||""),C(h.tag||""),x.encodeAndBuildRequest(h.url||[],","),C(h.ttl||""),"","",h.fireURLSync?"true":"false"],h.syncOnPage||(this.canSetThirdPartyCookies?this.addMessage(I.join("|")):h.fireURLSync&&this.checkFirstPartyCookie(h,I.join("|")));m&&this.jsonProcessed.push(i)},checkFirstPartyCookie:function(i,c,l){var f=l==="syncOnPage",h=f?"MCSYNCSOP":"MCSYNCS";t._readVisitor();var I,C,m=t._getField(h),T=!1,O=!1,v=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);m?(I=m.split("*"),C=this.pruneSyncData(I,i.id,v),T=C.dataPresent,O=C.dataValid,T&&O||this.fireSync(f,i,c,I,h,v)):(I=[],this.fireSync(f,i,c,I,h,v))},pruneSyncData:function(i,c,l){var f,h,I,C=!1,m=!1;for(h=0;h<i.length;h++)f=i[h],I=parseInt(f.split("-")[1],10),f.match("^"+c+"-")?(C=!0,l<I?m=!0:(i.splice(h,1),h--)):l>=I&&(i.splice(h,1),h--);return{dataPresent:C,dataValid:m}},manageSyncsSize:function(i){if(i.join("*").length>this.MAX_SYNCS_LENGTH)for(i.sort(function(c,l){return parseInt(c.split("-")[1],10)-parseInt(l.split("-")[1],10)});i.join("*").length>this.MAX_SYNCS_LENGTH;)i.shift()},fireSync:function(i,c,l,f,h,I){var C=this;if(i){if(c.tag==="img"){var m,T,O,v,e=c.url,A=t.loadSSL?"https:":"http:";for(m=0,T=e.length;m<T;m++){O=e[m],v=/^\/\//.test(O);var j=new Image;j.addEventListener("load",(function(P,H,Y,X){return function(){C.onPagePixels[P]=null,t._readVisitor();var z,U=t._getField(h),ie=[];if(U){z=U.split("*");var J,B,re;for(J=0,B=z.length;J<B;J++)re=z[J],re.match("^"+H.id+"-")||ie.push(re)}C.setSyncTrackingData(ie,H,Y,X)}})(this.onPagePixels.length,c,h,I)),j.src=(v?A:"")+O,this.onPagePixels.push(j)}}}else this.addMessage(l),this.setSyncTrackingData(f,c,h,I)},addMessage:function(i){var c=encodeURIComponent,l=c(t._enableErrorReporting?"---destpub-debug---":"---destpub---");this.messages.push((K.POST_MESSAGE_ENABLED?"":l)+i)},setSyncTrackingData:function(i,c,l,f){i.push(c.id+"-"+(f+Math.ceil(c.ttl/60/24))),this.manageSyncsSize(i),t._setField(l,i.join("*"))},sendMessages:function(){var i,c=this,l="",f=encodeURIComponent;this.regionChanged&&(l=f("---destpub-clear-dextp---"),this.regionChanged=!1),this.messages.length?K.POST_MESSAGE_ENABLED?(i=l+f("---destpub-combined---")+this.messages.join("%01"),this.postMessage(i),this.messages=[],this.sendingMessages=!1):(i=this.messages.shift(),this.postMessage(l+i),setTimeout(function(){c.sendMessages()},this.messageSendingInterval)):this.sendingMessages=!1},postMessage:function(i){je.postMessage(i,this.url,this.iframe.contentWindow),this.messagesPosted.push(i)},receiveMessage:function(i){var c,l=/^---destpub-to-parent---/;typeof i=="string"&&l.test(i)&&(c=i.replace(l,"").split("|"),c[0]==="canSetThirdPartyCookies"&&(this.canSetThirdPartyCookies=c[1]==="true",this.receivedThirdPartyCookiesNotification=!0,this.requestToProcess()),this.messagesReceived.push(i))},processIDCallData:function(i){(this.url==null||i.subdomain&&this.subdomain==="nosubdomainreturned")&&(typeof t._subdomain=="string"&&t._subdomain.length?this.subdomain=t._subdomain:this.subdomain=i.subdomain||"",this.url=this.getUrl()),i.ibs instanceof Array&&i.ibs.length&&(this.doAttachIframe=!0),this.readyToAttachIframe()&&(t.idSyncAttachIframeOnWindowLoad?(r.windowLoaded||o.readyState==="complete"||o.readyState==="loaded")&&this.attachIframe():this.attachIframeASAP()),typeof t.idSyncIDCallResult=="function"?t.idSyncIDCallResult(i):this.requestToProcess(i),typeof t.idSyncAfterIDCallResult=="function"&&t.idSyncAfterIDCallResult(i)},canMakeSyncIDCall:function(i,c){return t._forceSyncIDCall||!i||c-i>K.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function i(){c.startedAttachingIframe||(o.body?c.attachIframe():setTimeout(i,30))}var c=this;i()}}},Ct={audienceManagerServer:{},audienceManagerServerSecure:{},cookieDomain:{},cookieLifetime:{},cookieName:{},doesOptInApply:{},disableThirdPartyCalls:{},discardTrackingServerECID:{},idSyncAfterIDCallResult:{},idSyncAttachIframeOnWindowLoad:{},idSyncContainerID:{},idSyncDisable3rdPartySyncing:{},disableThirdPartyCookies:{},idSyncDisableSyncs:{},disableIdSyncs:{},idSyncIDCallResult:{},idSyncSSLUseAkamai:{},isCoopSafe:{},isIabContext:{},isOptInStorageEnabled:{},loadSSL:{},loadTimeout:{},marketingCloudServer:{},marketingCloudServerSecure:{},optInCookieDomain:{},optInStorageExpiry:{},overwriteCrossDomainMCIDAndAID:{},preOptInApprovals:{},previousPermissions:{},resetBeforeVersion:{},sdidParamExpiry:{},serverState:{},sessionCookieName:{},secureCookie:{},takeTimeoutMetrics:{},trackingServer:{},trackingServerSecure:{},whitelistIframeDomains:{},whitelistParentDomain:{}},ht={getConfigNames:function(){return Object.keys(Ct)},getConfigs:function(){return Ct},normalizeConfig:function(t){return typeof t!="function"?t:t()}},Fn=function(t){var r={};return t.on=function(o,i,c){if(!i||typeof i!="function")throw new Error("[ON] Callback should be a function.");r.hasOwnProperty(o)||(r[o]=[]);var l=r[o].push({callback:i,context:c})-1;return function(){r[o].splice(l,1),r[o].length||delete r[o]}},t.off=function(o,i){r.hasOwnProperty(o)&&(r[o]=r[o].filter(function(c){if(c.callback!==i)return c}))},t.publish=function(o){if(r.hasOwnProperty(o)){var i=[].slice.call(arguments,1);r[o].slice(0).forEach(function(c){c.callback.apply(c.context,i)})}},t.publish},le={PENDING:"pending",CHANGED:"changed",COMPLETE:"complete"},Ce={AAM:"aam",ADCLOUD:"adcloud",ANALYTICS:"aa",CAMPAIGN:"campaign",ECID:"ecid",LIVEFYRE:"livefyre",TARGET:"target",MEDIA_ANALYTICS:"mediaaa"},He=(Me={},d(Me,Ce.AAM,565),d(Me,Ce.ECID,565),Me),Un=(ke={},d(ke,Ce.AAM,[1,2,5]),d(ke,Ce.ECID,[1,2,5]),ke),Pe=(function(t){return Object.keys(t).map(function(r){return t[r]})})(Ce),It=function(){var t={};return t.callbacks=Object.create(null),t.add=function(r,o){if(!me(o))throw new Error("[callbackRegistryFactory] Make sure callback is a function or an array of functions.");t.callbacks[r]=t.callbacks[r]||[];var i=t.callbacks[r].push(o)-1;return function(){t.callbacks[r].splice(i,1)}},t.execute=function(r,o){if(t.callbacks[r]){o=o===void 0?[]:o,o=o instanceof Array?o:[o];try{for(;t.callbacks[r].length;){var i=t.callbacks[r].shift();typeof i=="function"?i.apply(null,o):i instanceof Array&&i[1].apply(i[0],o)}delete t.callbacks[r]}catch{}}},t.executeAll=function(r,o){(o||r&&!$(r))&&Object.keys(t.callbacks).forEach(function(i){var c=r[i]!==void 0?r[i]:"";t.execute(i,c)},t)},t.hasCallbacks=function(){return!!Object.keys(t.callbacks).length},t},Gn=function(){},jn=function(t){var r=window,o=r.console;return!!o&&typeof o[t]=="function"},Be=function(t,r,o){return o()?function(){if(jn(t)){for(var i=arguments.length,c=new Array(i),l=0;l<i;l++)c[l]=arguments[l];console[t].apply(console,[r].concat(c))}}:Gn},Hn=Ae,Re=new Hn("[ADOBE OPT-IN]"),Le=function(t,r){return s(t)===r},We=function(t,r){return t instanceof Array?t:Le(t,"string")?[t]:r||[]},Bn=function(t){var r=Object.keys(t);return!!r.length&&r.every(function(o){return t[o]===!0})},Ye=function(t){return!(!t||Yn(t))&&We(t).every(function(r){return Pe.indexOf(r)>-1})},St=function(t,r){return t.reduce(function(o,i){return o[i]=r,o},{})},Wn=function(t){return JSON.parse(JSON.stringify(t))},Yn=function(t){return Object.prototype.toString.call(t)==="[object Array]"&&!t.length},yt=function(t){if(vt(t))return t;try{return JSON.parse(t)}catch{return{}}},Ke=function(t){return t===void 0||(vt(t)?Ye(Object.keys(t)):Kn(t))},Kn=function(t){try{var r=JSON.parse(t);return!!t&&Le(t,"string")&&Ye(Object.keys(r))}catch{return!1}},vt=function(t){return t!==null&&Le(t,"object")&&Array.isArray(t)===!1},De=function(){},Xn=function(t){return Le(t,"function")?t():t},At=function(t,r){Ke(t)||Re.error("".concat(r))},qn=function(t){return Object.keys(t).map(function(r){return t[r]})},$n=function(t){return qn(t).filter(function(r,o,i){return i.indexOf(r)===o})},zn=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=r.command,i=r.params,c=i===void 0?{}:i,l=r.callback,f=l===void 0?De:l;if(!o||o.indexOf(".")===-1)throw new Error("[OptIn.execute] Please provide a valid command.");try{var h=o.split("."),I=t[h[0]],C=h[1];if(!I||typeof I[C]!="function")throw new Error("Make sure the plugin and API name exist.");var m=Object.assign(c,{callback:f});I[C].call(I,m)}catch(T){Re.error("[execute] Something went wrong: "+T.message)}}};_e.prototype=Object.create(Error.prototype),_e.prototype.constructor=_e;var Et="fetchPermissions",Jn="[OptIn#registerPlugin] Plugin is invalid.";Ee.Categories=Ce,Ee.TimeoutError=_e;var Xe=Object.freeze({OptIn:Ee,IabPlugin:gn}),Qn=function(t,r){t.publishDestinations=function(o){var i=arguments[1],c=arguments[2];try{c=typeof c=="function"?c:o.callback}catch{c=function(){}}var l=r;if(!l.readyToAttachIframePreliminary())return void c({error:"The destination publishing iframe is disabled in the Visitor library."});if(typeof o=="string"){if(!o.length)return void c({error:"subdomain is not a populated string."});if(!(i instanceof Array&&i.length))return void c({error:"messages is not a populated array."});var f=!1;if(i.forEach(function(m){typeof m=="string"&&m.length&&(l.addMessage(m),f=!0)}),!f)return void c({error:"None of the messages are populated strings."})}else{if(!x.isObject(o))return void c({error:"Invalid parameters passed."});var h=o;if(typeof(o=h.subdomain)!="string"||!o.length)return void c({error:"config.subdomain is not a populated string."});var I=h.urlDestinations;if(!(I instanceof Array&&I.length))return void c({error:"config.urlDestinations is not a populated array."});var C=[];I.forEach(function(m){x.isObject(m)&&(m.hideReferrer?m.message&&l.addMessage(m.message):C.push(m))}),(function m(){C.length&&setTimeout(function(){var T=new Image,O=C.shift();T.src=O.url,l.onPageDestinationsFired.push(O),m()},100)})()}l.iframe?(c({message:"The destination publishing iframe is already attached and loaded."}),l.requestToProcess()):!t.subdomain&&t._getField("MCMID")?(l.subdomain=o,l.doAttachIframe=!0,l.url=l.getUrl(),l.readyToAttachIframe()?(l.iframeLoadedCallbacks.push(function(m){c({message:"Attempted to attach and load the destination publishing iframe through this API call. Result: "+(m.message||"no result")})}),l.attachIframe()):c({error:"Encountered a problem in attempting to attach and load the destination publishing iframe through this API call."})):l.iframeLoadedCallbacks.push(function(m){c({message:"Attempted to attach and load the destination publishing iframe through normal Visitor API processing. Result: "+(m.message||"no result")})})}},Zn=function t(r){function o(ie,J){return ie>>>J|ie<<32-J}for(var i,c,l=Math.pow,f=l(2,32),h="",I=[],C=8*r.length,m=t.h=t.h||[],T=t.k=t.k||[],O=T.length,v={},e=2;O<64;e++)if(!v[e]){for(i=0;i<313;i+=e)v[i]=e;m[O]=l(e,.5)*f|0,T[O++]=l(e,1/3)*f|0}for(r+="\x80";r.length%64-56;)r+="\0";for(i=0;i<r.length;i++){if((c=r.charCodeAt(i))>>8)return;I[i>>2]|=c<<(3-i)%4*8}for(I[I.length]=C/f|0,I[I.length]=C,c=0;c<I.length;){var A=I.slice(c,c+=16),j=m;for(m=m.slice(0,8),i=0;i<64;i++){var P=A[i-15],H=A[i-2],Y=m[0],X=m[4],z=m[7]+(o(X,6)^o(X,11)^o(X,25))+(X&m[5]^~X&m[6])+T[i]+(A[i]=i<16?A[i]:A[i-16]+(o(P,7)^o(P,18)^P>>>3)+A[i-7]+(o(H,17)^o(H,19)^H>>>10)|0);m=[z+((o(Y,2)^o(Y,13)^o(Y,22))+(Y&m[1]^Y&m[2]^m[1]&m[2]))|0].concat(m),m[4]=m[4]+z|0}for(i=0;i<8;i++)m[i]=m[i]+j[i]|0}for(i=0;i<8;i++)for(c=3;c+1;c--){var U=m[i]>>8*c&255;h+=(U<16?0:"")+U.toString(16)}return h},Dt=function(t,r){return r!=="SHA-256"&&r!=="SHA256"&&r!=="sha256"&&r!=="sha-256"||(t=Zn(t)),t},Tt=function(t){return String(t).trim().toLowerCase()},ei=Xe.OptIn;x.defineGlobalNamespace(),window.adobe.OptInCategories=ei.Categories;var qe=function(t,r,o){function i(n){var a=n;return function(u){var g=u||Y.location.href;try{var S=e._extractParamFromUri(g,a);if(S)return W.parsePipeDelimetedKeyValues(S)}catch{}}}function c(n){function a(u,g,S){u&&u.match(K.VALID_VISITOR_ID_REGEX)&&(S===U&&(H=!0),g(u))}a(n[U],e.setMarketingCloudVisitorID,U),e._setFieldExpire(M,-1),a(n[B],e.setAnalyticsVisitorID)}function l(n){n=n||{},e._supplementalDataIDCurrent=n.supplementalDataIDCurrent||"",e._supplementalDataIDCurrentConsumed=n.supplementalDataIDCurrentConsumed||{},e._supplementalDataIDLast=n.supplementalDataIDLast||"",e._supplementalDataIDLastConsumed=n.supplementalDataIDLastConsumed||{}}function f(n){function a(S,E,D){return D=D&&(D+="|"),D+=S+"="+encodeURIComponent(E)}function u(S,E){var D=E[0],R=E[1];return R!=null&&R!==V&&(S=a(D,R,S)),S}var g=n.reduce(u,"");return(function(S){var E=W.getTimestampInSeconds();return S=S&&(S+="|"),S+="TS="+E})(g)}function h(n){var a=n.minutesToLive,u="";return(e.idSyncDisableSyncs||e.disableIdSyncs)&&(u=u||"Error: id syncs have been disabled"),typeof n.dpid=="string"&&n.dpid.length||(u=u||"Error: config.dpid is empty"),typeof n.url=="string"&&n.url.length||(u=u||"Error: config.url is empty"),a===void 0?a=20160:(a=parseInt(a,10),(isNaN(a)||a<=0)&&(u=u||"Error: config.minutesToLive needs to be a positive number")),{error:u,ttl:a}}function I(){return!!e.configs.doesOptInApply&&!(A.optIn.isComplete&&C())}function C(){return e.configs.doesOptInApply&&e.configs.isIabContext?A.optIn.isApproved(A.optIn.Categories.ECID)&&P:A.optIn.isApproved(A.optIn.Categories.ECID)}function m(){[["getMarketingCloudVisitorID"],["setCustomerIDs",void 0],["getAnalyticsVisitorID"],["getAudienceManagerLocationHint"],["getLocationHint"],["getAudienceManagerBlob"]].forEach(function(n){var a=n[0],u=n.length===2?n[1]:"",g=e[a];e[a]=function(S){return C()&&e.isAllowed()?g.apply(e,arguments):(typeof S=="function"&&e._callCallback(S,[u]),u)}})}function T(n,a){if(P=!0,n)throw new Error("[IAB plugin] : "+n);a.gdprApplies&&(j=a.consentString),e.init(),v()}function O(){A.optIn.isComplete&&(A.optIn.isApproved(A.optIn.Categories.ECID)?e.configs.isIabContext?A.optIn.execute({command:"iabPlugin.fetchConsentData",callback:T}):(e.init(),v()):(m(),v()))}function v(){A.optIn.off("complete",O)}if(!o||o.split("").reverse().join("")!==t)throw new Error("Please use `Visitor.getInstance` to instantiate Visitor.");var e=this,A=window.adobe,j="",P=!1,H=!1;e.version="4.6.0";var Y=k,X=Y.Visitor;X.version=e.version,X.AuthState=ee.AUTH_STATE,X.OptOut=ee.OPT_OUT,Y.s_c_in||(Y.s_c_il=[],Y.s_c_in=0),e._c="Visitor",e._il=Y.s_c_il,e._in=Y.s_c_in,e._il[e._in]=e,Y.s_c_in++,e._instanceType="regular",e._log={requests:[]},e.marketingCloudOrgID=t,e.cookieName="AMCV_"+t,e.sessionCookieName="AMCVS_"+t,e.cookieDomain=pt(),e.loadSSL=!0,e.loadTimeout=3e4,e.CORSErrors=[],e.marketingCloudServer=e.audienceManagerServer="dpm.demdex.net",e.sdidParamExpiry=30;var z=null,U="MCMID",ie="MCIDTS",J="A",B="MCAID",re="AAM",M="MCAAMB",V="NONE",Q=function(n){return!Object.prototype[n]},fe=xn(e);e.FIELDS=ee.FIELDS,e.cookieRead=function(n){return Ie.get(n)},e.cookieWrite=function(n,a,u){var g=e.cookieLifetime?(""+e.cookieLifetime).toUpperCase():"",S=!1;return e.configs&&e.configs.secureCookie&&location.protocol==="https:"&&(S=!0),Ie.set(n,""+a,{expires:u,domain:e.cookieDomain,cookieLifetime:g,secure:S})},e.resetState=function(n){n?e._mergeServerState(n):l()},e._isAllowedDone=!1,e._isAllowedFlag=!1,e.isAllowed=function(){return e._isAllowedDone||(e._isAllowedDone=!0,(e.cookieRead(e.cookieName)||e.cookieWrite(e.cookieName,"T",1))&&(e._isAllowedFlag=!0)),e.cookieRead(e.cookieName)==="T"&&e._helpers.removeCookie(e.cookieName),e._isAllowedFlag},e.setMarketingCloudVisitorID=function(n){e._setMarketingCloudFields(n)},e._use1stPartyMarketingCloudServer=!1,e.getMarketingCloudVisitorID=function(n,a){e.marketingCloudServer&&e.marketingCloudServer.indexOf(".demdex.net")<0&&(e._use1stPartyMarketingCloudServer=!0);var u=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=u.url;return e._getRemoteField(U,g,n,a,u)};var ri=function(n,a){var u={};e.getMarketingCloudVisitorID(function(){a.forEach(function(g){u[g]=e._getField(g,!0)}),a.indexOf("MCOPTOUT")!==-1?e.isOptedOut(function(g){u.MCOPTOUT=g,n(u)},null,!0):n(u)},!0)};e.getVisitorValues=function(n,a){var u={MCMID:{fn:e.getMarketingCloudVisitorID,args:[!0],context:e},MCOPTOUT:{fn:e.isOptedOut,args:[void 0,!0],context:e},MCAID:{fn:e.getAnalyticsVisitorID,args:[!0],context:e},MCAAMLH:{fn:e.getAudienceManagerLocationHint,args:[!0],context:e},MCAAMB:{fn:e.getAudienceManagerBlob,args:[!0],context:e}},g=a&&a.length?x.pluck(u,a):u;a&&a.indexOf("MCAID")===-1?ri(n,a):Ln(g,n)},e._currentCustomerIDs={},e._customerIDsHashChanged=!1,e._newCustomerIDsHash="",e.setCustomerIDs=function(n,a){function u(){e._customerIDsHashChanged=!1}if(!e.isOptedOut()&&n){if(!x.isObject(n)||x.isObjectEmpty(n))return!1;e._readVisitor();var g,S,E;for(g in n)if(Q(g)&&(S=n[g],a=S.hasOwnProperty("hashType")?S.hashType:a,S))if(s(S)==="object"){var D={};if(S.id){if(a){if(!(E=Dt(Tt(S.id),a)))return;S.id=E,D.hashType=a}D.id=S.id}S.authState!=null&&(D.authState=S.authState),e._currentCustomerIDs[g]=D}else if(a){if(!(E=Dt(Tt(S),a)))return;e._currentCustomerIDs[g]={id:E,hashType:a}}else e._currentCustomerIDs[g]={id:S};var R=e.getCustomerIDs(),b=e._getField("MCCIDH"),q="";b||(b=0);for(g in R)Q(g)&&(S=R[g],q+=(q?"|":"")+g+"|"+(S.id?S.id:"")+(S.authState?S.authState:""));e._newCustomerIDsHash=String(e._hash(q)),e._newCustomerIDsHash!==b&&(e._customerIDsHashChanged=!0,e._mapCustomerIDs(u))}},e.getCustomerIDs=function(){e._readVisitor();var n,a,u={};for(n in e._currentCustomerIDs)Q(n)&&(a=e._currentCustomerIDs[n],a.id&&(u[n]||(u[n]={}),u[n].id=a.id,a.authState!=null?u[n].authState=a.authState:u[n].authState=X.AuthState.UNKNOWN,a.hashType&&(u[n].hashType=a.hashType)));return u},e.setAnalyticsVisitorID=function(n){e._setAnalyticsFields(n)},e.getAnalyticsVisitorID=function(n,a,u){if(!W.isTrackingServerPopulated()&&!u)return e._callCallback(n,[""]),"";var g="";if(u||(g=e.getMarketingCloudVisitorID(function(ce){e.getAnalyticsVisitorID(n,!0)})),g||u){var S=u?e.marketingCloudServer:e.trackingServer,E="";e.loadSSL&&(u?e.marketingCloudServerSecure&&(S=e.marketingCloudServerSecure):e.trackingServerSecure&&(S=e.trackingServerSecure));var D={};if(S){var R="http"+(e.loadSSL?"s":"")+"://"+S+"/id",b="d_visid_ver="+e.version+"&mcorgid="+encodeURIComponent(e.marketingCloudOrgID)+(g?"&mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":""),q=["s_c_il",e._in,"_set"+(u?"MarketingCloud":"Analytics")+"Fields"];E=R+"?"+b+"&callback=s_c_il%5B"+e._in+"%5D._set"+(u?"MarketingCloud":"Analytics")+"Fields",D.corsUrl=R+"?"+b,D.callback=q}return D.url=E,e._getRemoteField(u?U:B,E,n,a,D)}return""},e.getAudienceManagerLocationHint=function(n,a){if(e.getMarketingCloudVisitorID(function(E){e.getAudienceManagerLocationHint(n,!0)})){var u=e._getField(B);if(!u&&W.isTrackingServerPopulated()&&(u=e.getAnalyticsVisitorID(function(E){e.getAudienceManagerLocationHint(n,!0)})),u||!W.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),S=g.url;return e._getRemoteField("MCAAMLH",S,n,a,g)}}return""},e.getLocationHint=e.getAudienceManagerLocationHint,e.getAudienceManagerBlob=function(n,a){if(e.getMarketingCloudVisitorID(function(E){e.getAudienceManagerBlob(n,!0)})){var u=e._getField(B);if(!u&&W.isTrackingServerPopulated()&&(u=e.getAnalyticsVisitorID(function(E){e.getAudienceManagerBlob(n,!0)})),u||!W.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),S=g.url;return e._customerIDsHashChanged&&e._setFieldExpire(M,-1),e._getRemoteField(M,S,n,a,g)}}return""},e._supplementalDataIDCurrent="",e._supplementalDataIDCurrentConsumed={},e._supplementalDataIDLast="",e._supplementalDataIDLastConsumed={},e.getSupplementalDataID=function(n,a){e._supplementalDataIDCurrent||a||(e._supplementalDataIDCurrent=e._generateID(1));var u=e._supplementalDataIDCurrent;return e._supplementalDataIDLast&&!e._supplementalDataIDLastConsumed[n]?(u=e._supplementalDataIDLast,e._supplementalDataIDLastConsumed[n]=!0):u&&(e._supplementalDataIDCurrentConsumed[n]&&(e._supplementalDataIDLast=e._supplementalDataIDCurrent,e._supplementalDataIDLastConsumed=e._supplementalDataIDCurrentConsumed,e._supplementalDataIDCurrent=u=a?"":e._generateID(1),e._supplementalDataIDCurrentConsumed={}),u&&(e._supplementalDataIDCurrentConsumed[n]=!0)),u};var Ne=!1;e._liberatedOptOut=null,e.getOptOut=function(n,a){var u=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=u.url;if(C())return e._getRemoteField("MCOPTOUT",g,n,a,u);if(e._registerCallback("liberatedOptOut",n),e._liberatedOptOut!==null)return e._callAllCallbacks("liberatedOptOut",[e._liberatedOptOut]),Ne=!1,e._liberatedOptOut;if(Ne)return null;Ne=!0;var S="liberatedGetOptOut";return u.corsUrl=u.corsUrl.replace(/dpm\.demdex\.net\/id\?/,"dpm.demdex.net/optOutStatus?"),u.callback=[S],k[S]=function(E){if(E===Object(E)){var D,R,b=x.parseOptOut(E,D,V);D=b.optOut,R=1e3*b.d_ottl,e._liberatedOptOut=D,setTimeout(function(){e._liberatedOptOut=null},R)}e._callAllCallbacks("liberatedOptOut",[D]),Ne=!1},fe.fireCORS(u),null},e.isOptedOut=function(n,a,u){a||(a=X.OptOut.GLOBAL);var g=e.getOptOut(function(S){var E=S===X.OptOut.GLOBAL||S.indexOf(a)>=0;e._callCallback(n,[E])},u);return g?g===X.OptOut.GLOBAL||g.indexOf(a)>=0:null},e._fields=null,e._fieldsExpired=null,e._hash=function(n){var a,u,g=0;if(n)for(a=0;a<n.length;a++)u=n.charCodeAt(a),g=(g<<5)-g+u,g&=g;return g},e._generateID=Nn,e._generateLocalMID=function(){var n=e._generateID(0);return se.isClientSideMarketingCloudVisitorID=!0,n},e._callbackList=null,e._callCallback=function(n,a){try{typeof n=="function"?n.apply(Y,a):n[1].apply(n[0],a)}catch{}},e._registerCallback=function(n,a){a&&(e._callbackList==null&&(e._callbackList={}),e._callbackList[n]==null&&(e._callbackList[n]=[]),e._callbackList[n].push(a))},e._callAllCallbacks=function(n,a){if(e._callbackList!=null){var u=e._callbackList[n];if(u)for(;u.length>0;)e._callCallback(u.shift(),a)}},e._addQuerystringParam=function(n,a,u,g){var S=encodeURIComponent(a)+"="+encodeURIComponent(u),E=W.parseHash(n),D=W.hashlessUrl(n);if(D.indexOf("?")===-1)return D+"?"+S+E;var R=D.split("?"),b=R[0]+"?",q=R[1];return b+W.addQueryParamAtLocation(q,S,g)+E},e._extractParamFromUri=function(n,a){var u=new RegExp("[\\?&#]"+a+"=([^&#]*)"),g=u.exec(n);if(g&&g.length)return decodeURIComponent(g[1])},e._parseAdobeMcFromUrl=i(K.ADOBE_MC),e._parseAdobeMcSdidFromUrl=i(K.ADOBE_MC_SDID),e._attemptToPopulateSdidFromUrl=function(n){var a=e._parseAdobeMcSdidFromUrl(n),u=1e9;a&&a.TS&&(u=W.getTimestampInSeconds()-a.TS),a&&a.SDID&&a.MCORGID===t&&u<e.sdidParamExpiry&&(e._supplementalDataIDCurrent=a.SDID,e._supplementalDataIDCurrentConsumed.SDID_URL_PARAM=!0)},e._attemptToPopulateIdsFromUrl=function(){var n=e._parseAdobeMcFromUrl();if(n&&n.TS){var a=W.getTimestampInSeconds(),u=a-n.TS;if(Math.floor(u/60)>K.ADOBE_MC_TTL_IN_MIN||n.MCORGID!==t)return;c(n)}},e._mergeServerState=function(n){if(n)try{if(n=(function(u){return W.isObject(u)?u:JSON.parse(u)})(n),n[e.marketingCloudOrgID]){var a=n[e.marketingCloudOrgID];(function(u){W.isObject(u)&&e.setCustomerIDs(u)})(a.customerIDs),l(a.sdid)}}catch{throw new Error("`serverState` has an invalid format.")}},e._timeout=null,e._loadData=function(n,a,u,g){a=e._addQuerystringParam(a,"d_fieldgroup",n,1),g.url=e._addQuerystringParam(g.url,"d_fieldgroup",n,1),g.corsUrl=e._addQuerystringParam(g.corsUrl,"d_fieldgroup",n,1),se.fieldGroupObj[n]=!0,g===Object(g)&&g.corsUrl&&fe.corsMetadata.corsType==="XMLHttpRequest"&&fe.fireCORS(g,u,n)},e._clearTimeout=function(n){e._timeout!=null&&e._timeout[n]&&(clearTimeout(e._timeout[n]),e._timeout[n]=0)},e._settingsDigest=0,e._getSettingsDigest=function(){if(!e._settingsDigest){var n=e.version;e.audienceManagerServer&&(n+="|"+e.audienceManagerServer),e.audienceManagerServerSecure&&(n+="|"+e.audienceManagerServerSecure),e._settingsDigest=e._hash(n)}return e._settingsDigest},e._readVisitorDone=!1,e._readVisitor=function(){if(!e._readVisitorDone){e._readVisitorDone=!0;var n,a,u,g,S,E,D=e._getSettingsDigest(),R=!1,b=e.cookieRead(e.cookieName),q=new Date;if(b||H||e.discardTrackingServerECID||(b=e.cookieRead(K.FIRST_PARTY_SERVER_COOKIE)),e._fields==null&&(e._fields={}),b&&b!=="T")for(b=b.split("|"),b[0].match(/^[\-0-9]+$/)&&(parseInt(b[0],10)!==D&&(R=!0),b.shift()),b.length%2==1&&b.pop(),n=0;n<b.length;n+=2)a=b[n].split("-"),u=a[0],g=b[n+1],a.length>1?(S=parseInt(a[1],10),E=a[1].indexOf("s")>0):(S=0,E=!1),R&&(u==="MCCIDH"&&(g=""),S>0&&(S=q.getTime()/1e3-60)),u&&g&&(e._setField(u,g,1),S>0&&(e._fields["expire"+u]=S+(E?"s":""),(q.getTime()>=1e3*S||E&&!e.cookieRead(e.sessionCookieName))&&(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[u]=!0)));!e._getField(B)&&W.isTrackingServerPopulated()&&(b=e.cookieRead("s_vi"))&&(b=b.split("|"),b.length>1&&b[0].indexOf("v1")>=0&&(g=b[1],n=g.indexOf("["),n>=0&&(g=g.substring(0,n)),g&&g.match(K.VALID_VISITOR_ID_REGEX)&&e._setField(B,g)))}},e._appendVersionTo=function(n){var a="vVersion|"+e.version,u=n?e._getCookieVersion(n):null;return u?mt.areVersionsDifferent(u,e.version)&&(n=n.replace(K.VERSION_REGEX,a)):n+=(n?"|":"")+a,n},e._writeVisitor=function(){var n,a,u=e._getSettingsDigest();for(n in e._fields)Q(n)&&e._fields[n]&&n.substring(0,6)!=="expire"&&(a=e._fields[n],u+=(u?"|":"")+n+(e._fields["expire"+n]?"-"+e._fields["expire"+n]:"")+"|"+a);u=e._appendVersionTo(u),e.cookieWrite(e.cookieName,u,1)},e._getField=function(n,a){return e._fields==null||!a&&e._fieldsExpired&&e._fieldsExpired[n]?null:e._fields[n]},e._setField=function(n,a,u){e._fields==null&&(e._fields={}),e._fields[n]=a,u||e._writeVisitor()},e._getFieldList=function(n,a){var u=e._getField(n,a);return u?u.split("*"):null},e._setFieldList=function(n,a,u){e._setField(n,a?a.join("*"):"",u)},e._getFieldMap=function(n,a){var u=e._getFieldList(n,a);if(u){var g,S={};for(g=0;g<u.length;g+=2)S[u[g]]=u[g+1];return S}return null},e._setFieldMap=function(n,a,u){var g,S=null;if(a){S=[];for(g in a)Q(g)&&(S.push(g),S.push(a[g]))}e._setFieldList(n,S,u)},e._setFieldExpire=function(n,a,u){var g=new Date;g.setTime(g.getTime()+1e3*a),e._fields==null&&(e._fields={}),e._fields["expire"+n]=Math.floor(g.getTime()/1e3)+(u?"s":""),a<0?(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[n]=!0):e._fieldsExpired&&(e._fieldsExpired[n]=!1),u&&(e.cookieRead(e.sessionCookieName)||e.cookieWrite(e.sessionCookieName,"1"))},e._findVisitorID=function(n){return n&&(s(n)==="object"&&(n=n.d_mid?n.d_mid:n.visitorID?n.visitorID:n.id?n.id:n.uuid?n.uuid:""+n),n&&(n=n.toUpperCase())==="NOTARGET"&&(n=V),n&&(n===V||n.match(K.VALID_VISITOR_ID_REGEX))||(n="")),n},e._setFields=function(n,a){if(e._clearTimeout(n),e._loading!=null&&(e._loading[n]=!1),se.fieldGroupObj[n]&&se.setState(n,!1),n==="MC"){se.isClientSideMarketingCloudVisitorID!==!0&&(se.isClientSideMarketingCloudVisitorID=!1);var u=e._getField(U);if(!u||e.overwriteCrossDomainMCIDAndAID){if(!(u=s(a)==="object"&&a.mid?a.mid:e._findVisitorID(a))){if(e._use1stPartyMarketingCloudServer&&!e.tried1stPartyMarketingCloudServer)return e.tried1stPartyMarketingCloudServer=!0,void e.getAnalyticsVisitorID(null,!1,!0);u=e._generateLocalMID()}e._setField(U,u)}u&&u!==V||(u=""),s(a)==="object"&&((a.d_region||a.dcs_region||a.d_blob||a.blob)&&e._setFields(re,a),e._use1stPartyMarketingCloudServer&&a.mid&&e._setFields(J,{id:a.id})),e._callAllCallbacks(U,[u])}if(n===re&&s(a)==="object"){var g=604800;a.id_sync_ttl!=null&&a.id_sync_ttl&&(g=parseInt(a.id_sync_ttl,10));var S=oe.getRegionAndCheckIfChanged(a,g);e._callAllCallbacks("MCAAMLH",[S]);var E=e._getField(M);(a.d_blob||a.blob)&&(E=a.d_blob,E||(E=a.blob),e._setFieldExpire(M,g),e._setField(M,E)),E||(E=""),e._callAllCallbacks(M,[E]),!a.error_msg&&e._newCustomerIDsHash&&e._setField("MCCIDH",e._newCustomerIDsHash)}if(n===J){var D=e._getField(B);D&&!e.overwriteCrossDomainMCIDAndAID||(D=e._findVisitorID(a),D?D!==V&&e._setFieldExpire(M,-1):D=V,e._setField(B,D)),D&&D!==V||(D=""),e._callAllCallbacks(B,[D])}if(e.idSyncDisableSyncs||e.disableIdSyncs)oe.idCallNotProcesssed=!0;else{oe.idCallNotProcesssed=!1;var R={};R.ibs=a.ibs,R.subdomain=a.subdomain,oe.processIDCallData(R)}if(a===Object(a)){var b,q;C()&&e.isAllowed()&&(b=e._getField("MCOPTOUT"));var ce=x.parseOptOut(a,b,V);b=ce.optOut,q=ce.d_ottl,e._setFieldExpire("MCOPTOUT",q,!0),e._setField("MCOPTOUT",b),e._callAllCallbacks("MCOPTOUT",[b])}},e._loading=null,e._getRemoteField=function(n,a,u,g,S){var E,D="",R=W.isFirstPartyAnalyticsVisitorIDCall(n),b={MCAAMLH:!0,MCAAMB:!0};if(C()&&e.isAllowed())if(e._readVisitor(),D=e._getField(n,b[n]===!0),(function(){return(!D||e._fieldsExpired&&e._fieldsExpired[n])&&(!e.disableThirdPartyCalls||R)})()){if(n===U||n==="MCOPTOUT"?E="MC":n==="MCAAMLH"||n===M?E=re:n===B&&(E=J),E)return!a||e._loading!=null&&e._loading[E]||(e._loading==null&&(e._loading={}),e._loading[E]=!0,e._loadData(E,a,function(q){if(!e._getField(n)){q&&se.setState(E,!0);var ce="";n===U?ce=e._generateLocalMID():E===re&&(ce={error_msg:"timeout"}),e._setFields(E,ce)}},S)),e._registerCallback(n,u),D||(a||e._setFields(E,{id:V}),"")}else D||(n===U?(e._registerCallback(n,u),D=e._generateLocalMID(),e.setMarketingCloudVisitorID(D)):n===B?(e._registerCallback(n,u),D="",e.setAnalyticsVisitorID(D)):(D="",g=!0));return n!==U&&n!==B||D!==V||(D="",g=!0),u&&g&&e._callCallback(u,[D]),D},e._setMarketingCloudFields=function(n){e._readVisitor(),e._setFields("MC",n)},e._mapCustomerIDs=function(n){e.getAudienceManagerBlob(n,!0)},e._setAnalyticsFields=function(n){e._readVisitor(),e._setFields(J,n)},e._setAudienceManagerFields=function(n){e._readVisitor(),e._setFields(re,n)},e._getAudienceManagerURLData=function(n){var a=e.audienceManagerServer,u="",g=e._getField(U),S=e._getField(M,!0),E=e._getField(B),D=E&&E!==V?"&d_cid_ic=AVID%01"+encodeURIComponent(E):"";if(e.loadSSL&&e.audienceManagerServerSecure&&(a=e.audienceManagerServerSecure),a){var R,b,q=e.getCustomerIDs();if(q)for(R in q)Q(R)&&(b=q[R],D+="&d_cid_ic="+encodeURIComponent(R)+"%01"+encodeURIComponent(b.id?b.id:"")+(b.authState?"%01"+b.authState:""));n||(n="_setAudienceManagerFields");var ce="http"+(e.loadSSL?"s":"")+"://"+a+"/id",Ot="d_visid_ver="+e.version+(j&&ce.indexOf("demdex.net")!==-1?"&gdpr=1&gdpr_force=1&gdpr_consent="+j:"")+"&d_rtbd=json&d_ver=2"+(!g&&e._use1stPartyMarketingCloudServer?"&d_verify=1":"")+"&d_orgid="+encodeURIComponent(e.marketingCloudOrgID)+"&d_nsid="+(e.idSyncContainerID||0)+(g?"&d_mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":"")+(z===!0?"&d_coop_safe=1":z===!1?"&d_coop_unsafe=1":"")+(S?"&d_blob="+encodeURIComponent(S):"")+D,oi=["s_c_il",e._in,n];return u=ce+"?"+Ot+"&d_cb=s_c_il%5B"+e._in+"%5D."+n,{url:u,corsUrl:ce+"?"+Ot,callback:oi}}return{url:u}},e.appendVisitorIDsTo=function(n){try{var a=[[U,e._getField(U)],[B,e._getField(B)],["MCORGID",e.marketingCloudOrgID]];return e._addQuerystringParam(n,K.ADOBE_MC,f(a))}catch{return n}},e.appendSupplementalDataIDTo=function(n,a){if(!(a=a||e.getSupplementalDataID(W.generateRandomString(),!0)))return n;try{var u=f([["SDID",a],["MCORGID",e.marketingCloudOrgID]]);return e._addQuerystringParam(n,K.ADOBE_MC_SDID,u)}catch{return n}};var W={parseHash:function(n){var a=n.indexOf("#");return a>0?n.substr(a):""},hashlessUrl:function(n){var a=n.indexOf("#");return a>0?n.substr(0,a):n},addQueryParamAtLocation:function(n,a,u){var g=n.split("&");return u=u??g.length,g.splice(u,0,a),g.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(n,a,u){if(n!==B)return!1;var g;return a||(a=e.trackingServer),u||(u=e.trackingServerSecure),!(typeof(g=e.loadSSL?u:a)!="string"||!g.length)&&g.indexOf("2o7.net")<0&&g.indexOf("omtrdc.net")<0},isObject:function(n){return!!(n&&n===Object(n))},removeCookie:function(n){Ie.remove(n,{domain:e.cookieDomain})},isTrackingServerPopulated:function(){return!!e.trackingServer||!!e.trackingServerSecure},getTimestampInSeconds:function(){return Math.round(new Date().getTime()/1e3)},parsePipeDelimetedKeyValues:function(n){return n.split("|").reduce(function(a,u){var g=u.split("=");return a[g[0]]=decodeURIComponent(g[1]),a},{})},generateRandomString:function(n){n=n||5;for(var a="",u="abcdefghijklmnopqrstuvwxyz0123456789";n--;)a+=u[Math.floor(Math.random()*u.length)];return a},normalizeBoolean:function(n){return n==="true"||n!=="false"&&n},parseBoolean:function(n){return n==="true"||n!=="false"&&null},replaceMethodsWithFunction:function(n,a){for(var u in n)n.hasOwnProperty(u)&&typeof n[u]=="function"&&(n[u]=a);return n}};e._helpers=W;var oe=Vn(e,X);e._destinationPublishing=oe,e.timeoutMetricsLog=[];var se={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(n,a){switch(n){case"MC":a===!1?this.MCIDCallTimedOut!==!0&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=a;break;case J:a===!1?this.AnalyticsIDCallTimedOut!==!0&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=a;break;case re:a===!1?this.AAMIDCallTimedOut!==!0&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=a}}};e.isClientSideMarketingCloudVisitorID=function(){return se.isClientSideMarketingCloudVisitorID},e.MCIDCallTimedOut=function(){return se.MCIDCallTimedOut},e.AnalyticsIDCallTimedOut=function(){return se.AnalyticsIDCallTimedOut},e.AAMIDCallTimedOut=function(){return se.AAMIDCallTimedOut},e.idSyncGetOnPageSyncInfo=function(){return e._readVisitor(),e._getField("MCSYNCSOP")},e.idSyncByURL=function(n){if(!e.isOptedOut()){var a=h(n||{});if(a.error)return a.error;var u,g,S=n.url,E=encodeURIComponent,D=oe;return S=S.replace(/^https:/,"").replace(/^http:/,""),u=x.encodeAndBuildRequest(["",n.dpid,n.dpuuid||""],","),g=["ibs",E(n.dpid),"img",E(S),a.ttl,"",u],D.addMessage(g.join("|")),D.requestToProcess(),"Successfully queued"}},e.idSyncByDataSource=function(n){if(!e.isOptedOut())return n===Object(n)&&typeof n.dpuuid=="string"&&n.dpuuid.length?(n.url="//dpm.demdex.net/ibs:dpid="+n.dpid+"&dpuuid="+n.dpuuid,e.idSyncByURL(n)):"Error: config or config.dpuuid is empty"},Qn(e,oe),e._getCookieVersion=function(n){n=n||e.cookieRead(e.cookieName);var a=K.VERSION_REGEX.exec(n);return a&&a.length>1?a[1]:null},e._resetAmcvCookie=function(n){var a=e._getCookieVersion();a&&!mt.isLessThan(a,n)||W.removeCookie(e.cookieName)},e.setAsCoopSafe=function(){z=!0},e.setAsCoopUnsafe=function(){z=!1},(function(){if(e.configs=Object.create(null),W.isObject(r))for(var n in r)Q(n)&&(e[n]=r[n],e.configs[n]=r[n])})(),m();var bt;e.init=function(){I()&&(A.optIn.fetchPermissions(O,!0),!A.optIn.isApproved(A.optIn.Categories.ECID))||bt||(bt=!0,(function(){if(W.isObject(r)){e.idSyncContainerID=e.idSyncContainerID||0,z=typeof e.isCoopSafe=="boolean"?e.isCoopSafe:W.parseBoolean(e.isCoopSafe),e.resetBeforeVersion&&e._resetAmcvCookie(e.resetBeforeVersion),e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl(),e._readVisitor();var n=e._getField(ie),a=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);e.idSyncDisableSyncs||e.disableIdSyncs||!oe.canMakeSyncIDCall(n,a)||(e._setFieldExpire(M,-1),e._setField(ie,a)),e.getMarketingCloudVisitorID(),e.getAudienceManagerLocationHint(),e.getAudienceManagerBlob(),e._mergeServerState(e.serverState)}else e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl()})(),(function(){if(!e.idSyncDisableSyncs&&!e.disableIdSyncs){oe.checkDPIframeSrc();var n=function(){var a=oe;a.readyToAttachIframe()&&a.attachIframe()};Y.addEventListener("load",function(){X.windowLoaded=!0,n()});try{je.receiveMessage(function(a){oe.receiveMessage(a.data)},oe.iframeHost)}catch{}}})(),(function(){e.whitelistIframeDomains&&K.POST_MESSAGE_ENABLED&&(e.whitelistIframeDomains=e.whitelistIframeDomains instanceof Array?e.whitelistIframeDomains:[e.whitelistIframeDomains],e.whitelistIframeDomains.forEach(function(n){var a=new lt(t,n),u=Rn(e,a);je.receiveMessage(u,n)}))})())}};qe.config=ht,k.Visitor=qe;var Se=qe,ti=function(t){if(x.isObject(t))return Object.keys(t).filter(function(r){return t[r]!==""}).reduce(function(r,o){var i=ht.normalizeConfig(t[o]),c=x.normalizeBoolean(i);return r[o]=c,r},Object.create(null))},ni=Xe.OptIn,ii=Xe.IabPlugin;return Se.getInstance=function(t,r){if(!t)throw new Error("Visitor requires Adobe Marketing Cloud Org ID.");t.indexOf("@")<0&&(t+="@AdobeOrg");var o=(function(){var C=k.s_c_il;if(C)for(var m=0;m<C.length;m++){var T=C[m];if(T&&T._c==="Visitor"&&T.marketingCloudOrgID===t)return T}})();if(o)return o;var i=ti(r);(function(C){k.adobe.optIn=k.adobe.optIn||(function(){var m=x.pluck(C,["doesOptInApply","previousPermissions","preOptInApprovals","isOptInStorageEnabled","optInStorageExpiry","isIabContext"]),T=C.optInCookieDomain||C.cookieDomain;T=T||pt(),T=T===window.location.hostname?"":T,m.optInCookieDomain=T;var O=new ni(m,{cookies:Ie});if(m.isIabContext&&m.doesOptInApply){var v=new ii(window.__cmp);O.registerPlugin(v)}return O})()})(i||{});var c=t,l=c.split("").reverse().join(""),f=new Se(t,null,l);x.isObject(i)&&i.cookieDomain&&(f.cookieDomain=i.cookieDomain),(function(){k.s_c_il.splice(--k.s_c_in,1)})();var h=x.getIeVersion();if(typeof h=="number"&&h<10)return f._helpers.replaceMethodsWithFunction(f,function(){});var I=(function(){try{return k.self!==k.parent}catch{return!0}})()&&!(function(C){return C.cookieWrite("TEST_AMCV_COOKIE","T",1),C.cookieRead("TEST_AMCV_COOKIE")==="T"&&(C._helpers.removeCookie("TEST_AMCV_COOKIE"),!0)})(f)&&k.parent?new kn(t,i,f,k.parent):new Se(t,i,l);return f=null,I.init(),I},(function(){function t(){Se.windowLoaded=!0}k.addEventListener?k.addEventListener("load",t):k.attachEvent&&k.attachEvent("onload",t),Se.codeLoadEnd=new Date().getTime()})(),Se})()});var ye="__mpi",te=typeof window<"u",kt=()=>te?window:void 0;function G(s){let p=kt()?.[ye]?.segmentWrapper||{};return s?p[s]:p}var ge=(s,d)=>{let p=kt();if(!p){console.warn("[segment-wrapper] Cannot set config in non-browser environment");return}p[ye]=p[ye]||{},p[ye].segmentWrapper=p[ye].segmentWrapper||{},p[ye].segmentWrapper[s]=d};var Te,$e=()=>({ADOBE_ORG_ID:window.__SEGMENT_WRAPPER?.ADOBE_ORG_ID,DEFAULT_DEMDEX_VERSION:window.__SEGMENT_WRAPPER?.DEFAULT_DEMDEX_VERSION??"3.3.0",TIME_BETWEEN_RETRIES:window.__SEGMENT_WRAPPER?.TIME_BETWEEN_RETRIES??15,TIMES_TO_RETRY:window.__SEGMENT_WRAPPER?.TIMES_TO_RETRY??80,SERVERS:{trackingServer:window.__SEGMENT_WRAPPER?.TRACKING_SERVER,trackingServerSecure:window.__SEGMENT_WRAPPER?.TRACKING_SERVER}}),Pt=()=>{let s=$e();if(window.Visitor&&s.ADOBE_ORG_ID)return window.Visitor.getInstance(s.ADOBE_ORG_ID,s.SERVERS)},pi=s=>s?.getMarketingCloudVisitorID(),Rt=()=>{let s=Pt(),d=$e(),p=s?.version??d.DEFAULT_DEMDEX_VERSION,{trackingServer:_}=d.SERVERS;return Promise.resolve({trackingServer:_,version:p})},Lt=()=>{if(Te)return Promise.resolve(Te);let s=$e();return new Promise(d=>{function p(_){if(_===0)return d("");let y=Pt();Te=pi(y),Te?d(Te):window.setTimeout(()=>p(--_),s.TIME_BETWEEN_RETRIES)}p(s.TIMES_TO_RETRY)})},mi=async()=>(await Promise.resolve().then(()=>gi(wt())),Lt()),xe=async()=>{let s=G("getCustomAdobeVisitorId");return typeof s=="function"?s():G("importAdobeVisitorId")===!0?mi():Lt()};var _i="borosTcf",Nt=2,Ci={channel:"GDPR"},xt={analytics:[1,8,10],advertising:[3]},ze={LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"},hi="CMP Submitted",ne={ACCEPTED:"accepted",DECLINED:"declined",UNKNOWN:"unknown"},ue={listeners:[],value:void 0,addListener:s=>ue.listeners.push(s),get:()=>ue.value,set:s=>{let{analytics:d,advertising:p}=s||{};ue.value={analytics:d,advertising:p},ue.listeners.forEach(_=>_(s)),ue.listeners=[]}};function Ii(s){if(!te)return null;let p=new RegExp(s+"=([^;]+)").exec(document.cookie);return p!==null?unescape(p[1]):null}var Si=()=>{if(G("initialized"))return!1;let s=!!window.__tcfapi;return s||console.warn("[tcfTracking] window.__tcfapi is not available on client and TCF won't be tracked."),s},yi=s=>xt.analytics.every(d=>s[`${d}`]),vi=s=>xt.advertising.every(d=>s[`${d}`]),Ai=({gdprPrivacy:s})=>{let d=s.analytics===ne.ACCEPTED,p=s.advertising===ne.ACCEPTED;return Ve.track(hi,{...Ci,...G("tcfTrackDefaultProperties")||{},google_consents:{analytics_storage:d?"granted":"denied",ad_storage:p?"granted":"denied",ad_user_data:p?"granted":"denied",ad_personalization:p?"granted":"denied"}},{gdpr_privacy:s.analytics,gdpr_privacy_advertising:s.advertising})},ve=()=>{let s=ue.get();return s!==void 0?Promise.resolve(s):new Promise(d=>{ue.addListener(p=>d(p))})},Vt=()=>ue.get(),he=s=>s?.analytics===ne.ACCEPTED,Ft=s=>{let d=yi(s),p=vi(s),_=d?ne.ACCEPTED:ne.DECLINED,y=p?ne.ACCEPTED:ne.DECLINED;return ue.set({analytics:_,advertising:y}),{analytics:_,advertising:y}},Ut=()=>{let s=Ii(_i);if(s)try{let{purpose:d}=JSON.parse(window.atob(s)),{consents:p}=d;return p}catch(d){console.error(d);return}},Ei=()=>{let s=Ut();s&&Ft(s)},Di=()=>{let s=Ut();ge("isFirstVisit",!s)};function Je(){if(te){if(Ei(),Di(),!Si()){ue.get()?.analytics===void 0&&ue.set({analytics:ne.UNKNOWN,advertising:ne.UNKNOWN});return}ge("initialized",!0),window.__tcfapi?.("addEventListener",Nt,({eventStatus:s,purpose:d},p)=>{if(!p)return Promise.resolve();if(s===ze.USER_ACTION_COMPLETE||s===ze.LOADED){let{consents:_}=d,y=Ft(_);if(s===ze.USER_ACTION_COMPLETE){let{analytics:w,advertising:L}=y;Ai({gdprPrivacy:{analytics:w,advertising:L}})}}})}}var Gt=s=>{te&&window.__tcfapi?.("addEventListener",Nt,(d,p)=>{function N($){return $?.eventStatus==="useractioncomplete"||$?.eventStatus==="tcloaded"}if(p&&N(d)){let $=d?.purpose?.consents||{},me=$[1]&&$[3]&&$[8]&&$[10];s(me)}})};function jt(s){if(typeof document>"u")return null;let p=new RegExp(`${s}=([^;]+)`).exec(document.cookie);return p!==null?unescape(p[1]):null}function Ht(s,d,p={}){if(typeof document>"u"||typeof window>"u")return;let{maxAge:_=31536e3,path:y="/",reduceDomain:w=!0,sameSite:L="Lax"}=p,N=w?Wt():window.location.hostname,$=[`${s}=${d}`,`domain=${N}`,`path=${y}`,`max-age=${_}`,`SameSite=${L}`].join(";");document.cookie=$}function Bt(s,d={}){if(typeof document>"u"||typeof window>"u")return;let{path:p="/",reduceDomain:_=!0}=d,y=_?Wt():window.location.hostname;document.cookie=`${s}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${p}; domain=${y}`}var Wt=s=>{let d=s!==void 0?s:typeof window<"u"?window.location.hostname:"",p=".",_=d.split(p).reverse();if(_.length===1)return _[0];let y=[];for(let w of _)if(y.push(w),w.length>3)break;return`${p}${y.reverse().join(p)}`};var Ti="https://secure.adnxs.com/getuidj?consent=1",Qe="adit-xandr-id",bi=0;function Oi(){return te?window.fetch(Ti,{credentials:"include"}).then(s=>s.json()).then(s=>s?.uid).catch(()=>null):Promise.resolve(null)}function Yt({gdprPrivacyValueAdvertising:s}){if(!te)return null;if(s!==ne.ACCEPTED)return Bt(Qe),null;let d=y=>y!==null&&Number(y)>bi,p=jt(Qe),_=d(p);return _||Oi().then(y=>{typeof y=="string"&&Ht(Qe,y)}),ge("xandrId",p),_?p:null}var Mi={platform:"web"},ki={All:!1},wi={All:!0},Pi=s=>{let d=G("userIdPrefix");return d&&(typeof s=="number"||typeof s=="string"&&!s.startsWith(d))?`${d}${s}`:s},Ze=()=>({...Mi,...G("defaultProperties")}),Ri=async({gdprPrivacyValue:s,event:d})=>{let p=he(s),_;try{p&&(_=await xe())}catch(w){console.error(w)}return{...Li({isGdprAccepted:p,event:d}),"Adobe Analytics":_?{marketingCloudVisitorId:_}:!0,"Google Analytics 4 Web":!0}},Li=({isGdprAccepted:s,event:d})=>d==="CMP Submitted"?wi:s?{}:ki,Ni=({context:s,xandrId:d})=>{let p=G("sendXandrId")!==!1,_=d&&parseInt(d)!==0;if(!p||!_)return{};let N=[...Array.isArray(s?.externalIds)?s.externalIds:[],{collection:"users",encoding:"none",id:d,type:"xandr_id"}];return{externalIds:N.filter(({id:me,type:Ae},Ge)=>Ge===N.findIndex(({id:_e,type:Ee})=>me===_e&&Ae===Ee))}},et=async({event:s="",context:d={}})=>{let p=await ve(),{analytics:_,advertising:y}=p||{},w=he(p),[L,N]=await Promise.all([Ri({gdprPrivacyValue:p,event:s}),Yt({gdprPrivacyValueAdvertising:y})]);return w||(d.integrations={...d.integrations??{},Personas:!1,Webhooks:!0,Webhook:!0}),{...d,...!w&&{ip:"0.0.0.0"},...Ni({context:d,xandrId:N}),clientVersion:"segment-wrapper@5.0.0",gdpr_privacy:_,gdpr_privacy_advertising:y,integrations:{...d.integrations,...L}}},Kt=(s,d,p={},_)=>new Promise(y=>{(async()=>{let L=await et({context:p,event:s}),N={...Ze(),...d},$=async(...me)=>{_&&_(...me);let[Ae]=await Promise.all([ve()]);he(Ae),y()};window.analytics.track(s,N,{...L,context:{integrations:{...L.integrations}}},$)})()}),xi=async(s,d,p,_)=>{let y=await ve(),w=Pi(s);return window.analytics.identify(w,he(y)?d:{},p,_)},Vi=(s,d,p={},_)=>(p.isPageTrack=!0,Kt(s??"",d,p,_)),Fi=()=>Promise.resolve(window.analytics.reset()),Ve={page:Vi,identify:xi,track:Kt,reset:Fi};var qt="__mpi_patch";function Xt(){let{track:s}=window.analytics;window.analytics.track=(...d)=>{let[p,_,y,w]=d,L={...Ze(),..._};return et({context:y,event:p}).then(N=>{s.call(window.analytics,p,L,N,w)}),window.analytics},window.analytics[qt]=!0}te&&(window.analytics?window.analytics[qt]||(window.analytics.initialized?Xt():window.analytics.ready(Xt)):console.warn("[segment-wrapper] Segment Analytics is not loaded so patch is not applied."));var tt={spaReferrer:"",referrer:""},Fe={getDocumentReferrer:()=>document.referrer,getActualLocation:()=>{let{origin:s,pathname:d}=window.location;return`${s}${d}`},getActualQueryString:()=>{let{search:s}=window.location;return s}},$t=({isPageTrack:s=!1}={})=>{let{referrer:d,spaReferrer:p}=tt;return(s?d:p)||Fe.getDocumentReferrer()},Ui=()=>{tt.spaReferrer=$t({isPageTrack:!0}),tt.referrer=Fe.getActualLocation()},zt=({payload:s,next:d})=>{let{obj:{context:p}}=s,{isPageTrack:_}=p,y=$t({isPageTrack:_});s.obj.context={...p,page:{...p.page,referrer:y}},_&&Ui(),d(s)};var be={QUERY:"stc",SPLIT_SYMBOL:"-",CAMPAIGN_SPLIT_SYMBOL:":"},Gi="utm_campaign",ji="utm_medium",Hi="utm_source",Bi="utm_content",Wi="utm_id",Yi="utm_term",Ki={aff:"affiliate",dis:"display",em:"email",met:"paid-metasearch",sem:"paid-search",rt:"display",sm:"social-media",sp:"paid-social",pn:"push-notification",cs:"cross-sites"},Xi="na",qi={medium:null,source:null,campaign:null},$i={STC:"stc",UTM:"utm"},Jt=({needsTransformation:s=!0}={})=>{let{medium:d,source:p,campaign:_,content:y,term:w}=zi();if(!d||!p||!_)return null;let[L,N]=_.split(be.CAMPAIGN_SPLIT_SYMBOL);if(!L&&!N)return null;let $=typeof y<"u"&&y!==Xi;return{campaign:{medium:s&&Ki[d]||d,...typeof N<"u"&&{id:L},name:N??L,source:p,...$&&{content:y},...typeof w<"u"&&{term:w}}}};function zi(){let s=Fe.getActualQueryString(),d=new URLSearchParams(s);return G("trackingTagsType")===$i.UTM?Ji(d):Qt(d)}function Qt(s){if(!Zt(s))return qi;let d=s.get(be.QUERY),[p,_,y,w,L]=d?.split(be.SPLIT_SYMBOL)||[];return{medium:p,source:_,campaign:y,content:w,term:L}}function Zt(s){return s.has(be.QUERY)}function Ji(s){let d=s.get(Wi),p=s.get(Gi),_=s.get(ji),y=s.get(Hi),w=s.get(Bi),L=s.get(Yi),N=d?`${d}${be.CAMPAIGN_SPLIT_SYMBOL}${p}`:p;return(!_||!y||!N)&&Zt(s)?Qt(s):{campaign:N,medium:_,source:y,content:w??void 0,term:L??void 0}}var en=({payload:s,next:d})=>{let p=Jt();s.obj.context={...s.obj.context,...p},d(s)};var tn=({payload:s,next:d})=>{let p=Vt();if(p){let{analytics:_,advertising:y}=p,w=_===ne.ACCEPTED,L=y===ne.ACCEPTED;s.obj.properties={...s.obj.properties,google_consents:{analytics_storage:w?"granted":"denied",ad_storage:L?"granted":"denied",ad_user_data:L?"granted":"denied",ad_personalization:L?"granted":"denied"}}}d(s)};var Qi={platform:"web"},nn=({payload:s,next:d})=>{let p=G("defaultContext")||{};s.obj.context={...Qi,...p,...s.obj.context},d(s)};var Zi=()=>{let s=null;return({payload:d,next:p})=>{try{let{obj:_}=d,{event:y,type:w}=_;if(w!=="track"){p(d);return}if(typeof y=="string"&&y.endsWith("Viewed")){let{page_name:L,page_type:N}=_.properties||{};s={name:L,type:N},p(d);return}if(!s){p(d);return}p({...d,obj:{..._,properties:{..._.properties,page_name_origin:s.name,page_type:_.properties?.page_type||s.type}}})}catch(_){console.error(_),p(d)}}},rn=Zi();var on=({payload:s,next:d})=>{s.obj.context={...s.obj.context,screen:{height:window.innerHeight,width:window.innerWidth,density:window.devicePixelRatio}},s.obj.properties={...s.obj.properties,screen_resolution:`${window.innerWidth}x${window.innerHeight}`},d(s)};var er=s=>{let d=G("isUserTraitsEnabled"),p=window.analytics.user?.(),_=he(s),y=p?.id();return{anonymousId:p?.anonymousId(),...y&&{userId:y},..._&&d&&p?.traits()||{}}},an=async({payload:s,next:d})=>{let p=await ve(),_;try{_=er(p)}catch(y){console.error(y)}s.obj.context={...s.obj.context,traits:{...s.obj.context.traits||{},..._}},d(s)};for(sn=[],Ue=0;Ue<64;)sn[Ue]=0|4294967296*Math.sin(++Ue%Math.PI);var sn,Ue;for(ae=18,Oe=[],nt=[];ae>1;ae--)for(F=ae;F<320;)Oe[F+=ae]=1;var F,ae,Oe,nt;function Z(s,d){return 4294967296*Math.pow(s,1/d)|0}for(F=0;F<64;)Oe[++ae]||(nt[F]=Z(ae,2),Oe[F++]=Z(ae,3));function de(s,d){return s>>>d|s<<-d}function cn(s){var d=nt.slice(ae=F=0,8),p=[],_=unescape(encodeURI(s))+"\x80",y=_.length;for(p[s=--y/4+2|15]=8*y;~y;)p[y>>2]|=_.charCodeAt(y)<<8*~y--;for(y=[];ae<s;ae+=16){for(Z=d.slice();F<64;Z.unshift(_+(de(_=Z[0],2)^de(_,13)^de(_,22))+(_&Z[1]^Z[1]&Z[2]^Z[2]&_)))Z[3]+=_=0|(y[F]=F<16?~~p[F+ae]:(de(_=y[F-2],17)^de(_,19)^_>>>10)+y[F-7]+(de(_=y[F-15],7)^de(_,18)^_>>>3)+y[F-16])+Z.pop()+(de(_=Z[4],6)^de(_,11)^de(_,25))+(_&Z[5]^~_&Z[6])+Oe[F++];for(F=8;F;)d[--F]+=Z[F]}for(_="";F<64;)_+=(d[F>>3]>>4*(7-F++)&15).toString(16);return _}var tr=/\.|\+.*$/g;function nr(s){if(typeof s!="string")return"";let p=s.toLowerCase().split(/@/);if(p.length!==2)return"";let[_,y]=p;return`${_.replace(tr,"")}@${y}`}function un(s){let d=nr(s);return d?cn(d):""}var ir="USER_DATA_READY",rr=()=>G("universalId"),or=()=>{let s=rr();if(s)return it(),s;let d=G("userEmail");if(d)return s=un(d),ar(s),it(),s;it()},dn=()=>{if(!te)return;let s=or(),d=G("userEmail");if(typeof window<"u"&&typeof window.dispatchEvent=="function"){let p=new CustomEvent(ir,{detail:{universalId:s,userEmail:d}});window.dispatchEvent(p)}return{universalId:s,userEmail:d}},it=()=>{ge("universalIdInitialized",!0)},ar=s=>{ge("universalId",s)};var ln=()=>{if(typeof window>"u")return;let s=window,d=s.analytics;if(!d){console.warn("[segment-wrapper] Analytics is not available");return}let p=s.__SEGMENT_WRAPPER?.SEGMENT_ID_USER_WITHOUT_CONSENTS??"anonymous_user";d.user?.()?.anonymousId()===p&&"setAnonymousId"in d&&typeof d.setAnonymousId=="function"&&d.setAnonymousId(null)};var sr=()=>{Gt(s=>{let d=G("key");if(!d){console.warn("[segment-wrapper] Segment write key is not configured.");return}if(!window.analytics?.load){console.warn("[segment-wrapper] analytics.load is not available. ");return}s?window.analytics.load(d):window.analytics.load(d,{integrations:{All:!1,"Segment.io":!0,"Google Analytics 4 Web":!0}})})};sr();Je();try{dn()}catch(s){console.error("[segment-wrapper] UniversalID could not be initialized",s)}var fn=()=>{let s=G("experimentalPageDataMiddleware");window.analytics.addSourceMiddleware?.(an),window.analytics.addSourceMiddleware?.(nn),window.analytics.addSourceMiddleware?.(tn),window.analytics.addSourceMiddleware?.(en),window.analytics.addSourceMiddleware?.(on),window.analytics.addSourceMiddleware?.(zt),s&&window.analytics.addSourceMiddleware?.(rn)};te&&window.analytics&&(window.analytics.ready(ln),window.analytics.addSourceMiddleware?fn():window.analytics.ready(fn));var rt=Ve;var pe=window;pe.sui=pe.sui||{};pe.sui.analytics=pe.sui.analytics||rt;pe.sui.analytics.getAdobeVisitorData=pe.sui.analytics.getAdobeVisitorData||Rt;pe.sui.analytics.getAdobeMCVisitorID=pe.sui.analytics.getAdobeMCVisitorID||xe;var So=rt;})();
2
2
  /**
3
3
  * @license
4
4
  * Adobe Visitor API for JavaScript version: 4.6.0