(()=>{var __webpack_modules__={9062:function(e,t){var o;void 0!==(t="function"==typeof(o=function(){var e=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;function t(e){var t=e.replace(/^v/,"").replace(/\+.*$/,""),o=function(e,t){return-1===e.indexOf("-")?e.length:e.indexOf("-")}(t),n=t.substring(0,o).split(".");return n.push(t.substring(o+1)),n}function o(e){return isNaN(Number(e))?e:Number(e)}function n(t){if("string"!=typeof t)throw new TypeError("Invalid argument expected string");if(!e.test(t))throw new Error("Invalid argument not valid semver ('"+t+"' received)")}function r(e,r){[e,r].forEach(n);for(var i=t(e),s=t(r),a=0;ad)return 1;if(d>c)return-1}var p=i[i.length-1],u=s[s.length-1];if(p&&u){var l=p.split(".").map(o),g=u.split(".").map(o);for(a=0;ag[a])return 1;if(g[a]>l[a])return-1}}else if(p||u)return p?-1:1;return 0}var i=[">",">=","=","<","<="],s={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};function a(e){if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===i.indexOf(e))throw new TypeError("Invalid operator, expected one of "+i.join("|"))}return r.validate=function(t){return"string"==typeof t&&e.test(t)},r.compare=function(e,t,o){a(o);var n=r(e,t);return s[o].indexOf(n)>-1},r})?o.apply(t,[]):o)&&(e.exports=t)},8101:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>n});const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiPjxwYXRoIGQ9Ik00ODUuNDMgMTEuNzJjLTExLjEyIDQuMjItMTguNDEgMTAuMzYtMjIuNjMgMTkuMTgtMy42NCA3LjQ4LTQuMDMgMTEuNy00LjAzIDQydjMzLjU2bC0xNi40OSAzLjI2Yy0yNC4xNiA0Ljc5LTQzLjE1IDExLjUxLTY4Ljg1IDIzLjk3LTc5LjIxIDM4Ljc0LTEzNS4wMSAxMTAuNjYtMTU0LjU4IDE5OS4yNi0zLjg0IDE3LjQ1LTQuMjIgMjYuMDgtNS41NiAxMzMuNjctMS4zNCAxMDUuMjktMS43MyAxMTYuNi01LjM3IDEzMy40OC0xMi40NyA1OS4wNy0zOS43IDEwOC4zNi04Mi4wOCAxNDkuNTktMTguNzkgMTguMDMtMzUuMDkgMzAuNjgtNTUuMDQgNDIuMzhsLTEzLjA0IDcuNDggNC42IDguMDVjMi40OSA0LjQxIDguMjUgMTUuMTUgMTIuODUgMjMuNzhsOC40NCAxNS45Mkg1MDBoNDE2LjM1bDguNDQtMTUuOTIgMTIuODUtMjMuNzggNC42LTguMDUtMTMuNDItNy44NmMtMjEuODYtMTIuNjYtNDIuMTktMjguOTYtNjIuNTItNTAuMjUtMzguMTctMzkuNTEtNjIuNTItODYuMTEtNzQuMjItMTQxLjM0LTMuNjQtMTYuODgtNC4wMy0yOC4zOS01LjM3LTEzMi41Mi0xLjUzLTExNC40OS0xLjkyLTEyMC42My05LjU5LTE1MC4xNi0yNi40Ni0xMDMuNzUtMTEzLjE1LTE4NS42NC0yMTkuNTktMjA3LjUxbC0yMS4xLTQuMjItLjk2LTM1LjI5Yy0uOTYtMzIuNzktMS4zNC0zNS44Ni01LjM3LTQyLjU3LTguODEtMTMuOC0yOS45MS0yMS40OC00NC42Ny0xNi4xMXptLTUxLjU5IDE3OC4zNmM3LjY3IDMuODQgMTQgMTQuNTggMTIuNjYgMjIuMjUtMS41MyAxMC4zNi02LjE0IDE1LjE1LTIxLjg2IDIzLjAxLTM1Ljg2IDE4LjAzLTYxLjM3IDQzLjczLTc5Ljc4IDgwLjM2LTkuOTcgMTkuNzUtMTkuNTYgMjUuMTItMzQuNzEgMTguOC03LjI5LTMuMDctMTIuNDctMTEuNTEtMTIuNDctMjAuMTQgMC0xMy44MSAyMS44Ni01MC4yNSA0NC4xMS03My44NCAxNy4yNi0xOC4wMyAzNS44Ni0zMi4wMyA1OC40OS00My43MyAxNy44My05LjM5IDI1LjMxLTEwLjkzIDMzLjU2LTYuNzF6TTM5Mi42IDg5Mi43NmMzLjY0IDI2Ljg1IDEzLjgxIDQ3Ljk1IDMxLjY0IDY1Ljc4IDIxLjI5IDIxLjI5IDQ1Ljg0IDMxLjQ1IDc1Ljc1IDMxLjQ1czU0LjQ3LTEwLjE3IDc1Ljc1LTMxLjQ1YzE4LjAzLTE4LjAzIDI4LjM4LTM5LjUxIDMxLjQ1LTY1Ljc4bDEuMTUtOS4wMUg0OTkuODEgMzkxLjQ1bDEuMTUgOS4wMXoiLz48L3N2Zz4K"},6755:(e,t)=>{"use strict";var o,n;Object.defineProperty(t,"__esModule",{value:!0}),t.debugResolved=t.debugCollapsed=t.error=t.warn=t.info=t.log=t.debug=t.trace=t.setDefaultLogger=t.defaultLogger=t.SimpleLogger=t.LogLevel=void 0,(n=o||(t.LogLevel=o={})).DEBUG="debug",n.TRACE="trace",n.LOG="log",n.INFO="info",n.WARN="warn",n.ERROR="error";class r{_log(e){++this._log_reentrant;try{var t=new Date,o=console[e];console[e]instanceof Function||(o=console.log);const n=[];if(1{}}get level(){return o.INFO}get trace(){return this.noop()}get debug(){return this.noop()}debugResolved(){!{debug:!1}["debug-unresolved"]&&(this._log_retained=void 0)}get log(){return this._log(o.LOG)}get info(){return this._log(o.INFO)}get warn(){return this._log(o.WARN)}get error(){return this._log(o.ERROR)}debugCollapsed(e){for(var t=arguments.length,o=new Array(1{t.defaultLogger=e},t.trace=function(){return t.defaultLogger.trace(...arguments)},t.debug=function(){return t.defaultLogger.debug(...arguments)},t.log=function(){return t.defaultLogger.log(...arguments)},t.info=function(){return t.defaultLogger.info(...arguments)},t.warn=function(){return t.defaultLogger.warn(...arguments)},t.error=function(){return t.defaultLogger.error(...arguments)},t.debugCollapsed=function(e){for(var o=arguments.length,n=new Array(1t.defaultLogger.debugResolved()},415:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryRemoteConfigStorage=t.FetchRemoteConfigFetcher=t.NoneRemoteConfigFetcher=t.IndexDbRemoteConfigStorage=t.RemoteConfigManager=t.RemoteConfigToUpdateBroadcastType=t.RemoteConfigUpdatedBroadcastType=t.RemoteConfig=t.remoteConfigStorageKey=t.disableConfigFetchKey=t.ComparisonResult=t.FetchRateLimitError=t.InvalidFormatError=void 0;const n=o(6755),r=o(9062);class i extends Error{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}}t.InvalidFormatError=i;class s extends Error{constructor(e){super(e),Object.setPrototypeOf(this,s.prototype)}}var a;t.FetchRateLimitError=s,(o=a||(t.ComparisonResult=a={}))[o.ascending=-1]="ascending",o[o.same=0]="same",o[o.descending=1]="descending",t.disableConfigFetchKey="disableConfigFetch",t.remoteConfigStorageKey="remoteConfig";const c="[remoteconfig]";class d{static compareVersions(e,t){var o=r.validate(e),n=r.validate(t);return!o&&n?a.ascending:!n&&o?a.descending:o||n?r(e,t):a.same}constructor(e,t){var o=2this.maxAge}get hasReachedMinAge(){return+new Date-this.fetchDate.getTime()>=this.minAge}}t.RemoteConfig=d,t.RemoteConfigUpdatedBroadcastType="RemoteConfigUpdated",t.RemoteConfigToUpdateBroadcastType="RemoteConfigToUpdate",t.RemoteConfigManager=class{constructor(e,o,r){this.remoteConfigFetcher=e,this.remoteConfigStorage=o,this.broadcastInterface=r,this.minimumFetchInterval=5e3,this.minimumConfigAge=0,this.maximumConfigAge=864e6,this.isFetching=!1,this.queuedHandlers=[],r.addBroadcastListener(t.RemoteConfigToUpdateBroadcastType,((e,t)=>{const o=d.fromJSON(t);!o||this.storedConfig&&!o.hasHigherVersionThan(this.storedConfig)||(this.storedHighestVersion=o.version,this.storedConfig=o,this.remoteConfigStorage.storeRemoteConfig(o).catch((e=>n.error(c,"[RemoteConfigManager] Could not store config",e))).then((()=>this.remoteConfigStorage.declareVersion(o.version))).catch((e=>n.error(c,"[RemoteConfigManager] Could not declare config version",e))))}))}invalidate(){return this.remoteConfigStorage.invalidate()}declareVersion(e){return this.remoteConfigStorage.declareVersion(e).then((()=>(this.storedHighestVersion&&d.compareVersions(this.storedHighestVersion,e)!==a.ascending||(this.storedHighestVersion=e),this.readConfigAndHighestDeclaredVersionFromStorage())),(e=>(n.error(c,"[declareVersion]","Error declaring version to storage",e),this.readConfigAndHighestDeclaredVersionFromStorage()))).then((t=>{var[t,o]=t;if(t){if(+new Date-t.fetchDate.getTime(){this.storedConfig=e}))}if(o&&d.compareVersions(t.version,o)!==a.ascending)return}var n=+new Date-((null==(n=this.lastFetchDate)?void 0:n.getTime())||0);if(!(this.lastFetchDate&&n{n.error(c,"[declareVersion]","Could not get RemoteConfig from storage",e)})).then((()=>{}))}read(){return this.isFetching?new Promise(((e,t)=>{this.queuedHandlers.push({resolve:e,reject:t})})):this.readConfigAndHighestDeclaredVersionFromStorage().then((e=>{let[t,o]=e;if(e=+new Date-((null==(e=this.lastFetchDate)?void 0:e.getTime())||0),!t){if(this.lastFetchDate&&ethis.maximumConfigAge||t.isExpired,!r&&c&&(r=!0,n||(i=t.version)),(r=!(r&&this.lastFetchDate&&et)):t}))}readConfigAndHighestDeclaredVersionFromStorage(){return this.storedConfig&&this.storedHighestVersion?Promise.resolve([this.storedConfig,this.storedHighestVersion]):this.remoteConfigStorage.loadRemoteConfigAndHighestDeclaredVersion().then((e=>{var[e,t]=e;return e&&(this.storedConfig=e),t&&(this.storedHighestVersion=t),[e,t]}))}resolveHandlers(e){this.queuedHandlers.splice(0,this.queuedHandlers.length).forEach((t=>t.resolve(e)))}rejectHandlers(e){this.queuedHandlers.splice(0,this.queuedHandlers.length).forEach((t=>t.reject(e)))}fetchAndStoreConfigWithVersion(e,o){return o&&o.data[t.disableConfigFetchKey]?Promise.resolve(o):this.isFetching?new Promise(((e,t)=>{this.queuedHandlers.push({resolve:e,reject:t})})):(this.isFetching=!0,this.lastFetchDate=new Date,this.remoteConfigFetcher.fetchConfigWithVersion(e).catch((e=>{throw n.error(c,"[fetchAndStoreConfigWithVersion]","Could not fetch RemoteConfig from server",e),this.rejectHandlers(e),this.isFetching=!1,e})).then((e=>o&&o.hasHigherVersionThan(e)?(this.resolveHandlers(o),this.isFetching=!1,o):this.remoteConfigStorage.storeRemoteConfig(e).catch((e=>{throw n.error(c,"[fetchAndStoreConfigWithVersion]","Could not store RemoteConfig",e),this.rejectHandlers(e),this.isFetching=!1,e})).then((()=>this.remoteConfigStorage.declareVersion(e.version).catch((e=>{n.error(c,"[fetchAndStoreConfigWithVersion]","Error declaring version to storage",e)})).then((()=>(this.storedConfig=e,this.isFetching=!1,o&&!e.hasHigherVersionThan(o)||(this.broadcastInterface.broadcast(t.RemoteConfigToUpdateBroadcastType,e.toJSON()),this.broadcastInterface.broadcast(t.RemoteConfigUpdatedBroadcastType,e.toJSON())),this.resolveHandlers(e),e))))))))}},t.IndexDbRemoteConfigStorage=class{constructor(e){this.storageModule=e}invalidate(){return this.storageModule.bulk([{test:{key:t.remoteConfigStorageKey,defaultValue:null,operationsCb:function(e){var o;return e&&(o=e.serializedConfig)?(o.fetchDate=0,{put:{key:t.remoteConfigStorageKey,value:e}}):[]}}}]).then((()=>{}))}declareVersion(e){return this.storageModule.bulk([{test:{key:t.remoteConfigStorageKey,defaultValue:{},operationsCb:function(o){var n=o.highestVersion;return n&&d.compareVersions(e,n)!==a.descending||(o.highestVersion=e),{put:{key:t.remoteConfigStorageKey,value:o}}}}}]).then((()=>{}))}loadRemoteConfigAndHighestDeclaredVersion(){return this.storageModule.get(t.remoteConfigStorageKey,{}).then((e=>{var t=null==e?void 0:e.highestVersion;return[null!=e&&e.serializedConfig?d.fromJSON(e.serializedConfig):void 0,t]}))}storeRemoteConfig(e){return this.storageModule.bulk([{test:{key:t.remoteConfigStorageKey,defaultValue:{},operationsCb:function(o){var n=o.serializedConfig?d.fromJSON(o.serializedConfig):void 0;return n&&n.hasHigherVersionThan(e)?{}:(o.serializedConfig=e.toJSON(),{put:{key:t.remoteConfigStorageKey,value:o}})}}}]).then((()=>{}))}},t.NoneRemoteConfigFetcher=class{fetchConfigWithVersion(e){return Promise.resolve(new d({},"0"))}};class p{constructor(e){this.urlOrUrlBuilder=e}get url(){return"function"==typeof this.urlOrUrlBuilder?this.urlOrUrlBuilder():this.urlOrUrlBuilder}fetchConfigWithVersion(e){var t=new URL(this.url.toString());return fetch(t.toString()).then((e=>e.json())).then((e=>p.parseConfigJSON(e)))}static parseConfigJSON(e){let t=e.version;if("string"!=typeof(t="number"==typeof t?""+t:t))throw new i;var o=t;let n=e.maxAge;var r="number"==typeof(n=void 0===n?e.cacheTtl:n)?n:0;let s=e.minAge;var a="number"==typeof(s=void 0===s?e.cacheMinAge:s)?s:0;return new d(e,o,new Date,r,a)}}t.FetchRemoteConfigFetcher=p,t.InMemoryRemoteConfigStorage=class{declareVersion(e){return this.storedHighestVersion&&d.compareVersions(this.storedHighestVersion,e)!==a.ascending||(this.storedHighestVersion=e),Promise.resolve()}loadRemoteConfigAndHighestDeclaredVersion(){return this.error?Promise.reject(this.error):Promise.resolve([this.storedConfig,this.storedHighestVersion])}storeRemoteConfig(e){return this.storedConfig=e,this.error?Promise.reject(this.error):Promise.resolve()}invalidate(){return this.storedConfig&&(this.storedConfig=new d(this.storedConfig.data,this.storedConfig.version,new Date(0),this.storedConfig.maxAge,this.storedConfig.minAge)),Promise.resolve(void 0)}}},6964:(e,t,o)=>{"use strict";const n=o(8101);t.ZP=e=>{e._protected.Assets=new r(e)};class r{constructor(e){this.SDK=e}get bell(){return n.default}}},6433:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventAttributionManager=t.ReportingDataUtil=t.isReportingData=void 0;const n=o(6755),r="eventAttribution",i="[attribution ]";t.isReportingData=e=>"object"==typeof e&&!("string"!=typeof e.notificationId||void 0!==e.campaignId&&null!==e.campaignId&&"string"!=typeof e.campaignId||void 0!==e.viewId&&null!==e.viewId&&"string"!=typeof e.viewId||void 0!==e.reporting&&null!=e.reporting&&"object"!=typeof e.reporting),t.ReportingDataUtil=class{static extract(e){function t(e){return null===e||"string"==typeof e}function o(e){return"string"==typeof e?e:null}function n(e){return"object"==typeof e?e:null}return t(e.n)||t(e.c)||t(e.v)?{notificationId:o(e.n),campaignId:o(e.c),viewId:o(e.v),reporting:n(e.reporting)}:t(e.notificationId)||t(e.campaignId)||t(e.viewId)?{notificationId:o(e.notificationId),campaignId:o(e.campaignId),viewId:o(e.viewId),reporting:n(e.reporting)}:"object"==typeof e.reporting?{notificationId:o(e.reporting.notificationId),campaignId:o(e.reporting.campaignId),viewId:o(e.reporting.viewId),reporting:e.reporting}:{notificationId:null,campaignId:null,viewId:null,reporting:null}}static hasReportingEventData(e){return"notificationId"in e||"campaignId"in e||"viewId"in e||"reporting"in e}static assignEventData(e,t){var o=2{(0,n.debug)(i,"[setCurrentAttribution] done",s)}))}currentAttribution(){return this.storage.get(r,void 0).then((e=>{if(e&&(new Date).getTime()t?{put:{key:r,value:Object.assign(Object.assign({},t),{expirationTime:+new Date+e})}}:[]}}]).then((()=>{(0,n.debug)(i,"[renewCurrentAttribution] done",e)}))}resetCurrentAttribution(){return(0,n.debug)(i,"[resetCurrentAttribution]"),this.storage.rm(r).then((()=>{(0,n.debug)(i,"[resetCurrentAttribution] done")}))}}},1443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventCollapser=void 0;class o{constructor(e){this.events=e,this.now=()=>+new Date,this.maximumCollapsedLastBuiltinTrackedEventsCount=o.DEFAULT_MAXIMUM_COLLAPSED_LAST_BUILTIN_TRACKED_EVENTS_COUNT,this.maximumCollapsedLastCustomTrackedEventsCount=o.DEFAULT_MAXIMUM_COLLAPSED_LAST_CUSTOM_TRACKED_EVENTS_COUNT,this.maximumCollapsedOtherTrackedEventsCount=o.DEFAULT_MAXIMUM_COLLAPSED_OTHER_TRACKED_EVENTS_COUNT,this.maximumUncollapsedTrackedEventsCount=o.DEFAULT_MAXIMUM_UNCOLLAPSED_TRACKED_EVENTS_COUNT,this.maximumUncollapsedTrackedEventsAgeMs=o.DEFAULT_MAXIMUM_UNCOLLAPSED_TRACKED_EVENTS_AGE_MS,Array.isArray(this.events)||(this.events=[])}getEvents(){return[...this.events]}addEvent(e){var t=e.type;if(!t)return null;let n=0;var r=e.campaignId;let i=e.collapsing;var s=this.getEvents();let a=[],c=[],d=[],p=[];var u=this.now(),l=this.maximumUncollapsedTrackedEventsAgeMs;for(const e of s){var g,h=e.collapsing,f=e.type;null!=i&&"last"!==i||"last"!==h||t!==f?null!=r&&"campaign"===i&&"campaign"===h&&t===f&&r===e.campaignId?(g=(g=e.occurrences)&&g.allTime||1,n=Math.max(1,g)):null==h&&u-(e.actionDate||u)>=l||(h?"last"===h?f.startsWith("@")?c:d:p:a).push(e):(h=(g=e.occurrences)&&g.allTime||1,n=Math.max(1,h))}s=null;let _=null;null==i&&(_=JSON.parse(JSON.stringify(e)),a.push(_)),n+=1,s=JSON.parse(JSON.stringify(e)),null==i&&(s.collapsing="last",i="last"),("last"===i?t.startsWith("@")?c:d:p).push(s),e=(e,t)=>(e=(e.actionDate||-1)-(t.actionDate||-1))<0?-1:0{"use strict";const n=o(6755),r="[features ]";t.ZP=e=>{e._protected.Features=new i(e)};class i{constructor(e){if(this.SDK=e,this.features=new Set,self.ServiceWorkerGlobalScope)this.context="serviceWorker";else{if(!self.window)throw new Error("Unknown context");this.context="window"}e.instantiationPromise.then((()=>this.save())),(0,n.debug)(r,"ready")}declareFeature(e){(0,n.debug)(r,"[declareFeature]",e),this.features.add(e)}mergeFeatures(e){var t=Array.from(this.features);return t.sort(),Object.assign(Object.assign({window:[],serviceWorker:[]},e),{[this.context]:t})}getFeatures(){return this.SDK.preInstantiationPromise.then((()=>this.SDK._protected.Storage.getModuleInitializationPromise())).then((()=>this.SDK._protected.Storage.get("features",void 0))).then((e=>this.mergeFeatures(e)))}save(){return this.SDK.preInstantiationPromise.then((()=>this.SDK._protected.Storage.getModuleInitializationPromise())).then((()=>this.SDK._protected.Storage.bulk([{test:{key:this.SDK._protected.Constants.FEATURES_STORAGE_KEY,defaultValue:void 0,operationsCb:e=>({put:{key:this.SDK._protected.Constants.FEATURES_STORAGE_KEY,value:this.mergeFeatures(e)}})}}]))).then((()=>{}))}}},4596:function(e,t,o){"use strict";var n=this&&this.__awaiter||function(e,t,o,n){return new(o=o||Promise)((function(r,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):((t=e.value)instanceof o?t:new o((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hasForcedInApps=t.forceDisplayOnNextEvent=void 0;const r=o(6755),i="[inapp-helper]";t.forceDisplayOnNextEvent=(e,t,o)=>{Array.isArray(t)&&((0,r.debug)(i,"[forceDisplayOnNextEvent]",t,o),e._protected.CustomDomainStorage.get(e._protected.Constants.FORCED_INAPPS_STORAGE_KEY,[]).then((n=>((0,r.debug)(i,"[forceDisplayOnNextEvent] forced in-apps:",n),(n=Array.from(n||[])).push({eventTypes:t,notification:o}),(0,r.debug)(i,"[forceDisplayOnNextEvent] setting forced in-apps:",n),e._protected.CustomDomainStorage.set(e._protected.Constants.FORCED_INAPPS_STORAGE_KEY,n)))))},t.hasForcedInApps=e=>n(void 0,void 0,void 0,(function*(){(0,r.debug)(i,"[hasForcedInApps]");var t=yield e._protected.CustomDomainStorage.get(e._protected.Constants.FORCED_INAPPS_STORAGE_KEY,[]);return(0,r.debug)(i,"[hasForcedInApps] forced in-apps:",t),!!Array.from(t||[]).length}))},6477:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RateLimiter=void 0;const n=o(6755),r=(e,t)=>{for(var o=+new Date-t;0this.locking.remoteMutexManager.create("rate-limiter-mutex",500)))}increment(e){let t;return(0,n.debug)(s,"[increment ]","try increment",e.key),this.makeMutex(e).then((o=>(t=o,(0,n.debug)(s,"[increment ]","acquiring mutex",e.key),this.locking.remoteMutexManager.acquire(t,{timeout:500})))).catch((o=>{throw(0,n.debug)(s,"[increment ]","could not acquire mutex",o,e.key),t=void 0,o})).then((()=>((0,n.debug)(s,"[increment ]","got mutex",e.key),this.storage.bulk([{test:{key:i,defaultValue:{},operationsCb:t=>{(0,n.debug)(s,"[increment ]","got storage result",e.key,JSON.parse(JSON.stringify(t)));var o=t[e.key]||{key:e.key,incrementDates:[]};return(t[e.key]=o).incrementDates.push(+new Date),r(o,e.timeToLive),(0,n.debug)(s,"[increment ]","increment",e.key,o.incrementDates.length),[{put:{key:i,value:t}}]}}}]).then((()=>{}))))).catch((e=>{throw t&&this.locking.remoteMutexManager.release(t).catch((e=>(0,n.error)(s,"[increment ]","could not release mutex",e))),e})).then((()=>((0,n.debug)(s,"[increment ]","increment done",e.key),this.locking.remoteMutexManager.release(t))))}isRateLimited(e){let t;return this.makeMutex(e).then((e=>(t=e,this.locking.remoteMutexManager.acquire(t,{timeout:500})))).catch((o=>{throw(0,n.debug)(s,"[isRateLimit…]","could not acquire mutex",o,e.key),t=void 0,o})).then((()=>((0,n.debug)(s,"[isRateLimit…]","mutex acquired",e.key),this.storage.get(i,{})))).then((t=>((0,n.debug)(s,"[isRateLimit…]","got cache",JSON.parse(JSON.stringify(t)),e.key),!!(t=t[e.key])&&(r(t,e.timeToLive),t.incrementDates.length>=e.limit)))).catch((e=>{throw(0,n.debug)(s,"[isRateLimit…]","error",e),t&&this.locking.remoteMutexManager.release(t).catch((e=>(0,n.error)(s,"[isRateLimit…]","could not release mutex",e))),e})).then((o=>((0,n.debug)(s,"[isRateLimit…]",e.key,o?"is":"is not","rate limited"),(0,n.debug)(s,"[isRateLimit…]","releasing mutex",e.key),this.locking.remoteMutexManager.release(t).then((()=>o)))))}}},5662:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.urlPassesFilters=void 0;const n=o(6755),r="[url-filters ]";t.urlPassesFilters=(e,t)=>{if((0,n.debug)(r,"[urlPassesFilters]",e,t),t){var o=e.href;if(t.whiteList&&0!!e)).length){let i=!1;for(const e of t.whiteList)if(e&&0<=o.indexOf(e)){i=!0;break}if(!i)return(0,n.debug)(r,"[urlPassesFilters] return",!1,e,t),!1}if(t.blackList&&0!!e)).length)for(const i of t.blackList)if(i&&0<=o.indexOf(i))return(0,n.debug)(r,"[urlPassesFilters] return",!1,e,t),!1}return(0,n.debug)(r,"[urlPassesFilters] return",!0,e,t),!0}},4885:(e,t)=>{t=function(){return function(e){function t(e){var t=i[e];t&&r[e]&&(r[e].forEach((function(e){e.resolve(t)})),delete r[e])}var o,n=new e._protected.Promise.Deferred,r={},i={};return e._protected.Analytics=new function(){function s(t,o){for(var n=e._protected.Constants.ANALYTICS_EXPERIMENTS||{},r=0;n[t]&&r{o=[o(8303),o(9936),o(1523),o(2247),o(1413),o(1599),o(949),o(551),o(3244),o(7354),o(6075),o(5511),o(9472),o(2477),o(6779),o(355),o(8978),o(282)],t=function(e,t,o,n,r,i,s,a,c,d,p,u,l,g,h,f,_,m){"use strict";return function(e,v,S){let b=3{};e[o]?Promise.resolve(e[o].apply(e,t)).then((e=>n(null,e)),(e=>n(e))):n(new TypeError(v+`.${o} is not a function`))}}}}const I=new function(){var E,P=!1,C=[],T=new Promise((function(e,t){E=e})),O=function(e){return setTimeout((()=>e.apply(D.this)),0),T},D=(this.ready=e=>{const t=new y(e);return P?O(t):("init"===t.functionName?t.apply(I):w.has(t.functionName)?A.promise.then((()=>{t.apply(D.this)})):C.push(t),T)},new function(){this._protected={gscope:e,sdkName:v},this.constructor={[v]:function(){}}[v],this.prototype=this.constructor.prototype,this.this=null}),N=(t(D),o(D),new D._protected.Promise.Deferred),A=(D.preInstantiationPromise=N.promise,new D._protected.Promise.Deferred),M=(D.instantiationPromise=A.promise,[]),R=!(D.readyCallback=function(){x(D.this)}),k=(this.init=function(t){return R?k(t):(R=!0,D._protected.options=t,M.push(n(D)),M.push(r(D)),M.push(i(D)),M.push(u(D)),M.push(a(D,b.additionalRunModes)),M.push(s(D)),M.push(p(D)),M.push(c(D)),M.push(l(D)),M.push(g(D)),M.push(d(D)),M.push(h(D)),M.push(f(D)),M.push(_(D)),M.push(m(D)),S.forEach((function(e){"function"==typeof e&&M.push(e(D))})),D.this=new D.constructor,N.resolve(),b.preInstantiationCallback&&b.preInstantiationCallback(D),Promise.all(M).then((function(){return A.resolve(),D}),(function(e){return console.error("SDK instantiation failed!",e),A.reject(e),D})).then((function(){D._protected.Options.isDebug()&&(e[v+"SDK"]=D)})),Promise.resolve())},function(){D._protected.Helper.warn("[sdk ]","extra call to init() dropped, sdk already instantialized!")}),x=function(e){P=!0,E(e),C.forEach((function(e){O(e)})),C=[]};(function(){var e,t,o=this.init.bind(this),n=this.ready.bind(this);"undefined"!=typeof window&&(e=v.toLowerCase(),e=document.querySelector('HEAD>META[name="'+e+'-integration"]'))&&!((e=(e.content||e.getAttribute("content")).trim().split(/\s*,\s*/)).indexOf("frame")<0&&e.indexOf("popup")<0)&&(t=!1,n((function(){t=!0})),window.addEventListener("message",(function(e){if(e.data instanceof Object&&e.data.sdk===v)switch(e.data.type){case"ping":e.ports&&0{t=function(){return function(e){e._protected.Blocker={};var t={};function o(t){function o(){const e=r.splice(0,r.length);setTimeout((()=>{e.forEach((function(e){e.resolve()}))}),0)}this.name=t;var n={},r=[];this.add=function(e){n[e]=!0},this.remove=function(e){delete n[e],this.unblocked()&&o()},this.wait=function(){var t=new e._protected.Promise.Deferred;return r.push(t),this.unblocked()&&o(),t.promise},this.unblocked=function(){for(var e in n)if(n.hasOwnProperty(e))return!1;return!0}}e._protected.Blocker.clearAllCategories=function(){t={}},e._protected.Blocker.category=function(e){var n=t[e]||new o(e);return t[e]=n}}}.apply(t,[]),void 0!==t&&(e.exports=t)},5488:(e,t,o)=>{o=[o(415)],t=function(e){return function(t){var o,n=new t._protected.Promise.Deferred;return t._protected.Config=new function(){var r=null,i=(o=function(){t._protected.Blocker.category("ready").add("config"),t.preInstantiationPromise.then((function(){Promise.all([t._protected.Options.getModuleInitializationPromise(),t._protected.Storage.getModuleInitializationPromise()]).then((function(){i()}))}))},this.isConfigLoaded=function(){return!!r},this.getModuleInitializationPromise=function(){return n.promise},function(){let o,n;n=t._protected.Options.getWebKey()?(o=new e.FetchRemoteConfigFetcher((()=>new URL(t._protected.Constants.CONFIG_URL_PATTERN.replace(/\${webkey}/,t._protected.Options.getWebKey())+"?_="+ +new Date))),new e.IndexDbRemoteConfigStorage(t._protected.Storage)):(o=new e.NoneRemoteConfigFetcher,new e.InMemoryRemoteConfigStorage);var r={broadcast:(e,o)=>{t._protected.Integration.getModuleInitializationPromise().then((()=>t._protected.Integration.broadcast(e,o)))},addBroadcastListener:(e,o)=>{t._protected.Integration.getModuleInitializationPromise().then((()=>t._protected.Integration.addBroadcastListener(e,o)))}};this.remoteConfigManager=new e.RemoteConfigManager(o,n,r),this.remoteConfigManager.read().then((e=>a(e.data))).catch((e=>console.log("Could not fetch config. Please try again later.",e)))}.bind(this)),s=[],a=(this.addConfigProcessor=function(e){s.push(e)},async function(e){a=function(){};for(const t of s)await t(e);r=e,c()}),c=function(){var e=(o=r.options||{}).defaults||{},o=o.override||{};t._protected.Options.merge(e,o),t._protected.Blocker.category("ready").remove("config"),n.resolve()};this.invalidateConfig=t._protected.Integration.remotelyCallable((function(){return this.remoteConfigManager?this.remoteConfigManager.invalidate():Promise.reject()}))},o(),n.promise}}.apply(t,o),void 0!==t&&(e.exports=t)},1599:(e,t)=>{t=function(){return function(e){e._protected.Constants={},e._protected.Constants.HOME_URL="https://example.com/",e._protected.Constants.CONFIG_URL_PATTERN="https://cdn.example.com/config/webkeys/${webkey}",e._protected.Constants.CONFIG_FETCH_MAX_TRIES=5,e._protected.Constants.SERVICE_WORKER_URL="serviceworker.js",e._protected.Constants.FRAME_URL="index.html",e._protected.Constants.REDIRECT_URL="redirect.html?url=${url}",e._protected.Constants.INTEGRATION_POPUP_DEFAULT_OPTIONS={resizable:0,toolbar:0,location:0,menubar:0,status:0,directories:0,personalbar:0,dependent:"yes",scrollbars:0,center:"window"},e._protected.Constants.WINDOW_LOAD_MAX_PAGELOAD_MS=6e4,e._protected.Constants.WINDOW_LOAD_SLOW_WARN_MS=1e4,e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_MIN=100,e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_MAX=1e3,e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_EXP=1.5,e._protected.Constants.REQUEST_TIMEOUT_MS=2e4,e._protected.Constants.REQUEST_VAULT_ERROR_WAIT_MS=2e4,e._protected.Constants.REQUEST_VAULT_RUNNING_JOB_TIMEOUT_MS=Math.round(1.1*e._protected.Constants.REQUEST_TIMEOUT_MS)+1e3,e._protected.Constants.REQUEST_VAULT_IDLE_WAIT_MS=2e4,e._protected.Constants.INTEGRATION_RPC_CHECK_TARGET_CLOSED_INTERVAL_MS=250,e._protected.Constants.AVAILABLE_LANGUAGES=["en"],e._protected.Constants.I18N_TRANSLATIONS={en:{}},e._protected.Constants.GOOGLE_ANALYTICS_USER_DATA_STORAGE_KEY="analyticsStorageKey",e._protected.Constants.GOOGLE_ANALYTICS_STORAGE_DATABASE_NAME=e._protected.sdkName+"_analytics",e.preInstantiationPromise.then((function(){e._protected.Helper.assign(e._protected.Constants,e.prototype.Constants),Object.freeze(e.prototype.Constants),Object.freeze(e._protected.Constants)}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},9472:(e,t)=>{t=function(){return function(e){e._protected.Consulate=function(t){function o(){r=n=null,i=!1,s=new e._protected.Promise.Deferred}var n,r,i,s;o(),this.setup=function(t,o){this.isSetup()?console.warn("cannot set up an already setup consulate"):(n=new URL(t).origin,"allow"in(r=document.createElement("IFRAME"))&&(r.allow.supports?r.allow.supports("geolocation")&&r.allow.add("geolocation"):r.allow="geolocation"),r.style.display="none",r.src=t,t=function(){document.body.appendChild(r),r.addEventListener("load",(function(){e._protected.Integration.probeAndInitWindowObject(r.contentWindow,n,o,(function(e){i=!0,s.resolve()}),{type:"ping"},(function(e){return e.data instanceof Object&&"pong"===e.data.type}))}))},document.body?t():document.addEventListener("DOMContentLoaded",t))}.bind(this),this.tearDown=function(){this.isSetup()&&(document.body.removeChild(r),o())}.bind(this),this.isSetup=function(){return!!r},this.isReady=function(){return i},this.getReadyPromise=function(){return s.promise},this.getPostMessageTarget=function(){return r.contentWindow},this.getPostMessageOrigin=function(){return n},this.getIFrame=function(){return r}};var t={};e._protected.Consulate.getConsulate=function(e){return t[e]||null},e._protected.Consulate.createConsulate=function(o){if(t[o])throw new e.prototype.Errors.InternalError("Consulate already created");return t[o]=new e._protected.Consulate(o),t[o]}}}.apply(t,[]),void 0!==t&&(e.exports=t)},1413:(e,t)=>{t=function(){return function(e){e.prototype.Errors=new function(){this.Error=function(t){delete(t=e._protected.Helper.plainObjectCopy(new Error(t))).name,e._protected.Helper.assign(this,t)},this.Error.prototype=Object.create(Error.prototype,{name:{value:e._protected.sdkName+"SDK.Errors.Error"},constructor:{value:this.Error}}),this.InternalError=function(t){e.prototype.Errors.Error.apply(this,arguments)},this.InternalError.prototype=Object.create(this.Error.prototype,{name:{value:e._protected.sdkName+"SDK.Errors.InternalError"},constructor:{value:this.InternalError}}),this.InvalidArgumentError=function(t){e.prototype.Errors.Error.apply(this,arguments)},this.InvalidArgumentError.prototype=Object.create(this.Error.prototype,{name:{value:e._protected.sdkName+"SDK.Errors.InvalidArgumentError"},constructor:{value:this.InvalidArgumentError}}),this.TimeoutError=function(t){e.prototype.Errors.Error.apply(this,arguments)},this.TimeoutError.prototype=Object.create(this.Error.prototype,{name:{value:"SDK.Errors.TimeoutError"},constructor:{value:this.TimeoutError}}),this.CancellationError=function(t){e.prototype.Errors.Error.apply(this,arguments)},this.CancellationError.prototype=Object.create(this.Error.prototype,{name:{value:"SDK.Errors.CancellationError"},constructor:{value:this.CancellationError}})},e._protected.Errors=new function(){this.InternalOptionsNotYetAvailableError=function(t){e.prototype.Errors.InternalError.apply(this,arguments)},this.InternalOptionsNotYetAvailableError.prototype=Object.create(e.prototype.Errors.InternalError.prototype,{name:{value:e._protected.sdkName+"SDK.Errors.InternalOptionsNotYetAvailableError"},constructor:{value:this.InternalOptionsNotYetAvailableError}}),this.InternalStorageError=function(t){e.prototype.Errors.InternalError.apply(this,arguments)},this.InternalStorageError.prototype=Object.create(e.prototype.Errors.InternalError.prototype,{name:{value:e._protected.sdkName+"SDK.Errors.InternalStorageError"},constructor:{value:this.InternalStorageError}}),this.InternalRPCTargetClosedError=function(t){e.prototype.Errors.InternalError.apply(this,arguments)},this.InternalRPCTargetClosedError.prototype=Object.create(e.prototype.Errors.InternalError.prototype,{name:{value:e._protected.sdkName+"SDK.Errors.InternalRPCTargetClosedError"},constructor:{value:this.InternalRPCTargetClosedError}})}}}.apply(t,[]),void 0!==t&&(e.exports=t)},9936:(e,t)=>{t=function(){return function(e){e._protected.Function={delay:function(e,t){var o=e;return function(){setTimeout(Function.prototype.bind.apply(o,[e].concat(Array.prototype.slice.call(arguments))),t)}}}}}.apply(t,[]),void 0!==t&&(e.exports=t)},5511:(e,t,o)=>{const n=o(6755);void 0!==(o=function(){return function(e){e._protected.Helper={browserAndOSCSSClasses:function(){var e=[],t=navigator.userAgent.toLowerCase();return-1 meta[name=language], HEAD > meta[http-equiv=content-language], HEAD > meta[http-equiv=Content-Language]")).map((function(e){return e.content})))).reduce((function(e,t){return t?e.concat(t.split(",")):e}),[])),t.push(navigator.language),t.concat(navigator.languages).map(e._protected.Helper.normalizeLocale).filter((function(e){return!!e})));return o.filter((function(e,t){return o.indexOf(e)===t}))},normalizeLocale:function(e){return"string"==typeof e&&(e=e.trim().toLowerCase().match(/^([a-z][a-z])(?:[-_]([a-z][a-z]))?$/))?e[2]?e[1]+"_"+e[2].toUpperCase():e[1]:null},parseNumber:function(e,t){var o;t=t||navigator.language;try{o=Intl.NumberFormat(t).format("1.1")}catch(e){o=Intl.NumberFormat(navigator.language).format("1.1")}return t=new RegExp("[^-+0-9"+o.charAt(1)+"]","g"),e=e.replace(t,"").replace(o.charAt(1),"."),parseFloat(e)},tryParse:function(e,t){try{return JSON.parse(e)}catch(e){}return t},detectBrowser:function(){var e,t,o=navigator.userAgent.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*([\d\.]+)/i)||[],n=(!e&&/trident/i.test(o[1])&&(e="Internet Explorer",t=(n=/\brv[ :]+([\d\.]+)/g.exec(navigator.userAgent)||[])[1]),!e&&/msie/i.test(o[1])&&(e="Internet Explorer",t=o[2]),!e&&/chrome/i.test(o[1])&&0<(n=navigator.userAgent.match(/\b(OPR|Edge)\/([\d\.]+)/)||[]).length&&(e=n[1],t=n[2]),!e&&o[1]&&(e=o[1],t=o[2]),"OPR"===e&&(e="Opera"),null!==(n=navigator.userAgent.match(/version\/([\d\.]+)/i))&&(t=n[1]),o=navigator.userAgent.match(/(Linux|iPad|iPhone|Android|Windows|Macintosh)/g)||[],null);return-1!==o.indexOf("Android")?n="Android":0{if(navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues)return navigator.userAgentData.getHighEntropyValues(["mobile"]).then((e=>e.mobile))})).catch((e=>{})).then((e=>void 0!==e?e:/Mobile|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)))},arrayBufferFromBase64:function(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))},arrayBufferFromBase64UrlSafe:function(t){return e._protected.Helper.arrayBufferFromBase64(t.replace(/-/g,"+").replace(/_/g,"/"))},arrayBufferToBase64:function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e)))},arrayBufferToBase64UrlSafe:function(t){return e._protected.Helper.arrayBufferToBase64(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")},compareVersions:function(e,t){function o(e){return parseInt(e,10)}e=e.split(".").map(o),t=t.split(".").map(o);for(var n=0;n=e.length)return-1;if(n>=t.length)return 1;if(e[n]t[n])return 1}return 0},_:void 0};const t=new n.SimpleLogger({sdkName:e._protected.sdkName});n.setDefaultLogger(t),Object.defineProperties(e._protected.Helper,{trace:{get:function(){return n.trace}},debug:{get:function(){return n.debug}},_debugResolved:{get:function(){return n.debugResolved}},log:{get:function(){return n.log}},info:{get:function(){return n.info}},warn:{get:function(){return n.warn}},error:{get:function(){return n.error}},debugCollapsed:{get:function(){return n.debugCollapsed}},setLogRunMode:{value:function(e){t.runMode=e}}})}}.apply(t,[]))&&(e.exports=o)},6075:(e,t)=>{t=function(){return function(e){var t=e.readyCallback,o=(delete e.readyCallback,e._protected.Init={},[]);e._protected.Init.addWillBecomeReadyCallback=function(e){o.push(e)},e._protected.Blocker.category("ready").add("_init"),e._protected.Blocker.category("ready").wait().then((function(){o.forEach((function(e){e()})),o=[],t()})),e.instantiationPromise.then((function(){e._protected.Blocker.category("ready").remove("_init")}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},2477:(e,t)=>{t=function(){return function(e){var t,o=new e._protected.Promise.Deferred,n=new Set,r=new Map;const i=Symbol(),s=Symbol(),a=new WeakSet;return e._protected.Integration=new function(){function c(t,o,n,r){var i=e._protected.Options.exportInitial();i._mode=e._protected.RunModes.Modes.Popup,i._popup=!0,e._protected.Integration.probeAndInitWindowObject(t,e._protected.Integration.getTargetOrigin(),i,o,n,r)}var d,p,u=e._protected.Consulate.createConsulate("frame"),l=(t=function(){e._protected.RunModes.Behaviors.ModeWebSite&&!e._protected.Integration.isOnRightDomain()&&l(),e._protected.RunModes.Behaviors.ModeFrame?_():e._protected.RunModes.Behaviors.ModePopup?b():e._protected.RunModes.Behaviors.ModeSlave?y():e._protected.RunModes.Behaviors.ModeWebSite?v():e._protected.RunModes.Behaviors.ModeServiceWorker&&E(),Promise.resolve().then((function(){if(e._protected.RunModes.Behaviors.ModeFrame||e._protected.RunModes.Behaviors.ModeWebSite&&e._protected.Integration.isOnRightDomain())return e._protected.Storage.getModuleInitializationPromise().then((function(){return e._protected.Integration.incrementPageViews()}))})).catch((function(){})).then(o.resolve)},this.remotelyCallable=function(e){return e=new Proxy(e,{get:(e,t,o)=>t===i?s:e[t]}),a.add(e),e},this.getModuleInitializationPromise=function(){return o.promise},this.getFrameReadyPromise=function(){return u.getReadyPromise()},this.getIFrame=function(){return u.getIFrame()},this.incrementPageViews=function(){return e._protected.RunModes.Behaviors.ModeFrame||e._protected.RunModes.Behaviors.ModeWebSite&&e._protected.Integration.isOnRightDomain()?e._protected.Storage.getModuleInitializationPromise().then((function(){return e._protected.Storage.bulk([{test:{key:"pageViews",defaultValue:0,operationsCb:function(e){return{put:{key:"pageViews",value:++e}}}}}])})):(console.error("should not be called from this domain"),Promise.resolve())},this.getHomeUrlObject=function(){return new URL(e._protected.Constants.HOME_URL)},this.getHomeHref=function(){return e._protected.Integration.getHomeUrlObject().href},this.getHomeOrigin=function(){return e._protected.Integration.getHomeUrlObject().origin},this.isOnRightDomain=function(){return e._protected.RunModes.Behaviors.ModeServiceWorker?(location.origin,e._protected.Integration.getHomeOrigin(),!0):location.origin===e._protected.Integration.getHomeOrigin()},this.areTopWindowAndSelfOnRightDomain=function(){if(e._protected.RunModes.Behaviors.ModeServiceWorker)return location.origin,e._protected.Integration.getHomeOrigin(),!0;try{return window.top.location.origin===e._protected.Integration.getHomeOrigin()}catch(e){return!1}},this.getServiceWorkerUrl=function(){var t=new URL(e._protected.Options.getServiceWorkerUrl(),e._protected.Integration.getHomeHref());return t.protocol="https:",t.href},this.getFrameUrl=function(){var t=new URL(e._protected.Options.getFrameUrl(),e._protected.Integration.getHomeHref());return t.protocol="https:",t.href},this.getRedirectionPageUrl=function(t){return(t=new URL(e._protected.Options.getRedirectionPageUrl(t),e._protected.Integration.getHomeHref())).protocol="https:",t.href},function(){var t;e._protected.RunModes.Behaviors.ModeWebSite&&(e._protected.Blocker.category("ready").add("hiddenFrame"),(t=e._protected.Options.exportInitial())._mode=e._protected.RunModes.Modes.Frame,t._hiddenFrame=!0,u.setup(e._protected.Integration.getFrameUrl(),t),u.getReadyPromise().then(g))}),g=(this.injectStylesheetLink=function(e){var t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e,document.head.appendChild(t)},this.injectStylesheetInline=function(e){var t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(e)),document.head.appendChild(t)},function(t){e._protected.Blocker.category("ready").remove("hiddenFrame")});const h=function(e,t,o,n){"function"==typeof this.postMessageHook&&(t=this.postMessageHook(t,o,n)||t),e.postMessage(t,o,n)}.bind(this);function f(t,o,n,r){var i,s;if(!t||t.postMessage)return r=r||[],T(n),null===t?O(n,r):(i=new e._protected.Promise.Deferred,s=new MessageChannel,"closed"in t&&e._protected.Promise.setIntervalUntilSettled(i.promise,(function(){var o;t.closed&&(o=new e._protected.Errors.InternalRPCTargetClosedError,i.reject(o))}),e._protected.Constants.INTEGRATION_RPC_CHECK_TARGET_CLOSED_INTERVAL_MS,!1,!1),s.port2.onmessageerror=function(t){e._protected.Helper.error("[integration ]","[callOn] raised onmessageerror",t,"(for target:","","type:",o,"functionName:",n,"args:",r,")"),i.reject(t)},s.port2.onmessage=function(t){var o,n;t.data instanceof Object&&("returned"in t.data?i.resolve(t.data.returned):"error"in t.data&&t.data.error&&((t=t.data.error)&&t.name&&(n=e._protected.sdkName+"SDK.Errors.",o=Error,"function"==typeof(o=t.name&&t.name.startsWith(n)?e.prototype.Errors[t.name.substring(n.length)]||e._protected.Errors[t.name.substring(n.length)]:o))&&(n=new o(t.message)).name===t.name&&(delete t.name,e._protected.Helper.assign(n,t),t=n),i.reject(t)))},"undefined"!=typeof ServiceWorker&&t instanceof ServiceWorker||"undefined"!=typeof Client&&t instanceof Client?t.postMessage({sdk:e._protected.sdkName,type:o,functionName:n,args:r},[s.port1]):t.postMessage({sdk:e._protected.sdkName,type:o,functionName:n,args:r},"*",[s.port1]),i.promise)}this.probeWindowObject=function(t,o,n,r){var i=new e._protected.Promise.Deferred;if(!t)return Promise.reject(new Error("Missing window object"));function s(){c&&(t.closed?(c=!1,i.reject(new Error("Window has gone away"))):d("*"))}n instanceof Object&&(n.sdk=e._protected.sdkName);var a=e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_MIN,c=((new Date).getTime(),!0),d=function(o){var d=new MessageChannel;d.port2.onmessage=function(e){c&&r(e)&&(c=!1,i.resolve())},a=Math.min(e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_MAX,a*e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_EXP),h(t,n,o,[d.port1]),setTimeout(s,a)};return setTimeout(d.bind(null,o),a),i.promise},this.probeAndInitWindowObject=function(t,o,n,r,i,s){var a,c,d,p,u;t?(i instanceof Object&&(i.sdk=e._protected.sdkName),a=e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_MIN,c=(new Date).getTime(),d=!0,p=function(c){var p=new MessageChannel;p.port2.onmessage=function(i){d&&s(i)&&(d=!1,(new Date).getTime(),(i=new MessageChannel).port2.onmessage=function(e){e.data instanceof Object&&"ready"===e.data.type&&(r(t),r=function(){})},h(t,{type:"init",sdk:e._protected.sdkName,initOpts:n},o,[i.port1]))},a=Math.min(e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_MAX,a*e._protected.Constants.WINDOW_LOAD_CHECK_PAGELOADED_INTERVAL_MS_EXP),h(t,i,c,[p.port1]),setTimeout(u,a)},u=function(){if(d)if(t.closed)r(d=!1),r=function(){};else if((new Date).getTime()-c!e._protected.Integration.isOnRightDomain())))))for(var n in o)o.hasOwnProperty(n)&&(o[n]=e._protected.Integration.remotelyCallable(o[n]));return o},this.callOnParentWindow=function(t,o){return f(!e._protected.RunModes.Behaviors.ContextFrame||window.parent===window||e._protected.RunModes.Behaviors.ModeSlave?null:window.parent,"callOnParentWindow",t,o)},this.proxifyToParentWindow=function(t,o){return e._protected.RunModes.Behaviors.ContextFrame?D(e._protected.Integration.callOnParentWindow,t,o,void 0,(()=>window.parent!==window)):e._protected.Integration.remotelyCallable(o)},this.callOnPopupWindow=function(e,t,o){return f(e,"callOnPopupWindow",t,o)},this.callOnSlave=function(e,t,o){return f(e,"callOnSlave",t,o)},this.callOnServiceWorker=function(t,o){return T(t),e._protected.RunModes.Behaviors.ContextServiceWorker?f(null,"callOnServiceWorker",t,o):navigator.serviceWorker?navigator.serviceWorker.ready.then((function(e){return f(e.active||navigator.serviceWorker.controller,"callOnServiceWorker",t,o)})):new Promise(((e,t)=>{}))},this.proxifyToServiceWorker=function(t,o){return e._protected.RunModes.Behaviors.ContextServiceWorker?e._protected.Integration.remotelyCallable(o):D(e._protected.Integration.callOnServiceWorker,t,o)},this.callOnServiceWorkerClients=function(t,o){return T(t),e._protected.RunModes.Behaviors.ContextServiceWorker?clients.matchAll().then((function(e){return Promise.all(e.map((function(e){return f(e,"callOnServiceWorkerClients",t,o)})))})):f(null,"callOnServiceWorkerClients",t,o)},this.proxifyToServiceWorkerClients=function(t,o){return e._protected.RunModes.Behaviors.ContextServiceWorker?D(e._protected.Integration.callOnServiceWorkerClients,t,o):e._protected.Integration.remotelyCallable(o)},this.broadcast=function(t,o){var n=e._protected.Helper.uuidv4();e._protected.Integration.onBroadcast(t,o,n)},this.onBroadcast=this.remotelyCallable((function(t,o,i){var s;n.has(i)||(n.add(i),(s=r.get(t))&&s.forEach((e=>e(t,o))),e._protected.RunModes.Behaviors.ModeWebSite&&u&&u.isSetup()?e._protected.Integration.callOnCustomDomain("SDK._protected.Integration.onBroadcast",[t,o,i]):e._protected.RunModes.Behaviors.ModeFrame?(e._protected.Integration.callOnParentWindow("SDK._protected.Integration.onBroadcast",[t,o,i]),e._protected.Helper.supportsServiceWorker()&&e._protected.Integration.callOnServiceWorker("SDK._protected.Integration.onBroadcast",[t,o,i])):e._protected.RunModes.Behaviors.ModeServiceWorker&&e._protected.Integration.callOnServiceWorkerClients("SDK._protected.Integration.onBroadcast",[t,o,i]))})),this.addBroadcastListener=function(e,t){let o=r.get(e);o||(o=new Set,r.set(e,o)),o.add(t)},this.removeBroadcastListener=function(e,t){(e=r.get(e))&&(t?e.delete(t):e.clear())}},e.preInstantiationPromise.then((function(){return e._protected.Options.getModuleInitializationPromise()})).then((function(){return e._protected.Blocker.category("integration").wait()})).then(t),o.promise}}.apply(t,[]),void 0!==t&&(e.exports=t)},7354:(e,t)=>{t=function(){return function(e){var t,o,n=new e._protected.Promise.Deferred;return e._protected.Locking=new function(){o=function(){e.preInstantiationPromise.then((function(){e._protected.Integration.getModuleInitializationPromise().then((function(){e._protected.Integration.isOnRightDomain()&&(e._protected.Locking=t),Promise.all([e._protected.Storage.getModuleInitializationPromise(),e._protected.Integration.getModuleInitializationPromise()]).then((function(){n.resolve()}))}))}))},this.getModuleInitializationPromise=function(){return n.promise},this.isAvailable=function(){return e._protected.Storage.isDefaultContainerAvailable()},this.ExpiringUnfairNamedGlobalMutex=function(t,o,n){var r=!1,i=null,s=t,a=o,c=n,d=(this.acquire=function(t){var o,n;return(t=t||{}).interval=t.interval||250,t.ttl=t.ttl||a,0===t.timeout?this.tryAcquire(t.ttl):r?Promise.resolve():(o=new e._protected.Promise.Deferred,n=+new Date,e._protected.Promise.setIntervalUntilSettled(o.promise,function(){if(!(0=t.timeout))return this.tryAcquire(t.ttl).then(o.resolve,(function(){}));o.reject()}.bind(this),t.interval,!0,!1),o.promise)},this.tryAcquire=function(t){var o,n;return r?Promise.resolve():(t=t||a,(n=function(){return o=+new Date+t,e._protected.Storage.bulk([{add:{store:e._protected.Storage.getMutexStoreName(),key:s,value:{name:s,until:o}}}],c)})().catch((function(e){return d().then(n)})).then((function(){r=!0,i=o;var e=(e=new Date(i)).toLocaleTimeString("en-GB")+"."+("00"+e.getMilliseconds()).slice(-3);return Promise.resolve()}),(function(){return r=!1,Promise.reject()})))},this.renewWhile=function(t,o){return(t=t||{}).ttl=t.ttl||a,t.interval=t.interval||t.ttl/2,e._protected.Promise.setIntervalUntilSettled(o,function(){return this.renew(t.ttl)}.bind(this),t.interval,!1,!1),t.release&&e._protected.Promise.do(o,function(){this.release()}.bind(this)),o},this.renew=function(t){if(!r)throw new e.prototype.Errors.InternalError("Cannot renew unacquired mutex");i<=+new Date&&console.log("Lock",s,"probably expired",+new Date-i,"ms ago"),t=t||a;var o=+new Date+t;return e._protected.Storage.bulk([{test:{store:e._protected.Storage.getMutexStoreName(),key:s,operationsCb:function(t){if(t&&t.name===s&&t.until===i)return{put:{store:e._protected.Storage.getMutexStoreName(),key:s,value:{name:s,until:o}}};console.warn("Lock",s,"has already expired"),r=!1,i=null}}}],c).then((function(){i=o;var e=(e=new Date(i)).toLocaleTimeString("en-GB")+"."+("00"+e.getMilliseconds()).slice(-3)}),(function(e){return console.error("Failed to renew lock",s,":",e),Promise.reject()}))},this.release=function(){if(r)return i<=+new Date&&console.log("Lock",s,"probably expired",+new Date-i,"ms ago"),e._protected.Storage.bulk([{test:{store:e._protected.Storage.getMutexStoreName(),key:s,operationsCb:function(t){if(t&&t.name===s&&t.until===i)return{delete:{store:e._protected.Storage.getMutexStoreName(),key:s}};console.warn("Lock",s,"has already expired"),r=!1,i=null}}}],c).then((function(){r=!1,i=null}),(function(e){return console.error("Failed to release lock",s,":",e),Promise.reject()}));throw new e.prototype.Errors.InternalError("Cannot release unacquired mutex")},function(){var t=+new Date,o=!1;return e._protected.Storage.bulk([{test:{store:e._protected.Storage.getMutexStoreName(),key:s,operationsCb:function(n){if(n&&n.name===s&&n.until{var i=e._protected.Helper.uuidv4();return t[i]||(t[i]=new e._protected.Locking.ExpiringUnfairNamedGlobalMutex(o,n,r)),Promise.resolve(i)},this.acquire=(e,o)=>t[e].acquire(o),this.tryAcquire=(e,o)=>t[e].tryAcquire(o),this.renew=(e,o)=>t[e].renew(o),this.release=e=>t[e].release()})},t=e._protected.Locking,e._protected.Locking={getModuleInitializationPromise:t.getModuleInitializationPromise,remoteMutexManager:t.remoteMutexManager},o(),n.promise}}.apply(t,[]),void 0!==t&&(e.exports=t)},949:(e,t)=>{t=function(){return function(e){function t(){var e=JSON.parse(JSON.stringify(n));return delete e._mergeStoredOptions,delete e._mode,delete e._popup,delete e._hiddenFrame,delete e._syncInit,e}var o="[options ]",n=JSON.parse(JSON.stringify(e._protected.options||{})),r=t(),i=(Object.freeze(r),delete e._protected.options,new e._protected.Promise.Deferred);return e._protected.Options=new function(){var s=!1,a={webKey:!0,_mode:!0,_hiddenFrame:!0,_popup:!0};function c(t,r){return s||t in a||e._protected.Helper.warn(o,new e._protected.Errors.InternalOptionsNotYetAvailableError("Option "+t+" read before options get filled")),e._protected.Helper.plainObjectCopy(t in n?n[t]:r)}function d(t){return s||t in a||e._protected.Helper.warn(o,new e._protected.Errors.InternalOptionsNotYetAvailableError("Option "+t+" tested before options get filled")),t in n}function p(e){delete n[e]}e.preInstantiationPromise.then((function(){d.debug&&e._protected.Helper.debug(o,"storage module initialization…"),e._protected.Storage.getModuleInitializationPromise().then((function(){if(d.debug&&e._protected.Helper.debug(o,"storage module initialization resolved"),e._protected.Storage.isDefaultContainerAvailable())return e._protected.RunModes.Behaviors.ModeServiceWorker||!0===n._mergeStoredOptions?(d.debug&&e._protected.Helper.debug(o,"read stored options…"),e._protected.Storage.get("options",{webKey:n.webKey}).then((function(i){d.debug&&e._protected.Helper.debug(o,"read stored options resolved",i),e._protected.Helper.mergeObjectInplaceRecursive(i,n),!0===(n=i)._mergeStoredOptions&&(r=t(),Object.freeze(r))}))):void 0;s=!0,i.resolve(),d.debug&&e._protected.Helper.debug(o,"module initialized without Storage support")})).then((function(){s=!0,e._protected.Helper._debugResolved(),d.debug&&e._protected.Helper.debug(o,"options:",n),d.debug&&e._protected.Helper.debug(o,"module initialized")})).then((function(){if(e._protected.RunModes.Behaviors.ModeFrame||e._protected.RunModes.Behaviors.ModeWebSite&&e._protected.Integration.isOnRightDomain())return d.debug&&e._protected.Helper.debug(o,"storing options…",r),e._protected.Storage.set("options",r).then((function(){d.debug&&e._protected.Helper.debug(o,"storing options resolved")}))})).then((()=>{i.resolve()}))})),this.get=c,this.has=d,this.getModuleInitializationPromise=function(){return i.promise},this.exportCurrent=t,this.exportInitial=function(){return e._protected.Helper.plainObjectCopy(r)},this.merge=function(t,r){d.debug&&e._protected.Helper.debug(o,"merging",n,"with default =",t,"and override =",r),n=e._protected.Options._merge3Way(JSON.parse(JSON.stringify(t||{})),JSON.parse(JSON.stringify(n||{})),JSON.parse(JSON.stringify(r||{}))),d.debug&&e._protected.Helper.debug(o,"merged options =",n)},this._merge3Way=function(t,o,r){return t=JSON.parse(JSON.stringify(t)),e._protected.Helper.mergeObjectInplaceRecursive(t,JSON.parse(JSON.stringify(n))),e._protected.Helper.mergeObjectInplaceRecursive(t,JSON.parse(JSON.stringify(r))),t},this.isDebug=function(){return!!c("debug",!1)},this.getFrameUrl=function(){return c("frameUrl",e._protected.Constants.FRAME_URL)},this.getServiceWorkerUrl=function(){return c("serviceWorkerUrl",e._protected.Constants.SERVICE_WORKER_URL)},this.getWebKey=function(){return c("webKey")},this.getTranslations=function(){return c("translations")||{}},this.getServiceWorkerScope=function(){return c("serviceWorkerScope")},this.getRedirectionPageUrl=function(t){var o=c("redirectionPageUrl",e._protected.Constants.REDIRECT_URL);return t?o.replace("${url}",encodeURIComponent(t)):o},this.get_mode=function(){return void 0===c("_mode")?e._protected.gscope.ServiceWorkerGlobalScope?e._protected.RunModes.Modes.ServiceWorker:e._protected.Options.get_hiddenFrame()?e._protected.RunModes.Modes.Frame:e._protected.Options.get_popup()?e._protected.RunModes.Modes.Popup:e._protected.RunModes.Modes.WebSite:c("_mode")},this.remove_mode=function(){return e._protected.Options.remove_hiddenFrame(),e._protected.Options.remove_popup(),p("_mode")},this.get_hiddenFrame=function(){return c("_hiddenFrame")},this.remove_hiddenFrame=function(){return p("_hiddenFrame")},this.get_popup=function(){return c("_popup")},this.remove_popup=function(){return p("_popup")},this.getLanguage=function(){return c("language")},this.getResubscribe=function(){var e=c("resubscribe");return void 0===e||e}},e._protected.RunModes.setCurrentMode(e._protected.Options.get_mode()),e._protected.Options.remove_mode(),i.promise}}.apply(t,[]),void 0!==t&&(e.exports=t)},8303:(e,t)=>{t=function(){function e(){}Function.prototype.bind||(Function.prototype.bind=function(e){function t(){return n.apply(this instanceof r?this:e,o.concat(Array.prototype.slice.call(arguments)))}var o=Array.prototype.slice.call(arguments,1),n=this,r=function(){};return r.prototype=this.prototype,t.prototype=new r,t}),Object.freeze||(Object.freeze=function(e){return e}),"function"!=typeof Object.create&&(Object.create=function(t){if(1{t=function(){return function(e){var t;"undefined"!=typeof Promise&&(t=function(){},e._protected.Promise={setIntervalUntilSettled:function(t,o,n,r,i){function s(){c=!0}function a(){var i;if(!c)return r?i=o():r=!0,e._protected.Promise.catchNoop(Promise.all([i]).then((function(){return e._protected.Promise.catchNoop(Promise.race([t,new e._protected.Promise.DelayedStartPromise((function(e,t){e(a())}),n)]))})))}var c=!1;return t.then(s,s),i?a():setTimeout(a,0),t},DelayedResultPromise:function(t,o){return new Promise((function(n,r){return t(e._protected.Function.delay(n,o),e._protected.Function.delay(r,o))}))},DelayedStartPromise:function(e,t){return new Promise((function(o,n){var r=this;setTimeout((function(){try{e.call(r,o,n)}catch(e){n(e)}}),t)}))},Poll:function(t,o,n){var r=new e._protected.Promise.Deferred,i=+new Date,s=function(){if(+new Date-i>o)r.reject(new e.prototype.Errors.TimeoutError);else{var a;try{a=!!t()}catch(a){return void r.reject(a)}a?r.resolve():setTimeout(s,n)}};s(),this.wait=function(){return r.promise},this.cancel=function(){r.reject(new e.prototype.Errors.CancellationError)}},Deferred:function(){try{this.resolve=null,this.reject=null,this.promise=new Promise(function(e,t){this.resolve=e,this.reject=t}.bind(this)),Object.freeze(this)}catch(t){throw new e.prototype.Errors.InternalError("Promise/Deferred is not available")}},DynamicPromise:function(){let e,t,o,n=(Object.defineProperty(this,"pending",{get:()=>!!t||!!o}),()=>{t=void 0,o=void 0});this.setPending=()=>{this.pending||(e=new Promise(((e,r)=>{t=t=>{n(),e(t)},o=e=>{n(),r(e)}})))},this.setResolved=o=>{t&&this.pending?t(o):e=Promise.resolve(o)},this.setRejected=t=>{o&&this.pending?o(t):e=Promise.reject(t)},Object.defineProperty(this,"promise",{get:()=>e}),this.setPending()},allTimeout:function(t,o,n){var r={},i=t.map((function(){return n}));return e._protected.Promise.timeout(Promise.all(t.map((function(e,t){return e.then((function(e){i[t]=e}))}))),o,r).then((function(){return i}),(function(e){return e===r?Promise.resolve(i):Promise.reject(e)}))},delay:function(t,o){var n=t;return new e._protected.Promise.DelayedStartPromise((function(e,t){n.then(e,t)}),o)},timeout:function(t,o,n,r){return void 0===o?t:Promise.race([t,new e._protected.Promise.DelayedStartPromise((function(e,t){(r?e:t)(n)}),o)])},do:function(e,t){return e.then((function(e){try{t()}catch(e){}return Promise.resolve(e)}),(function(e){try{t()}catch(e){}return Promise.reject(e)}))},log:function(e,t){var o=t?function(e){console.log(t,e)}:function(e){console.log(e)};return e.then((function(e){return o(e),Promise.resolve(e)}),(function(e){return o(e),Promise.reject(e)}))},catchNoop:function(e){return e.catch(t)}})}}.apply(t,[]),void 0!==t&&(e.exports=t)},6779:(e,t)=>{t=function(){return function(e){var t=[];const o=o=>{t.forEach((t=>{try{t(o)}catch(t){e._protected.Helper.error("[request ]","error running global handler",t,o)}}))};e._protected.Request=new function(){this.request=function(t,n,r,i,s,a,c){c=c||{},a=a||{},d=t,p=n;var d,p,u,l="function"!=typeof XMLHttpRequest&&"function"!=typeof XDomainRequest?null:("withCredentials"in(u=new XMLHttpRequest)?u.open(d,p,!0):"undefined"!=typeof XDomainRequest?(u=new XDomainRequest).open(d,p):u=null,u);if(!(l&&!0!==c.fetch||"function"!=typeof fetch)){var g={};if(g.method=t||"GET",g.mode="cors",i?g.body=i:r&&(g.body=r),s)for(var h in g.headers=new Headers,s)g.headers.append(h,s[h]);var f="function"==typeof a.onload?a.onload:function(){},_=e=>{o(e),"function"==typeof a.onerror&&a.onerror(e)};return fetch(n,g).then((function(t){const o=new e._protected.Promise.Deferred;if(t.text().then((t=>{let n;o.resolve(t);try{n=JSON.parse(t)}catch(t){return}const r=n?n._configVersion:void 0;r&&e._protected.Config.getModuleInitializationPromise().then((()=>e._protected.Config.remoteConfigManager.declareVersion(r.toString())))}),(e=>{o.reject(e)})),t.json=()=>o.promise.then(JSON.parse),t.text=()=>o.promise,0===t.status||200<=t.status&&t.status<=299)return f(t),t;throw _(t),t}),(function(e){throw _(e),e}))}if(l){if(l.timeout=e._protected.Constants.REQUEST_TIMEOUT_MS,s)for(var h in s)l.setRequestHeader(h,s[h]);a&&["onerror","ontimeout","onabort","onloadend"].forEach((function(e){a[e]&&(l[e]=a[e])})),l.onerror=function(e){o(e),"function"==typeof a.onerror&&a.onerror.apply(this,arguments)},l.onload=function(){if(a){try{l.responseJSON=e._protected.Helper.tryParse(this.responseText,null);const t=l.responseJSON?l.responseJSON._configVersion:void 0;t&&e._protected.Config.getModuleInitializationPromise().then((()=>e._protected.Config.remoteConfigManager.declareVersion(t.toString())))}catch(t){}var t=this.status;200<=t&&t<=299&&a.onload?a.onload.apply(this,arguments):a.onerror&&(o(arguments[0]),a.onerror.apply(this,arguments))}},l.onloadend=function(){a.onloadend&&a.onloadend.apply(this,arguments)},"POST"===t||"PATCH"===t?l.send(r):l.send()}},this.requestEventually=function(t,o,n,r,i){if(e._protected.RunModes.Behaviors.AccessToken&&e._protected.Integration.isOnRightDomain())return t=new e._protected.RequestVaultJob([t,o,n,r,i]),e._protected.RequestVault.run(t);throw new e.prototype.Errors.InternalError("Should not be called in this environment")},this.addGlobalErrorHandler=e=>{t.push(e)},this.removeGlobalErrorHandler=e=>{t=t.filter((t=>t!==e))}}}}.apply(t,[]),void 0!==t&&(e.exports=t)},355:(e,t)=>{t=function(){return function(e){var t=new e._protected.Promise.DynamicPromise;e._protected.RequestVault={JOB_STATUS_QUEUED:"queued",JOB_STATUS_RUNNING:"running",JOB_STATUS_PERFORMED:"performed",jobTypes:{},waitUntilEmptyPromise:function(){return t.promise},run:function(e){return this._queue(e).then(function(){this._execute(e)}.bind(this))},_queue:function(o){var n=Math.floor(1e10*Math.random());return e._protected.Storage.bulk([{test:{key:"requestVaultJobs",defaultValue:{},operationsCb:function(e){for(;n in e;)n=Math.floor(1e10*Math.random());return e[o._jid=n]=this.serialize(o),o._jid=null,t.setPending(),{put:{key:"requestVaultJobs",value:e}}}.bind(this)}}]).then((function(){o._jid=n}))},_update:function(o){return e._protected.Storage.bulk([{test:{key:"requestVaultJobs",defaultValue:{},operationsCb:function(e){return o._jid in e?(o.getStatus()===this.JOB_STATUS_PERFORMED?(delete e[o._jid],0===Object.entries(e).length&&t.setResolved()):e[o._jid]=this.serialize(o),{put:{key:"requestVaultJobs",value:e}}):{abort:{}}}.bind(this)}}]).then((function(){}))},_unqueue:function(o){return(o=o instanceof Array?o:[o]).length?e._protected.Storage.bulk([{test:{key:"requestVaultJobs",defaultValue:{},operationsCb:function(e){for(var n=0;n=s.getWaitUntilDate()?this._executing[s._jid]||this._execute(s):n=Math.min(n,s.getWaitUntilDate());break;case this.JOB_STATUS_RUNNING:o>=s.getRunningSinceDate()+e._protected.Constants.REQUEST_VAULT_RUNNING_JOB_TIMEOUT_MS&&(this._executing[s._jid]||this._execute(s))}}return this._unqueue(i)}.bind(this))),function(){var e=n-o;e+=100+Math.round(1e3*Math.random()),setTimeout(this._runQueued.bind(this),e)}.bind(this))}.bind(this),function(){var t=Math.round(e._protected.Constants.REQUEST_VAULT_IDLE_WAIT_MS*(1+.2*Math.random()));setTimeout(this._runQueued.bind(this),t)}.bind(this))},_executing:{},_execute:function(t){e._protected.Blocker.category("requestvault").wait().then((()=>{var o,n;return!this._executing[t._jid]&&(t.getStatus()!==this.JOB_STATUS_RUNNING||+new Date>=t.getRunningSinceDate()+e._protected.Constants.REQUEST_VAULT_RUNNING_JOB_TIMEOUT_MS)?(this._executing[t._jid]=!0,o=e._protected.Constants.REQUEST_VAULT_RUNNING_JOB_TIMEOUT_MS,n=new e._protected.Locking.ExpiringUnfairNamedGlobalMutex("requestvault-job-"+t._jid,o),e._protected.Promise.do(n.tryAcquire().then(function(){return t.setStatus(this.JOB_STATUS_RUNNING),e._protected.Promise.do(this._update(t).then(function(){return e._protected.Promise.do(t.run().then((function(){}),(function(){})),function(){this._update(t)}.bind(this))}.bind(this)),(function(){return n.release()}))}.bind(this),(function(){})),function(){delete this._executing[t._jid]}.bind(this))):void 0}))},_init:function(){e._protected.Locking.getModuleInitializationPromise().then(function(){e._protected.Locking.isAvailable()&&this._runQueued()}.bind(this))},serialize:function(e){return e.toJSONObject()},unserialize:function(t){"string"==typeof t&&((t=JSON.parse(t)).v=t.v||1,t.status=t.status||e._protected.RequestVault.JOB_STATUS_QUEUED,t.id=t.id||Math.floor(1e10*Math.random()));var o=t.type;return this.jobTypes[o].fromJSONObject(t)}},e._protected.RequestVaultJob=function(t){var o,n=e._protected.RequestVault.JOB_STATUS_QUEUED,r=+new Date,i=0,s=0,a=this,c={onload:function(){a.setStatus(e._protected.RequestVault.JOB_STATUS_PERFORMED),o.resolve(),o=void 0},onerror:function(t){t&&t.target&&(0===t.target.status||e._protected.Helper.inArray(t.target.status,[500,503]))||"undefined"!=typeof TypeError&&t instanceof TypeError?(a.setWaitUntilDate(e._protected.Constants.REQUEST_VAULT_ERROR_WAIT_MS+ +new Date),a.setStatus(e._protected.RequestVault.JOB_STATUS_QUEUED)):a.setStatus(e._protected.RequestVault.JOB_STATUS_PERFORMED),o.resolve(),o=void 0},ontimeout:function(){a.setWaitUntilDate(e._protected.Constants.REQUEST_VAULT_ERROR_WAIT_MS+ +new Date),a.setStatus(e._protected.RequestVault.JOB_STATUS_QUEUED),o.resolve(),o=void 0},onabort:function(){a.setWaitUntilDate(e._protected.Constants.REQUEST_VAULT_ERROR_WAIT_MS+ +new Date),a.setStatus(e._protected.RequestVault.JOB_STATUS_QUEUED),o.resolve(),o=void 0}},d=t.slice();d.push(c),this._jid=null,this.getStatus=function(){return n},this.setStatus=function(t){2===(t=1===(t=0===t?e._protected.RequestVault.JOB_STATUS_QUEUED:t)?e._protected.RequestVault.JOB_STATUS_RUNNING:t)&&(t=e._protected.RequestVault.JOB_STATUS_PERFORMED),n=t},this.getCreationDate=function(){return r},this.setCreationDate=function(e){r=e},this.getWaitUntilDate=function(){return i},this.setWaitUntilDate=function(e){i=e||0},this.getRunningSinceDate=function(){return s},this.setRunningSinceDate=function(e){s=e||0},this.run=function(){return o||(o=new e._protected.Promise.Deferred,s=+new Date,e._protected.Request.request.apply(e._protected.Request.request,d)),o.promise},this.toJSONObject=function(){return{type:"RequestVaultJob",v:1,id:a._jid,status:n,creationDate:r,waitUntilDate:i,runningSinceDate:s,args:t}}},e._protected.RequestVaultJob.fromJSONObject=function(t){var o=new e._protected.RequestVaultJob(t.args);return o._jid=t.id,o.setStatus(t.status),t.creationDate&&o.setCreationDate(t.creationDate),o.setWaitUntilDate(t.waitUntilDate),o.setRunningSinceDate(t.runningSinceDate),o},e._protected.RequestVault.jobTypes.RequestVaultJob=e._protected.RequestVaultJob,e.preInstantiationPromise.then((function(){e._protected.RunModes.Behaviors.AccessToken&&e._protected.Integration.getModuleInitializationPromise().then((function(){e._protected.Integration.isOnRightDomain()&&e._protected.RequestVault._init()}))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},551:(e,t)=>{t=function(){return function(e){var t=1{t=function(){return function(e){var t;e._protected.ServiceWorkerClient=new function(){var o=[],n=(t=function(){e._protected.Integration.getModuleInitializationPromise().then((function(){e._protected.RunModes.Behaviors.RegisterServiceWorker&&e._protected.Helper.supportsServiceWorker()&&"https:"===location.protocol&&n()}))},function(){addEventListener("message",r),navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",r)}),r=(this.isCurrentURLInScope=()=>{var t=e._protected.Integration.getServiceWorkerUrl(),o=e._protected.Options.getServiceWorkerScope();return o=new URL("./",o?new URL(o,e._protected.Integration.getHomeHref()).href:t),new URL("./",location.href).href.startsWith(o.href)},this.registerServiceWorker=function(){var t=e._protected.Integration.getServiceWorkerUrl(),o={scope:e._protected.Options.getServiceWorkerScope()};return e._protected.Options.getResubscribe()&&navigator.serviceWorker?navigator.serviceWorker.register(t,o).catch((function(e){})).then((function(e){return e}),(function(e){if(console.error("Cannot register the ServiceWorker / no ServiceWorker ready",e),e)throw e})):new Promise(((e,t)=>{}))}.bind(this),this.getPushSubscriptionAndRegisterServiceWorkerIfNecessary=e._protected.Integration.proxifyToCustomDomain("SDK._protected.ServiceWorkerClient.getPushSubscriptionAndRegisterServiceWorkerIfNecessary",function(){return navigator.serviceWorker?this.isCurrentURLInScope()&&!navigator.serviceWorker.controller?Promise.resolve(null):e._protected.ServiceWorkerClient.registerServiceWorker().then((function(e){return e.pushManager.getSubscription()})):new Promise(((e,t)=>{}))}.bind(this)),this.getPushSubscriptionFromServiceWorker=e._protected.Integration.proxifyToServiceWorker("SDK._protected.ServiceWorkerClient.getPushSubscriptionFromServiceWorker",(function(){return"granted"!==Notification.permission?Promise.resolve(null):registration.pushManager.getSubscription()})),function(t){("undefined"==typeof ServiceWorkerMessageEvent||t instanceof ServiceWorkerMessageEvent)&&(t.data instanceof Object&&t.data.sdk!==e._protected.sdkName&&"ping"===t.data.type&&"ports"in t&&0{t=function(){return function(e){var t;e._protected.RunModes.Behaviors.ContextServiceWorker&&(t=e._protected.gscope,e._protected.ServiceWorker=new function(){this.addEventListener=t._wp_worker_addEventListener||function(e,o){t.addEventListener(e,(function(e){var t=o(e);t instanceof Promise&&e.waitUntil(t)}))},this.removeEventListener=t._wp_worker_removeEventListener||function(e,o){t.removeEventListener(e,o)};var o=function(){this.addEventListener("message",(function(t){return e.instantiationPromise.then((function(){r(t)}))}))}.bind(this),n=[],r=function(e){e.data instanceof Object&&(e.data.type,n.forEach((function(t){try{t.call(this,e)}catch(t){console.error("ServiceWorker message handler threw",t)}})))};this.addMessageEventListener=function(e){n.push(e)},this.removeMessageEventListener=function(e){0<=(e=n.indexOf(e))&&n.splice(e,1)},o()})}}.apply(t,[]),void 0!==t&&(e.exports=t)},3244:(e,t,o)=>{o=[o(949)],t=function(e){return function(e){function t(t){t&&t.then?a=t.then(function(e){return o=(r=e)&&r.name,this}.bind(this)):o=t;var o,r,a,c=function(t){e._protected.Helper.warn(t),r&&(r.close(),a=r=void 0)}.bind(this),d=(this.ready=function(){return a=a||function(t,o){var r,a=new e._protected.Promise.Deferred;try{r=e._protected.gscope.indexedDB.open(t,1)}catch(t){return"SecurityError"===t.name?e._protected.Helper.warn(n,"Could not open IndexedDB: cross-site tracking is probably disabled",t):e._protected.Helper.warn(n,"Could not open IndexedDB, the WonderPush SDK will not initialize",t),new Promise((()=>{}))}var c=!1;return r.onupgradeneeded=function(t){c=!0;var o=t.target.result;if(1!==t.newVersion)throw new e._protected.Errors.InternalStorageError("Updating from version "+t.oldVersion+" to version "+t.newVersion+", but dbVersion in code is 1");var r=t.oldVersion,a=[];a.push((function(){0===r&&(++r,o.createObjectStore(i),o.createObjectStore(s)),this.onsuccess()})),a.push((function(){var o;if(1!==r)throw o="IndexedDB upgrade chain from version "+t.oldVersion+" to version "+t.newVersion+" broken at version "+r,e._protected.Helper.error(n,o),new e._protected.Errors.InternalStorageError(o);c=!1}));for(var d=a.length-2;0<=d;--d){var p=a[d],u=a[d+1];p.onsuccess=u.bind(u),p.onerror=a[a.length-1]}a[0].bind(a[0])()},r.onerror=function(o){r.error&&"InvalidStateError"===r.error.name?e._protected.Helper.debug(n,"Could not open database",r.error):(e._protected.Helper.error(n,"failed to initialize IndexedDB storage",t,o,r.error),a.reject(r.error))},r.onsuccess=function(t){c&&a.reject(new e._protected.Errors.InternalStorageError("Module storage initialization failed: error encountered or broken upgrade chain")),t=t.target.result,Promise.resolve(e._protected.Storage.onDbOpen(t)).then(a.resolve.bind(null,t),a.resolve.bind(null,t))},a.promise}(o).then(function(e){return(r=e).addEventListener("close",c),r.addEventListener("abort",c),this}.bind(this))},this.getKeyValueStorageStoreName=function(){return i},this.getMutexStoreName=function(){return s},this.get=function(e,t){return d({get:{key:e,defaultValue:t}})},this.set=function(e,t){return d({put:{key:e,value:t}})},this.rm=function(e){return d({delete:{key:e}})},function(e){return this.bulk([e]).then((function(e){return e.results.byIndex[0]}))}.bind(this));this.bulk=function(t,o){t=t.slice(),o=o||{};var s=new e._protected.Promise.Deferred,a=[],c={},d=Object.keys(t.reduce((function(e,t){return e[t[Object.keys(t)[0]].store||i]=!0,e}),{})),p={test:!0,add:!0,put:!0,delete:!0},u=t.find((function(e){return!!p[Object.keys(e)[0]]}))?"readwrite":"readonly",l=null;try{l=r.transaction(d,u,{durability:"relaxed"})}catch(d){if("InvalidStateError"!==d.name)throw d;{e._protected.Helper.warn(n,d);var g=o.tries||1;if(3<=g)return Promise.reject(d);var h=1e3*Math.pow(2,g-1)*(1+.2*Math.random());e._protected.Helper.info(n,"Reopening IDBDatabase connection in ",h,"ms, cause:",d.message);const r=this;return new Promise((function(e,n){setTimeout((function(){return r.ready().then((function(){return r.bulk.call(r,t,Object.assign({},o,{tries:g+1}))})).then(e,n)}),h)}))}}var f=d.reduce((function(e,t){return e[t]=l.objectStore(t),e}),{}),_=function(o){for(var n=!1,r=o;!n&&r{o=[o(7583),o(559),o(4671),o(9534),o(6303),o(3650)],t=function(){var e=Array.prototype.slice.call(arguments);return function(t){e.forEach((e=>e(t)))}}.apply(t,o),void 0!==t&&(e.exports=t)},7583:(e,t)=>{t=function(){return function(e){e._protected.Plugins.preregisterInlinedPlugin("optin-automatic","1.0.6",(function(){WonderPush.registerPlugin("optin-automatic",(function(e,t){function o(e){e instanceof WonderPush.Errors.UserCancellationError||e instanceof WonderPush.Errors.PermissionError?console.warn(e):console.error(e)}var n=!!(t=t||{}).noDialog,r=navigator.userAgent.startsWith("Mozilla/5.0 (Linux; Android"),i=void 0!==e.detectBrowser?e.detectBrowser():{};t.triggers&&(t.triggers.waitForUserActivation="Safari"===i.name),r&&((i=document.createElement("style")).type="text/css",i.appendChild(document.createTextNode('/**\n * WonderPush Web SDK Plugin: optin-automatic\n * Package: wonderpush-webplugin-optin-automatic\n * Version: 1.0.6\n * Description: WonderPush Web SDK plugin to automatically present the user a prompt for push permission with a configurable trigger.\n *\n * Copyright 2023 WonderPush\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n#wp-slidedown-container.wp-slide-up{bottom:0}#wp-slidedown-container.wp-slide-down{top:0;bottom:unset}#wp-slidedown-container.wp-slide-down #wp-slidedown-dialog{border-bottom-left-radius:unset;border-bottom-right-radius:unset;width:500px;-webkit-animation-name:wpSlideDownEnter;-webkit-animation-iteration-count:1;-webkit-animation-timing-function:ease-out;-webkit-animation-duration:.4s;-webkit-animation-fill-mode:forwards;animation-name:wpSlideDownEnter;animation-iteration-count:1;animation-timing-function:ease-out;animation-duration:.4s;animation-fill-mode:forwards}#wp-slidedown-container.wp-slide-up #wp-slidedown-dialog{border-bottom-left-radius:unset;border-bottom-right-radius:unset;width:100%;-webkit-animation-name:wpSlideUpEnter;-webkit-animation-iteration-count:1;-webkit-animation-timing-function:ease-out;-webkit-animation-duration:.4s;-webkit-animation-fill-mode:backwards;animation-name:wpSlideUpEnter;animation-iteration-count:1;animation-timing-function:ease-out;animation-duration:.4s;animation-fill-mode:backwards}#wp-slidedown-container.wp-slide-down.wp-close-slidedown #wp-slidedown-dialog{-webkit-animation-name:wpSlideDownExit;-webkit-animation-iteration-count:1;-webkit-animation-timing-function:ease-out;-webkit-animation-duration:.4s;-webkit-animation-fill-mode:forwards;animation-name:wpSlideDownExit;animation-iteration-count:1;animation-timing-function:ease-out;animation-duration:.4s;animation-fill-mode:forwards}#wp-slidedown-container.wp-slide-up.wp-close-slidedown #wp-slidedown-dialog{-webkit-animation-name:wpSlideUpExit;-webkit-animation-iteration-count:1;-webkit-animation-timing-function:ease-out;-webkit-animation-duration:.4s;-webkit-animation-fill-mode:forwards;animation-name:wpSlideUpExit;animation-iteration-count:1;animation-timing-function:ease-out;animation-duration:.4s;animation-fill-mode:forwards}#wp-slidedown-container{font-size:16px;position:fixed;z-index:2258594000;left:0;right:0;-webkit-font-smoothing:initial}#wp-slidedown-container #wp-slidedown-dialog{box-sizing:border-box;max-width:100%;margin:0 auto;box-shadow:0 1px 6px rgba(5,27,44,.06),0 2px 32px rgba(5,27,44,.16)!important;background:#fff!important;color:#051b2c;padding:1.5em 1.5em;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Seoe UI Symbol"}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-body{box-sizing:border-box;margin:0}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-body-icon{box-sizing:border-box;float:left;width:80px;height:80px;position:relative}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-body-icon img{width:100%;height:100%}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-body-message{box-sizing:border-box;padding:0 0 0 1em;font-weight:400;float:left;width:calc(100% - 80px);line-height:1.45em;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;color:#051b2c!important}#wp-slidedown-container #wp-slidedown-dialog button{box-sizing:border-box;display:inline-block;padding:.375rem 1rem;font-size:.9625em;font-weight:400;line-height:1.5;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:.25rem;font-family:inherit;letter-spacing:.05em;transition:background-color 75ms ease;margin:0}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-button.wp-primary{background:#0078d1;color:#fff!important;transition:linear 75ms}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-button.wp-primary:hover{background:#0062ab}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-button.wp-primary:active{background:#004c85}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-button.wp-primary.disabled{background-color:#ced3d8;cursor:default}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-button.wp-secondary{box-shadow:none;background:#fff!important;color:#0078d1!important}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-button.wp-secondary:hover{color:#005391}#wp-slidedown-container #wp-slidedown-dialog .wp-slidedown-button.wp-secondary:active{color:#001f35}#wp-slidedown-container #wp-slidedown-dialog .wp-primary.wp-slidedown-button+.wp-secondary.wp-slidedown-button{margin-right:.714em}#wp-slidedown-container #wp-slidedown-dialog .wp-align-right{float:right}#wp-slidedown-container #wp-slidedown-dialog .wp-clearfix{display:block;-webkit-backface-visibility:initial!important;backface-visibility:initial!important}#wp-slidedown-container #wp-slidedown-dialog .wp-clearfix:after{content:\'\';display:block;height:0;clear:both;visibility:hidden}@keyframes wpSlideUpEnter{0%{transform:translateY(150%)}100%{transform:translateY(0)}}@keyframes wpSlideUpExit{0%{transform:translateY(0)}100%{transform:translateY(150%)}}@keyframes wpSlideDownEnter{0%{transform:translateY(-150%)}100%{transform:translateY(0)}}@keyframes wpSlideDownExit{0%{transform:translateY(0)}100%{transform:translateY(-150%)}}')),document.head.appendChild(i)),e.waitTriggers(t.triggers).then((function(){if(!n&&r){if(window.WonderPush&&((p=window.WonderPush.Notification.getSubscriptionState())===window.WonderPush.SubscriptionState.SUBSCRIBED||p===window.WonderPush.SubscriptionState.UNSUPPORTED||p===window.WonderPush.SubscriptionState.DENIED))return;function i(e){return s.hasOwnProperty(a)&&s[a][e]?s[a][e]:e}var s={fr:{"We'd like to show you notifications for the latest news and updates.":"Recevoir les notifications pour être tenu informé des dernières nouveautés.",Cancel:"Refuser",Allow:"Accepter"}},a=(e.getLocales&&e.getLocales()||[]).map((function(e){return e.split(/[-_]/)[0]}))[0]||(navigator.language||"").split("-")[0],c=document.createElement("div");function d(){c.classList.add("wp-close-slidedown"),setTimeout((function(){c.parentNode&&c.parentNode.removeChild(c)}),400)}c.className="wp-slidedown-container "+(window.matchMedia("only screen and (min-width : 600px)").matches?"wp-slide-down":"wp-slide-up"),c.id="wp-slidedown-container",c.innerHTML='
';var p=t.icon||e.getNotificationIcon(),u=c.querySelector(".wp-slidedown-body-icon"),l=(p&&u?((l=document.createElement("img")).src=p,u.appendChild(l)):u&&u.parentNode.removeChild(u),(p=c.querySelector(".wp-slidedown-body-message"))&&(p.innerText=t.message||i("We'd like to show you notifications for the latest news and updates.")),c.querySelector("#wp-slidedown-cancel-button"));function g(){document.body.appendChild(c)}l&&(l.innerText=t.negativeButton||i("Cancel"),l.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),d()}))),(u=c.querySelector("#wp-slidedown-allow-button"))&&(u.innerText=t.positiveButton||i("Allow"),u.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),d(),e.subscribeToNotifications().catch(o)}))),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",g):g()}else e.subscribeToNotifications().catch(o)}))}))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},6303:(e,t)=>{t=function(){return function(e){e._protected.Plugins.preregisterInlinedPlugin("optin-bell","1.1.2",(function(){WonderPush.registerPlugin("optin-bell",{window:function(e,t){if(!e.isNativePushNotificationSupported())return{showBell:function(){},hideBell:function(){},updateTexts:function(){},updateDiscretion:function(){}};function o(e){e instanceof WonderPush.Errors.UserCancellationError||e instanceof WonderPush.Errors.PermissionError?console.warn(e):console.error(e)}function n(e){return s.hasOwnProperty(c)&&s[c][e]?s[c][e]:e}function r(e){return new Promise((function(t,o){var n=function(o){e.removeEventListener("transitionend",n),e.removeEventListener("transitioncancel",n),t()};e.addEventListener("transitionend",n),e.addEventListener("transitioncancel",n)}))}var i,s={fr:{"Manage Notifications":"Gestion des notifications","Your personal notification data:":"Vos données personnelles de notification :","WonderPush fully supports european GDPR":"WonderPush soutient pleinement la RGPD européenne",Clear:"Effacer",Download:"Télécharger","You've blocked notifications":"Vous avez bloqué les notifications",Unsubscribe:"Désinscription","You're subscribed to notifications":"Vous êtes abonné aux notifications",Subscribe:"Je m'abonne","You are not receiving any notifications":"Vous ne recevez pas de notifications",Loading:"Chargement","Click to subscribe to notifications":"Cliquez pour vous abonner aux notifications","You won't receive more notifications":"Vous ne recevrez plus de notifications","Thanks for subscribing!":"Merci de vous être abonné !"},es:{"Manage Notifications":"Administrar notificaciones","Your personal notification data:":"Sus datos personales de notificación :","WonderPush fully supports european GDPR":"WonderPush es totalmente compatible con GDPR europeo",Clear:"Borrar",Download:"Descargar","You've blocked notifications":"Has bloqueado las notificaciones",Unsubscribe:"Darse de baja de las notificaciones","You're subscribed to notifications":"Estás suscrito a notificaciones",Subscribe:"Suscribirse","You are not receiving any notifications":"No está recibiendo ninguna notificación",Loading:"Cargando","Click to subscribe to notifications":"Haga clic para suscribirse a las notificaciones","You won't receive more notifications":"No recibirá más notificaciones","Thanks for subscribing!":"¡Gracias por suscribirse!"},it:{"Manage Notifications":"Gestisci notifiche","Your personal notification data:":"I tuoi dati di notifica personali:","WonderPush fully supports european GDPR":"WonderPush supporta pienamente il GDPR europeo",Clear:"Eliminare",Download:"Scaricare","You've blocked notifications":"Notifiche bloccate",Unsubscribe:"Annulla iscrizione","You're subscribed to notifications":"Sei iscritto alle notifiche",Subscribe:"Mi iscrivo","You are not receiving any notifications":"Non ricevi alcuna notifica",Loading:"Carica","Click to subscribe to notifications":"Fai clic per iscriverti alle notifiche","You won't receive more notifications":"Non riceverai più notifiche","Thanks for subscribing!":"Grazie per esserti iscritto!"},de:{"Manage Notifications":"Benachrichtigungen verwalten","Your personal notification data:":"Ihre persönlichen Benachrichtigungsdaten:","WonderPush fully supports european GDPR":"WonderPush unterstützt die europäische GDPR",Clear:"Klar",Download:"Herunterladen","You've blocked notifications":"Sie haben Benachrichtigungen blockiert",Unsubscribe:"Abbestellen","You're subscribed to notifications":"Sie haben Benachrichtigungen abonniert",Subscribe:"Abonnieren","You are not receiving any notifications":"Sie erhalten keine Benachrichtigungen",Loading:"Wird geladen","Click to subscribe to notifications":"Klicken Sie hier, um Benachrichtigungen zu abonnieren","You won't receive more notifications":"Sie erhalten keine Benachrichtigungen mehr","Thanks for subscribing!":"Danke fürs Abonnieren!"},pt:{"Manage Notifications":"Gerenciar notificações","Your personal notification data:":"Os seus dados de notificação pessoal:","WonderPush fully supports european GDPR":"O WonderPush suporta totalmente o GDPR europeu",Clear:"Clear",Download:"Download","You've blocked notifications":"Você bloqueou as notificações",Unsubscribe:"Cancelar inscrição","You're subscribed to notifications":"Você está inscrito nas notificações",Subscribe:"Inscrever-se","You are not receiving any notifications":"Você não está recebendo nenhuma notificação",Loading:"Loading","Click to subscribe to notifications":"Clique para assinar as notificações","You won't receive more notifications":"Você não receberá mais notificações","Thanks for subscribing!":"Obrigado por se inscrever!"},nl:{"Manage Notifications":"Beheer pushmeldingen","Your personal notification data:":"Uw persoonlijke meldingsgegevens:","WonderPush fully supports european GDPR":"WonderPush ondersteunt de Europese GDPR volledig",Clear:"Clear",Download:"Downloaden","You've blocked notifications":"Je hebt pushmeldingen geblokkeerd",Unsubscribe:"Abonnement opzeggen","You're subscribed to notifications":"U bent aangemeld voor kennisgevingen",Subscribe:"Abonneren","You are not receiving any notifications":"Je ontvangt geen meldingen meer",Loading:"Bezig met laden","Click to subscribe to notifications":"Klik om u te abonneren op meldingen","You won't receive more notifications":"Je ontvangt geen meldingen meer","Thanks for subscribing!":"Bedankt voor het inschrijven!"},pl:{"Manage Notifications":"Zarządzaj powiadomieniami push","Your personal notification data:":"Twoje osobiste dane powiadomień:","WonderPush fully supports european GDPR":"WonderPush w pełni wspiera europejski RODO",Clear:"Wyczyść dane",Download:"Pobierz","You've blocked notifications":"Zablokowałeś powiadomienia",Unsubscribe:"Anuluj subskrypcje","You're subscribed to notifications":"Subskrybujesz powiadomienia",Subscribe:"Subskrybuj","You are not receiving any notifications":"Nie otrzymujesz żadnych powiadomień",Loading:"Ładowanie","Click to subscribe to notifications":"Kliknij, aby zasubskrybować powiadomienia","You won't receive more notifications":"Nie będziesz otrzymywać więcej powiadomień","Thanks for subscribing!":"Dzięki za subskrypcję!"}},a="wonderpush-",c=(e.getLocales&&e.getLocales()||[]).map((function(e){return e.split(/[-_]/)[0]}))[0]||(navigator.language||"").split("-")[0],d=((t=t||{}).cssPrefix&&(a=t.cssPrefix),(i=document.createElement("style")).type="text/css",i.appendChild(document.createTextNode(".wonderpush-hidden{display:none!important}.wonderpush-bell{z-index:10000;direction:ltr;color:#333;font:13px arial;position:fixed;bottom:20px;left:20px;display:flex;justify-content:flex-start;align-items:center;height:44px;transition:all .2s ease-in;transform-origin:center}.wonderpush-bell div:empty{display:revert}.wonderpush-bell.wonderpush-deactivated{transform:scaleY(0)}.wonderpush-bell a{color:#ff6f61!important;text-decoration:none!important}.wonderpush-bell .wonderpush-collapsed{transform:scale(0)!important;box-shadow:0 0 0 transparent!important}.wonderpush-bell.wonderpush-discrete{height:33px}.wonderpush-bell.wonderpush-discrete .wonderpush-icon-container{border-radius:16.5px;width:33px;opacity:.5}.wonderpush-bell.wonderpush-discrete:hover{height:44px}.wonderpush-bell.wonderpush-discrete:hover .wonderpush-icon-container{border-radius:22px;width:44px;opacity:1}.wonderpush-bell .wonderpush-icon-container{cursor:pointer;transform-origin:center center;transform:scale(1);transition:all .2s ease-in;width:44px;height:100%;border-radius:22px;background:#ff6f61;display:flex;align-items:center;justify-content:center;position:relative}.wonderpush-bell .wonderpush-icon-container .wonderpush-icon{mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center center;-webkit-mask-position:center center;background:#fff;width:60%;height:60%;display:block}.wonderpush-bell .wonderpush-icon-container .wonderpush-icon-badge{transition:transform .2s ease-in-out;transform-origin:center center;transform:scale(1);font-size:.8em;width:1.4em;height:1.4em;display:flex;border-radius:1em;background:#000;border:1px solid #fff;align-items:center;justify-content:center;position:absolute;left:10%;top:10%;color:#fff}.wonderpush-bell .wonderpush-paragraph{transition:transform .2s ease-in-out;transform-origin:left;transform:scale(1);background-color:rgba(0,0,0,.8);color:#fff;font-size:14px;font-family:arial,sans-serif;border-radius:4px;padding:.7em 1em;margin-left:12px;position:relative}.wonderpush-bell .wonderpush-paragraph:after{position:absolute;right:100%;bottom:.77em;border:7px solid transparent;border-right-color:rgba(0,0,0,.8);content:' ';width:0;height:0;box-sizing:border-box}.wonderpush-bell .wonderpush-help{transition:transform .2s ease-in-out;transform-origin:bottom left;transform:scale(1);background-size:contain;border:1px solid #ccc;background-repeat:no-repeat;width:280px;height:200px;position:absolute;left:0;bottom:59px;border-radius:4px;box-shadow:0 0 15px rgba(0,0,0,.4)}.wonderpush-bell .wonderpush-help:after,.wonderpush-bell .wonderpush-help:before{position:absolute;top:100%;left:11px;border:11px solid transparent;border-top-color:#fff;content:' ';width:0;height:0;box-sizing:border-box}.wonderpush-bell .wonderpush-help:before{left:10px;border-width:12px;border-top-color:#ccc}.wonderpush-bell .wonderpush-help:not(.wonderpush-collapsed)[style*=\"--uncollapsed-background-image\"]{background-image:var(--uncollapsed-background-image)}.wonderpush-bell .wonderpush-dialog{transition:transform .2s ease-in-out;transform-origin:bottom left;transform:scale(1);position:absolute;width:max-content;min-width:240px;left:0;bottom:59px;border:1px solid #ccc;border-radius:4px;background:#fff;box-shadow:0 0 15px rgba(0,0,0,.4)}.wonderpush-bell .wonderpush-dialog:after,.wonderpush-bell .wonderpush-dialog:before{position:absolute;top:100%;left:11px;border:11px solid transparent;border-top-color:#fff;content:' ';width:0;height:0;box-sizing:border-box}.wonderpush-bell .wonderpush-dialog:before{left:10px;border-width:12px;border-top-color:#ccc}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-title{color:#333;font-weight:700;text-align:center;font-size:1.1em;padding:1em;border-bottom:1px solid #e0e0e0}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-button-container{margin:10px;display:flex;justify-content:stretch;align-items:center}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-settings-button{width:25px;height:25px;background-color:#aaa;transition:background-color .3s ease-in-out;mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgdmlld0JveD0iMCAwIDQ4IDQ4Ij4KICAgIDxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPgogICAgPHBhdGggZD0iTTM4Ljg2IDI1Ljk1Yy4wOC0uNjQuMTQtMS4yOS4xNC0xLjk1cy0uMDYtMS4zMS0uMTQtMS45NWw0LjIzLTMuMzFjLjM4LS4zLjQ5LS44NC4yNC0xLjI4bC00LTYuOTNjLS4yNS0uNDMtLjc3LS42MS0xLjIyLS40M2wtNC45OCAyLjAxYy0xLjAzLS43OS0yLjE2LTEuNDYtMy4zOC0xLjk3bC0uNzUtNS4zYy0uMDktLjQ3LS41LS44NC0xLS44NGgtOGMtLjUgMC0uOTEuMzctLjk5Ljg0bC0uNzUgNS4zYy0xLjIyLjUxLTIuMzUgMS4xNy0zLjM4IDEuOTdsLTQuOTgtMi4wMWMtLjQ1LS4xNy0uOTcgMC0xLjIyLjQzbC00IDYuOTNjLS4yNS40My0uMTQuOTcuMjQgMS4yOGw0LjIyIDMuMzFjLS4wOC42NC0uMTQgMS4yOS0uMTQgMS45NXMuMDYgMS4zMS4xNCAxLjk1bC00LjIyIDMuMzFjLS4zOC4zLS40OS44NC0uMjQgMS4yOGw0IDYuOTNjLjI1LjQzLjc3LjYxIDEuMjIuNDNsNC45OC0yLjAxYzEuMDMuNzkgMi4xNiAxLjQ2IDMuMzggMS45N2wuNzUgNS4zYy4wOC40Ny40OS44NC45OS44NGg4Yy41IDAgLjkxLS4zNy45OS0uODRsLjc1LTUuM2MxLjIyLS41MSAyLjM1LTEuMTcgMy4zOC0xLjk3bDQuOTggMi4wMWMuNDUuMTcuOTcgMCAxLjIyLS40M2w0LTYuOTNjLjI1LS40My4xNC0uOTctLjI0LTEuMjhsLTQuMjItMy4zMXptLTE0Ljg2IDUuMDVjLTMuODcgMC03LTMuMTMtNy03czMuMTMtNyA3LTcgNyAzLjEzIDcgNy0zLjEzIDctNyA3eiIvPgo8L3N2Zz4K);-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgdmlld0JveD0iMCAwIDQ4IDQ4Ij4KICAgIDxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPgogICAgPHBhdGggZD0iTTM4Ljg2IDI1Ljk1Yy4wOC0uNjQuMTQtMS4yOS4xNC0xLjk1cy0uMDYtMS4zMS0uMTQtMS45NWw0LjIzLTMuMzFjLjM4LS4zLjQ5LS44NC4yNC0xLjI4bC00LTYuOTNjLS4yNS0uNDMtLjc3LS42MS0xLjIyLS40M2wtNC45OCAyLjAxYy0xLjAzLS43OS0yLjE2LTEuNDYtMy4zOC0xLjk3bC0uNzUtNS4zYy0uMDktLjQ3LS41LS44NC0xLS44NGgtOGMtLjUgMC0uOTEuMzctLjk5Ljg0bC0uNzUgNS4zYy0xLjIyLjUxLTIuMzUgMS4xNy0zLjM4IDEuOTdsLTQuOTgtMi4wMWMtLjQ1LS4xNy0uOTcgMC0xLjIyLjQzbC00IDYuOTNjLS4yNS40My0uMTQuOTcuMjQgMS4yOGw0LjIyIDMuMzFjLS4wOC42NC0uMTQgMS4yOS0uMTQgMS45NXMuMDYgMS4zMS4xNCAxLjk1bC00LjIyIDMuMzFjLS4zOC4zLS40OS44NC0uMjQgMS4yOGw0IDYuOTNjLjI1LjQzLjc3LjYxIDEuMjIuNDNsNC45OC0yLjAxYzEuMDMuNzkgMi4xNiAxLjQ2IDMuMzggMS45N2wuNzUgNS4zYy4wOC40Ny40OS44NC45OS44NGg4Yy41IDAgLjkxLS4zNy45OS0uODRsLjc1LTUuM2MxLjIyLS41MSAyLjM1LTEuMTcgMy4zOC0xLjk3bDQuOTggMi4wMWMuNDUuMTcuOTcgMCAxLjIyLS40M2w0LTYuOTNjLjI1LS40My4xNC0uOTctLjI0LTEuMjhsLTQuMjItMy4zMXptLTE0Ljg2IDUuMDVjLTMuODcgMC03LTMuMTMtNy03czMuMTMtNyA3LTcgNyAzLjEzIDcgNy0zLjEzIDctNyA3eiIvPgo8L3N2Zz4K);mask-size:contain;-webkit-mask-size:contain;margin-right:5px;cursor:pointer}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-settings-button:hover{background-color:#777}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-button{padding:7px 10px;flex-grow:1;border-radius:4px;background-color:#ff6f61;color:#fff;text-align:center;cursor:pointer;text-transform:uppercase}.wonderpush-bell .wonderpush-dialog .wonderpush-notification{margin:15px;border:1px solid #ddd;border-radius:4px;overflow:hidden;height:63px;box-shadow:0 0 3px rgba(0,0,0,.3)}.wonderpush-bell .wonderpush-dialog .wonderpush-notification .wonderpush-notification-icon{width:53px;height:53px;float:left;margin-top:5px;margin-left:5px;background-color:#f3f3f3;background-size:cover}.wonderpush-bell .wonderpush-dialog .wonderpush-notification .wonderpush-notification-paragraph-small{height:6px;background-color:#eee;margin:8px 5px 0 63px;width:80px}.wonderpush-bell .wonderpush-dialog .wonderpush-notification .wonderpush-notification-paragraph-medium{height:6px;background-color:#eee;margin:8px 5px 0 63px;width:100px}.wonderpush-bell .wonderpush-dialog .wonderpush-notification .wonderpush-notification-paragraph-large{height:6px;background-color:#eee;margin:8px 5px 0 63px;width:120px}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings{transition:all .2s ease-in-out;height:57px;overflow:hidden;box-sizing:content-box;border-top:1px solid #efefef;padding:15px;text-align:center}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings.wonderpush-collapsed{height:0;padding:0}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings .wonderpush-dialog-advanced-settings-description{font-size:12px}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings .wonderpush-dialog-advanced-settings-button-container{margin:10px 0;display:flex;justify-content:stretch;align-items:center}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings .wonderpush-dialog-advanced-settings-button-container .wonderpush-dialog-advanced-settings-download-button{margin-right:5px}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings .wonderpush-dialog-advanced-settings-button-container .wonderpush-dialog-advanced-settings-clear-button,.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings .wonderpush-dialog-advanced-settings-button-container .wonderpush-dialog-advanced-settings-download-button{opacity:.7;transition:all .15s ease-in-out;cursor:pointer;border-radius:4px;padding:3px 5px;text-align:center;flex-grow:1;background-color:#fff;color:#ff6f61;font-size:.9em;border:1px solid #ff6f61;text-transform:uppercase}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings .wonderpush-dialog-advanced-settings-button-container .wonderpush-dialog-advanced-settings-clear-button:hover,.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings .wonderpush-dialog-advanced-settings-button-container .wonderpush-dialog-advanced-settings-download-button:hover{opacity:1}.wonderpush-bell .wonderpush-dialog .wonderpush-dialog-advanced-settings .wonderpush-dialog-advanced-settings-fineprint{font-size:10px;color:#aaa}.wonderpush-bell.wonderpush-right{left:unset;right:20px;flex-direction:row-reverse}.wonderpush-bell.wonderpush-right .wonderpush-paragraph{transition:transform .2s ease-in-out;transform-origin:right;transform:scale(1);margin-left:unset;margin-right:12px;pointer-events:none}.wonderpush-bell.wonderpush-right .wonderpush-paragraph:after{position:absolute;right:unset;left:100%;border-right-color:transparent;border-left-color:rgba(0,0,0,.8)}.wonderpush-bell.wonderpush-right .wonderpush-dialog{transition:transform .2s ease-in-out;transform-origin:bottom right;transform:scale(1);left:unset;right:0}.wonderpush-bell.wonderpush-right .wonderpush-dialog:after{left:unset;right:11px}.wonderpush-bell.wonderpush-right .wonderpush-help{transition:transform .2s ease-in-out;transform-origin:bottom right;transform:scale(1);left:unset;right:0}.wonderpush-bell.wonderpush-right .wonderpush-help:after{left:unset;right:11px}")),document.head.appendChild(i),new function(e){e=e||{},this.element=window.document.createElement("div"),this.element.classList.add(a+"bell"),[{cls:"icon-container",name:"iconContainer"},{cls:"icon",name:"icon",parent:"iconContainer"},{cls:"icon-badge",name:"iconBadge",parent:"iconContainer"},{cls:"paragraph",name:"paragraph"},{cls:"help",name:"help"},{cls:"dialog",name:"dialog"},{cls:"dialog-title",name:"dialogTitle",parent:"dialog"},{cls:"notification",name:"notification",parent:"dialog"},{cls:"notification-icon",name:"notificationIcon",parent:"notification"},{cls:"notification-paragraph-large",parent:"notification"},{cls:"notification-paragraph-medium",parent:"notification"},{cls:"notification-paragraph-large",parent:"notification"},{cls:"notification-paragraph-small",parent:"notification"},{cls:"dialog-button-container",name:"dialogButtonContainer",parent:"dialog"},{cls:"dialog-settings-button",name:"dialogSettingsButton",parent:"dialogButtonContainer"},{cls:"dialog-button",name:"dialogButton",parent:"dialogButtonContainer"},{cls:"dialog-advanced-settings",name:"dialogAdvancedSettings",parent:"dialog"},{cls:"dialog-advanced-settings-description",name:"dialogAdvancedSettingsDescription",parent:"dialogAdvancedSettings"},{cls:"dialog-advanced-settings-button-container",name:"dialogAdvancedSettingsButtonContainer",parent:"dialogAdvancedSettings"},{cls:"dialog-advanced-settings-download-button",name:"dialogAdvancedSettingsDownloadButton",parent:"dialogAdvancedSettingsButtonContainer"},{cls:"dialog-advanced-settings-clear-button",name:"dialogAdvancedSettingsClearButton",parent:"dialogAdvancedSettingsButtonContainer"},{cls:"dialog-advanced-settings-fineprint",name:"dialogAdvancedSettingsFineprint",parent:"dialogAdvancedSettings"}].forEach(function(e){var t=window.document.createElement("div");e.name&&(this[e.name]=t),this[e.parent||"element"].appendChild(t),t.classList.add(a+e.cls)}.bind(this)),e.hidePrivacySettings&&(this.dialogSettingsButton.style.display="none"),this.isCollapsed=function(e){return!!(e="string"==typeof e?this[e]:e)&&e.classList.contains(a+"collapsed")}.bind(this),this.collapse=function(e){if(e="string"==typeof e?this[e]:e){if(e.classList.contains(a+"collapsed"))return Promise.resolve();e.classList.add(a+"collapsed");var t=this.element.parentNode?r(e):Promise.resolve();return e===this.dialog?t.then(function(){this.collapse(this.dialogAdvancedSettings)}.bind(this)):e===this.paragraph&&t.then(function(){this.paragraph.classList.add(a+"hidden")}.bind(this)),t}}.bind(this),this.uncollapse=function(e){if(e="string"==typeof e?this[e]:e)return e.classList.contains(a+"collapsed")?(e.classList.remove(a+"collapsed"),e.classList.remove(a+"hidden"),r(e)):Promise.resolve()}.bind(this),this.toggleCollapse=function(e){if(e="string"==typeof e?this[e]:e)return e.classList.contains(a+"collapsed")?this.uncollapse(e):this.collapse(e)}.bind(this),this.deactivate=function(){if(!this.element.classList.contains(a+"deactivated"))return this.element.classList.add(a+"deactivated"),r(this.element).then(function(){this.element.classList.add(a+"hidden")}.bind(this))}.bind(this),this.activate=function(){if(this.element.classList.contains(a+"deactivated"))return this.element.classList.remove(a+"hidden"),setTimeout(function(){this.element.classList.remove(a+"deactivated")}.bind(this),0),r(this.element)}.bind(this),e.notificationIcon&&(this.notificationIcon.style.backgroundImage="url("+e.notificationIcon.replace("(","%28").replace(")","%29")+")"),this.dialogTitle.textContent=e.dialogTitle||n("Manage Notifications"),this.dialogAdvancedSettingsDescription.textContent=e.advancedSettingsDescription||n("Your personal notification data:"),e.advancedSettingsFineprint?this.dialogAdvancedSettingsFineprint.textContent=e.advancedSettingsFineprint:this.dialogAdvancedSettingsFineprint.innerHTML=n("WonderPush fully supports european GDPR").replace("WonderPush",'WonderPush'),this.dialogAdvancedSettingsClearButton.textContent=e.clearDataButtonTitle||n("Clear"),this.dialogAdvancedSettingsDownloadButton.textContent=e.downloadDataButtonTitle||n("Download"),this.dialogSettingsButton.addEventListener("click",function(){this.toggleCollapse(this.dialogAdvancedSettings)}.bind(this)),this.iconBadge.textContent="1",this.collapse("help"),this.collapse("dialog"),this.collapse("paragraph"),this.collapse("iconBadge"),this.collapse("dialogAdvancedSettings")}({notificationIcon:t.notificationIcon||e.getNotificationIcon(),dialogTitle:t.dialogTitle,hidePrivacySettings:t.hidePrivacySettings,clearDataButtonTitle:t.clearDataButtonTitle,downloadDataButtonTitle:t.downloadDataButtonTitle,advancedSettingsDescription:t.advancedSettingsDescription,advancedSettingsFineprint:t.advancedSettingsFineprint}));if(this.showBell=function(){function o(){window.document.body.appendChild(d.element)}this.hideBell(),t.urlFilters&&e.currentURLPassesFilters&&!e.currentURLPassesFilters(t.urlFilters)?e.logDebug("Current URL does not match url filters",t.urlFilters):"loading"===window.document.readyState?window.document.addEventListener("DOMContentLoaded",o):o()}.bind(this),this.hideBell=function(){d.element&&d.element.parentNode&&d.element.parentNode.removeChild(d.element)},this.updateTexts=function(){switch(e.Notification.getSubscriptionState()){case e.SubscriptionState.DENIED:d.dialogButton.textContent="",d.paragraph.textContent=t.blockedText||n("You've blocked notifications"),d.help.style.setProperty("--uncollapsed-background-image","url(https://cdn.by.wonderpush.com/plugins/optin-bell/1.0.0/allow-notifications.jpg");break;case e.SubscriptionState.SUBSCRIBED:d.dialogButton.textContent=t.unsubscribeButtonTitle||n("Unsubscribe"),d.paragraph.textContent=t.alreadySubscribedText||n("You're subscribed to notifications");break;case e.SubscriptionState.UNSUBSCRIBED:d.dialogButton.textContent=t.subscribeButtonTitle||n("Subscribe"),d.paragraph.textContent=t.alreadyUnsubscribedText||n("You are not receiving any notifications");break;case e.SubscriptionState.UNDETERMINED:d.dialogButton.textContent=n("Loading"),d.paragraph.textContent=n("Loading");break;case e.SubscriptionState.NOT_SUBSCRIBED:d.dialogButton.textContent=n("Subscribe"),d.paragraph.textContent=t.subscribeInviteText||n("Click to subscribe to notifications")}},this.updateDiscretion=function(){e.Notification.getSubscriptionState()===e.SubscriptionState.SUBSCRIBED&&d.isCollapsed(d.dialog)&&d.isCollapsed(d.help)&&d.element.classList.add(a+"discrete")}.bind(this),window.addEventListener("WonderPushEvent",function(o){o.detail&&o.detail.state&&"subscription"===o.detail.name&&(this.updateTexts(),d.collapse(d.dialog),d.collapse(d.help),d.collapse(d.iconBadge),o.detail.state===e.SubscriptionState.UNSUBSCRIBED&&(d.paragraph.textContent=t.unsubscribedText||n("You won't receive more notifications"),setTimeout(function(){d.collapse(d.paragraph),this.updateTexts(),t.hideWhenSubscribed&&d.activate()}.bind(this),1200)),o.detail.state===e.SubscriptionState.SUBSCRIBED&&(d.paragraph.textContent=t.subscribedText||n("Thanks for subscribing!"),d.uncollapse(d.paragraph),setTimeout(function(){t.hideWhenSubscribed?d.deactivate():(d.element.classList.add(a+"discrete"),d.collapse(d.paragraph).then(function(){this.updateTexts()}.bind(this)))}.bind(this),1200)),o.detail.state===e.SubscriptionState.DENIED)&&(d.element.classList.remove(a+"discrete"),d.uncollapse(d.paragraph),t.hideWhenSubscribed&&d.activate(),setTimeout(function(){d.collapse(d.paragraph)}.bind(this),1200))}.bind(this)),d.dialogButton.addEventListener("click",(function(t){switch(e.Notification.getSubscriptionState()){case e.SubscriptionState.SUBSCRIBED:e.setNotificationEnabled(!1,t).then((function(){d.collapse(d.dialog),d.uncollapse(d.paragraph)}),o);break;case e.SubscriptionState.UNSUBSCRIBED:e.setNotificationEnabled(!0,t).catch(o),d.collapse(d.dialog)}})),d.dialogAdvancedSettingsDownloadButton.addEventListener("click",(function(t){e.Data.downloadExport()})),d.dialogAdvancedSettingsClearButton.addEventListener("click",function(t){window.confirm(n("This action will clear all the data used to send you targeted push notifications. Are you sure ?"))&&(d.collapse(d.dialog),e.Data.clearAll().then(function(){d.paragraph.textContent=n("Data successfully cleared"),d.uncollapse(d.paragraph),setTimeout(function(){d.collapse(d.paragraph),this.updateTexts()}.bind(this),1200)}.bind(this)))}.bind(this)),d.iconContainer.addEventListener("mouseenter",(function(){d.collapse(d.iconBadge),d.isCollapsed(d.dialog)&&d.uncollapse(d.paragraph)})),d.iconContainer.addEventListener("mouseleave",function(){this.updateDiscretion(),d.collapse(d.paragraph).then(function(){this.updateTexts()}.bind(this))}.bind(this)),d.iconContainer.addEventListener("click",(function(n){if(d.isCollapsed(d.dialog)){var r=e.Notification.getSubscriptionState();switch(r){case e.SubscriptionState.DENIED:e.isOnRightDomain()&&(d.uncollapse(d.help),d.collapse(d.paragraph),d.element.classList.remove(a+"discrete"));break;case e.SubscriptionState.SUBSCRIBED:case e.SubscriptionState.UNSUBSCRIBED:d.dialogSettingsButton.style.display=t.hidePrivacySettings||r!==e.SubscriptionState.SUBSCRIBED?"none":"",d.uncollapse(d.dialog),d.collapse(d.paragraph),d.element.classList.remove(a+"discrete");break;case e.SubscriptionState.NOT_SUBSCRIBED:e.setNotificationEnabled(!0,n).catch(o),d.collapse(d.dialog)}}else d.collapse(d.dialog)})),window.document.addEventListener("click",function(e){d.element.contains(e.srcElement)||(d.collapse(d.dialog),d.collapse(d.help),this.updateDiscretion(),this.updateTexts())}.bind(this)),t.style)for(var p in t.style)d.element.style[p]=t.style[p];"right"===t.position?(d.element.classList.add(a+"right"),t.distanceFromTheEdge&&(d.element.style.right=t.distanceFromTheEdge+"px")):t.distanceFromTheEdge&&(d.element.style.left=t.distanceFromTheEdge+"px"),t.distanceFromTheBottom&&(d.element.style.bottom=t.distanceFromTheBottom+"px"),t.color&&(d.iconContainer.style.backgroundColor=t.color,d.dialogButton.style.backgroundColor=t.color,d.dialogAdvancedSettingsClearButton.style.color=t.color,d.dialogAdvancedSettingsDownloadButton.style.color=t.color,d.dialogAdvancedSettingsClearButton.style.borderColor=t.color,d.dialogAdvancedSettingsDownloadButton.style.borderColor=t.color),t.bellIcon?d.icon.style.maskImage=d.icon.style.webkitMaskImage="url("+t.bellIcon+")":e.getAssets&&(i=e.getAssets(),d.icon.style.maskImage="url("+i.bell+")",d.icon.style.setProperty("-webkit-mask-image",d.icon.style.maskImage)),this.showBell();var u=window.location.href;setInterval(function(){window.location.href!==u&&(u=window.location.href,e.logDebug("Change of URL detected, show bell"),this.showBell())}.bind(this),1e3),this.updateTexts(),e.Notification.getSubscriptionState()===e.SubscriptionState.SUBSCRIBED&&(d.element.classList.add(a+"discrete"),d.collapse(d.iconBadge)),t.hideWhenSubscribed&&e.Notification.getSubscriptionState()===e.SubscriptionState.SUBSCRIBED&&(d.element.classList.add(a+"hidden"),d.element.classList.add(a+"deactivated")),t.hasOwnProperty("showBadge")&&!t.showBadge||e.Storage.get("badgeShown").then((function(t){t.badgeShown||(e.Storage.set("badgeShown",!0),d.uncollapse(d.iconBadge))}))}})}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},559:(e,t)=>{t=function(){return function(e){e._protected.Plugins.preregisterInlinedPlugin("optin-blurb","1.0.1",(function(){"use strict";WonderPush.registerPlugin("optin-blurb",{window:function(e,t){if(t=t||{},!e.isNativePushNotificationSupported())return{};function o(e){return r.hasOwnProperty(a)&&r[a][e]?r[a][e]:e}var n,r={fr:{"Subscribe to our latest news and updates":"Abonnez-vous pour recevoir nos dernières offres"},es:{},it:{},de:{},pt:{},nl:{},pl:{}},i="wonderpush-",s=(t.cssPrefix&&(i=t.cssPrefix),function(e){e instanceof WonderPush.Errors.UserCancellationError||e instanceof WonderPush.Errors.PermissionError?console.warn(e):console.error(e)}),a=(e.getLocales&&e.getLocales()||[]).map((function(e){return e.split(/[-_]/)[0]}))[0]||(navigator.language||"").split("-")[0],c=t.message?o(t.message):o("Subscribe to our latest news and updates");function d(){if(this.element=document.createElement("div"),this.element.classList.add(i+"blurb"),t.style)for(var o in t.style)this.element.style[o]=t.style[o];"right"===t.alignment&&this.element.classList.add(i+"align-right"),"center"===t.alignment&&this.element.classList.add(i+"align-center"),this.element.style.display="none",this.element.style.padding=(t.verticalPadding||"0")+" "+(t.horizontalPadding||"0"),t.imgUrl?((r=document.createElement("img")).src=t.imgUrl,this.element.appendChild(r)):t.noIcon||(r=document.createElement("div"),this.element.appendChild(r),r.classList.add(i+"icon-container"),n=document.createElement("div"),r.appendChild(n),n.classList.add(i+"icon"),t.bellIconColor&&(r.style.backgroundColor=t.bellIconColor),r=e.getAssets(),r=t.bellIcon||r.bell,n.style.maskImage="url("+r+")",n.style.setProperty("-webkit-mask-image",n.style.maskImage));var n,r,a=document.createElement("a");if(this.element.appendChild(a),t.linkStyle)for(var d in t.linkStyle)a.style[d]=t.linkStyle[d];a.href="#",a.textContent=c,a.addEventListener("click",function(e){e.preventDefault()}.bind(this)),this.element.addEventListener("click",(function(){e.subscribeToNotifications().catch(s)})),this.attach=function(e){e&&e.insertBefore(this.element,t.insertBefore&&e.firstChild||null)}.bind(this),this.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)}.bind(this),this.show=function(){this.element.style.display=""}.bind(this),this.hide=function(){this.element.style.display="none"}.bind(this)}(n=document.createElement("style")).type="text/css",n.appendChild(document.createTextNode(".wonderpush-blurb{cursor:pointer;display:flex;align-items:center}.wonderpush-blurb.wonderpush-align-center{justify-content:center}.wonderpush-blurb.wonderpush-align-right{flex-direction:row-reverse}.wonderpush-blurb.wonderpush-align-right .wonderpush-icon-container,.wonderpush-blurb.wonderpush-align-right img{margin-right:0;margin-left:10px}.wonderpush-blurb img{margin-right:10px;max-width:120px;max-height:120px}.wonderpush-blurb .wonderpush-icon-container{margin-right:10px;cursor:pointer;width:28px;height:28px;border-radius:14px;background:#ff6f61;display:flex;align-items:center;justify-content:center;position:relative}.wonderpush-blurb .wonderpush-icon-container .wonderpush-icon{mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center center;-webkit-mask-position:center center;background-color:#fff;width:60%;height:60%;display:block}")),document.head.appendChild(n);var p=[];function u(){var o;e.logDebug("recreateBlurbs"),p.forEach((e=>e.detach())),p=[],t.urlFilters&&e.currentURLPassesFilters&&!e.currentURLPassesFilters(t.urlFilters)?e.logDebug("Current URL does not match url filters",t.urlFilters):(o=t.querySelector||".wonderpush-blurb",(t.multiple?document.querySelectorAll(o):[document.querySelector(o)]).forEach((function(t){var n;t?(n=new d,p.push(n),n.attach(t)):e.logWarn("No element corresponding to selector",o)})),e.Notification.getSubscriptionState()===e.SubscriptionState.SUBSCRIBED?p.forEach((function(e){e.hide()})):p.forEach((function(e){e.show()})))}window.addEventListener("WonderPushEvent",function(t){t.detail&&t.detail.state&&"subscription"===t.detail.name&&(t.detail.state===e.SubscriptionState.UNSUBSCRIBED&&(e.logDebug("Subscription state changed to unsubscribed, showing blurbs"),p.forEach((function(e){e.show()}))),t.detail.state===e.SubscriptionState.SUBSCRIBED&&(e.logDebug("Subscription state changed to subscribed, hiding blurbs"),p.forEach((function(e){e.hide()}))),t.detail.state===e.SubscriptionState.DENIED)&&(e.logDebug("Subscription state changed to denied, showing blurbs"),p.forEach((function(e){e.show()})))}.bind(this));var l=window.location.href;setInterval((()=>{window.location.href!==l&&(l=window.location.href,e.logDebug("Change of URL detected, recreate blurbs"),u())}),1e3),"complete"===window.document.readyState?u():window.addEventListener("load",u)}})}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},4671:(e,t)=>{t=function(){return function(e){e._protected.Plugins.preregisterInlinedPlugin("optin-dialog","1.3.14",(function(){WonderPush.registerPlugin("optin-dialog",(function(e,t){if(!e.isNativePushNotificationSupported())return{showDialog:function(){},hideDialog:function(){}};function o(e){return n.hasOwnProperty(r)&&n[r][e]?n[r][e]:e}var n={fr:{"Would you like to subscribe to push notifications?":"Souhaitez-vous vous inscrire aux notifications?","You can always unsubscribe at any time.":"Vous pouvez vous désinscrire à tout moment.",Subscribe:"Je m'inscris",Later:"Plus tard","Web push by WonderPush":"Push web par WonderPush"},es:{"Would you like to subscribe to push notifications?":"¿Desea suscribirse a las notificaciones push?","You can always unsubscribe at any time.":"Siempre puede darse de baja en cualquier momento",Subscribe:"Me suscribo",Later:"Más tarde","Web push by WonderPush":"Push web por WonderPush"},it:{"Would you like to subscribe to push notifications?":"Vuoi iscriverti alle notifiche push?","You can always unsubscribe at any time.":"Puoi annullare l'iscrizione in qualsiasi momento",Subscribe:"Mi iscrivo",Later:"Più tardi","Web push by WonderPush":"Push web di WonderPush"},de:{"Would you like to subscribe to push notifications?":"Möchten Sie Push-Benachrichtigungen abonnieren?","You can always unsubscribe at any time.":"Sie können sich jederzeit abmelden.",Subscribe:"Register",Later:"Später","Web push by WonderPush":"Web push von WonderPush"},pt:{"Would you like to subscribe to push notifications?":"Deseja se inscrever para receber notificações?","You can always unsubscribe at any time.":"Você pode cancelar a qualquer momento.",Subscribe:"Register",Later:"Mais tarde","Web push by WonderPush":"Push web da WonderPush"},nl:{"Would you like to subscribe to push notifications?":"Wilt u zich abonneren op pushmeldingen?","You can always unsubscribe at any time.":"U kunt zich altijd op elk gewenst moment afmelden.",Subscribe:"Abonneren",Later:"Later"},pl:{"Would you like to subscribe to push notifications?":"Czy chcesz subskrybować powiadomienia push?","You can always unsubscribe at any time.":"Zawsze możesz zrezygnować z subskrypcji w dowolnym momencie.",Subscribe:"Subskrybuj",Later:"Później"}},r=(e.getLocales&&e.getLocales()||[]).map((function(e){return e.split(/[-_]/)[0]}))[0]||(navigator.language||"").split("-")[0],i=o("Would you like to subscribe to push notifications?"),s=o("You can always unsubscribe at any time."),a=void 0!==t.title?t.title:i,c=void 0!==t.message?t.message:s;a||c||(a=i,c=s);var d=t.positiveButton||o("Subscribe"),p=t.negativeButton||o("Later"),u=t.style,l=void 0!==t.icon?t.icon:e.getNotificationIcon(),g=!!t.hidePoweredBy,h=void 0!==t.closeSnooze&&t.closeSnooze,f=void 0!==t.negativeSnooze?t.negativeSnooze:6048e5;i=t.triggers,(s=document.createElement("style")).type="text/css",s.appendChild(document.createTextNode(".wp-optin-dialog-container{z-index:10000;width:420px;max-width:100%;box-sizing:border-box;background-image:linear-gradient(to bottom,#eae9ea,#eeedee);position:fixed;top:0;left:50%;transform:translateX(-50%);padding:15px 20px 10px 20px;border:1px solid #dfdfdf;box-shadow:0 0 20px #888}.wp-optin-dialog-container .wp-optin-dialog-body{display:flex;flex-direction:row}.wp-optin-dialog-container .wp-optin-dialog-icon{flex-shrink:0;flex-basis:64px;width:64px;height:64px;background-size:contain;background-repeat:no-repeat;background-position:50% 50%;margin-right:20px}.wp-optin-dialog-container .wp-optin-dialog-text{display:flex;flex-direction:column;flex-grow:1}.wp-optin-dialog-container .wp-optin-dialog-text .wp-optin-dialog-title{font:bold 16px arial;margin-bottom:15px}.wp-optin-dialog-container .wp-optin-dialog-text .wp-optin-dialog-message{font:12px arial}.wp-optin-dialog-container .wp-optin-dialog-buttons{display:flex;flex-direction:row;margin-top:1em}.wp-optin-dialog-container .wp-optin-dialog-powered-by{flex-grow:1;align-self:flex-end;font:10px arial;color:#333;opacity:.8;background-position:bottom right;background-repeat:no-repeat;text-decoration:none;margin-right:.5em}.wp-optin-dialog-container .wp-optin-dialog-button{flex-grow:1;border-radius:4px;border:1px solid #d3d3d3;background:#fff;text-decoration:none;font:15px arial;color:#333;text-align:center;display:flex;min-width:5em;padding:.25em .5em}.wp-optin-dialog-container .wp-optin-dialog-button label{cursor:inherit;margin:auto}.wp-optin-dialog-container .wp-optin-dialog-button.wp-optin-dialog-positiveButton{border-color:#46a4f3;color:#fff;background-image:linear-gradient(to bottom,#62b3f4,#0486f6);margin-left:.5em}.wp-optin-dialog-container .wp-optin-dialog-close{position:absolute;top:4px;right:4px;width:10px;height:10px;text-decoration:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1MDVDQUVGMDQzOUIxMUU3ODE2N0YyM0EyNDc4QTZCNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1MDVDQUVGMTQzOUIxMUU3ODE2N0YyM0EyNDc4QTZCNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjI4NjdCN0UxNDM5QTExRTc4MTY3RjIzQTI0NzhBNkI3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjI4NjdCN0UyNDM5QTExRTc4MTY3RjIzQTI0NzhBNkI3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+JRvgJAAAAEdJREFUeNpiYmBgOAPEDP///8eKYfIMuBQiK8CqEEUBVABFIYYJSDoZsCkAyTGhmQhSYIJsNQNON6C5Eacv0K0+Q8iNAAEGAG9QVX0F8yI2AAAAAElFTkSuQmCC);background-size:cover;background-repeat:no-repeat;background-position:50% 50%}")),document.head.appendChild(s);var _,m,v=!1;e.waitTriggers?e.waitTriggers(i).then(function(){this.showDialog()}.bind(this)):e.checkTriggers(i,function(){this.showDialog()}.bind(this)),this.hideDialog=function(){m&&_.dispatchEvent(new Event("wonderpush-webplugin-optin-dialog.hide",{bubbles:!0,cancelable:!0}))&&(m(),v=!1,_=m=void 0)}.bind(this),this.showDialog=function(){var n=this;if(v)e.logDebug("Registration already in progress");else{if(window.WonderPush&&((y=window.WonderPush.Notification.getSubscriptionState())===window.WonderPush.SubscriptionState.SUBSCRIBED||y===window.WonderPush.SubscriptionState.UNSUPPORTED||y===window.WonderPush.SubscriptionState.DENIED))return;v=!0;var r="wp-optin-dialog-",i=document.createElement("div");if(i.className=r+"container",t.backgroundColor&&(i.style.backgroundColor=t.backgroundColor,i.style.backgroundImage="none",i.style.borderColor=t.backgroundColor),i.style.color=t.textColor||"black",u)for(var s in u)i.style[s]=u[s];m=function(){i.parentNode.removeChild(i)},_=i;var S=((y=document.createElement("div")).className=r+"body",i.appendChild(y),l&&((S=document.createElement("div")).className=r+"icon",S.style.backgroundImage="url("+l.replace("(","%28").replace(")","%29")+")",y.appendChild(S)),document.createElement("div")),b=(S.className=r+"text",y.appendChild(S),a&&((y=document.createElement("div")).className=r+"title",y.innerHTML=a,S.appendChild(y)),c&&((y=document.createElement("div")).className=r+"message",y.innerHTML=c,S.appendChild(y)),document.createElement("div")),w=(b.className=r+"buttons",i.appendChild(b),g||((S=document.createElement("a")).innerHTML=o("Web push by WonderPush"),S.href="https://docs.wonderpush.com/docs/manage-your-data-and-unsubscribe-from-web-push-notifications",S.className=r+"powered-by",S.setAttribute("title","Web and mobile push notifications"),b.appendChild(S)),{positiveButton:{label:d,backgroundColor:t.positiveButtonBackgroundColor||void 0,color:t.positiveButtonTextColor||void 0,click:function(t){t.target.dispatchEvent(new Event("wonderpush-webplugin-optin-dialog.positiveButton.click",{bubbles:!0,cancelable:!0}))&&(e.subscribeToNotifications(t).catch((function(e){e instanceof WonderPush.Errors.UserCancellationError||e instanceof WonderPush.Errors.PermissionError?console.warn(e):console.error(e)})),n.hideDialog())}},negativeButton:{label:p,backgroundColor:t.negativeButtonBackgroundColor||void 0,color:t.negativeButtonTextColor||void 0,click:function(t){void 0!==f&&!1!==f&&e.snoozeTriggers&&e.snoozeTriggers(f),t.target.dispatchEvent(new Event("wonderpush-webplugin-optin-dialog.negativeButton.click",{bubbles:!0,cancelable:!0}))&&n.hideDialog()}}}),y=(["negativeButton","positiveButton"].forEach((function(e){var t=document.createElement("a"),o=(t.href="#",t.className=r+"button "+r+e,w[e].backgroundColor&&(t.style.backgroundColor=w[e].backgroundColor,t.style.backgroundImage="none",t.style.borderColor=w[e].backgroundColor),w[e].color&&(t.style.color=w[e].color),t.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),w[e].click(t)})),b.appendChild(t),document.createElement("label"));o.innerHTML=w[e].label,t.appendChild(o)})),document.createElement("a"));i.appendChild(y),y.href="#",y.className=r+"close",y.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),void 0!==h&&!1!==h&&e.snoozeTriggers&&e.snoozeTriggers(h),t.target.dispatchEvent(new Event("wonderpush-webplugin-optin-dialog.closeButton.click",{bubbles:!0,cancelable:!0}))&&n.hideDialog()})),document.body.dispatchEvent(new Event("wonderpush-webplugin-optin-dialog.show",{bubbles:!0,cancelable:!0}))?document.body.appendChild(i):(v=!1,_=m=void 0)}}.bind(this)}))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},9534:(e,t)=>{t=function(){return function(e){e._protected.Plugins.preregisterInlinedPlugin("optin-switch","1.0.4",(function(){WonderPush.registerPlugin("optin-switch",(function(e,t){if(!e.isNativePushNotificationSupported())return{setupSubscriptionSwitch:function(){}};(n=document.createElement("style")).type="text/css",n.appendChild(document.createTextNode(".wp-switch{position:relative;display:inline-block;vertical-align:middle;width:auto;height:auto;padding:.2em;border-radius:1.25em;box-shadow:inset 0 -1px rgba(0,0,0,.05),inset 0 1px 1px rgba(0,0,0,.05);cursor:pointer;background-image:linear-gradient(to bottom,rgba(0,0,0,.2),rgba(255,255,255,.3) 1.5em)}.wp-switch-input{display:none}.wp-switch-label{position:relative;display:block;height:2em;font-size:60%;text-transform:uppercase;background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px rgba(0,0,0,.12),inset 0 0 2px rgba(0,0,0,.15);transition:.15s ease-out;transition-property:opacity,background}.wp-switch-label:after,.wp-switch-label:before{line-height:0;clear:both;transition:inherit;white-space:nowrap;display:inline-block}.wp-switch-label:before{content:attr(data-off);right:1em;color:#aaa;text-shadow:0 1px rgba(255,255,255,.5);float:right;margin-top:1em;margin-right:1em;margin-left:2.5em}.wp-switch-label:after{content:attr(data-on);left:1em;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0;float:left;margin-top:0;margin-left:1em;margin-right:2.5em}.wp-switch-input:checked~.wp-switch-label{background:#47a8d8;box-shadow:inset 0 1px 2px rgba(0,0,0,.15),inset 0 0 3px rgba(0,0,0,.2)}.wp-switch-input:checked~.wp-switch-label:before{opacity:0}.wp-switch-input:checked~.wp-switch-label:after{opacity:1}.wp-switch-handle{position:absolute;top:.24em;left:.24em;width:1.125em;height:1.125em;background:#fff;border-radius:100%;box-shadow:1px 1px 5px rgba(0,0,0,.2);background-image:linear-gradient(to bottom,#fff 40%,#f0f0f0);transition:.15s ease-out;transition-property:left,margin-left}.wp-switch-handle:before{content:'';position:absolute;top:0;left:0;margin:.1875em 0 0 .1875em;width:.75em;height:.75em;background:#f9f9f9;border-radius:100%;box-shadow:inset 0 1px rgba(0,0,0,.02);background-image:linear-gradient(to bottom,#eee,#fff)}.wp-switch-input:checked~.wp-switch-handle{left:100%;margin-left:-1.365em;box-shadow:-1px 1px 5px rgba(0,0,0,.2)}.wp-switch-input:disabled~.wp-switch-handle{background-image:linear-gradient(to bottom,silver 40%,grey)}.wp-switch-input:disabled~.wp-switch-handle:before{background:#b0b0b0}.wp-switch-input:disabled~.wp-switch-label{background:silver}.wp-switch-input:disabled~.wp-switch-label:before{color:#eee}.wp-switch-off-gray>.wp-switch-label{background:#eceeef}.wp-switch-off-gray>.wp-switch-label:before{color:#aaa;text-shadow:0 1px rgba(255,255,255,.5)}.wp-switch-off-grey>.wp-switch-label{background:#eceeef}.wp-switch-off-grey>.wp-switch-label:before{color:#aaa;text-shadow:0 1px rgba(255,255,255,.5)}.wp-switch-off-red>.wp-switch-label{background:#ed2121}.wp-switch-off-red>.wp-switch-label:before{color:#fff;text-shadow:0 1px rgba(0,0,0,.2)}.wp-switch-on-green>.wp-switch-input:checked~.wp-switch-label{background:#4fb845;text-shadow:0 1px rgba(0,0,0,.2)}.wp-switch-on-blue>.wp-switch-input:checked~.wp-switch-label{background:#47a8d8;text-shadow:0 1px rgba(0,0,0,.2)}")),document.head.appendChild(n);var o=null,n=function(){"loading"!==document.readyState?this.setupSubscriptionSwitch():document.addEventListener("DOMContentLoaded",function(){this.setupSubscriptionSwitch()}.bind(this))}.bind(this),r=(this.setupSubscriptionSwitch=function(){var n,a,c,d,p,u,l,g,h,f,_;o||null!==t.switchElementId&&(n=t.switchElementId||"wonderpush-subscription-switch",n=document.querySelectorAll("#"+n),a=t.unsupported||"",c=t.classPrefix||"wp-",d=t.prepend||"",p=t.append||"",u=t.sentence||"",l=t.cssClass||"",g=t.on||"ON",h=t.off||"OFF",f=t.colorOn,_=t.colorOff,Array.prototype.slice.call(n).forEach((function(t){var n,m,v,S,b,w;t&&"true"!==t.dataset.wpInitialized&&((o=t).dataset.wpInitialized="true",e.isNativePushNotificationSupported()?(n=t.dataset.classPrefix||c,t.innerHTML=(t.dataset.prepend||d)+'
'+(t.dataset.append||p),m=t.querySelector("."+n+"switch-wrapper"),(v=document.createElement("SPAN")).innerHTML=t.dataset.sentence||u,(S=document.createElement("LABEL")).classList.add(n+"switch"),S.className+=" "+(t.dataset.class||l),(t.dataset.colorOn||f)&&S.classList.add(n+"switch-on-"+(t.dataset.colorOn||f)),(t.dataset.colorOff||_)&&S.classList.add(n+"switch-off-"+(t.dataset.colorOff||_)),(b=document.createElement("INPUT")).id=t.id+"-input",b.type="checkbox",b.classList.add(n+"switch-input"),S.appendChild(b),(w=document.createElement("SPAN")).classList.add(n+"switch-label"),w.dataset.on=t.dataset.on||g,w.dataset.off=t.dataset.off||h,S.appendChild(w),(w=document.createElement("SPAN")).classList.add(n+"switch-handle"),S.appendChild(w),m.appendChild(v),m.appendChild(S),b.addEventListener("click",r),window.addEventListener("WonderPushEvent",s(b)),i(b,e.Notification.getSubscriptionState())):t.innerHTML=t.dataset.unsupported||a)})))},function(t){var o=t.target.checked;return t.stopPropagation(),t.preventDefault(),e.setNotificationEnabled(o,t).catch((function(e){e instanceof WonderPush.Errors.UserCancellationError||e instanceof WonderPush.Errors.PermissionError?console.warn(e):console.error(e)})),!1}),i=function(t,o){switch(o){case e.SubscriptionState.UNSUPPORTED:t.disabled=!0,t.checked=!1;break;case e.SubscriptionState.UNDETERMINED:case e.SubscriptionState.NOT_SUBSCRIBED:case e.SubscriptionState.UNSUBSCRIBED:t.disabled=!1,t.checked=!1;break;case e.SubscriptionState.SUBSCRIBED:t.disabled=!1,t.checked=!0}},s=function(e){return function(t){"subscription"===(t=(t.originalEvent||t).detail||{}).name&&i(e,t.state)}};n()}))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},3650:(e,t)=>{t=function(){return function(e){e._protected.Plugins.preregisterInlinedPlugin("tag-switch","1.1.5",(function(){WonderPush.registerPlugin("tag-switch",(function(e,t){(n=document.createElement("style")).type="text/css",n.appendChild(document.createTextNode(".wp-tag-switch{position:relative;display:inline-block;vertical-align:middle;width:auto;height:auto;padding:.2em;border-radius:1.25em;box-shadow:inset 0 -1px rgba(0,0,0,.05),inset 0 1px 1px rgba(0,0,0,.05);cursor:pointer;background-image:linear-gradient(to bottom,rgba(0,0,0,.2),rgba(255,255,255,.3) 1.5em)}.wp-tag-switch-input{display:none!important}.wp-tag-switch-label{position:relative;display:block;height:2em;font-size:60%;text-transform:uppercase;background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px rgba(0,0,0,.12),inset 0 0 2px rgba(0,0,0,.15);transition:.15s ease-out;transition-property:opacity,background}.wp-tag-switch-label:after,.wp-tag-switch-label:before{line-height:0;clear:both;transition:inherit;white-space:nowrap;display:inline-block}.wp-tag-switch-label:before{content:attr(data-off);right:1em;color:#aaa;text-shadow:0 1px rgba(255,255,255,.5);float:right;margin-top:1em;margin-right:1em;margin-left:2.5em}.wp-tag-switch-label:after{content:attr(data-on);left:1em;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0;float:left;margin-top:0;margin-left:1em;margin-right:2.5em}.wp-tag-switch-input:checked~.wp-tag-switch-label{background:#47a8d8;box-shadow:inset 0 1px 2px rgba(0,0,0,.15),inset 0 0 3px rgba(0,0,0,.2)}.wp-tag-switch-input:checked~.wp-tag-switch-label:before{opacity:0}.wp-tag-switch-input:checked~.wp-tag-switch-label:after{opacity:1}.wp-tag-switch-handle{position:absolute;top:.24em;left:.24em;width:1.125em;height:1.125em;background:#fff;border-radius:100%;box-shadow:1px 1px 5px rgba(0,0,0,.2);background-image:linear-gradient(to bottom,#fff 40%,#f0f0f0);transition:.15s ease-out;transition-property:left,margin-left}.wp-tag-switch-handle:before{content:'';position:absolute;top:0;left:0;margin:.1875em 0 0 .1875em;width:.75em;height:.75em;background:#f9f9f9;border-radius:100%;box-shadow:inset 0 1px rgba(0,0,0,.02);background-image:linear-gradient(to bottom,#eee,#fff)}.wp-tag-switch-input:checked~.wp-tag-switch-handle{left:100%;margin-left:-1.365em;box-shadow:-1px 1px 5px rgba(0,0,0,.2)}.wp-tag-switch-input:disabled~.wp-tag-switch-handle{background-image:linear-gradient(to bottom,silver 40%,grey)}.wp-tag-switch-input:disabled~.wp-tag-switch-handle:before{background:#b0b0b0}.wp-tag-switch-input:disabled~.wp-tag-switch-label{background:silver}.wp-tag-switch-input:disabled~.wp-tag-switch-label:before{color:#eee}.wp-tag-switch-off-gray>.wp-tag-switch-label{background:#eceeef}.wp-tag-switch-off-gray>.wp-tag-switch-label:before{color:#aaa;text-shadow:0 1px rgba(255,255,255,.5)}.wp-tag-switch-off-grey>.wp-tag-switch-label{background:#eceeef}.wp-tag-switch-off-grey>.wp-tag-switch-label:before{color:#aaa;text-shadow:0 1px rgba(255,255,255,.5)}.wp-tag-switch-off-red>.wp-tag-switch-label{background:#ed2121}.wp-tag-switch-off-red>.wp-tag-switch-label:before{color:#fff;text-shadow:0 1px rgba(0,0,0,.2)}.wp-tag-switch-on-green>.wp-tag-switch-input:checked~.wp-tag-switch-label{background:#4fb845;text-shadow:0 1px rgba(0,0,0,.2)}.wp-tag-switch-on-blue>.wp-tag-switch-input:checked~.wp-tag-switch-label{background:#47a8d8;text-shadow:0 1px rgba(0,0,0,.2)}")),document.head.appendChild(n);var o=t.switchElementClass||"wonderpush-tag-switch",n=function(){"loading"!==document.readyState?this.setupTagSwitch():document.addEventListener("DOMContentLoaded",function(){this.setupTagSwitch()}.bind(this))}.bind(this),r=(this.setupTagSwitch=function(){if(null!==t.switchElementClass){var n,i,s,a,c,d,p,u,l,g,h,f,_=document.querySelectorAll("."+o);if(_.length)return n=t.unsupported||"",i="true"===t.includeUnsupported,s=t.classPrefix||"wp-tag-",a=t.prepend||"",c=t.append||"",d=t.sentence||"",p=t.cssClass||"",u=t.label,l=t.on||u||"ON",g=t.off||u||"OFF",h=t.colorOn,f=t.colorOff,this.cachedPromises||(this.cachedPromises=[e.getProperties(),e.getTags()],setTimeout(function(){this.cachedPromises=void 0}.bind(this),100)),Promise.all(this.cachedPromises).then((function(t){var o=t[0],m=t[1];Array.prototype.slice.call(_).forEach((function(t){var _,v,S,b,w,y,I,E;t&&"true"!==t.dataset.wpInitialized&&(t.dataset.wpInitialized="true",(_=i||"true"===t.dataset.includeUnsupported)||e.isNativePushNotificationSupported()?(v=!!t.dataset.tag,I=!!t.dataset.field&&!!t.dataset.value,v&&I&&e.logWarn("In the presence of a tag data attribute, field and value data attributes are ignored for",t),v||I?(I=t.dataset.classPrefix||s,t.innerHTML=(t.dataset.prepend||a)+'
'+(t.dataset.append||c),S=t.querySelector("."+I+"switch-wrapper"),(b=document.createElement("SPAN")).innerHTML=t.dataset.sentence||d,(w=document.createElement("LABEL")).classList.add(I+"switch"),w.className+=" "+(t.dataset.class||p),(t.dataset.colorOn||h)&&w.classList.add(I+"switch-on-"+(t.dataset.colorOn||h)),(t.dataset.colorOff||f)&&w.classList.add(I+"switch-off-"+(t.dataset.colorOff||f)),(y=document.createElement("INPUT")).id=t.id+"-input",y.type="checkbox",y.classList.add(I+"switch-input"),w.appendChild(y),(E=document.createElement("SPAN")).classList.add(I+"switch-label"),E.dataset.on=t.dataset.label||t.dataset.on||u||l,E.dataset.off=t.dataset.label||t.dataset.off||u||g,w.appendChild(E),(E=document.createElement("SPAN")).classList.add(I+"switch-handle"),w.appendChild(E),y.addEventListener("click",r),y.disabled=!e.isNativePushNotificationSupported()&&!_,v?y.checked=0<=m.indexOf(t.dataset.tag):(E=null==(I=o[t.dataset.field])?[]:Array.isArray(I)?I:[I],y.checked=0<=E.indexOf(t.dataset.value)),S.appendChild(b),S.appendChild(w)):e.logWarn("Missing tag, or both field and value data attribute for",t)):t.innerHTML=t.dataset.unsupported||n)}))}))}},function(t){var n=t.target.closest("."+o),r=t.target.checked;r&&e.isNativePushNotificationSupported()&&e.subscribeToNotifications(t),n.dataset.tag?r?WonderPush.addTag(n.dataset.tag):WonderPush.removeTag(n.dataset.tag):r?WonderPush.addProperty(n.dataset.field,n.dataset.value):WonderPush.removeProperty(n.dataset.field,n.dataset.value)});n()}))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},4276:(e,t,o)=>{var n;"undefined"==typeof localStorage||"undefined"==typeof PushManager||"undefined"==typeof Notification||localStorage.getItem("_wpinitialpermissionstate")||("default"===(n=Notification.permission)&&(n="prompt"),localStorage.setItem("_wpinitialpermissionstate",n)),n=[o(4433),o(7749),o(5488),o(5881),o(9536),o(8691),o(1102),o(4885),o(7285),o(6897),o(3998),o(686),o(9302),o(5115),o(8167),o(7735),o(6013),o(7995),o(6533),o(9072),o(8291),o(7303),o(4961),o(8442),o(124),o(7433),o(5403),o(431),o(5737),o(5163),o(4666),o(3066),o(9492),o(5792),o(846),o(6778),o(1669),o(2638),o(3878)],void 0!==(t=function(e,t,n,r,i,s,a,c,d,p,u,l,g,h,f,_,m,v,S,b,w,y,I,E,P,C,T,O,D,N,A,M,R,k,x,L,U,W,B){var j=Array.prototype.slice.call(arguments).slice(1);j.push(o(6964).ZP),j.push(o(7319).ZP),function(t){"use strict";var o,n,r,i,s;function a(e){var t={};if(e)for(var o=(e="?"===e.charAt(0)?e.substring(1):e).split("&"),n=0;n{e._protected.Api.proxifyPublicSDK(),e.this.init=n.init,e.this.ready=n.ready,e.this.push=n.ready,t.WonderPush=e.this,delete t.WonderPushInitLock,"permission"===s.wonderpushPopupUI&&e.this.push(e._protected.PopupUI.presentPermissionUI)}});if(t.WonderPush.push=n.ready,r)n.init(r);else{var c={};try{o&&(c=a(new URL(o.src).search))}catch(n){}var d=s.wonderpushWebKey||c.webKey,p=s.wonderpushUserId||c.userId,u=s.amp,l=(c=s.wonderpushInitOpts||c.initOpts,s.wonderpushUI||s.wonderpushUi);(d||c)&&(c=c?JSON.parse(c):{},d&&(c.webKey=d),void 0!==p&&(c.userId=p),l&&(c._mode=c._mode||"popup"),"frame"===u&&(c._mode="frame"),"dialog"===u&&(c._mode="popup"),c._mergeStoredOptions=!0,WonderPush.init(c))}for(const e of i)n.ready(e)}t.WonderPush&&"WonderPush"===t.WonderPush.constructor.name||t.WonderPushInitLock||(t.WonderPushInitLock=Symbol(),o="undefined"!=typeof document?document.currentScript:null,n=!0,r=void 0,i=[],t.WonderPush&&(r=t.WonderPush?t.WonderPush.initOpts:void 0,i=Array.isArray(t.WonderPush)?t.WonderPush:Array.isArray(t.WonderPush.q)?t.WonderPush.q:[],n=!!t.ServiceWorkerGlobalScope),s=a(location.search),n?c():setTimeout(c,0))}(self)}.apply(t,n))&&(e.exports=t)},3878:(e,t,o)=>{let n,r;o=[o(7758),o(3303),o(1651)],void 0!==(t=function(e,t,o){return function(i){switch(i._protected.Helper.decodeQueryString(location.search).amp){case"frame":(n=new e.AmpWebPushHelperFrame({debug:!1,WonderPushSDK:i})).run();break;case"dialog":i._protected.PopupUI.getModuleInitializationPromise().then((()=>{(r=new o.AmpWebPushPermissionDialog({debug:!1,htmlElement:i._protected.PopupUI.permissionHtmlElement(),needUserGestureToAskPermission:i._protected.Notification.needUserGestureToAskPermission(),PromisePoll:i._protected.Promise.Poll})).run()}))}i._protected.RunModes.Behaviors.ContextServiceWorker&&t.registerListeners((()=>i._protected.Config.getModuleInitializationPromise().then((()=>({applicationServerKey:i._protected.Helper.arrayBufferFromBase64UrlSafe(i._protected.Options.getApplicationServerKey()||""),onSubscribe:e=>e?Promise.all([i._protected.Notification.setManuallyUnsubscribed(!1),i._protected.Installation.addInstallationPushToken(e)]):Promise.resolve(),onUnsubscribe:()=>i._protected.Notification.setManuallyUnsubscribed(!0),getManuallyUnsubscribed:()=>i._protected.Notification.getManuallyUnsubscribed()})))),i._protected.ServiceWorker.addEventListener)}}.apply(t,o))&&(e.exports=t)},1651:(e,t,o)=>{"use strict";o.r(t),o.d(t,{AmpWebPushPermissionDialog:()=>s,PermissionDialogOptions:()=>{}});var n=o(9457),r=o(7114),i=o(4849);class s{constructor(e){this.debug_=e&&e.debug,this.PromisePoll=e&&e.PromisePoll,this.window_=e.windowContext||window,this.htmlElement=e.htmlElement,this.needUserGestureToAskPermission=e.needUserGestureToAskPermission,this.ampMessenger_=new r.Hi({debug:this.debug_,windowContext:this.window_})}isCurrentDialogPopup(){return!!this.window_.opener&&this.window_.opener!==this.window_}requestNotificationPermission(){return this.needUserGestureToAskPermission?new this.PromisePoll((()=>"default"!==Notification.permission),Number.POSITIVE_INFINITY,250).wait().then((()=>Notification.permission)):new Promise(((e,t)=>{try{this.window_.Notification.requestPermission((t=>e(t)))}catch(e){t(e)}}))}run(){this.onCloseIconClick_(),this.storeNotificationPermission_(),this.showTargetPermissionSection_(),this.showPostloadSection_(),this.showDefaultUI_(),this.window_.Notification.permission!==n.Of.DENIED?this.onPermissionDefaultOrGranted_():this.onPermissionDenied_()}showDefaultUI_(){var e=this.htmlElement,t=this.window_.document.querySelector("#whole-content");e&&t&&(t.innerHTML="",t.appendChild(e),e=e=>{e.addEventListener("click",(function(e){e.preventDefault(),window.close()}))},t.querySelectorAll(".wonderpush-close-button").forEach(e),t.querySelectorAll(".wp-popup-negative-button").forEach(e),t.querySelectorAll(".wp-popup-positive-button").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),WonderPush.subscribeToNotifications(e)}))})))}onCloseIconClick_(){var e=this.window_.document.querySelector("#close");e&&e.addEventListener("click",(()=>{this.closeDialog()}))}closeDialog(){if(this.isCurrentDialogPopup())this.window_.close();else{var e=this.window_.fakeLocation||this.window_.location;if(!(e=(0,i.dD)(e.search)).return)throw new Error("Missing required parameter.");e=(0,i.JH)(e.return),this.redirectToUrl(e)}}onPermissionDenied_(){navigator.permissions.query({name:"notifications"}).then((e=>{e.onchange=()=>{switch(this.storeNotificationPermission_(),this.window_.Notification.permission){case n.Of.DEFAULT:case n.Of.GRANTED:this.onPermissionDefaultOrGranted_()}}}))}storeNotificationPermission_(){this.window_.localStorage.setItem(n.BU.NOTIFICATION_PERMISSION,this.window_.Notification.permission)}showTargetPermissionSection_(){var e=this.window_.document.querySelectorAll("[permission]");for(let t=0;t{if(this.storeNotificationPermission_(),this.isCurrentDialogPopup())return this.ampMessenger_.connect(opener,"*"),this.ampMessenger_.send(r.Hi.Topics.NOTIFICATION_PERMISSION_STATE,e).then((e=>{(e=e[0])&&e.closeFrame&&this.closeDialog()}));this.closeDialog()}))}redirectToUrl(e){var t=(0,i.Ct)(e);!t||"http:"!==t.protocol&&"https:"!==t.protocol||(this.window_.location.href=e)}}},7758:(e,t,o)=>{"use strict";o.r(t),o.d(t,{AmpWebPushHelperFrame:()=>a,HelperFrameOptions:()=>{},NotificationPermissionStateMessage:()=>{},ServiceWorkerMessage:()=>{},ServiceWorkerRegistrationMessage:()=>{},StorageGetMessage:()=>{}});var n=o(9457),r=o(7114),i=o(4849),s=o(3303);class a{constructor(e){this.WonderPushSDK_=e&&e.WonderPushSDK,this.debug_=e&&e.debug,this.window_=e.windowContext||window,this.ampMessenger_=new r.Hi({debug:this.debug_,windowContext:this.window_}),this.allowedWorkerMessageTopics_={}}replyToFrameWithPayload_(e,t,o,n){e({success:t,error:t?void 0:o,result:t?n:void 0})}onAmpPageMessageReceivedNotificationPermissionState_(e,t){if(e&&e.isQueryTopicSupported){let o=!1;for(const t in r.Hi.Topics)e.isQueryTopicSupported===r.Hi.Topics[t]&&(o=!0);this.replyToFrameWithPayload_(t,!0,null,o)}else this.replyToFrameWithPayload_(t,!0,null,Notification.permission)}onAmpPageMessageReceivedStorageGet_(e,t){let o=null;try{e&&e.key&&this.window_.localStorage?o=this.window_.localStorage.getItem(e.key):console.warn(n.Kg,"LocalStorage retrieval failed.")}catch(e){}this.replyToFrameWithPayload_(t,!0,null,o)}onAmpPageMessageReceivedServiceWorkerState_(e,t){var o={isControllingFrame:!!this.window_.navigator.serviceWorker.controller,url:this.window_.navigator.serviceWorker.controller?this.window_.navigator.serviceWorker.controller.scriptURL:null,state:this.window_.navigator.serviceWorker.controller?this.window_.navigator.serviceWorker.controller.state:null};this.replyToFrameWithPayload_(t,!0,null,o)}onAmpPageMessageReceivedServiceWorkerRegistration_(e,t){if(!e||!e.workerUrl||!e.registrationOptions)throw new Error("Expected arguments workerUrl and registrationOptions in message, got:",e);this.window_.navigator.serviceWorker.register(e.workerUrl,e.registrationOptions).then((()=>{this.replyToFrameWithPayload_(t,!0,null,null)})).catch((e=>{this.replyToFrameWithPayload_(t,!0,null,e?e.message||e.toString():null)}))}messageServiceWorker(e){this.window_.navigator.serviceWorker.controller.postMessage({command:e.topic,payload:e.payload})}onAmpPageMessageReceivedServiceWorkerQuery_(e,t){if(!e||!e.topic)throw new Error("Expected argument topic in message, got:",e);new Promise((t=>{this.allowedWorkerMessageTopics_[e.topic]=t,this.waitUntilWorkerControlsPage().then((()=>{this.messageServiceWorker(e)}))})).then((o=>(delete this.allowedWorkerMessageTopics_[e.topic],this.replyToFrameWithPayload_(t,!0,null,o))))}getParentOrigin_(){var e=(0,i.dD)(this.window_.location.search);if(e.parentOrigin)return e.parentOrigin;throw new Error("Expecting parentOrigin URL query parameter.")}onPageMessageReceivedFromServiceWorker_(e){var{command:e,payload:t}=e.data,o=this.allowedWorkerMessageTopics_[e];e===s.WorkerMessengerCommand.AMP_SUBSCRIBE&&this.WonderPushSDK_&&this.WonderPushSDK_._protected.Installation.updateInstallationCoreProperties(),"function"==typeof o&&o(t)}isWorkerControllingPage_(){return this.window_.navigator.serviceWorker&&this.window_.navigator.serviceWorker.controller&&"activated"===this.window_.navigator.serviceWorker.controller.state}waitUntilWorkerControlsPage(){return new Promise((e=>{this.isWorkerControllingPage_()?e():this.window_.navigator.serviceWorker.addEventListener("controllerchange",(()=>{this.isWorkerControllingPage_()?e():this.window_.navigator.serviceWorker.controller.addEventListener("statechange",(()=>{this.isWorkerControllingPage_()&&e()}))}))}))}run(e){this.ampMessenger_.on(r.Hi.Topics.NOTIFICATION_PERMISSION_STATE,this.onAmpPageMessageReceivedNotificationPermissionState_.bind(this)),this.ampMessenger_.on(r.Hi.Topics.SERVICE_WORKER_STATE,this.onAmpPageMessageReceivedServiceWorkerState_.bind(this)),this.ampMessenger_.on(r.Hi.Topics.SERVICE_WORKER_REGISTRATION,this.onAmpPageMessageReceivedServiceWorkerRegistration_.bind(this)),this.ampMessenger_.on(r.Hi.Topics.SERVICE_WORKER_QUERY,this.onAmpPageMessageReceivedServiceWorkerQuery_.bind(this)),this.ampMessenger_.on(r.Hi.Topics.STORAGE_GET,this.onAmpPageMessageReceivedStorageGet_.bind(this)),this.waitUntilWorkerControlsPage().then((()=>{this.window_.navigator.serviceWorker.addEventListener("message",this.onPageMessageReceivedFromServiceWorker_.bind(this))})),this.ampMessenger_.listen([e||this.getParentOrigin_()])}}},3303:(e,t,o)=>{"use strict";o.r(t),o.d(t,{WorkerMessengerCommand:()=>n,registerListeners:()=>function(e,t){const o=e();t("message",(e=>{switch(e=e.data.command){case n.AMP_SUBSCRIPTION_STATE:o.then((e=>{{e={getManuallyUnsubscribed:e.getManuallyUnsubscribed};let t=null;Promise.all([self.registration.pushManager.getSubscription().then((e=>(t=e)?self.registration.pushManager.permissionState(e.options):null)),e.getManuallyUnsubscribed()]).then((e=>{var[e,o]=e;null==e||o?r(n.AMP_SUBSCRIPTION_STATE,!1):(o=!!t&&"granted"===e,r(n.AMP_SUBSCRIPTION_STATE,o))}))}}));break;case n.AMP_SUBSCRIBE:o.then((e=>{var t;t={applicationServerKey:e.applicationServerKey,onSubscribe:e.onSubscribe},self.registration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t.applicationServerKey}).then((e=>t.onSubscribe(e))).then((()=>{r(n.AMP_SUBSCRIBE,null)}))}));break;case n.AMP_UNSUBSCRIBE:o.then((e=>{(e={onUnsubscribe:e.onUnsubscribe})&&e.onUnsubscribe&&e.onUnsubscribe().then((()=>{r(n.AMP_UNSUBSCRIBE,null)}))}))}}))}});const n={AMP_SUBSCRIPTION_STATE:"amp-web-push-subscription-state",AMP_SUBSCRIBE:"amp-web-push-subscribe",AMP_UNSUBSCRIBE:"amp-web-push-unsubscribe"};function r(e,t){self.clients.matchAll().then((o=>{for(let n=0;n{"use strict";o.d(t,{Ct:()=>function(e){return i=i||self.document.createElement("a"),function(e,t){let o;return e.href=t,e.protocol||(e.href=e.href),"/"!==(t={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null}).pathname[0]&&(t.pathname="/"+t.pathname),("http:"==t.protocol&&80==t.port||"https:"==t.protocol&&443==t.port)&&(t.port="",t.host=t.hostname),o=e.origin&&"null"!=e.origin?e.origin:"data:"!=t.protocol&&t.host?t.protocol+"//"+t.host:t.href,t.origin=o,!1}(i,e)},JH:()=>r,dD:()=>function(e){var t=Object.create(null);if(e)for(;i=n.exec(e);){var o=r(i[1],i[1]),i=i[2]?r(i[2],i[2]):"";t[o]=i}return t}});const n=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function r(e){var t=1{"use strict";o.d(t,{BU:()=>r,Kg:()=>n,Of:()=>i});const n="[amp-web-push]",r={NOTIFICATION_PERMISSION:"amp-web-push-notification-permission"},i={GRANTED:"granted",DENIED:"denied",DEFAULT:"default"}},7114:(e,t,o)=>{"use strict";o.d(t,{Hi:()=>s});var n=o(9457),r=o(4849);function i(e){return e.data}class s{constructor(e){e=e||{debug:!1,windowContext:window},this.messages_={},this.listeners_={},this.debug_=e.debug,this.listening_=!1,this.connecting_=!1,this.connected_=!1,this.channel_=null,this.messagePort_=null,this.onListenConnectionMessageReceivedProc_=null,this.onConnectConnectionMessageReceivedProc_=null,this.onChannelMessageReceivedProc_=null,this.window_=e.windowContext||window}listen(e){return new Promise(((t,o)=>{this.connected_?o(new Error("Already connected.")):this.listening_?o(new Error("Already listening for connections.")):Array.isArray(e)?(this.onListenConnectionMessageReceivedProc_=this.onListenConnectionMessageReceived_.bind(this,e,t,o),this.window_.addEventListener("message",this.onListenConnectionMessageReceivedProc_),this.debug_&&console.debug(n.Kg,"Listening for a connection message...")):o(new Error("allowedOrigins should be a string array of allowed origins to accept messages from. Got:",e))})).then((()=>{this.send(s.Topics.CONNECT_HANDSHAKE,null),this.connected_=!0}))}isAllowedOrigin_(e,t){var o=(0,r.Ct)(e).origin;for(let e=0;e{e||i(new Error("Provide a valid Window context to connect to.")),t||i(new Error("Provide an expected origin for the remote Window or provide the wildcard *.")),this.connected_?i(new Error("Already connected.")):this.connecting_?i(new Error("Already connecting.")):(this.channel_=new MessageChannel,this.messagePort_=this.channel_.port1,this.onConnectConnectionMessageReceivedProc_=this.onConnectConnectionMessageReceived_.bind(this,this.messagePort_,t,o),this.messagePort_.addEventListener("message",this.onConnectConnectionMessageReceivedProc_),this.messagePort_.start(),e.postMessage({topic:s.Topics.CONNECT_HANDSHAKE},"*"===t?"*":(0,r.Ct)(t).origin,[this.channel_.port2]),console.debug(n.Kg,`Opening channel to ${t}...`))}))}onConnectConnectionMessageReceived_(e,t,o){this.connected_=!0,this.debug_&&console.debug(n.Kg,`Messenger channel to ${t} established.`),e.removeEventListener("message",this.onConnectConnectionMessageReceivedProc_),this.onChannelMessageReceivedProc_=this.onChannelMessageReceived_.bind(this),e.addEventListener("message",this.onChannelMessageReceivedProc_,!1),o()}static get Topics(){return{CONNECT_HANDSHAKE:"topic-connect-handshake",NOTIFICATION_PERMISSION_STATE:"topic-notification-permission-state",SERVICE_WORKER_STATE:"topic-service-worker-state",SERVICE_WORKER_REGISTRATION:"topic-service-worker-registration",SERVICE_WORKER_QUERY:"topic-service-worker-query",STORAGE_GET:"topic-storage-get"}}onChannelMessageReceived_(e){var t=i(e);if(this.messages_[t.id]&&t.isReply){e=this.messages_[t.id];var o=(delete this.messages_[t.id],e).promiseResolver;e.message=t.data,this.debug_&&console.debug(n.Kg,"Received reply for topic '%s': %s",t.topic,t.data),o([t.data,this.sendReply_.bind(this,t.id,e.topic)])}else{var r=this.listeners_[t.topic];if(r){this.debug_&&console.debug(n.Kg,`Received new message for topic '${t.topic}': `+t.data);for(let e=0;e{this.messages_[n.id]={message:o,topic:t,promiseResolver:e}}))}send(e,t){const o={id:crypto.getRandomValues(new Uint8Array(10)).join(""),topic:e,data:t};return this.debug_&&console.debug(n.Kg,"Sending %s: %s",e,t),this.messagePort_.postMessage(o),new Promise((n=>{this.messages_[o.id]={message:t,topic:e,promiseResolver:n}}))}}},2638:(e,t)=>{t=function(){let e=!1;const t=new Set(["constructor"]);return function(o){const n=new o._protected.Promise.Deferred,r=new Set(["init","ready","push","registerPlugin","Constants","Errors","setUserConsent","getUserConsent","clearAllData","clearEventsHistory","clearPreferences","downloadAllData"]),i=(o._protected.Api={},o._protected.Api.proxify=function(n,r){let i=2{if(!(t.has(s)||i.has(s)||e))switch(typeof n[s]){case"object":return o._protected.Api.proxify(n[s],r+"."+s);case"function":return()=>Promise.reject(new o.prototype.Errors.ConsentError(`Cannot call ${r}.${s} without user consent. Consider calling WonderPush.setUserConsent(true) after prompting the user.`));default:return n[s]}return n[s]}})},o._protected.Api.proxifyPublicSDK=function(){o.this=o._protected.Api.proxify(o.this,"WonderPush",r)},()=>o._protected.Consent.hasUserConsent().then((t=>{e=t})));return o.preInstantiationPromise.then((()=>o._protected.Consent.getModuleInitializationPromise())).then((()=>{o._protected.Integration.addBroadcastListener(o._protected.Constants.BROADCAST_TYPE_SET_USER_CONSENT,(()=>{i()})),i().then(n.resolve)})),n.promise}}.apply(t,[]),void 0!==t&&(e.exports=t)},7749:(e,t,o)=>{t=function(){return function(e){e._protected.BundleHelper=new function(){var t;this.loadInAppMessaging=function(){return e._protected.RunModes.Behaviors.ModeServiceWorker?Promise.reject():t=t||o.e(86).then(o.t.bind(o,5950,23)).then((t=>{t.default(e)}))}.bind(this)}}}.apply(t,[]),void 0!==t&&(e.exports=t)},7995:(e,t,o)=>{o=[o(415),o(4596)],t=function(e,t){return function(o){var n,r=[],i=Object.freeze({supportLevels:{optOut:{accessToken:!1,internalEvents:!1,customEvents:!1},optIn:{accessToken:!0,internalEvents:!0,customEvents:!1}}}),s=function(){if(!o._protected.Config.isConfigLoaded())throw new o._protected.Errors.InternalConfigUnavailableError("Config not loaded yet");switch(o.prototype.Notification.getSubscriptionState()){default:case o.prototype.SubscriptionState.UNSUPPORTED:case o.prototype.SubscriptionState.UNSUBSCRIBED:case o.prototype.SubscriptionState.NOT_SUBSCRIBED:return"optOut";case o.prototype.SubscriptionState.SUBSCRIBED:return"optIn"}},a=function(){o._protected.RunModes.Behaviors.AccessToken&&o._protected.Integration.isOnRightDomain()&&c()},c=function(){e=s();var e=(n.supportLevels||{})[e]||i.supportLevels[e],t=s(),o=[];e.accessToken||o.push("config_"+t+"_accessToken"),d(o)},d=function(e){for(var t=0;to._protected.Config.remoteConfigManager.read())).then((e=>e&&e.data&&e.data.inAppConfig||{campaigns:[]}))},o._protected.Config.getAutomaticActions=function(){return o._protected.Config.getModuleInitializationPromise().then((()=>o._protected.Config.remoteConfigManager.read())).then((e=>e&&e.data&&e.data.automaticActions||[]))},o._protected.Events.listen((function(e){n&&"subscription"===(e.detail||{}).name&&a()})),o._protected.Config.addConfigProcessor((async function(e){var t=(e=(n=e).options||{}).defaults||{};e=e.override||{},"string"==typeof o._protected.Options.getNotificationIcon()&&"string"==typeof t.notificationIcon&&o._protected.Options.getNotificationIcon().startsWith("http://")&&t.notificationIcon.startsWith("https://")&&(e.notificationIcon=t.notificationIcon)})),o._protected.Config.addConfigProcessor((async function(e){let n=!1;e&&e.inAppConfig&&e.inAppConfig.campaigns&&e.inAppConfig.campaigns.length&&(n=!0),e.automaticActions&&e.automaticActions.length&&(n=!0),await o.preInstantiationPromise,(n=!!await t.hasForcedInApps(o)||n)&&await o._protected.BundleHelper.loadInAppMessaging().catch((e=>{o._protected.RunModes.Behaviors.ModeServiceWorker||o._protected.Helper.warn("[config ]","[loadInAppMessaging]",e)}))})),o.preInstantiationPromise.then((()=>Promise.all([o._protected.Options.getModuleInitializationPromise(),o._protected.Integration.getModuleInitializationPromise(),o._protected.Config.getModuleInitializationPromise()]))).then((function(){o._protected.RunModes.Behaviors.ModeFrame&&o._protected.Config.remoteConfigManager.read().then((t=>{o._protected.Integration.broadcast(e.RemoteConfigToUpdateBroadcastType,t)}))})),o._protected.Blocker.category("accessToken").add("config"),o._protected.Blocker.category("integration").add("config"),o._protected.Config.getModuleInitializationPromise().then((function(){o._protected.RunModes.Behaviors.AccessToken&&o._protected.Integration.isOnRightDomain()&&c(),o._protected.Blocker.category("accessToken").remove("config"),o._protected.Blocker.category("integration").remove("config")}))}}.apply(t,o),void 0!==t&&(e.exports=t)},7735:(e,t)=>{t=function(){return function(e){let t=new e._protected.Promise.DynamicPromise;const o=new e._protected.Promise.Deferred;return e._protected.Consent={},e._protected.Consent.getUserConsent=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Consent.getUserConsent",(function(){return e._protected.Storage.get("userConsent").then((e=>(e=e||{}).state))})),e._protected.Consent.hasUserConsent=function(){return e._protected.Consent.getUserConsent().then((t=>{var o=e._protected.Options.getRequiresUserConsent();return void 0!==t?t:!o}))},e._protected.Consent.setUserConsent=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Consent.setUserConsent",(function(t){e._protected.Helper.debug("[consent ]","[setUserConsent]",t);const o={state:!!t,updateDate:+new Date};return e._protected.Storage.set("userConsent",o).then((()=>{e._protected.Integration.broadcast(e._protected.Constants.BROADCAST_TYPE_SET_USER_CONSENT,o)}))})),e._protected.Consent.awaitUserConsent=function(){return t.promise},e._protected.Consent.getModuleInitializationPromise=()=>o.promise,e.preInstantiationPromise.then((()=>Promise.all([e._protected.Integration.getModuleInitializationPromise(),e._protected.Options.getModuleInitializationPromise()]))).then((()=>{o.resolve(),e._protected.RunModes.Behaviors.ModeWebSite&&e._protected.Blocker.category("ready").add("consent"),e._protected.Consent.hasUserConsent().then((o=>{o?(e._protected.Blocker.category("ready").remove("consent"),t.setResolved()):t.setPending()})),e._protected.Integration.addBroadcastListener(e._protected.Constants.BROADCAST_TYPE_SET_USER_CONSENT,(()=>{e._protected.Consent.hasUserConsent().then((o=>{o?(t.setResolved(),e._protected.Blocker.category("ready").remove("consent")):t.setPending()}))}))})),o.promise}}.apply(t,[]),void 0!==t&&(e.exports=t)},8691:(e,t)=>{void 0!==(t=function(){return function(e){e._protected.Constants.SERVICE_WORKER_URL="wonderpush-worker-loader.min.js?webKey=${webKey}",e._protected.Constants.FRAME_URL="wonderpush.min.html",e._protected.Constants.MANIFEST_URL="wonderpush-manifest.json",e._protected.Constants.REDIRECT_URL="wonderpush-redirect.html?url=${url}",e.prototype.Constants={},e.prototype.Constants.SDK_VERSION="1.1.35.2",e.prototype.Constants.SDK_SHORT_VERSION=e.prototype.Constants.SDK_VERSION.split(".").slice(0,2).join("."),e._protected.Constants.ROOT_API_URL="api.wonderpush.com",e._protected.Constants.API_VERSION="v1",e._protected.Constants.MEASUREMENTS_API_BASE_URL="https://measurements-api.wonderpush.com/v1",e._protected.Constants.DEFAULT_LANGUAGE_CODE="en",e._protected.Constants.VALID_LANGUAGE_CODES=["af","ar","be","bg","bn","ca","cs","da","de","el","en","en_GB","en_US","es","es_ES","es_MX","et","fa","fi","fr","fr_FR","fr_CA","he","hi","hr","hu","id","is","it","ja","ko","lt","lv","mk","ms","nb","nl","pa","pl","pt","pt_PT","pt_BR","ro","ru","sk","sl","sq","sr","sv","sw","ta","th","tl","tr","uk","vi","zh","zh_CN","zh_TW","zh_HK"],e._protected.Constants.DEFAULT_DOMAIN_SUFFIX=".by.wonderpush.com",e._protected.Constants.CDN_ROOT_HREF="https://cdn"+e._protected.Constants.DEFAULT_DOMAIN_SUFFIX+"/",e._protected.Constants.CONFIG_URL_PATTERN=e._protected.Constants.CDN_ROOT_HREF+"config/webkeys/${webkey}",e._protected.Constants.PLUGIN_ROOT_URL=e._protected.Constants.CDN_ROOT_HREF+"plugins/",e._protected.Constants.PARTNER_DOMAIN_DEFAULT_URL_SUFFIX="sdk/",e._protected.Constants.CONFIG_FETCH_WAIT_BEFORE_RETRY_MS=1e4,e._protected.Constants.CONFIG_FETCH_MAX_TRIES=3,e._protected.Constants.CONFIG_CACHE_DEFAULT_TTL=432e5,e._protected.Constants.CONFIG_MISSING_CACHE_TTL=9e5,e._protected.Constants.GET_DELIVERIES_TRIES=3,e._protected.Constants.GET_DELIVERIES_ERROR_WAIT_MS=1e4,e._protected.Constants.GET_DELIVERIES_RANDOM_WAIT_MIN_MS=0,e._protected.Constants.GET_DELIVERIES_RANDOM_WAIT_MAX_MS=5e3,e._protected.Constants.GEOLOCATION_SUPPORTED="geolocation"in navigator,e._protected.Constants.GEOLOCATION_MAXIMUM_AGE=3e5,e._protected.Constants.GEOLOCATION_OPTIONS_FIRST_FIX={enableHighAccuracy:!1,timeout:0,maximumAge:e._protected.Constants.GEOLOCATION_MAXIMUM_AGE},e._protected.Constants.GEOLOCATION_OPTIONS={enableHighAccuracy:!1,timeout:e._protected.Constants.GEOLOCATION_MAXIMUM_AGE,maximumAge:e._protected.Constants.GEOLOCATION_MAXIMUM_AGE},e._protected.Constants.DIFFERENT_SESSION_REGULAR_MIN_TIME_GAP=18e5,e._protected.Constants.DIFFERENT_SESSION_NOTIFICATION_MIN_TIME_GAP=9e5,e._protected.Constants.INSTALLATION_CORE_PROPERTIES_CACHE=6048e5,e._protected.Constants.INSTALLATION_PUSH_TOKEN_CACHE=e._protected.Constants.INSTALLATION_CORE_PROPERTIES_CACHE,e._protected.Constants.SW_MAX_PAGELOAD_MS=6e4,e._protected.Constants.SW_CHECK_PAGELOADED_INTERVAL_MS=250,e._protected.Constants.SW_PING_TIMEOUT_MS=2e3,e._protected.Constants.SUBSCRIPTION_SWITCH_ELEMENT_ID_DEFAULT="wonderpush-subscription-switch",e._protected.Constants.SUBSCRIPTION_MODE_DEFAULT="visits",e._protected.Constants.SUBSCRIPTION_MIN_VISITS_DEFAULT=2,e._protected.Constants.SUBSCRIPTION_MIN_PAGES_DEFAULT=3,e._protected.Constants.SUBSCRIPTION_DELAY_DEFAULT=0,e._protected.Constants.SUBSCRIPTION_SNOOZE_DEFAULT=6048e5,e._protected.Constants.POPUP_AUTOCLOSE_SLEEP=3e3,e._protected.Constants.PUSH_MANAGER_SUBSCRIBE_TOO_LONG=5e3,e._protected.Constants.ACTION_METHOD="method",e._protected.Constants.ACTION_LINK="link",e._protected.Constants.ACTION_TRACK_EVENT="trackEvent",e._protected.Constants.ACTION_UPDATE_INSTALLATION="updateInstallation",e._protected.Constants.ACTION_SUBSCRIBE_TO_NOTIFICATIONS="subscribeToNotifications",e._protected.Constants.ACTION_SUBSCRIBE_TO_SPONSORED_NOTIFICATIONS="enableSponsoredNotifications",e._protected.Constants.ACTION_UNSUBSCRIBE_FROM_SPONSORED_NOTIFICATIONS="disableSponsoredNotifications",e._protected.Constants.ACTION_ADD_PROPERTY="addProperty",e._protected.Constants.ACTION_REMOVE_PROPERTY="removeProperty",e._protected.Constants.ACTION_RESYNC_INSTALLATION="resyncInstallation",e._protected.Constants.ACTION_ADD_TAG="addTag",e._protected.Constants.ACTION_REMOVE_TAG="removeTag",e._protected.Constants.ACTION_REMOVE_ALL_TAGS="removeAllTags",e._protected.Constants.ACTION__OVERRIDE_NOTIFICATION_RECEIPT="_overrideNotificationReceipt",e._protected.Constants.PER_USER_INSTALLATION_CUSTOM_PROPERTIES_STORAGE_KEY="perUserInstallationCustomProperties",e._protected.Constants.FEATURES_STORAGE_KEY="features",e._protected.Constants.PER_USER_CORE_PROPERTIES_STORAGE_KEY="perUserCoreProperties",e._protected.Constants.EVENTS_STORAGE_KEY="events",e._protected.Constants.JSON_SYNC_MAX_INFLIGHT_TIME=Math.round(1.1*e._protected.Constants.REQUEST_TIMEOUT_MS)+1e3,e._protected.Constants.CACHED_INSTALLATION_CUSTOM_PROPERTIES_MIN_DELAY=0,e._protected.Constants.CACHED_INSTALLATION_CUSTOM_PROPERTIES_MAX_DELAY=0,e._protected.Constants.FEDERATED_FRAME_URL=e._protected.Constants.CDN_ROOT_HREF+e._protected.Constants.PARTNER_DOMAIN_DEFAULT_URL_SUFFIX+e.prototype.Constants.SDK_VERSION+"/"+e._protected.Constants.FRAME_URL,e._protected.Constants.STORELOOP_WEBKEY="d94e437fcebe9b6abd33b391daf02ae151cefd9838ec80d287869abfbcd8e89b",e._protected.Constants.GOOGLE_ANALYTICS_PROPERTY_ID="UA-56491200-3",e._protected.Constants.GOOGLE_ANALYTICS_STORAGE_DATABASE_NAME="WP_analytics",e._protected.Constants.PRESENCE_ANTICIPATED_TIME_MS=3e5,e._protected.Constants.PRESENCE_UPDATE_SAFETY_MARGIN=6e4,e._protected.Constants.BROADCAST_TYPE_SET_USER_CONSENT="setUserConsent",e._protected.Constants.DEFAULT_LAST_RECEIVED_NOTIFICATION_CHECK_DELAY=6048e5,e._protected.Constants.LAST_RECEIVED_NOTIFICATION_CHECK_DATE_STORAGE_KEY="lastReceivedNotificationCheckDate",e._protected.Constants.LAST_RECEIVED_NOTIFICATION_CHECK_DATE_INSTALLATION_KEY="lastReceivedNotificationCheckDate",e._protected.Constants.LAST_RECEIVED_NOTIFICATION_CHECK_DELAY_PAYLOAD_KEY="lastReceivedNotificationCheckDelay",e._protected.Constants.FORCED_INAPPS_STORAGE_KEY="forcedInApps",e._protected.Constants.INVALID_ACCESS_TOKEN_ERROR_CODE=11003}}.apply(t,[]))&&(e.exports=t)},9492:(e,t)=>{t=function(){return function(e){var t="[data ]";e._protected.Data=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Data",new function(){this.exportAsBlob=function(){function t(e){n.push(JSON.stringify(e)),n.push("\n")}function o(o){var n=e._protected.Rest.fetchJson(o,"GET","/authentication/accessToken",{},void 0).then((function(e){return{accessToken:e}})).then(t),r=(null==o||""===o?Promise.resolve(null):e._protected.Rest.fetchJson(o,"GET","/user",{},void 0)).then((function(e){return{user:e}})).then(t),i=e._protected.Rest.fetchJson(o,"GET","/installation",{},void 0).then((function(e){return{installation:e}})).then(t);return Promise.all([n,i,r,function n(r){return function(t){return t=t?e._protected.Helper.decodeQueryString(new URL(t).search):{limit:1e3},e._protected.Rest.fetchJson(o,"GET","/events",t,void 0)}(r).then((function(e){if(t({eventsPage:e.data||[]}),e=(e.pagination||{}).next)return n(e)}))}(void 0)])}var n=[];return Promise.all([e._protected.Storage.listObjectStores().then((function(o){return Promise.all(o.map((function(o){return e._protected.Storage.listKeyValuePairs(o).then((function(e){t({indexedDbStoreKeyValuePairs:{[o]:e}})}))})))})),e._protected.Session.listUsedUserIds().then((function(e){return Promise.all(e.map(o))}))]).then((function(){return new Blob(n,{type:"application/json"})}))},this.downloadExport=function(){return Promise.all([e.this.getUserId(),e.this.getInstallationId(),e._protected.Data.exportAsBlob()]).then((function(e){var t=e[0],o=e[1],n=(e=e[2],null==t&&(t=""),document.createElement("a"));n.href=window.URL.createObjectURL(e),n.download="wonderpush-web-dataexport-"+encodeURIComponent(t).replace("-","%2D")+"-"+encodeURIComponent(o).replace("-","%2D")+"-"+(new Date).toISOString()+".json",document.body.appendChild(n),n.click(),document.body.removeChild(n)})).then((function(){}))},this.clearEventsHistory=function(t){return e._protected.Rest.fetchJson(t,"DELETE","/events",{},void 0).then((function(){}))},this.clearPreferences=function(t){e._protected.JsonSyncInstallationCustom.getInstallationCustomPropertiesForUser(t).then((function(o){return Object.keys(o).forEach((function(e){o[e]=null})),Promise.all([e._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser(t,o),t?e._protected.Rest.fetchJson(t,"PUT","/user",{body:JSON.stringify({custom:null})},void 0):Promise.resolve()])})).then((function(){}))},this.clearInstallation=function(o){return e._protected.Rest.fetchJson(o,"DELETE","/installation",{},void 0).catch((function(n){e._protected.Helper.error(t,"Failed to delete installation for userId",o,":",n),e._protected.Helper.info(t,"Continuing cleanup anyway")})).then((function(){return Promise.all([e._protected.Session.deleteSession(o),e._protected.JsonSyncInstallationCustom.deleteForUser(o)])})).then((function(){}))},this.clearAllLocalStorage=function(){var t=e._protected.Storage.getKeyValueStorageStoreName();return e._protected.Storage.listKeyValuePairs(t).then((function(t){e._protected.Storage.bulk(t.map((function(e){return{delete:{key:e[0]}}})))}))}}),e.prototype.Data=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.Data",new function(){this.exportAsBlob=function(){return e._protected.Data.exportAsBlob()},this.downloadExport=function(){return e._protected.Data.downloadExport()},this.clearEventsHistory=function(){return e._protected.Session.listUsedUserIds().then((function(t){return Promise.all(t.map((function(t){return e._protected.Data.clearEventsHistory(t)})))})).then((()=>{}))},this.clearPreferences=function(){return e._protected.Session.listUsedUserIds().then((function(t){return Promise.all(t.map((function(t){return e._protected.Data.clearPreferences(t)})))})).then((()=>{}))},this.clearAll=function(){return e._protected.Session.listUsedUserIds().then((function(t){return Promise.all(t.map((function(t){return e._protected.Data.clearInstallation(t)}))).then((function(){return e._protected.Data.clearAllLocalStorage()}))})).then((()=>{}))}})}}.apply(t,[]),void 0!==t&&(e.exports=t)},1102:(e,t)=>{void 0!==(t=function(){return function(){}}.apply(t,[]))&&(e.exports=t)},6778:(e,t)=>{t=function(){return function(e){e.prototype.Developer=new function(){this.invalidateConfig=function(){return Promise.all([e._protected.Config.invalidateConfig(),e._protected.Integration.callOnCustomDomain("WonderPushSDK._protected.Config.invalidateConfig",[])]).then((function(){}),(function(t){throw e._protected.Helper.warn("[developer ]","Failed to invalidate config",t),new e.prototype.Errors.InternalError("Failed to invalidate config")}))}}}}.apply(t,[]),void 0!==t&&(e.exports=t)},7285:(e,t)=>{t=function(){return function(e){e.prototype.Errors.ConsentError=function(t){e.prototype.Errors.Error.apply(this,arguments)},e.prototype.Errors.ConsentError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.ConsentError"},constructor:{value:e.prototype.Errors.ConsentError}}),e.prototype.Errors.PermissionError=function(t,o,n){e.prototype.Errors.Error.call(this,t),this.permission=o,this.state=n},e.prototype.Errors.PermissionError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.PermissionError"},constructor:{value:e.prototype.Errors.PermissionError}}),e.prototype.Errors.UserCancellationError=function(t){e.prototype.Errors.Error.apply(this,arguments)},e.prototype.Errors.UserCancellationError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.UserCancellationError"},constructor:{value:e.prototype.Errors.UserCancellationError}}),e.prototype.Errors.RegistrationInProgressError=function(t){e.prototype.Errors.Error.apply(this,arguments)},e.prototype.Errors.RegistrationInProgressError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.RegistrationInProgressError"},constructor:{value:e.prototype.Errors.RegistrationInProgressError}}),e.prototype.Errors.PushNotificationsNotSupportedError=function(t){e.prototype.Errors.Error.apply(this,arguments)},e.prototype.Errors.PushNotificationsNotSupportedError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.PushNotificationsNotSupportedError"},constructor:{value:e.prototype.Errors.PushNotificationsNotSupportedError}}),e.prototype.Errors.PopupError=function(t){e.prototype.Errors.Error.apply(this,arguments)},e.prototype.Errors.PopupError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.PopupError"},constructor:{value:e.prototype.Errors.PopupError}}),e.prototype.Errors.NotificationPayloadError=function(t){e.prototype.Errors.Error.apply(this,arguments)},e.prototype.Errors.NotificationPayloadError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.NotificationPayloadError"},constructor:{value:e.prototype.Errors.NotificationPayloadError}}),e.prototype.Errors.PluginError=function(t){e.prototype.Errors.Error.apply(this,arguments)},e.prototype.Errors.PluginError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.PluginError"},constructor:{value:e.prototype.Errors.PluginError}}),e._protected.Errors.InternalConfigUnavailableError=function(t){e.prototype.Errors.InternalError.apply(this,arguments)},e._protected.Errors.InternalConfigUnavailableError.prototype=Object.create(e.prototype.Errors.InternalError.prototype,{name:{value:"WonderPushSDK.Errors.InternalConfigUnavailableError"},constructor:{value:e._protected.Errors.InternalConfigUnavailableError}}),e._protected.Errors.InternalWrongDomainError=function(t){e.prototype.Errors.InternalError.apply(this,arguments)},e._protected.Errors.InternalWrongDomainError.prototype=Object.create(e.prototype.Errors.InternalError.prototype,{name:{value:"WonderPushSDK.Errors.InternalWrongDomainError"},constructor:{value:e._protected.Errors.InternalWrongDomainError}}),e._protected.Errors.InternalWrongTargetError=function(t){e.prototype.Errors.InternalError.apply(this,arguments)},e._protected.Errors.InternalWrongTargetError.prototype=Object.create(e.prototype.Errors.InternalError.prototype,{name:{value:"WonderPushSDK.Errors.InternalWrongTargetError"},constructor:{value:e._protected.Errors.InternalWrongTargetError}}),e.prototype.Errors.SubscriptionStateError=function(t,o,n){e.prototype.Errors.Error.call(this,t),this.expectedValues=o,this.subscriptionState=n},e.prototype.Errors.SubscriptionStateError.prototype=Object.create(e.prototype.Errors.Error.prototype,{name:{value:"WonderPushSDK.Errors.SubscriptionStateError"},constructor:{value:e.prototype.Errors.SubscriptionStateError}})}}.apply(t,[]),void 0!==t&&(e.exports=t)},686:(e,t,o)=>{var n=[o(1443)];t=function(e){let t=e.EventCollapser;return function(e){const{EventAttributionManager:n,ReportingDataUtil:r}=o(6433);var i="[events ]";e._protected.Events=new function(){this.WonderPushTrackEventEvent=function(t){return{event:t,name:e._protected.Events.WonderPushTrackEventEvent.TYPE,type:e._protected.Events.WonderPushTrackEventEvent.TYPE}},this.WonderPushTrackEventEvent.TYPE="trackEvent",this.WonderPushNotificationOpenedEvent=function(t){return{event:t,name:e._protected.Events.WonderPushNotificationOpenedEvent.TYPE,type:e._protected.Events.WonderPushNotificationOpenedEvent.TYPE}},this.WonderPushNotificationOpenedEvent.TYPE="notificationOpened",this.WonderPushSessionEvent=function(t){return{name:e._protected.Events.WonderPushSessionEvent.TYPE,type:e._protected.Events.WonderPushSessionEvent.TYPE,state:t}},this.WonderPushSessionEvent.TYPE="session",this.WonderPushSubscriptionEvent=function(t){return{name:e._protected.Events.WonderPushSubscriptionEvent.TYPE,type:e._protected.Events.WonderPushSubscriptionEvent.TYPE,state:t}},this.WonderPushSubscriptionEvent.TYPE="subscription",this.WonderPushCallMethodEvent=function(t,o){return{name:e._protected.Events.WonderPushCallMethodEvent.TYPE,type:e._protected.Events.WonderPushCallMethodEvent.TYPE,method:t,arg:o}},this.WonderPushCallMethodEvent.TYPE="method",this.NewAppOpen=function(t){return{type:e._protected.Events.NewAppOpen.TYPE,visitCount:t}},this.NewAppOpen.TYPE="newAppOpen",this.NewPageView=function(t){return{type:e._protected.Events.NewPageView.TYPE,attendance:t}},this.NewPageView.TYPE="newPageView",this.MethodCall=function(t,o){return{type:e._protected.Events.MethodCall.TYPE,method:t,methodArg:o}},this.MethodCall.TYPE="methodCall",this.fire=function(t){t.WonderPushSDK=e.this,e._protected.Helper.fireEvent(e._protected.gscope,"WonderPushEvent",t)},this.fireOnParentWindow=e._protected.Integration.proxifyToParentWindow("WonderPushSDK._protected.Events.fireOnParentWindow",(function(t){e._protected.Events.fire(t)})),this.listen=function(t){var o=self._wp_worker_addEventListener||function(t,o){e._protected.Helper.listenEvent(e._protected.gscope,t,o)};try{o("WonderPushEvent",t)}catch(t){console.warn(i,"Cannot listen to WonderPushEvent")}},this.unlisten=function(t){var o=self._wp_worker_removeEventListener||function(t,o){e._protected.Helper.unlistenEvent(e._protected.gscope,t,o)};try{o("WonderPushEvent",t)}catch(t){console.warn(i,"Cannot remove listener to WonderPushEvent")}},this.sendEvent=function(o,n,s,a,c){return e._protected.Events.getCurrentAttribution().then((d=>{n=n||{};const p=c&&c.useMeasurementsApi?e._protected.Options.getMeasurementsApiUrlPrefix()+"/events":"/events",u=t=>c&&c.useBeacon?e._protected.Consent.awaitUserConsent().then((()=>e.this.Rest.postBeacon(p,t,a))):c&&c.postImmediately?e._protected.Consent.awaitUserConsent().then((()=>e.this.Rest.post(p,t,void 0))):e.this.Rest.postEventually(p,t,void 0);var l,g={};for(l in n)n.hasOwnProperty(l)&&(g[l]=n[l]);return r.assignEventData(g,d,{attributionReason:"recentNotificationOpened"}),g.type=o,g.actionDate=g.actionDate||e._protected.Time.getRealTime(),g.location=g.location||e._protected.Geo.getGeolocation(),g.location||delete g.location,s&&"object"==typeof s&&(g.custom=s),e._protected.Storage.getModuleInitializationPromise().then((()=>{let o=Promise.resolve();return e._protected.Storage.bulk([{test:{key:e._protected.Constants.EVENTS_STORAGE_KEY,operationsCb:n=>{var r=JSON.parse(JSON.stringify(g)),i=("@CAMPAIGN_TRIGGER"===r.type&&(r.collapsing="campaign"),n=new t(n||[]),r.occurrences=n.addEvent(r),{body:JSON.stringify(r)});return e._protected.Events.fireOnParentWindow(new e._protected.Events.WonderPushTrackEventEvent(r)),o=c&&(c.useMeasurementsApi||c.allowAnonymous)?e._protected.getUserId().then((t=>c&&c.useMeasurementsApi?(i.clientId=e._protected.Options.getWebKey(),i.devicePlatform="Web",t&&(i.userId=t),e._protected.Init.getDeviceId().then((e=>(i.deviceId=e,u(i))))):c&&c.allowAnonymous?e._protected.Session.getSession(t).then((t=>t&&t.accessToken?u(i):e._protected.Consent.awaitUserConsent().then((()=>e.this.Rest.postEventuallyAnonymously(p,i,void 0))))):u(i))):u(i),[{put:{key:e._protected.Constants.EVENTS_STORAGE_KEY,value:n.getEvents()}}]}}}]).then((()=>o),(t=>(e._protected.Helper.error(i,"[sendEvent] storing events rejected:",t),o)))}))}))},this.getCurrentAttribution=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Events.getCurrentAttribution",(function(){return new n(e._protected.Storage).currentAttribution()})),this.getAllEvents=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Events.getAllEvents",(function(){return e._protected.Storage.getModuleInitializationPromise().then((()=>e._protected.Storage.get(e._protected.Constants.EVENTS_STORAGE_KEY,[]).then((e=>e.map((e=>(e.creationDate||(e.creationDate=e.actionDate),e)))))))}))}}}.apply(t,n),void 0!==t&&(e.exports=t)},5115:(e,t)=>{t=function(){return function(e){var t=e._protected.Consulate.createConsulate("federated");e._protected.Federated=new function(){this.ensureSetup=function(){if(e._protected.RunModes.Behaviors.ContextWindow){if(e._protected.RunModes.Behaviors.ModeSlave,e._protected.RunModes.Behaviors.Federated)throw new e._protected.Errors.InternalWrongTargetError("Must not create a frame on federated domain from a frame on federated domain");var n,r;t.isSetup()||(n=e._protected.Options.exportInitial(),r={_mode:e._protected.RunModes.Modes.Slave},"debug"in n&&(r.debug=n.debug),t.setup(o(),r))}},this.getReadyPromise=function(){return t.getReadyPromise()},this.call=function(o,n){return e._protected.Federated.ensureSetup(),e._protected.Federated.getReadyPromise().then((function(){return e._protected.Integration.callOnSlave(t.getPostMessageTarget(),o,n)}))};var o=function(){return e._protected.Constants.FEDERATED_FRAME_URL}}}}.apply(t,[]),void 0!==t&&(e.exports=t)},4961:(e,t)=>{t=function(){return function(e){function t(t){e._protected.Storage.set("geolocationPermission",t)}var o=null,n=null,r=null,i=(e.prototype.Geo={},e.prototype.Geo.useGeolocation=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.Geo.useGeolocation",(function(t){e._protected.Constants.GEOLOCATION_SUPPORTED&&i().then((function(n){(t="auto"===t?"granted"===n:t)?o||(o=navigator.geolocation.watchPosition(s,a,e._protected.Constants.GEOLOCATION_OPTIONS),navigator.geolocation.getCurrentPosition(s,a,e._protected.Constants.GEOLOCATION_OPTIONS_FIRST_FIX)):o&&(navigator.geolocation.clearWatch(o),o=void 0)}))})),e.prototype.Geo.fake=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.Geo.fake",(function(e){e?"lat"in e&&"lon"in e&&(r={lat:e.lat,lon:e.lon}):r=null})),e._protected.Geo={},e._protected.Geo.getGeolocation=function(){return r?{lat:r.lat,lon:r.lon}:!n||new Date-n.timestamp>e._protected.Constants.GEOLOCATION_MAXIMUM_AGE?null:{lat:n.coords.latitude,lon:n.coords.longitude}},function(){return e._protected.Storage.get("geolocationPermission","prompt")}),s=function(o){t("granted"),!o||new Date-o.timestamp>e._protected.Constants.GEOLOCATION_MAXIMUM_AGE||(!n||o.timestamp>n.timestamp)&&(n=o)},a=function(o){o.code===o.PERMISSION_DENIED&&(t("denied"),e.prototype.Geo.useGeolocation(!1))};e._protected.RunModes.Behaviors.GeolocationPermission&&e._protected.Config.getModuleInitializationPromise().then((function(){function t(){e._protected.Consent.hasUserConsent().then((t=>{t?e.prototype.Geo.useGeolocation(e._protected.Options.getGeolocation()):(e.prototype.Geo.useGeolocation(!1),n=null)}))}e._protected.Integration.addBroadcastListener(e._protected.Constants.BROADCAST_TYPE_SET_USER_CONSENT,(()=>{t()})),t()}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},5881:(e,t)=>{void 0!==(t=function(){return function(e){e._protected.Helper.supportsVAPID=function(){return"undefined"!=typeof PushSubscriptionOptions&&"applicationServerKey"in PushSubscriptionOptions.prototype}}}.apply(t,[]))&&(e.exports=t)},6533:(e,t)=>{t=function(){return function(e){function t(){var t,n;e._protected.Init.isInitialized()||(t=function(){i=!0,o(e.this.SessionState.INIT_SUCCESS)},n=function(){o(e.this.SessionState.INIT_FAILED)},e._protected.Blocker.category("accessToken").add("initNeedsConfig"),e._protected.Config.getModuleInitializationPromise().then((()=>{e._protected.Integration.isOnRightDomain()&&e._protected.Blocker.category("accessToken").remove("isOnRightDomain"),e._protected.RunModes.Behaviors.CoreProperties&&e._protected.Installation.updateInstallationCoreProperties()})),e._protected.Config.getModuleInitializationPromise().then((function(){e._protected.RunModes.Behaviors.AccessToken&&e._protected.Integration.isOnRightDomain()&&(o(e.this.SessionState.INIT_INPROGRESS),e.instantiationPromise.then((function(){e._protected.getUserId().then((o=>e._protected.Init.fetchAccessTokenIfNeeded(o,t,n)))}))),e._protected.Blocker.category("accessToken").remove("initNeedsConfig")}))),e._protected.Blocker.category("ready").remove("init")}function o(t){r!==(s=t)&&(r=s,e._protected.Events.fire(e._protected.Events.WonderPushSessionEvent(e._protected.Init.getSessionState())),e._protected.RunModes.Behaviors.ModeFrame&&e._protected.Init.setSessionStateOnParentWindow(t),t===e.prototype.SessionState.INIT_SUCCESS)&&((e._protected.RunModes.Behaviors.ModeFrame||e._protected.RunModes.Behaviors.ModeWebSite&&e._protected.Integration.isOnRightDomain())&&e._protected.Helper.supportsServiceWorker()&&e._protected.Init.setSessionStateOnServiceWorker(t),e._protected.RunModes.Behaviors.ModeServiceWorker)&&e._protected.Init.setSessionStateOnServiceWorkerClients(t)}function n(e,t,o,n){for(var r=0;rt))},e._protected.Init.getFederatedDeviceId=e._protected.Integration.remotelyCallable((function(){var t=e._protected.Helper.detectBrowser();return t&&"Safari"===t.name?Promise.resolve(null):new Promise(((t,o)=>{e._protected.Storage.bulk([{test:{key:"federatedDeviceId",defaultValue:null,operationsCb:function(n){if(n)t(n);else if(e._protected.RunModes.Behaviors.ContextWindow){if(e._protected.Integration.isOnFederatedDomain())return n=e._protected.Helper.uuidv4()+"-"+(+new Date).toString(16),t(n),{put:{key:"federatedDeviceId",value:n}};e._protected.Federated.call("WonderPushSDK._protected.Init.getFederatedDeviceId",[]).then((function(t){return e._protected.Promise.catchNoop(e._protected.Storage.set("federatedDeviceId",t)).then((function(){return t}))})).then(t,o)}else t(null)}}}])}))})),e._protected.Blocker.category("accessToken").wait().then((()=>e._protected.getUserId())).then((function(t){e._protected.Init.fetchAccessTokenIfNeeded(t)})),{});e._protected.Init.fetchAccessTokenIfNeeded=function(t,o,r){e._protected.RunModes.Behaviors.AccessToken&&e._protected.Integration.isOnRightDomain()?e._protected.Consent.awaitUserConsent().then((()=>{function i(){}"function"!=typeof o&&(o=i),"function"!=typeof r&&(r=i),c[t]||(c[t]=[]),c[t].push({onload:o,onerror:r}),e._protected.Blocker.category("accessToken").unblocked()&&(o=function(){n(c[t],"onload",this)},r=function(){n(c[t],"onerror",this)},e._protected.Session.getSession(t).then((function(n){var i,s;n&&n.accessToken&&n.installationId?setTimeout(o,0):(i=new e._protected.Locking.ExpiringUnfairNamedGlobalMutex("fetchAccessToken:userId="+(t||""),3e4),s=function(t){function n(t){var n=(t=t||{}).token||null,r=(t.data||{}).sid||null,s=(t.data||{}).installationId||null,a=(t.data||{}).userId||null;return n&&s?i.renew().then((function(){var i=[];return t._installation instanceof Object&&i.push(e._protected.JsonSyncInstallationCustom.receiveStateForUser(a,t._installation.custom||{},!1)),i.push(e._protected.Session.setSession({accessToken:n,sid:r,installationId:s,userId:a})),Promise.all(i).then((function(){setTimeout((function(){o()}),0)}))}),(function(){return Promise.reject()})):Promise.reject("invalid access token")}return"function"==typeof Response&&t instanceof Response?t.json().then(n):n(this.responseJSON)},i.tryAcquire().then((function(){var o,n,a=new e._protected.Promise.Deferred;i.renewWhile({interval:15e3,release:!0},a.promise),e._protected.Promise.catchNoop(a.promise),o=t,n={onload:function(t){e._protected.Promise.do(s.call(this,t),a.resolve).catch((function(e){r.call(this,e)}))},onerror:function(e){a.reject(e),r.call(this,e)}},e._protected.RunModes.Behaviors.AccessToken&&e._protected.Integration.isOnRightDomain()?e._protected.Init.getDeviceId().then((async function(t){(t={clientId:e._protected.Options.getWebKey(),devicePlatform:"Web",deviceCategory:await e._protected.Helper.isMobile()?"mobile":"desktop",deviceId:t,userId:o}).userId||delete t.userId,e._protected.Rest.post(o,"/authentication/accessToken",t,void 0,n)}),(function(e){console.warn("Failed to read deviceId",e),n.onerror&&n.onerror.call(null,e)})):console.error("fetchAccessToken should not be called from this mode")}),(function(){setTimeout((function(){e._protected.Init.fetchAccessTokenIfNeeded(t,null,null)}),2e3)})))})))})):console.error("fetchAccessToken should not be called from this mode")},e._protected.Blocker.category("ready").add("init"),e._protected.RunModes.Behaviors.AccessToken||e._protected.Blocker.category("accessToken").add("mode"),e._protected.Blocker.category("accessToken").add("isOnRightDomain"),setTimeout((function(){e.preInstantiationPromise.then(t)}),0)}}.apply(t,[]),void 0!==t&&(e.exports=t)},4860:(e,t)=>{t=function(){return function(e){const t="[install-prof]";var o=new e._protected.Promise.Deferred;async function n(t){let n=1{var o=(e=e||{})[s]||{},a=(e[s]=o)[t]||{};if(o[t]=a,r=void 0!==a.overrideValue&&null!==a.overrideValue?a.overrideValue:null!=n?n:a.defaultValue,null!=n&&a.defaultValue!==n)return a.defaultValue=n,[{put:{key:i,value:e}}]}}}]),r}const r=async(t,n)=>{await o.promise;const r=e._protected.Constants.PER_USER_CORE_PROPERTIES_STORAGE_KEY,i=await e._protected.getUserId()||"";await e._protected.Storage.bulk([{test:{key:r,operationsCb:e=>{var o=(e=e||{})[i]||{},s=(e[i]=o)[t]||{};if((o[t]=s).overrideValue!==n)return s.overrideValue=n,[{put:{key:r,value:e}}]}}}]),e._protected.RunModes.Behaviors.CoreProperties&&await e._protected.Installation.updateInstallationCoreProperties()};e._protected.Installation.Profile={},e._protected.Installation.Profile.getModuleInitializationPromise=function(){return o.promise},e._protected.Installation.Profile.getTimeZone=async function(){return n("device.configuration.timeZone",((r=!r&&Intl&&(e=Intl.DateTimeFormat())&&e.resolvedOptions?e.resolvedOptions().timeZone:r)||(t={GMT:"GMT",EAT:"Africa/Addis_Ababa",CET:"Africa/Algiers",WAT:"Africa/Kinshasa",CAT:"Africa/Lubumbashi","CEST CET":"Europe/Berlin",SAST:"Africa/Johannesburg",EET:"Africa/Tripoli","HADT HAST":"America/Adak","AKDT AKST":"America/Anchorage",BRT:"America/Bahia",ART:"America/Buenos_Aires",EST:"America/Panama",AMT:"America/Manaus","AMST AMT":"America/Campo_Grande",MST:"America/Phoenix","PDT PST":"America/Los_Angeles","EDT EST":"America/New_York",ACT:"America/Rio_Branco","ADT AST":"America/Halifax",PST:"America/Metlakatla",FNT:"America/Noronha","CLST CLT":"America/Santiago","BRST BRT":"America/Sao_Paulo","NDT NST":"America/St_Johns",AWST:"Australia/West","NZDT NZST":"Pacific/Auckland",AQTT:"Asia/Aqtobe",TMT:"Asia/Ashgabat",ICT:"Asia/Bangkok",IST:"Asia/Kolkata",BDT:"Asia/Dhaka",GST:"Asia/Dubai",HKT:"Asia/Hong_Kong",WIB:"Asia/Jakarta","IDT IST":"Asia/Jerusalem",XJT:"Asia/Urumqi",NPT:"Asia/Katmandu",YAKT:"Asia/Yakutsk",MYT:"Asia/Kuala_Lumpur",WITA:"Asia/Makassar",KST:"Asia/Seoul",UZT:"Asia/Tashkent",SGT:"Asia/Singapore","IRDT IRST":"Asia/Tehran",BTT:"Asia/Thimphu",JST:"Asia/Tokyo",ULAT:"Asia/Ulaanbaatar",VLAT:"Asia/Vladivostok","AEDT AEST":"Australia/Victoria","ACDT ACST":"Australia/South",AEST:"Australia/Queensland",ACST:"Australia/North","LHDT LHST":"Australia/Lord_Howe","EASST EAST":"Pacific/Easter","GMT IST":"Europe/Dublin",UCT:"Etc/UCT",UTC:"UTC","BST GMT":"Europe/London",MSK:"Europe/Moscow",HST:"Pacific/Honolulu",MHT:"Pacific/Majuro","CHADT CHAST":"Pacific/Chatham",CHUT:"Pacific/Chuuk",ChST:"Pacific/Guam",SST:"Pacific/Samoa",PONT:"Pacific/Pohnpei"},o=[["America/Mexico_City",1396771200,360,300],["America/Chicago",1394352e3,360,300],["America/Havana",1394341200,300,240],["America/Denver",1394355600,420,360],["America/Chihuahua",1396774800,420,360],["America/Puerto_Rico",1420070400,240,240],["Asia/Baghdad",1420070400,-180,-180],["America/Guatemala",1420070400,360,360],["Asia/Chongqing",1420070400,-480,-480],["Africa/Cairo",1400191200,-120,-180],["Asia/Gaza",1395957600,-120,-180],["Asia/Istanbul",1396227600,-120,-180],["Europe/Athens",1396141200,-120,-180],["Africa/Casablanca",1396144800,0,-60],["Europe/Lisbon",1396141200,0,-60]],r=function(){for(var e=[],n=0;n<12;++n){var r=new Date(2014,n).toString().replace(/^.*\((.+)\)$/,"$1");-1===e.indexOf(r)&&e.push(r)}var i=e.sort().join(" ");if(i in t)return t[i];for(var s=0;s(new Date).getTime()&&t?(r.requestHappening||{}).withUserActivation:void 0,t=void 0!==r.permissionGrantedWithUserActivation?r.permissionGrantedWithUserActivation:t,o=r.initialPermissionState?"-"+r.initialPermissionState:"",n="v"+r.version+"-",!0===t?n+"promptedWithEvent"+o:!1===t?n+"promptedWithoutEvent"+o:(r.statsByState.granted.sinceDate,Math.max((r.statsByState.prompt||{}).lastDate||Number.NEGATIVE_INFINITY,(r.statsByState.denied||{}).lastDate||Number.NEGATIVE_INFINITY),r.statsByState.granted.hadSession?n+"unknown"+o:n+"inherited"+o)):null},e._protected.Installation.Profile.getCoreProperties=async function(t){var n=(t=await Promise.all([t?void 0:e._protected.Init.getFederatedDeviceId(),e._protected.Notification.getManuallyUnsubscribed(),e._protected.Notification.getTrustedOrCachedNotificationPermissionState(),o.promise,e._protected.Features.getFeatures(),e._protected.Notification.getSponsoredNotificationsEnabled(),e._protected.Notification.getSponsoredNotificationsConsentGiven()]))[0],r=t[1],i=t[2],s=t[4],a=t[5];let c;return t=t[6],n=n&&"0:"+n,a={sponsoredNotificationsEnabled:void 0===a&&void 0===t?void 0:(void 0===a||a)&&(void 0===t||t)},i!==e._protected.Notification.PERMISSION_UNKNOWN&&(c=i===e._protected.Notification.PERMISSION_GRANTED,a.osNotificationsVisible=c),a.subscriptionStatus=r||!1===c?"optOut":"optIn",a.subscribedToNotifications=!r,{application:{version:e._protected.Options.getApplicationVersion(),integrator:e._protected.Options.getIntegrator()||null,sdkVersion:"Web-"+e.this.Constants.SDK_VERSION,web:{permissionCollection:await e._protected.Installation.Profile.getPermissionCollection(),features:s},domain:function(){if(!e._protected.RunModes.Behaviors.ContextServiceWorker&&!e._protected.RunModes.Behaviors.ModeSlave){if(e._protected.RunModes.Behaviors.ContextFrame||e._protected.RunModes.Behaviors.ModePopup)try{return new URL(document.referrer).hostname}catch(e){}return location.hostname}}()},preferences:a,device:{federatedId:n,osVersion:e._protected.Helper.detectBrowser().version||null,brand:e._protected.Helper.detectBrowser().name||null,model:navigator.userAgent,screenWidth:"undefined"!=typeof screen&&screen.width||void 0,screenHeight:"undefined"!=typeof screen&&screen.height||void 0,category:await e._protected.Helper.isMobile()?"mobile":"desktop",configuration:{timeZone:await e._protected.Installation.Profile.getTimeZone(),locale:await e._protected.Installation.Profile.getLocale(),country:await e._protected.Installation.Profile.getCountry(),currency:await e._protected.Installation.Profile.getCurrency()},platform:"Web"}}},e.preInstantiationPromise.then((()=>Promise.all([e._protected.Storage.getModuleInitializationPromise()]))).then((()=>{o.resolve()}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},8442:(e,t,o)=>{o=[o(4860)],t=function(e){return function(t){var o="[installation]";t._protected.Installation={},t._protected.Installation.updateInstallationCoreProperties=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.updateInstallationCoreProperties",(function(e){return t.prototype.getInitializationPromise().then((function(){return t._protected.Session.getCurrentSession().then((function(o){return t._protected.Installation.Profile.getCoreProperties().then((function(n){if(n)return t._protected.Storage.bulk([{test:{key:"installationCoreProperties",defaultValue:null,operationsCb:function(r){r=r||{date:0,json:"{}"};var i=JSON.parse(r.json),s={},a=(t._protected.RunModes.Behaviors.ContextServiceWorker&&t._protected.Helper.mergeObjectInplaceRecursive(s,JSON.parse(JSON.stringify(i))),(n.application||{}).integrator);if(t._protected.Helper.stripObject(n),t._protected.Helper.mergeObjectInplaceRecursive(s,n),t._protected.Helper.stripObject(s),void 0!==a&&(s.application||(s.application={}),s.application.integrator=a),e&&e.force||!t._protected.JsonUtil.equal(s,i)||r.userId!==o.userId||r.installationId!==o.installationId||!(+new DatePromise.resolve(u)))})),t._protected.Installation.getCachedInstallationPushToken=function(){return t._protected.Storage.get("pushTokenCache",{pushTokenData:null}).then((function(e){return e.pushTokenData}))},t._protected.Installation.removeInstallationPushToken=function(){t._protected.Installation.addInstallationPushToken(null)},t._protected.Installation.sendCachedPushToken=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.sendCachedPushToken",(function(){return t._protected.Storage.get("pushTokenCache",{}).then((e=>{e&&e.pushTokenData&&t.this.Rest.postEventually("/installation",{overwrite:"false",body:JSON.stringify({pushToken:{origin:e.pushTokenOrigin,data:e.pushTokenData,expirationDate:e.pushTokenExpirationDate,p256dh:e.pushTokenP256dh,auth:e.pushTokenAuth,applicationServerKey:e.pushTokenApplicationServerKey,userVisibleOnly:e.pushTokenUserVisibleOnly}})},void 0)}))})),t._protected.Installation.getProperties=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.getProperties",(function(){return t._protected.getUserId().then((e=>t._protected.JsonSyncInstallationCustom.getInstallationCustomPropertiesForUser(e))).then((e=>(Object.keys(e).forEach((t=>{("string"!=typeof t||t.indexOf("_")<0)&&delete e[t]})),e)))})),t._protected.Installation.putProperties=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.putProperties",(function(e){return e?e instanceof Object?(e=t._protected.Helper.plainObjectCopy(e),Object.keys(e).forEach((n=>{("string"!=typeof n||n.indexOf("_")<0)&&(t._protected.Helper.warn(o,"Dropping installation property with no prefix:",n,"=",e[n]),delete e[n])})),t._protected.getUserId().then((o=>t._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser(o,e)))):(console.error("WonderPushSDK.putProperties() expects an object as argument, got ",e),Promise.reject(new t.prototype.Errors.InvalidArgumentError("WonderPushSDK.putProperties() expects an object as argument"))):Promise.resolve()})),t._protected.Installation.setProperty=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.setProperty",(function(e,o){return e?t._protected.Installation.putProperties({[e]:o}):Promise.resolve()})),t._protected.Installation.unsetProperty=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.unsetProperty",(function(e){return e?t._protected.Installation.putProperties({[e]:null}):Promise.resolve()})),t._protected.Installation.addProperty=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.addProperty",(function(e,o){if(!e||null==o)return Promise.resolve();const n=Array.isArray(o)?o:Array.from(arguments).slice(1);return t._protected.Installation.getPropertyValues(e).then((o=>(n.forEach((e=>{null!=e&&o.indexOf(e)<0&&o.push(e)})),t._protected.Installation.putProperties({[e]:o}))))})),t._protected.Installation.removeProperty=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.removeProperty",(function(e,o){if(!e||null==o)return Promise.resolve();const n=Array.isArray(o)?o:Array.from(arguments).slice(1);return t._protected.Installation.getPropertyValues(e).then((o=>(n.forEach((e=>{0<=(e=o.indexOf(e))&&o.splice(e,1)})),t._protected.Installation.putProperties({[e]:o}))))})),t._protected.Installation.getPropertyValue=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.getPropertyValue",(function(e){return e?t._protected.Installation.getProperties().then((t=>{let o=t[e];return null!==(o=Array.isArray(o)?o[0]:o)&&void 0!==o?o:null})):Promise.resolve(null)})),t._protected.Installation.getPropertyValues=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.getPropertyValues",(function(e){return e?t._protected.Installation.getProperties().then((t=>{let o=t[e];return null!=o||(o=[]),Array.isArray(o)?o:[o]})):Promise.resolve(null)})),t._protected.Installation.addTag=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.addTag",(function(e){const o=(Array.isArray(e)?e:Array.from(arguments)).filter((e=>"string"==typeof e));return t._protected.Installation.getTags().then((e=>{const n=Array.from(new Set(e.concat(o)));return n.sort(),t._protected.getUserId().then((e=>t._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser(e,{tags:n}))).then((()=>{}))}))})),t._protected.Installation.removeTag=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.removeTag",(function(e){const o=new Set(Array.isArray(e)?e:Array.from(arguments));return t._protected.Installation.getTags().then((e=>{const n=e.filter((e=>!o.has(e)));return t._protected.getUserId().then((e=>t._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser(e,{tags:n}))).then((()=>{}))}))})),t._protected.Installation.removeAllTags=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.removeAllTags",(function(){return t._protected.getUserId().then((e=>t._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser(e,{tags:null}))).then((()=>{}))})),t._protected.Installation.addRemoveTags=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.addRemoveTags",(function(e,n){t._protected.Helper.debug(o,"[addRemoveTags]",e,n);var r=e=>(Array.isArray(e)?e:"string"==typeof e?[e]:[]).filter((e=>"string"==typeof e));return e=r(e),n=r(n),t._protected.Installation.getTags().then((r=>{const i=new Set(r.concat(e)),s=(n.forEach((e=>i.delete(e))),Array.from(i));return s.sort(),t._protected.Helper.debug(o,"[addRemoveTags] newTags",s),t._protected.getUserId().then((e=>t._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser(e,{tags:s}))).then((()=>{}))}))})),t._protected.Installation.getTags=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.getTags",(function(){return t._protected.getUserId().then((e=>t._protected.JsonSyncInstallationCustom.getInstallationCustomPropertiesForUser(e))).then((e=>{let t=(e||{}).tags;return(t=Array.isArray(t)?t:[]).sort(),t}))})),t._protected.Installation.hasTag=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Installation.hasTag",(function(e){return t._protected.Installation.getTags().then((t=>0<=t.indexOf(e)))})),e(t)}}.apply(t,o),void 0!==t&&(e.exports=t)},9302:(e,t,o)=>{o=[o(111)],t=function(e){return function(t){function o(){var o,n,r;t._protected.RunModes.Behaviors.Stylesheets&&((n=t._protected.Options.getStylesheetUrl())&&"wonderpush.min.css"!==n?t._protected.Integration.injectStylesheetLink(n):t._protected.Integration.injectStylesheetInline(e.default.toString())),t._protected.RunModes.Behaviors.Manifest&&!document.head.querySelector('link[rel=manifest][href^="'+t._protected.Integration.getHomeOrigin()+'"]')&&"Safari"===(n=t._protected.Helper.detectBrowser()).name&&16<=parseInt(n.version)&&((r=document.createElement("link")).rel="manifest",r.href=s(),document.head.appendChild(r)),i.resolve(),t._protected.RunModes.Behaviors.ModeWebSite&&(r=t._protected.gscope._wp_loaderScriptUrl)&&(delete t._protected.gscope._wp_loaderScriptUrl,o=(r.match(/by\.wonderpush\.com\/sdk\/([0-9\.]*)\//)||[])[1])&&t._protected.Integration.getFrameReadyPromise().then((function(){t._protected.Integration.setSdkLoaderUrlVersionOnCustomDomain(o)})),(t._protected.RunModes.Behaviors.ModeFrame||t._protected.RunModes.Behaviors.ModeWebSite&&t._protected.Integration.isOnRightDomain())&&t._protected.Storage.set("sdkVersion",t._protected.Constants.SDK_VERSION)}function n(e){var o,n=t._protected.Options.getCustomDomain()||("undefined"!=typeof registration?registration.scope:void 0)||location.origin;try{o=new URL(n)}catch(r){n.indexOf(".")<0&&"localhost"!==n&&(n+=t._protected.Constants.DEFAULT_DOMAIN_SUFFIX),n.endsWith("/")||(n+="/"),n="full"===e?"https://"+n+t._protected.Constants.PARTNER_DOMAIN_DEFAULT_URL_SUFFIX+t._protected.Constants.SDK_VERSION+"/":"short"===e?"https://"+n+t._protected.Constants.PARTNER_DOMAIN_DEFAULT_URL_SUFFIX+t._protected.Constants.SDK_SHORT_VERSION+"/":"https://"+n+t._protected.Constants.PARTNER_DOMAIN_DEFAULT_URL_SUFFIX,o=new URL(n)}return o.protocol="https:","/"!==o.href.slice(-1)?new URL(o.href+"/"):o}function r(e){return n(e).href}var i=new t._protected.Promise.Deferred,s=(t._protected.Integration.setSdkLoaderUrlVersionOnCustomDomain=t._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Integration.setSdkLoaderUrlVersionOnCustomDomain",(function(e){t._protected.Storage.set("sdkLoaderUrlVersion",e)})),t._protected.Integration.getCurrentOperatingOrigin=function(){return t._protected.RunModes.Behaviors.ReadCurrentOrigin?location.origin:null},t._protected.Integration.getHomeUrlObject=function(){return n()},t._protected.Integration.getServiceWorkerUrl=function(){var e=new URL(t._protected.Options.getServiceWorkerUrl(),r("none"));return e.protocol="https:",e.href},t._protected.Integration.getFrameUrl=function(){var e=new URL(t._protected.Options.getFrameUrl(),r("full"));return e.protocol="https:",e.href},t._protected.Integration.getRedirectionPageUrl=function(e){return(e=new URL(t._protected.Options.getRedirectionPageUrl(e),r("full"))).protocol="https:",e.href},t._protected.Integration.getManifestInjectedPromise=function(){return i.promise},function(){var e=new URL(t._protected.Options.getManifestUrl(),r("full"));return e.protocol="https:",e.href});t._protected.Integration.postMessageHook=function(e,o,n){if(t._protected.Options.getBrevoInitOptions()&&o===t._protected.Integration.getTargetOrigin()&&e)switch(e.type){case"ping":e.sdk="Brevo";break;case"init":e.sdk="Brevo";var r=(e.initOpts||{})._mode;e.initOpts=t._protected.Options.getBrevoInitOptions(),e.initOpts._mode=r}return e},t._protected.Integration.isOnFederatedDomain=function(){return location.origin===new URL(t._protected.Constants.FEDERATED_FRAME_URL).origin},t.preInstantiationPromise.then((function(){t._protected.Integration.getModuleInitializationPromise().then(o)}))}}.apply(t,o),void 0!==t&&(e.exports=t)},4666:(e,t)=>{t=function(){return function(e){var t=e._protected.JsonUtil,o="sdkState",n="serverState",r="putAccumulator",i="inflightDiff",s="inflightPutAccumulator",a="scheduledPatchCall",c="inflightPatchCallDeadline";e._protected.JsonSyncCallbackBuilder=function(){var e=this,t={save:function(e){return Promise.resolve()},schedulePatchCall:function(){return Promise.resolve()},serverPatchInstallation:function(e){}};e.onSave=function(o){return t.save=o,e},e.onSchedulePatchCall=function(o){return t.schedulePatchCall=o,e},e.onServerPatchInstallation=function(o){return t.serverPatchInstallation=o,e},e.build=function(){return t}},e._protected.JsonSync=function(d,p,u,l,g,h,f,_){if(!d)throw new e.prototype.Errors.InvalidArgumentError("callbacks cannot be null");function m(){return S()&&+new Date>_}p=t.deepCopy(p||{}),u=t.deepCopy(u||{}),l=t.deepCopy(l||{}),g=t.deepCopy(g||{}),h=t.deepCopy(h||{}),f=!!f,_="number"==typeof _?_:0,t.stripNulls(p),t.stripNulls(u);var v=function(){var e={_syncStateVersion:1};return e[o]=p,e[n]=u,e[r]=l,e[i]=g,e[s]=h,e[a]=f,e[c]=_,Promise.resolve(d.save(e))},S=function(){return 0!==_},b=function(){return f=!0,v().then((function(){return Promise.resolve(d.schedulePatchCall())}))},w=(this.callPatch_onSuccess=function(){return _=0,h={},t.merge(u,g,!0),g={},v()},this.callPatch_onFailure=function(){return _=0,t.merge(h,l,!1),l=h,h={},b()},this.getSdkState=function(){return t.deepCopy(p)},this.hasInflightPatchCall=S,this.hasInflightPatchCallTimedout=m,this.hasScheduledPatchCall=function(){return f},this.performScheduledPatchCall=function(){if(f){if(S())return(f?v:b)();f=!1;try{g=t.diff(u,p)}catch(o){e._protected.Helper.error("[jsonsync ]","[callPatch] Failed to diff server state and sdk state to send installation custom diff",u,p,o),g={}}if(!Object.keys(g).length)return v();_=+new Date+e._protected.Constants.JSON_SYNC_MAX_INFLIGHT_TIME,h=t.deepCopy(l),l={};var o=v();return o.then((function(){d.serverPatchInstallation(g)})),o}return Promise.resolve()},this.put=function(e){return t.merge(p,e=e||{},!0),t.merge(l,e,!1),b()},this.receiveDiff=function(e){return t.merge(u,e=e||{},!0),this.put(e)}.bind(this),this.receiveState=function(e,o){return u=t.deepCopy(e=e||{}),t.stripNulls(u),p=t.deepCopy(u),o?l={}:(t.merge(p,g,!0),t.merge(p,l,!0)),b()},this.receiveServerState=function(e){return u=t.deepCopy(e=e||{}),t.stripNulls(u),b()},this.save=v,new Promise(function(e,t){m()?e(this.callPatch_onFailure()):this.hasScheduledPatchCall()?e(b()):e()}.bind(this)));this.ready=function(){return w}},e._protected.JsonSync.fromSavedState=function(t,d){return d=d||{},new e._protected.JsonSync(t,d[o],d[n],d[r],d[i],d[s],null==d[a]||d[a],d[c])}}}.apply(t,[]),void 0!==t&&(e.exports=t)},3066:(e,t)=>{t=function(){return function(e){function t(){null===c&&e._protected.RunModes.Behaviors.AccessToken&&e._protected.Integration.isOnRightDomain()&&n((function(){return e._protected.Storage.get(e._protected.Constants.PER_USER_INSTALLATION_CUSTOM_PROPERTIES_STORAGE_KEY,{}).then((function(t){Promise.all(Object.keys(t).map((function(n){return new e._protected.JsonSyncInstallationCustom(n||"",t[n]).ready().catch((function(t){e._protected.Helper.error(o,"Failed to initialize JsonSyncInstallationCustom for user",n,":",t)}))})))}))})).catch((function(t){e._protected.Helper.warn(o,"Periodic check rejected with",t)})).then((function(){var o=Math.round(e._protected.Constants.REQUEST_VAULT_IDLE_WAIT_MS*(1+.2*Math.random()));c=setTimeout((function(){c=null,t()}),o)}))}var o="[jsonsyncinst]",n=(e._protected.JsonSyncInstallationCustom=function(t,i){var c=function(){return e.prototype.getInitializationPromise().then((function(){return n((function(){return r(t).then((function(e){return p=0,e.sync.performScheduledPatchCall()}))}))}))}.bind(this),d=(this.flush=function(){null!==d&&(clearTimeout(d),d=null),c()},null),p=0,u=(t=t||null,(new e._protected.JsonSyncCallbackBuilder).onServerPatchInstallation((function(n){var r,i;r={body:JSON.stringify({custom:n}),overwrite:!1},i={onload:function(e){(e="function"==typeof e.json?e.json():Promise.resolve(this.responseJSON)).then((function(e){(e&&!0===e.success?s:a)(t)}),(function(e){a(t)}))},onerror:function(e){a(t)},ontimeout:function(e){a(t)},onabort:function(e){a(t)}},e._protected.Session.getSession(t).then((n=>{n.accessToken?e._protected.Consent.hasUserConsent().then((o=>o&&e._protected.Rest.post(t,"/installation",r,void 0,i))):(e._protected.Helper.error(o,"We have no accessToken! Cannot call WonderPush API."),setTimeout((()=>{a(t)}),3e4))}))})).onSchedulePatchCall((function(){var t;null!==d&&(clearTimeout(d),d=null),t=+new Date,0===p&&(p=t),t=Math.max(0,Math.min(e._protected.Constants.CACHED_INSTALLATION_CUSTOM_PROPERTIES_MIN_DELAY,p+e._protected.Constants.CACHED_INSTALLATION_CUSTOM_PROPERTIES_MAX_DELAY-t)),d=setTimeout(c,t)})).onSave((function(o){return n=o,r=t||"",e._protected.Storage.get(e._protected.Constants.PER_USER_INSTALLATION_CUSTOM_PROPERTIES_STORAGE_KEY,{}).then((function(t){return t[r]=n,e._protected.Storage.set(e._protected.Constants.PER_USER_INSTALLATION_CUSTOM_PROPERTIES_STORAGE_KEY,t)}));var n,r})).build()),l=(this.sync=e._protected.JsonSync.fromSavedState(u,i),this.getSdkState=this.sync.getSdkState,this.put=this.sync.put,this.receiveServerState=this.sync.receiveServerState,this.receiveState=this.sync.receiveState,this.receiveDiff=this.sync.receiveDiff,this.callPatch_onSuccess=this.sync.callPatch_onSuccess,this.callPatch_onFailure=this.sync.callPatch_onFailure,new e._protected.Promise.Deferred);this.sync.ready().then(function(){l.resolve(this)}.bind(this)).catch((function(e){l.reject(e)})),this.ready=function(){return l.promise}},function(t){var n=new e._protected.Locking.ExpiringUnfairNamedGlobalMutex("jsonSyncInstallationCustom",5e3);return n.acquire({timeout:6e3,interval:10}).then((function(){var e=t();return n.renewWhile({interval:2500,release:!0},e),e}),(function(t){throw e._protected.Helper.warn(o,"cannot enter synchronized section",t),t}))}),r=(e._protected.JsonSyncInstallationCustom.getInstallationCustomPropertiesForUser=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.JsonSyncInstallationCustom.getInstallationCustomPropertiesForUser",(function(t){return e.instantiationPromise.then((function(){return n((function(){return r(t).then((function(e){return e.getSdkState()}))}))}))})),e._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser",(function(t,o){return e.instantiationPromise.then((function(){return n((function(){return r(t).then((function(e){return e.put(o)}))}))}))})),e._protected.JsonSyncInstallationCustom.receiveDiffForUser=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.JsonSyncInstallationCustom.receiveDiffForUser",(function(t,o){return e.instantiationPromise.then((function(){return n((function(){return r(t).then((function(e){return e.receiveDiff(o)}))}))}))})),e._protected.JsonSyncInstallationCustom.receiveStateForUser=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.JsonSyncInstallationCustom.receiveStateForUser",(function(t,o,i){return e.instantiationPromise.then((function(){return n((function(){return r(t).then((function(e){return e.receiveState(o,i)}))}))}))})),e._protected.JsonSyncInstallationCustom.receiveServerStateForUser=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.JsonSyncInstallationCustom.receiveServerStateForUser",(function(t,o){return e.instantiationPromise.then((function(){return n((function(){return r(t).then((function(e){return e.receiveServerState(o)}))}))}))})),e._protected.JsonSyncInstallationCustom.deleteForUser=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.JsonSyncInstallationCustom.deleteForUser",(function(t){return e.instantiationPromise.then((function(){return n((function(){return i(t)}))}))})),function(t){return t=t||"",e._protected.Storage.get(e._protected.Constants.PER_USER_INSTALLATION_CUSTOM_PROPERTIES_STORAGE_KEY,{}).then((function(o){return new e._protected.JsonSyncInstallationCustom(t,o[t]||null).ready()}))}),i=function(t){return t=t||"",e._protected.Storage.bulk([{test:{key:e._protected.Constants.PER_USER_INSTALLATION_CUSTOM_PROPERTIES_STORAGE_KEY,defaultValue:{},operationsCb:function(o){return delete o[t],[{put:{key:e._protected.Constants.PER_USER_INSTALLATION_CUSTOM_PROPERTIES_STORAGE_KEY,value:o}}]}}}]).then((function(){}))},s=function(t){e._protected.Promise.catchNoop(n((function(){return r(t).then((function(e){return e.callPatch_onSuccess()})).then((function(){}))})))},a=function(t){e._protected.Promise.catchNoop(n((function(){return r(t).then((function(e){return e.callPatch_onFailure()})).then((function(){}))})))},c=null;Promise.all([e._protected.Locking.getModuleInitializationPromise(),e._protected.Config.getModuleInitializationPromise()]).then((function(){e._protected.RunModes.Behaviors.AccessToken&&e._protected.Integration.isOnRightDomain()&&(e.prototype.getInitializationPromise().then((()=>Promise.all([e._protected.Storage.get(e._protected.Constants.PER_USER_INSTALLATION_CUSTOM_PROPERTIES_STORAGE_KEY,null),e._protected.getUserId()]))).then((function(t){let[o,i]=t;if(!((i||"")in(o||{})))return n((function(){return r(i).then((function(t){return o=i,e.preInstantiationPromise.then((function(){function t(){n.reject()}var n=new e._protected.Promise.Deferred;return e._protected.Rest.get(o,"/installation",{},{onload:function(e){e=e&&e.json&&e.json()||this.responseJSON,n.resolve(e&&e.custom||{})},onerror:t,ontimeout:t,onabort:t},{}),n.promise})).then((function(e){t.receiveState(e,!1)}));var o}))}))})),e._protected.Locking.getModuleInitializationPromise().then((function(){t()})))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},5163:(e,t)=>{t=function(){return function(e){e._protected.JsonUtil=new function(){this.stripNulls=function(t){t instanceof Object&&!Array.isArray(t)&&Object.keys(t).forEach((function(o){var n=t[o];null==n?delete t[o]:e._protected.JsonUtil.stripNulls(n)}))},this.deepCopy=function(e){if(void 0!==e)return null===e?null:JSON.parse(JSON.stringify(e))},this.equal=function(e,t){var o;return e&&t?(o=this.diff(e,t))&&0===Object.keys(o).length:e==t},this.merge=function(t,o,n){if(n=!1!==n,t&&o)for(var r in o){var i,s=o[r];r in t?Array.isArray(s)?t[r]=e._protected.JsonUtil.deepCopy(s):s instanceof Object?(i=t[r],Array.isArray(i)||"object"!=typeof i?t[r]=e._protected.JsonUtil.deepCopy(s):e._protected.JsonUtil.merge(i,s,n)):null==s&&n?delete t[r]:t[r]=s:n&&null==s||(t[r]=e._protected.JsonUtil.deepCopy(s))}},this.diff=function(t,o){if("object"!=typeof t||"object"!=typeof o||Array.isArray(t)||Array.isArray(o))throw new e.prototype.Errors.InvalidArgumentError("diff only accept objects as arguments");if(null==o)return null;if(null==t)return e._protected.JsonUtil.deepCopy(o);var n,r={};for(n in t){var i=n in o?o[n]:null,s=t[n];if(s!==i)if(Array.isArray(i))if(Array.isArray(s)&&i.length===s.length){for(var a=!1,c=0;c{t=function(){return function(e){const t=o(6433).ReportingDataUtil;var n="[notification]",r=new e._protected.Promise.Deferred,i="undefined"!=typeof Notification,s=null,a=i?Notification.permission:void 0;"default"===a&&(a="prompt");const c="undefined"!=typeof localStorage?localStorage.getItem("_wpinitialpermissionstate"):void 0;e.prototype.Notification=new function(){function t(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent}this.requestPopupToFinalizeRegistration=function(t){return e._protected.Notification.setNotificationEnabled(!0)};var o={modalBoxIcon:null,modalBoxTitle:null,modalBoxMessage:"We will send you personalized notifications.
You can always unsubscribe at any time.",modalBoxButton:"Got it!",modalBoxCancellable:!0,externalBoxWidth:500,externalBoxHeight:500,externalBoxLogoUrl:null,externalBoxLogoWidth:90,externalBoxLogoHeight:90,externalBoxProcessingMessage:"Subscribing...",externalBoxSuccessMessage:"Thanks for subscribing!",externalBoxFailureMessage:"Sorry, something went wrong.",externalBoxTooLongHint:"Poor connection or private browsing?",externalBoxCloseHint:"Close",externalBoxCloseDelay:e._protected.Constants.POPUP_AUTOCLOSE_SLEEP},n=(this.setOptInOptions=function(t){e._protected.Helper.mergeObjectInplaceRecursive(o,t)},this.getOptInOptions=function(){var t=e._protected.Helper.plainObjectCopy(o);return t&&"Inscription en cours..."===t.externalBoxProcessingMessage?e._protected.Helper.assign({externalBoxMessage:"Nous aimerions vous envoyer des notifications",externalBoxExampleTitle:"Notification exemple",externalBoxExampleMessage:"Ceci est un exemple de notification",externalBoxDisclaimer:"Vous pouvez vous désinscrire à n'importe quel moment.",negativeButtonText:"Plus tard",positiveButtonText:"Je m'inscris"},t):t},{requestPopupToFinalizeRegistration_icon:null,requestPopupToFinalizeRegistration_title:null,requestPopupToFinalizeRegistration_text:null,requestPopupToFinalizeRegistration_buttonLabel:null,requestPopupToFinalizeRegistration_popupContent_processing:null,requestPopupToFinalizeRegistration_popupContent_success:null,requestPopupToFinalizeRegistration_popupContent_failure:null});Object.defineProperties(this,{requestPopupToFinalizeRegistration_icon:{set:function(t){e.prototype.Notification.setOptInOptions({modalBoxIcon:t}),n.requestPopupToFinalizeRegistration_icon=t},get:function(){return n.requestPopupToFinalizeRegistration_icon}},requestPopupToFinalizeRegistration_title:{set:function(t){e.prototype.Notification.setOptInOptions({modalBoxTitle:t}),n.requestPopupToFinalizeRegistration_title=t},get:function(){return n.requestPopupToFinalizeRegistration_title}},requestPopupToFinalizeRegistration_text:{set:function(t){e.prototype.Notification.setOptInOptions({modalBoxMessage:t}),n.requestPopupToFinalizeRegistration_text=t},get:function(){return n.requestPopupToFinalizeRegistration_text}},requestPopupToFinalizeRegistration_buttonLabel:{set:function(t){e.prototype.Notification.setOptInOptions({modalBoxButton:t}),n.requestPopupToFinalizeRegistration_buttonLabel=t},get:function(){return n.requestPopupToFinalizeRegistration_buttonLabel}},requestPopupToFinalizeRegistration_popupContent_processing:{set:function(o){e.prototype.Notification.setOptInOptions({externalBoxProcessingMessage:t(o),externalBoxTooLongMessage:t(o)}),n.requestPopupToFinalizeRegistration_popupContent_processing=o},get:function(){return n.requestPopupToFinalizeRegistration_popupContent_processing}},requestPopupToFinalizeRegistration_popupContent_success:{set:function(o){e.prototype.Notification.setOptInOptions({externalBoxSuccessMessage:t(o)}),n.requestPopupToFinalizeRegistration_popupContent_success=o},get:function(){return n.requestPopupToFinalizeRegistration_popupContent_success}},requestPopupToFinalizeRegistration_popupContent_failure:{set:function(o){e.prototype.Notification.setOptInOptions({externalBoxFailureMessage:t(o)}),n.requestPopupToFinalizeRegistration_popupContent_failure=o},get:function(){return n.requestPopupToFinalizeRegistration_popupContent_failure}}}),e._protected.RunModes.Behaviors.OptionsSource?e._protected.Config.getModuleInitializationPromise().then((function(){e.prototype.Notification.setOptInOptions({modalBoxIcon:e._protected.Options.getNotificationIcon(),modalBoxTitle:e._protected.Options.getApplicationName(),externalBoxLogoUrl:e._protected.Options.getNotificationIcon()}),e.prototype.Notification.setOptInOptions(e._protected.Options.getOptInOptions()),n.requestPopupToFinalizeRegistration_icon=e._protected.Options.getNotificationIcon(),n.requestPopupToFinalizeRegistration_title=e._protected.Options.getApplicationName(),n.requestPopupToFinalizeRegistration_text="We will send you personalized notifications.
You can always change your preferences later.",n.requestPopupToFinalizeRegistration_buttonLabel="Got it!",n.requestPopupToFinalizeRegistration_popupContent_processing='

Subscribing...

',n.requestPopupToFinalizeRegistration_popupContent_toolong='

Subscribing...

Poor connection or private browsing?

',n.requestPopupToFinalizeRegistration_popupContent_success='

Thanks for subscribing!

Close

',n.requestPopupToFinalizeRegistration_popupContent_failure='

Sorry, something went wrong.

Close

',r.resolve()})):r.resolve(),this.getSubscriptionState=function(){return s}},e._protected.Notification=new function(){this.PERMISSION_GRANTED="granted",this.PERMISSION_DENIED="denied",this.PERMISSION_DEFAULT="default",this.PERMISSION_UNKNOWN="unknown",this.getModuleInitializationPromise=function(){return r.promise},this.getSettledSubscriptionState=function(){return new Promise((t=>{var o=e.prototype.Notification.getSubscriptionState();if("number"==typeof o&&o!==e.prototype.SubscriptionState.UNDETERMINED)return t(o);const n=o=>{o.detail&&"subscription"===o.detail.name&&"number"==typeof o.detail.state&&o.detail.state!==e.prototype.SubscriptionState&&(window.removeEventListener("WonderPushEvent",n),t(o.detail.state))};window.addEventListener("WonderPushEvent",n)}))},this.getTrustedNotificationPermissionState=async function(){var t,o,n,r,i=e._protected.Helper.detectBrowser(),s=!e._protected.Integration.areTopWindowAndSelfOnRightDomain(),a=!1===e._protected.gscope.isSecureContext,c=!!e._protected.RunModes.Behaviors.ModeServiceWorker;switch(i.name){case"Safari":switch(i.platform){case"Macintosh":return a||s?(t=e._protected.Notification.PERMISSION_UNKNOWN,Promise.resolve(t)):c?navigator.permissions.query({name:"notifications"}).then((e=>"prompt"===(e=(e||{}).state)?"default":e)).catch((t=>e._protected.Notification.PERMISSION_UNKNOWN)):(t="undefined"!=typeof Notification?Notification.permission:e._protected.Notification.PERMISSION_UNKNOWN,Promise.resolve(t));case"iPhone":case"iPad":return a?(t=e._protected.Notification.PERMISSION_UNKNOWN,Promise.resolve(t)):(t="undefined"!=typeof Notification?Notification.permission:e._protected.Notification.PERMISSION_UNKNOWN,c&&"default"===t||s&&"default"===t?(o=e._protected.Notification.PERMISSION_UNKNOWN,Promise.resolve(o)):"default"===(o=t)?Promise.resolve(e._protected.Notification.PERMISSION_UNKNOWN):Promise.resolve(o))}break;case"Firefox":return a||s?(n=e._protected.Notification.PERMISSION_UNKNOWN,Promise.resolve(n)):(n="undefined"!=typeof Notification?Notification.permission:e._protected.Notification.PERMISSION_UNKNOWN,Promise.resolve(n));default:return a?(n=e._protected.Notification.PERMISSION_UNKNOWN,Promise.resolve(n)):(n="undefined"!=typeof Notification?Notification.permission:e._protected.Notification.PERMISSION_UNKNOWN,r=void 0!==navigator.permissions?(await navigator.permissions.query({name:"notifications"}).catch((()=>{}))||{}).state:void 0,c&&"denied"===n&&"prompt"===r?(r=e._protected.Notification.PERMISSION_DEFAULT,Promise.resolve(r)):s&&"denied"===n?(r=e._protected.Notification.PERMISSION_UNKNOWN,Promise.resolve(r)):Promise.resolve(n))}return Promise.resolve(e._protected.Notification.PERMISSION_UNKNOWN)},this.getTrustedOrCachedNotificationPermissionState=e._protected.Integration.remotelyCallable((function(){return e._protected.Notification.getTrustedNotificationPermissionState().then((function(t){return t===e._protected.Notification.PERMISSION_UNKNOWN?e._protected.Notification.getTrustedNotificationPermissionStateCached().then((function(t){var o=e._protected.Notification.PERMISSION_UNKNOWN;return 2<=t.checkVersion?t.permission:o})):Promise.resolve(t)}))})),this.getTrustedNotificationPermissionStateCached=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Notification.getTrustedNotificationPermissionStateCached",(function(){var t={permission:e._protected.Notification.PERMISSION_UNKNOWN,date:+new Date};return e._protected.Storage.get("notificationPermissionStateCached",t).then((function(e){return!e.checkVersion||e.checkVersion<2||"denied"===e.permission&&e.checkVersion<=3&&"Chrome"===e.browserName&&62<=e.browserVersionMajor&&e.framed&&e.isSecureContext?t:e}))})),this.updateTrustedNotificationPermissionCacheIfPossible=function(){var t=+new Date;return e._protected.Integration.isOnRightDomain()?e._protected.Notification.getTrustedNotificationPermissionState().then((function(o){var n,r,i;return o!==e._protected.Notification.PERMISSION_UNKNOWN&&(n=e._protected.Helper.detectBrowser(),r={permission:o,date:t,checkVersion:5,sdkVersion:e.prototype.Constants.SDK_VERSION,browserName:n.name,browserVersion:n.version,browserVersionMajor:parseInt(n.version.substr(0,n.version.indexOf("."))),userAgent:navigator.userAgent,isSecureContext:e._protected.gscope.isSecureContext,framed:void 0!==e._protected.gscope.parent&&e._protected.gscope!==e._protected.gscope.parent,origin:location.origin,runMode:e._protected.RunModes.getCurrentModeNotForBehaviorTestingPurpose()},i=!1,e._protected.Storage.getModuleInitializationPromise().then((function(){return e._protected.Storage.bulk([{test:{key:"notificationPermissionStateCached",defaultValue:{permission:null,date:0},operationsCb:function(e){if(!(r.date{}),(e=>{})):e._protected.RunModes.Behaviors.CanRegisterServiceWorker&&e._protected.Integration.isOnRightDomain()&&e._protected.ServiceWorkerClient.registerServiceWorker().then((function(t){e._protected.ServiceWorkerClient.refreshPushToken(t,!1).then((e=>{}),(e=>{}))}))))},r=function(e){},e._protected.RunModes.Behaviors.CanRegisterServiceWorker&&e._protected.Integration.isOnRightDomain()?e._protected.ServiceWorkerClient.getPushSubscriptionAndRegisterServiceWorkerIfNecessary().then(t,r):e._protected.RunModes.Behaviors.ContextServiceWorker||navigator.serviceWorker&&navigator.serviceWorker.controller&&e._protected.Integration.isOnRightDomain()?e._protected.ServiceWorkerClient.getPushSubscriptionFromServiceWorker().then(t,r):e._protected.Installation.getCachedInstallationPushToken().then((function(t){if(!t)return Promise.reject();e._protected.Notification.setSubscriptionState(e.prototype.SubscriptionState.SUBSCRIBED)}),(function(e){return Promise.reject()})).catch((function(){e._protected.Notification.setSubscriptionState(e.prototype.SubscriptionState.NOT_SUBSCRIBED)})))})):e._protected.Notification.setSubscriptionState(e.prototype.SubscriptionState.UNSUPPORTED))})),this.setSubscriptionState=function(t){var o=s;s=t,e._protected.Blocker.category("ready").remove("refreshSubscriptionState"),o!==s&&(e._protected.Events.fire(e._protected.Events.WonderPushSubscriptionEvent(t)),e._protected.RunModes.Behaviors.ModeFrame&&e._protected.Notification.setSubscriptionStateOnParentWindow(t),e._protected.RunModes.Behaviors.ModeServiceWorker?e._protected.Notification.setSubscriptionStateOnServiceWorkerClients(t):(e._protected.RunModes.Behaviors.ModeFrame||e._protected.RunModes.Behaviors.ModeWebSite&&e._protected.Integration.isOnRightDomain())&&e._protected.Helper.supportsServiceWorker()&&e._protected.Notification.setSubscriptionStateOnServiceWorker(t))},this.setSubscriptionStateOnParentWindow=e._protected.Integration.proxifyToParentWindow("WonderPushSDK._protected.Notification.setSubscriptionStateOnParentWindow",(function(t){e._protected.Notification.setSubscriptionState(t)})),this.setSubscriptionStateOnServiceWorker=e._protected.Integration.proxifyToServiceWorker("WonderPushSDK._protected.Notification.setSubscriptionStateOnServiceWorker",(function(t){e._protected.Notification.refreshSubscriptionState()})),this.setSubscriptionStateOnServiceWorkerClients=e._protected.Integration.proxifyToServiceWorkerClients("WonderPushSDK._protected.Notification.setSubscriptionStateOnServiceWorkerClients",(function(t){e._protected.Notification.setSubscriptionState(t)})),this.setManuallyUnsubscribed=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Notification.setManuallyUnsubscribed",(function(t){return e._protected.Notification.getManuallyUnsubscribed().then((function(o){if(!!t!=!!o)return e._protected.Storage.set("unsubscribed",t).then((()=>t?e._protected.Notification.setSubscriptionState(e.prototype.SubscriptionState.UNSUBSCRIBED):e._protected.Notification.refreshSubscriptionState())).then((t=>e._protected.RunModes.Behaviors.CoreProperties?e._protected.Installation.updateInstallationCoreProperties().then((()=>t)):t))}))})),this.getManuallyUnsubscribed=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Notification.getManuallyUnsubscribed",(function(){return e._protected.Storage.get("unsubscribed",!1).then((function(e){return!!e}))})),this.isNativePushNotificationSupported=function(){return i&&e._protected.Helper.supportsPushManager()},this.needUserGestureToAskPermission=function(){return!0},this.askPermission=function(t){var o=new e._protected.Promise.Deferred;if(e._protected.Notification.isNativePushNotificationSupported())if(e._protected.Integration.isOnRightDomain())if(e._protected.RunModes.Behaviors.NotificationPermission){const r=e._protected.Notification.getLiveNotificationPermissionStateSync(),i=e._protected.Init.getSessionState(),s=(new Date).getTime();var n=Notification.requestPermission();l(r,i,t,n),n.then((n=>{g(s,r,n,i,t),Promise.all([e._protected.Consent.hasUserConsent(),e._protected.Session.getCurrentSession()]).then((t=>{var[t,o]=t;t&&o&&o.accessToken&&e._protected.Installation.updateInstallationCoreProperties()})),e._protected.Notification.updateTrustedNotificationPermissionCacheIfPossible().then((function(){return"denied"===(n=Notification.permission)?o.reject(new e.prototype.Errors.PermissionError("User denied notification permission","notification",n)):"granted"!==n?o.reject(new e.prototype.Errors.UserCancellationError("User neither granted or denied notification permission")):void o.resolve(n)}))}),o.reject)}else o.reject(new e._protected.Errors.InternalWrongTargetError);else o.reject(new e._protected.Errors.InternalWrongDomainError("Current origin "+location.origin+" cannot ask for the notification permission"));else o.reject(new e.prototype.Errors.PushNotificationsNotSupportedError);return o.promise},this.askPermissionAndRegisterInWindow=function(t){var o,n,r,i,s=new e._protected.Promise.Deferred;return e._protected.Integration.isOnRightDomain()?(i=function(){e._protected.Analytics.sendEvent("askPermissionAndRegisterInWindow",n,null,+new Date-o)},(r=function(e){o=+new Date,n=e})("askPermission"),e._protected.Notification.askPermission(t).then((function(t){return i(),r("setManuallyUnsubscribed"),e._protected.Integration.callOnCustomDomain("WonderPushSDK._protected.Notification.setManuallyUnsubscribed",[!1])})).then((function(){return i(),r("registerForPushNotifications"),e._protected.Integration.callOnCustomDomain("WonderPushSDK._protected.ServiceWorkerClient.registerForPushNotifications")})).then((function(t){return i(),r("addInstallationPushToken"),e._protected.Integration.callOnCustomDomain("WonderPushSDK._protected.Installation.addInstallationPushToken",[t])})).then((function(){i(),s.resolve()})).catch((function(t){e._protected.Analytics.sendEvent("askPermissionAndRegisterInWindow",n+"-error",t&&t.name,+new Date-o),s.reject(t)}))):s.reject(new e._protected.Errors.InternalWrongDomainError("Current origin "+location.origin+" cannot ask for the notification permission")),s.promise},this.openPopupAskPermissionAndRegister=function(t){var o=new e._protected.Promise.Deferred,n=new URL(e._protected.Integration.getFrameUrl()),r=(i=e._protected.Options.exportBrevoInitOptions())||e._protected.Options.exportInitial(),i=(r._mode=e._protected.RunModes.Modes.Popup,i?"brevoInitOpts":"wonderpushInitOpts"),s=(n.search="?wonderpushPopupUI=permission&"+i+"="+encodeURIComponent(JSON.stringify(r)),e.prototype.Notification.getOptInOptions());const a=e._protected.Integration.openPopup(n.href,{width:s.externalBoxWidth,height:s.externalBoxHeight,center:"window"});if(a)return e._protected.Integration.probeWindowObject(a,e._protected.Integration.getTargetOrigin(),{type:"isReady"},(e=>e.data instanceof Object&&"readiness"===e.data.type&&e.data.ready)).then((()=>{e._protected.Integration.callOnPopupWindow(a,"WonderPushSDK._protected.PopupUI.waitForSubscription").then((()=>(o.resolve(),0<=s.externalBoxCloseDelay&&setTimeout((function(){a.close()}),s.externalBoxCloseDelay),e._protected.Integration.callOnCustomDomain("WonderPushSDK._protected.Notification.refreshSubscriptionState"))),(t=>{t instanceof e.prototype.Errors.UserCancellationError?a.close():0<=s.externalBoxCloseDelay&&setTimeout((function(){a.close()}),s.externalBoxCloseDelay),o.reject(t)}))})).catch((e=>o.reject(e))),o.promise;o.reject(new e.prototype.Errors.PopupError("Cannot open popup"))};var o=!(this.presentModal=function(t,o){var n={icon:(n=e.prototype.Notification.getOptInOptions()).modalBoxIcon,title:n.modalBoxTitle,text:n.modalBoxMessage,buttons:[{label:n.modalBoxButton,onclick:function(e,o){t(e)}}],cancellable:n.modalBoxCancellable,oncancel:function(t){o(new e.prototype.Errors.UserCancellationError("Modal cancelled by user"))}};e._protected.Modal.show(n)}),c=(this.isRegistrationInProgress=function(){return o},this.setNotificationEnabled=function(t,n){return e._protected.Notification.isNativePushNotificationSupported()?o?Promise.reject(new e.prototype.Errors.RegistrationInProgressError("Registration already in progress")):new Promise((function(r,i){function s(e){o=!1,i(e)}function a(e){o=!1,r(e)}try{var c,d=e.prototype.Notification.getSubscriptionState();t&&d===e.prototype.SubscriptionState.SUBSCRIBED?a():t||d!==e.prototype.SubscriptionState.UNSUBSCRIBED?t?e._protected.Notification.isAllowedSubscriptionDomain(window.location.origin)?(o=!0,(c=e._protected.Integration.isOnRightDomain())&&!1!==e._protected.gscope.isSecureContext?e._protected.Notification.askPermissionAndRegisterInWindow(n).then((function(){a()}),(function(e){s(e)})):(c&&!1===e._protected.gscope.isSecureContext&&e._protected.Helper.warn("Although on custom domain (location.href =",e._protected.gscope.location.href,"), isSecureContext is",e._protected.gscope.isSecureContext),n?e._protected.Notification.openPopupAskPermissionAndRegister(n).then(a,s):t&&d===e.prototype.SubscriptionState.UNSUBSCRIBED?e._protected.Integration.callOnCustomDomain("WonderPushSDK._protected.Notification.getTrustedOrCachedNotificationPermissionState").then((function(t){t===e._protected.Notification.PERMISSION_GRANTED?e._protected.Notification.setManuallyUnsubscribed(!1).then(a,s):s(new e._protected.Errors.InternalWrongTargetError("No user event was given"))})).catch(s):s(new e._protected.Errors.InternalWrongTargetError("No user event was given")))):(e._protected.Helper.warn("Current origin is not allowed to subscribe"),s(new e._protected.Errors.InternalWrongDomainError("Current origin "+window.location.origin+" is not allowed to subscribe"))):e._protected.ServiceWorkerClient.unsubscribeFromPush().then((function(){a()}),(function(t){s(new e._protected.Errors.InternalStorageError("Failed to store unsubscription"))})):a()}catch(c){s(c)}})):Promise.resolve()},this.isAllowedSubscriptionDomain=function(t){if((t=(t=t||window.location.origin).startsWith("https://")||t.startsWith("http://")?t:"https://"+t)===e._protected.Integration.getHomeOrigin())return!0;let o=e._protected.Options.getAllowedSubscriptionDomains();return null==o||-1!==(o=(o=Array.isArray(o)?o:[]).map((t=>{var o=t.match(/^\/(.*)\/([gimsuy]*)$/);if(null!==o)try{return new RegExp(o[1],o[2])}catch(o){e._protected.Helper.warn(n,"Failed to construct regex from",t)}if(null===(o=t.match(/^(https?:\/\/)?([^\/]+)(?:\/.*)?$/)))return/^$/;let[,r,i,,]=o;return r=r||"https?:\\/\\/",i=(i=e._protected.Helper.escapeRegExp(i)).replace(/\\\*/g,"[^.\\/]+"),new RegExp(`^${r}${i}(\\/.*)?$`)}))).findIndex((e=>e.test(t)))},this.getPermissionCollectionInfo=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Notification.getPermissionCollectionInfo",(function(){return e._protected.Storage.get("permissionCollection")})),this.setSponsoredNotificationsEnabled=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Notification.setSponsoredNotificationsEnabled",(function(t){return e._protected.Notification.getSponsoredNotificationsEnabled().then((function(o){if(t!==o)return e._protected.Storage.set("sponsoredNotificationsEnabled",t).then((()=>e._protected.Installation.updateInstallationCoreProperties()))}))})),this.getSponsoredNotificationsEnabled=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Notification.getSponsoredNotificationsEnabled",(function(){return e._protected.Storage.get("sponsoredNotificationsEnabled").then((function(e){return!0===e||!1===e?e:void 0}))})),this.setSponsoredNotificationsConsentGiven=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Notification.setSponsoredNotificationsConsentGiven",(function(t){return e._protected.Notification.getSponsoredNotificationsConsentGiven().then((function(o){if(t!==o)return e._protected.Storage.set("sponsoredNotificationsConsentGiven",t).then((()=>e._protected.Installation.updateInstallationCoreProperties()))}))})),this.getSponsoredNotificationsConsentGiven=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Notification.getSponsoredNotificationsConsentGiven",(function(){return e._protected.Storage.get("sponsoredNotificationsConsentGiven").then((function(e){return!0===e||!1===e?e:void 0}))})),this.handleActions=function(t,o){if(Array.isArray(o)){const n=[];o.forEach((function(o){try{if(o instanceof Object)switch(o.type){case e._protected.Constants.ACTION_LINK:o.url&&n.push(o);break;case e._protected.Constants.ACTION_METHOD:h(o);break;case e._protected.Constants.ACTION_TRACK_EVENT:f(t,o);break;case e._protected.Constants.ACTION_UPDATE_INSTALLATION:S(o);break;case e._protected.Constants.ACTION_SUBSCRIBE_TO_NOTIFICATIONS:_(o);break;case e._protected.Constants.ACTION_SUBSCRIBE_TO_SPONSORED_NOTIFICATIONS:m(o);break;case e._protected.Constants.ACTION_UNSUBSCRIBE_FROM_SPONSORED_NOTIFICATIONS:v(o);break;case e._protected.Constants.ACTION_ADD_PROPERTY:b(o);break;case e._protected.Constants.ACTION_REMOVE_PROPERTY:w(o);break;case e._protected.Constants.ACTION_RESYNC_INSTALLATION:y(o);break;case e._protected.Constants.ACTION_ADD_TAG:d(o);break;case e._protected.Constants.ACTION_REMOVE_TAG:p(o);break;case e._protected.Constants.ACTION_REMOVE_ALL_TAGS:u(o);break;case e._protected.Constants.ACTION__OVERRIDE_NOTIFICATION_RECEIPT:I(o);break;default:console.log("Unhandled action type ",o.type," for action ",o)}}catch(e){console.error("Unexpected error while handling action ",o,e)}})),n.length&&n.lengthc(n[0])),500):n.length&&c(n[0])}},function(e){(e=(e||{}).url)&&"undefined"!=typeof window&&(window.location=e)}),h=function(t){var{method:t,methodArg:o}=t||{};t&&(t=new e._protected.Events.MethodCall(t,o),e._protected.Events.fire(t))},f=function(o,n){var r,i,s;n.event instanceof Object&&(r=n.event.type,i=n.event.custom,delete(s=JSON.parse(JSON.stringify(n.event||{}))).type,delete s.custom,!0===n.addCurrentUrl&&"undefined"!=typeof window&&(s.currentUrl=window.location.href),"@"===r.charAt(0)?e._protected.trackInternalEvent(r,t.withEventData(s,o,{attributionReason:"notificationOpened"}),i):e._protected.trackEventWithInternalData(r,t.withEventData(s,o,{attributionReason:"notificationOpened"}),i))},_=function(t){e.prototype.subscribeToNotifications(t.domEvent)},m=function(t){e.prototype.enableSponsoredNotifications()},v=function(t){e.prototype.disableSponsoredNotifications()},S=function(t){var o=(t.installation&&t.installation.custom?t.installation:t).custom;o&&Object.keys(o).length&&(t.appliedServerSide?e._protected.getUserId().then((t=>e._protected.JsonSyncInstallationCustom.receiveDiffForUser(t,o))):e._protected.getUserId().then((t=>e._protected.JsonSyncInstallationCustom.putInstallationCustomPropertiesForUser(t,o))))},b=function(t){var o=(t.installation&&t.installation.custom?t.installation:t).custom;o&&Object.keys(o).length&&Object.keys(o).forEach((t=>{var n=o[t];e._protected.Installation.addProperty(t,n)}))},w=function(t){var o=(t.installation&&t.installation.custom?t.installation:t).custom;o&&Object.keys(o).length&&Object.keys(o).forEach((t=>{var n=o[t];e._protected.Installation.removeProperty(t,n)}))},y=function(t){function o(t){var o=t.installation,n=o?o.custom:null;if(!n){if(!o)return;n={}}t.reset?e._protected.getUserId().then((o=>e._protected.JsonSyncInstallationCustom.receiveStateForUser(o,n,!!t.force))):e._protected.getUserId().then((t=>e._protected.JsonSyncInstallationCustom.receiveServerStateForUser(t,n))),e._protected.Installation.updateInstallationCoreProperties(),e._protected.ServiceWorker.resendPushToken(!0),o={preferences:{subscriptionStatus:e.prototype.Notification.getSubscriptionState()===e.prototype.SubscriptionState.UNSUBSCRIBED?"optOut":"optIn"}},e.this.Rest.postEventually("/installation",{body:JSON.stringify(o),overwrite:!1})}t.installation?o(t):e._protected.Installation.getInstallationFromServer().then((function(e){Object.keys(e).forEach((function(t){t.startsWith("_")&&delete e[t]})),t.installation=e,o(t)}),(function(e){}))},I=function(t){t=t.force,e._protected.Helper.log(n,"OVERRIDE notification receipt:",t),e._protected.Storage.set("_overrideNotificationReceipt",t)}};var d=function(t){t=t.tags,e._protected.Installation.addTag(t)},p=function(t){t=t.tags,e._protected.Installation.removeTag(t)},u=function(t){e._protected.Installation.removeAllTags()},l=async function(t,o,n,r){(e._protected.RunModes.Behaviors.ModePopup||e._protected.RunModes.Behaviors.ModeWebSite||e._protected.RunModes.Behaviors.ModeServiceWorker)&&e._protected.Integration.isOnRightDomain()&&"prompt"===(t="default"!==t?"prompt":t)&&e._protected.Promise.setIntervalUntilSettled(r,(()=>e._protected.Storage.bulk([{test:{key:"permissionCollection",defaultValue:{},operationsCb:function(e){var t=(new Date).getTime();if(e.requestHappening=e.requestHappening||{},"number"==typeof e.requestHappening.expirationDate&&t>e.requestHappening.expirationDate&&(e.requestHappening={}),!(1=e.this.SessionState.INIT_SUCCESS:void 0,d=0{g(void 0,void 0,a,void 0,void 0).catch((e=>{})).then(e,t)}),0)),e._protected.Notification.refreshSubscriptionState(),Promise.all([e._protected.Consent.hasUserConsent(),e._protected.Session.getCurrentSession()]).then((t=>{var[t,o]=t;t&&o&&o.accessToken&&e._protected.Installation.updateInstallationCoreProperties()}))})))}))}catch(e){}})),r.promise}}.apply(t,[]),void 0!==t&&(e.exports=t)},3998:(e,t)=>{t=function(){return function(e){var t=e._protected.Options._merge3Way;e._protected.Options._merge3Way=function(o,n,r){var i=t(o,n,r);return i.plugins=e._protected.Plugins.mergeOptionsPlugins(o.plugins||{},n.plugins||{},r.plugins||{}),i},e._protected.Options.getRequiresUserConsent=function(){return e._protected.Options.get("requiresUserConsent")||!1},e._protected.Options.getStylesheetUrl=function(){return e._protected.Options.get("stylesheetUrl")},e._protected.Options.getCustomDomain=function(){return e._protected.Options.get("customDomain")},e._protected.Options.getServiceWorkerUrl=function(){return e._protected.Options.get("serviceWorkerUrl",e._protected.Constants.SERVICE_WORKER_URL).replace("${webKey}",encodeURIComponent(e._protected.Options.getWebKey()))},e._protected.Options.getManifestUrl=function(){return e._protected.Options.get("manifestUrl",e._protected.Constants.MANIFEST_URL)},e._protected.Options.getUserId=function(){return e._protected.Options.get("userId",null)},e._protected.Options.hasUserId=function(){return e._protected.Options.has("userId")},e._protected.Options.getApiUrlPrefix=function(){return"https://"+e._protected.Options.get("_rootApiUrl",e._protected.Constants.ROOT_API_URL)+"/"+e._protected.Options.get("_apiVersion",e._protected.Constants.API_VERSION)},e._protected.Options.getMeasurementsApiUrlPrefix=function(){return e._protected.Options.get("_measurementApiUrl",e._protected.Constants.MEASUREMENTS_API_BASE_URL).replace(/\/*$/,"")},e._protected.Options.getApplicationVersion=function(){return e._protected.Options.get("applicationVersion")},e._protected.Options.getIntegrator=function(){return e._protected.Options.get("integrator")},e._protected.Options.getGeolocation=function(){return e._protected.Options.get("geolocation","auto")},e._protected.Options.getNotificationIcon=function(){return e._protected.Options.get("notificationIcon")},e._protected.Options.getDefaultNotificationUrl=function(){return e._protected.Options.get("notificationDefaultUrl")},e._protected.Options.getApplicationName=function(){return e._protected.Options.get("applicationName",location.hostname)},e._protected.Options.getOptInOptions=function(){return e._protected.Options.get("optInOptions",{})},e._protected.Options.getPlugins=function(){return e._protected.Options.get("plugins")},e._protected.Options.getSubscriptionOptions=function(){return e._protected.Options.get("subscriptionOptions",{})},e._protected.Options.getApplicationServerKey=function(){return e._protected.Options.get("applicationServerKey")},e._protected.Options.getAllowedSubscriptionDomains=function(){return e._protected.Options.get("allowedSubscriptionDomains")},e._protected.Options.getDisableConfirmedReceipts=function(){return e._protected.Options.get("disableConfirmedReceipts")},e._protected.Options.getBrevoInitOptions=function(){return e._protected.Options.get("brevoInitOptions")},e._protected.Options.exportBrevoInitOptions=function(){var t=e._protected.Options.get("brevoInitOptions");return t?e._protected.Helper.plainObjectCopy(t):void 0},e._protected.Options.getBrevoClientKey=function(){var t=e._protected.Options.get("brevoInitOptions");return t?t.client_key:void 0}}}.apply(t,[]),void 0!==t&&(e.exports=t)},846:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(3674)],__WEBPACK_AMD_DEFINE_RESULT__=function(inlinedPlugins){const{ReportingDataUtil}=__webpack_require__(6433),{urlPassesFilters}=__webpack_require__(5662);return function(WonderPushSDK){var TAG="[plugins ]",init,_pluginFunctions={},_pluginDefinitions={},_pluginInstances={},_pluginInlinedRegistry={},_pluginsRegistryWithInlined={},_maxScrollPercent=0,_maxScrollPixels=0,eventInfosByType=("undefined"!=typeof window&&window.addEventListener("scroll",(e=>{try{var t,o,n=e.target===document?document.documentElement:e.target,r=n.scrollHeight-n.clientHeight;0==r||(o=100*(t=n.scrollTop)/r,isNaN(o)||(_maxScrollPercent=Math.max(_maxScrollPercent,o)),isNaN(t))||(_maxScrollPixels=Math.max(_maxScrollPixels,t))}catch(e){}}),!0),WonderPushSDK.prototype.Plugins=new function(){this.get=function(e){return WonderPushSDK._protected.Plugins.get(e)},this.getVersion=function(e){return WonderPushSDK._protected.Plugins.getVersion(e)}},{activate:{},WonderPushEvent:{},install:{},message:{},notificationclick:{},push:{},pushsubscriptionchange:{}});const pluginEventHandlersDeferred=new WonderPushSDK._protected.Promise.Deferred;let pluginEventHandlersDeferredResolved=!1;Object.keys(eventInfosByType).forEach((function(e){eventInfosByType[e].listeners=[],self.addEventListener(e,(function(t){var o=pluginEventHandlersDeferred.promise.then((function(){return Promise.all((eventInfosByType[e].listeners.length,eventInfosByType[e].listeners.map((function(o){try{return o.handler(t)}catch(t){WonderPushSDK._protected.Helper.warn(TAG,`[${o.pluginDefinition.name}]`,"A handler for an event of type",e," raised:",t)}})))).then((function(e){return e}),(function(e){throw e})).finally((()=>{}))}));if("undefined"!=typeof ExtendableEvent&&t instanceof ExtendableEvent)return t.waitUntil(o)}))}));var WonderPushPluginSDK=function(e){this.declareFeature=function(t){WonderPushSDK._protected.Features.declareFeature(e.name+":"+t)},this.addEventListener=function(t,o,n){t in eventInfosByType?eventInfosByType[t].listeners.push({handler:o,pluginDefinition:e}):self.addEventListener(t,o,n)},this.removeEventListener=function(e,t,o){var n;e in eventInfosByType?0<=(n=eventInfosByType[e].listeners.map((e=>e.handler)).indexOf(t))&&eventInfosByType[e].listeners.splice(n,1):self.removeEventListener(e,t,o)},this.getAssets=function(){return WonderPushSDK._protected.Assets},this.getLocales=function(){return WonderPushSDK._protected.Helper.getLocales()},this.detectBrowser=function(){return WonderPushSDK._protected.Helper.detectBrowser()},this.Storage=new function(){this.get=WonderPushSDK._protected.Plugins.pluginStorageGet.bind(null,e.name),this.set=WonderPushSDK._protected.Plugins.pluginStorageSet.bind(null,e.name)},this.loadStylesheet=function(){if(window)for(var t=new URL(".",e.url),o=0;o{(e?t:o)()}))}.bind(this),this.waitTriggers=function(e){return WonderPushSDK._protected.Plugins.checkTriggersForPlugin(this,e).then((t=>t?Promise.resolve():WonderPushSDK._protected.Plugins.registerTriggersCheck(this,e)))}.bind(this),this.resetTriggers=function(){return Promise.all([this.getAttendance(),this.Storage.get("_triggersInfo")]).then(function(e){var t=e[0];return(e=e[1]._triggersInfo||{}).resetDate=(new Date).getTime(),e.resetVisits=t.visitCount,e.resetPages=t.pageViews,this.Storage.set("_triggersInfo",e).then((function(){}))}.bind(this))}.bind(this),this.snoozeTriggers=function(e){return"number"==typeof e&&(e+=(new Date).getTime()),this.Storage.get("_triggersInfo").then(function(t){return(t=t._triggersInfo||{}).snoozeUntilDate=e,this.Storage.set("_triggersInfo",t).then((function(){}))}.bind(this))}.bind(this),this.currentURLPassesFilters=function(e){var t="undefined"!=typeof window?window.location:void 0;return!t||urlPassesFilters(t,e)}.bind(this),this.trackSponsoredNotificationRevenue=e=>{let{amount:t,currency:o,provider:n,revenueModel:r,_wp:i}=e;return"object"!=typeof i?Promise.reject(new Error("_wp must be an object")):"number"!=typeof t?Promise.reject(new Error("amount must be a finite positive number")):Number.isFinite(t)?t<0?Promise.reject(new Error("amount must be a finite positive number")):"string"!=typeof o||3!==o.length?Promise.reject(new Error("currency must be a 3-letter ISO 4217 currency code")):"string"!=typeof n||0===n.length?Promise.reject(new Error("provider must be a non-empty string")):(e=["cpc","cpm","cpa"]).indexOf(r)<0?Promise.reject(new Error("revenue model must be one of: ")+e.join(", ")):(n=n.toLocaleLowerCase(),o=o.toLocaleUpperCase(),e=ReportingDataUtil.withEventData({revenueAmount:t,revenueCurrency:o,subtype:n+"-"+r},ReportingDataUtil.extract(i)),WonderPushSDK._protected.trackInternalEventWithMeasurementsApi("@SPONSORED_NOTIFICATION_REVENUE",e)):Promise.reject(new Error("amount must be a finite positive number"))},this.trackSponsoredNotificationFailed=e=>"object"!=typeof(e=e._wp)?Promise.reject(new Error("_wp must be an object")):(e=ReportingDataUtil.withEventData({},ReportingDataUtil.extract(e)),WonderPushSDK._protected.trackInternalEventWithMeasurementsApi("@SPONSORED_NOTIFICATION_FAILED",e)),this.setSponsoredNotificationsConsentGiven=e=>WonderPushSDK._protected.Notification.setSponsoredNotificationsConsentGiven(e),this.getSponsoredNotificationsConsentGiven=()=>WonderPushSDK._protected.Notification.getSponsoredNotificationsConsentGiven()};WonderPushPluginSDK.prototype=new WonderPushSDK.constructor,WonderPushSDK._protected.Plugins=new function(){var PluginDefinition=function(e,t){var o;if(this.key=e,this.options=t,t=e.match(/^([-_a-zA-Z0-9]+)(?::(\d+(?:\.\d+(?:\.\d+)?)?))?$/)){var n=[];this.name=t[1],t[2]?(n=t[2].split(".").map((function(e){return""+parseInt(e)})),this.version=n.join(".")):(this.version="latest",n=[this.version]),3===n.length?this.url=new URL(WonderPushSDK._protected.Constants.PLUGIN_ROOT_URL+this.name+"/"+this.version+"/"+this.name+".js"):this.url=new URL(WonderPushSDK._protected.Constants.PLUGIN_ROOT_URL+this.name+"/"+this.version)}else{try{o=new URL(e.endsWith(".js")?e:e+".js")}catch(t){throw Error('Invalid plugin name (allowed characters: a-z, A-Z, 0-9, "-", "_") or version (3 dot-separated digits): '+e)}if(o.pathname.endsWith("/"))throw Error("Invalid plugin URL (should end with the name of your plugin, not /): "+e);if("https:"!==o.protocol)throw Error("Invalid plugin URL (HTTP is not supported, please use HTTPS): "+e);this.name=o.pathname.replace(/^(?:.*\/)?([^\/]*?)(?:\.js)?$/,"$1"),this.url=o,this.version=o}this.resolveVersion=function(){var e;return"string"!=typeof this.version||3===this.version.split(".").length?Promise.resolve(this):(e=this,new Promise((function(t,o){function n(o){(o&&o.text?o.text():Promise.resolve("string"==typeof o?o:this.responseText)).then((function(o){o=o.trim(),t(new PluginDefinition(e.name+":"+o,e.options))}))}function r(t){console.error("Failed to resolve full version for plugin "+e.name+":"+e.version,t),o(new WonderPushSDK.prototype.Errors.InternalError("Failed to resolve full version for plugin "+e.name+":"+e.version))}var i;(i=(i=(i=_pluginsRegistryWithInlined&&_pluginsRegistryWithInlined[e.name])&&i.shortVersions)&&i[e.version])?n(i):WonderPushSDK._protected.Request.request("GET",e.url.href,null,null,null,{onload:n,onerror:r,ontimeout:r,onabort:r})})))}.bind(this)},overloadPluginOptionsWithInitOptions=function(e){for(const t of[{initOption:"subscriptionNative",pluginName:"optin-automatic"},{initOption:"subscriptionDialog",pluginName:"optin-dialog"},{initOption:"subscriptionBlurb",pluginName:"optin-blurb"},{initOption:"subscriptionBell",pluginName:"optin-bell"},{initOption:"subscriptionSwitch",pluginName:"optin-switch",defaultValue:{}}]){let o=e[t.pluginName],n=WonderPushSDK._protected.Options.get(t.initOption);void 0!==(n=void 0===n?t.defaultValue:n)&&(o||(e[(o=new PluginDefinition(t.pluginName)).name]=o),o.options=n)}},pluginOptionsFromSubscriptionOptions=function(e){var t={"optin-switch":{switchElementId:e.switchElementId||WonderPushSDK._protected.Constants.SUBSCRIPTION_SWITCH_ELEMENT_ID_DEFAULT},"tag-switch":{}};return"visits"===e.mode?t["optin-dialog"]={triggers:{minVisits:void 0!==e.minVisits?e.minVisits:WonderPushSDK._protected.Constants.SUBSCRIPTION_MIN_VISITS_DEFAULT}}:"pages"===e.mode?t["optin-dialog"]={triggers:{minPages:void 0!==e.minPages?e.minPages:WonderPushSDK._protected.Constants.SUBSCRIPTION_MIN_PAGES_DEFAULT}}:"direct"===e.mode&&(t["optin-dialog"]={triggers:{}}),t["optin-dialog"]&&t["optin-dialog"].triggers&&(t["optin-dialog"].triggers.delay=void 0!==e.delay?e.delay:WonderPushSDK._protected.Constants.SUBSCRIPTION_DELAY_DEFAULT,t["optin-dialog"].triggers.snooze=void 0!==e.snooze?e.snooze:WonderPushSDK._protected.Constants.SUBSCRIPTION_SNOOZE_DEFAULT,e=WonderPushSDK.prototype.Notification.getOptInOptions())&&"Recevez désormais nos news en temps réel.
Vous pouvez vous désinscrire à n'importe quel moment."===e.modalBoxMessage&&(t["optin-dialog"].title="Voulez-vous recevoir nos news en temps réel ?",t["optin-dialog"].message="Vous pouvez vous désinscrire à n'importe quel moment.",t["optin-dialog"].positiveButton="S'enregistrer",t["optin-dialog"].negativeButton="Plus tard"),t},optionsToPluginDefinitions=(init=function(){inlinedPlugins(WonderPushSDK);var loadPlugins=function(){_pluginsRegistryWithInlined=WonderPushSDK._protected.Config.getPluginsRegistry(),Object.keys(_pluginInlinedRegistry).forEach((e=>{var t=_pluginInlinedRegistry[e].loaderByVersion||{};Object.keys(t).forEach((t=>{var o=(n=t.split("."))[0],n=n[0]+"."+n[1];e in _pluginsRegistryWithInlined||(_pluginsRegistryWithInlined[e]={}),_pluginsRegistryWithInlined[e].shortVersions||(_pluginsRegistryWithInlined[e].shortVersions={}),["latest",o,n].forEach((o=>{var n=_pluginsRegistryWithInlined[e].shortVersions[o];(!n||0{if(!e.ok)throw new Error("Unexpected response code when fetching plugin",e.status);var t=e.headers.get("Content-Type");if(/^application\/javascript\s*($|[,;])/.test(t||""))return e.text();throw new Error("Unexpected response Content-Type when fetching plugin:"+JSON.stringify(t))})).then((jsCode=>{try{eval(jsCode)}catch(e){pluginDeferred[def.name].resolve()}})).catch((e=>{pluginDeferred[def.name].resolve()}))}}),loader){const e=loader;loader=function(t){var o;(o=(o=(o=_pluginInlinedRegistry[t.name])&&o.loaderByVersion)&&o[t.version])?o():e(t)}}for(plugin in loader&&WonderPushSDK._protected.RunModes.Behaviors.Plugins||(loader=function(e){pluginDeferred[e.name].resolve()},pluginOptions={},injectedPlugins={}),WonderPush.registerPlugin=function(e,t){var o,n;"function"==typeof t?o=t:"object"==typeof t&&("function"==typeof t.window&&(o=t.window),"function"==typeof t.serviceWorker)&&(n=t.serviceWorker),WonderPushSDK._protected.RunModes.Behaviors.ModeWebSite?_pluginFunctions[e]=o:WonderPushSDK._protected.RunModes.Behaviors.ModeServiceWorker&&(_pluginFunctions[e]=n),(t=pluginDeferred[e])&&t.resolve()},_pluginDefinitions=optionsToPluginDefinitions(pluginOptions),injectedPlugins)plugin in _pluginDefinitions||(def=new PluginDefinition(plugin,injectedPlugins[plugin]),_pluginDefinitions[def.name]=def);overloadPluginOptionsWithInitOptions(_pluginDefinitions);var pluginDeferred={};Object.keys(_pluginDefinitions).forEach((function(e){try{var t=_pluginDefinitions[e];pluginDeferred[t.name]=new WonderPushSDK._protected.Promise.Deferred,t.options?t.resolveVersion().then((function(e){_pluginDefinitions[e.name]=e,loader(e)}),(function(e){console.error("Cannot load plugin "+t.name+" at "+t.url.href,e)})):pluginDeferred[t.name].resolve()}catch(e){WonderPushSDK._protected.Helper.error(TAG,e.message)}})),Promise.all(Object.keys(pluginDeferred).map((function(e){return pluginDeferred[e].promise}))).then((function(){delete WonderPush.registerPlugin,WonderPushSDK._protected.Blocker.category("ready").remove("plugin")}))},dependencies=(WonderPushSDK._protected.Blocker.category("ready").add("plugin"),[WonderPushSDK._protected.Config,WonderPushSDK._protected.Integration]);Promise.all(dependencies.map((function(e){return e.getModuleInitializationPromise()}))).then((function(){loadPlugins()}))},function(e){var t,o={};for(t in e)if(e.hasOwnProperty(t))try{var n=new PluginDefinition(t,e[t]);n.name in _pluginDefinitions?(WonderPushSDK._protected.Helper.error(TAG,"Multiple plugin versions specified for "+n.name),WonderPushSDK._protected.Helper.error(TAG,"We had "+_pluginDefinitions[n.name].version+" and saw "+n.version),console.error(new WonderPushSDK.prototype.Errors.PluginError("Multiple plugin versions specified for "+n.name))):o[n.name]=n}catch(e){WonderPushSDK._protected.Helper.error(TAG,e.message)}return o}),pluginDefinitionsToOptions=function(e){var t,o,n={};for(t in e)e.hasOwnProperty(t)&&(n[(o=e[t]).key]=o.options);return n},RegisteredTriggersCheck=(this.mergeOptionsPlugins=function(e,t){for(var o=[{}],n=0;n{this.resolve=e}));var o=()=>{this.resolve&&(this.pluginSdk.logDebug("[checkTriggers] finally passed, resolving promise"),this.resolve(),this.resolve=void 0),this.removable=!0};this.runCheck=()=>WonderPushSDK._protected.Plugins.checkTriggersForPlugin(this.pluginSdk,this.config).then((e=>(e&&o(),e)))}),registeredTriggersChecks=[];this.registerTriggersCheck=function(e,t){return e=new RegisteredTriggersCheck(e,t),registeredTriggersChecks.push(e),e.promise},this.runRegisteredTriggersCheck=function(){return Promise.all(registeredTriggersChecks.map((e=>e.runCheck()))).then((()=>{registeredTriggersChecks=registeredTriggersChecks.filter((e=>!e.removable))}))},this.checkTriggersForPlugin=function(e,t){e.logDebug("[checkTriggers] config =",t),t?!0===t?t={}:(t.autoReset=null==t.autoReset||t.autoReset,t.delay=null!=t.delay?t.delay:0,t.snooze=null!=t.snooze?t.snooze:432e5):t={manual:!0};var o=null,n=null,r=null,i=null,s=WonderPushSDK.prototype.getAttendance().then((function(e){o=e})),a=e.Storage.get("_triggersInfo").then((function(e){n=e._triggersInfo||{}})),c=WonderPushSDK._protected.Integration.callOnCustomDomain("WonderPushSDK._protected.Notification.getTrustedOrCachedNotificationPermissionState").then((function(e){r=e===WonderPushSDK._protected.Notification.PERMISSION_DENIED})),d=WonderPushSDK._protected.Notification.getSettledSubscriptionState().then((function(e){i=e}));return Promise.all([s,a,c,d]).then((function(){var s=!0;return WonderPushSDK._protected.Notification.isAllowedSubscriptionDomain(window.location.origin)||(e.logDebug("[checkTriggers] rejects (allowedSubscriptionDomains)",{domain:window.location.origin,allowed:WonderPushSDK._protected.Options.getAllowedSubscriptionDomains()}),s=!1),r&&(e.logDebug("[checkTriggers] rejects (permission)",{permissionDenied:r}),s=!1),i!==WonderPushSDK.prototype.SubscriptionState.NOT_SUBSCRIBED&&(e.logDebug("[checkTriggers] rejects (subscription state)",{subscriptionState:i}),s=!1),t.manual&&(e.logDebug("[checkTriggers] rejects (manual)",{manual:t.manual}),s=!1),(!0===n.snoozeUntilDate||"number"==typeof n.snoozeUntilDate&&n.snoozeUntilDate>(new Date).getTime())&&(e.logDebug("[checkTriggers] rejects (snoozeUntilDate)",{snoozeUntilDate:n.snoozeUntilDate}),s=!1),t.snooze&&n.resetDate&&n.resetDate+t.snooze>(new Date).getTime()&&(e.logDebug("[checkTriggers] rejects (snooze)",{snooze:t.snooze,resetDate:n.resetDate}),s=!1),t.minVisits&&o.visitCountWonderPushSDK._protected.Promise.delay(Promise.resolve(e),e&&t.delay&&0o&&(t.minScrollPercent||t.minScrollPixels)?new WonderPushSDK._protected.Promise.Poll((()=>t.minScrollPixels&&_maxScrollPixels>=t.minScrollPixels||t.minScrollPercent&&_maxScrollPercent>=t.minScrollPercent),Number.POSITIVE_INFINITY,100).wait().then((()=>(e.logDebug("[checkTriggers] scrolled",_maxScrollPixels,"pixels, ",_maxScrollPercent+"%"),o))):o)).then((e=>e&&t.waitForUserActivation?void 0===navigator.userActivation||navigator.userActivation.isActive?Promise.resolve(e):new Promise((function(t,o){var n=setInterval((function(){navigator.userActivation.isActive&&(t(e),clearInterval(n),n=void 0)}),200)})):e)).then((o=>{var n;return t.urlFilters&&(n="undefined"!=typeof window?window.location:void 0)&&o&&!urlPassesFilters(n,t.urlFilters)&&(e.logDebug("[checkTriggers] rejects (urlFilters do not pass)",n,t.urlFilters),o=!1),o})).then((t=>t&&WonderPushSDK._protected.Notification.isRegistrationInProgress()?(e.logDebug("[checkTriggers] will never resolve as registration is already in progress."),new Promise((()=>{}))):t)).then((o=>(o&&t.autoReset&&(e.logDebug("[checkTriggers] reset triggers"),e.resetTriggers()),e.logDebug("[checkTriggers] return",o),o)))}},WonderPushSDK.preInstantiationPromise.then(init),WonderPushSDK.preInstantiationPromise.then((function(){WonderPushSDK._protected.Init.addWillBecomeReadyCallback((function(){Object.keys(_pluginDefinitions).forEach((function(e){var t=_pluginFunctions[e];if(t){var o=_pluginDefinitions[e];try{_pluginInstances[e]=new t(new WonderPushPluginSDK(o),o.options)}catch(t){WonderPushSDK._protected.Helper.error(TAG,"Error during instantiation for",e,t)}delete _pluginFunctions[e]}})),pluginEventHandlersDeferred.resolve(),pluginEventHandlersDeferredResolved=!0}))}))}}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__);void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},5737:(e,t)=>{t=function(){return function(e){var t=new e._protected.Promise.Deferred;return e._protected.PopupUI=new function(){var o,n,r=new e._protected.Promise.Deferred;let i=!e._protected.Notification.needUserGestureToAskPermission();Promise.all([e._protected.Integration.getModuleInitializationPromise(),e._protected.Notification.getModuleInitializationPromise()]).then((function(){var r=e._protected.Integration.getFrameUrl();o=new URL(r).origin,n=e.prototype.Notification.getOptInOptions(),t.resolve()}));const s=function(e){e=e();var t=document.getElementById("whole-content");t.innerHTML="",t.appendChild(e),e=e=>{e.addEventListener("click",(function(e){e.preventDefault(),window.close()}))},t.querySelectorAll(".wonderpush-close-button").forEach(e),t.querySelectorAll(".wp-popup-negative-button").forEach(e),t.querySelectorAll(".wp-popup-positive-button").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),this.subscribeToNotifications(e)}))}))}.bind(this);function a(t,o){var n=e.prototype.Notification.getOptInOptions(),r=document.createElement("div");return r.innerHTML='",r.querySelector(".wp-text").innerText=t,(t=r.querySelector(".wp-popup-icon")).style.width=n.externalBoxLogoWidth+"px",t.style.height=n.externalBoxLogoHeight+"px",n.externalBoxLogoUrl&&(t.style.backgroundImage="url("+n.externalBoxLogoUrl+")"),(t=r.querySelector(".wp-hint"))&&o&&("string"==typeof o?t.innerText=o:o instanceof HTMLElement&&t.appendChild(o)),r}const c=this.permissionHtmlElement=function(){var t=n.negativeButtonText||"Later",r=n.positiveButtonText||"Subscribe",s=n.externalBoxTitle||e._protected.Options.getApplicationName(),a=void 0===n.externalBoxMessage?"We'd like to send you notifications":n.externalBoxMessage,c=n.externalBoxExampleTitle||"Example notification",d=n.externalBoxExampleMessage||"This is an example notification",p=o.replace(/^https?\:\/\//,""),u=n.externalBoxDisclaimer||"You can always unsubscribe at anytime.",l=e._protected.Options.getNotificationIcon(),g=document.createElement("div"),h=(g.className="wp-popup",g.innerHTML='",(h=g.querySelector(".wp-popup-title"))&&(h.innerText=s),a&&(h=g.querySelector(".wp-popup-message"))&&(h.innerText=a),l&&(g.querySelector(".wp-popup-icon").style.backgroundImage="url("+l+")"),(s=g.querySelector(".wp-popup-example-title"))&&(s.innerText=c),g.querySelector(".wp-popup-example-message"));return h&&(h.innerText=d),(a=g.querySelector(".wp-popup-example-url"))&&(a.innerText=p),(l=g.querySelector(".wp-popup-disclaimer"))&&(l.innerText=u),(s=g.querySelector(".wp-popup-negative-button"))&&(s.innerText=t),(c=g.querySelector(".wp-popup-positive-button"))&&(c.innerText=r),g};this.subscribeToNotifications=t=>{e.this.subscribeToNotifications(t).then((()=>{this.presentSuccessUI(),r.resolve()}),(t=>{t instanceof e.prototype.Errors.UserCancellationError||this.presentFailureUI(),r.reject(t)}))},this.presentPermissionUI=()=>{s(c),i&&this.subscribeToNotifications()},this.waitForSubscription=e._protected.Integration.remotelyCallable((()=>r.promise));var d=this.processingUI=function(){return a(e.prototype.Notification.getOptInOptions().externalBoxProcessingMessage)};this.presentProcessingUI=s.bind(this,d),d=this.timeoutUI=function(){var t=e.prototype.Notification.getOptInOptions();return a(t.externalBoxProcessingMessage,t.externalBoxTooLongHint)},this.presentTimeoutUI=s.bind(this,d),d=this.successUI=function(){var t=e.prototype.Notification.getOptInOptions(),o=document.createElement("a");return o.className="wonderpush-close-button",o.href="#",o.innerText=t.externalBoxCloseHint,a(t.externalBoxSuccessMessage,o)},this.presentSuccessUI=s.bind(this,d),d=this.failureUI=function(){var t=e.prototype.Notification.getOptInOptions(),o=document.createElement("a");return o.className="wonderpush-close-button",o.href="#",o.innerText=t.externalBoxCloseHint,a(t.externalBoxFailureMessage,o)},this.presentFailureUI=s.bind(this,d),this.getModuleInitializationPromise=function(){return t.promise}},t.promise}}.apply(t,[]),void 0!==t&&(e.exports=t)},1669:(e,t)=>{void 0!==(t=function(){return function(e){e.preInstantiationPromise.then((()=>(e._protected.Blocker.category("requestvault").add("consent"),e._protected.Consent.awaitUserConsent()))).then((()=>{e._protected.Blocker.category("requestvault").remove("consent")}))}}.apply(t,[]))&&(e.exports=t)},8291:(e,t,o)=>{o=[o(6477)],t=function(e){let t=e.RateLimiter;return function(e){function o(t,o,n){return o=o||{},(n?Promise.resolve(n):e._protected.Session.getSession(t)).then((function(t){o.sdkVersion="Web-"+e.this.Constants.SDK_VERSION;var n=t.lang||e._protected.gscope.navigator.language;return o.lang=e._protected.Helper.inArray(n,e._protected.Constants.VALID_LANGUAGE_CODES)?n:e._protected.Constants.DEFAULT_LANGUAGE_CODE,t.accessToken&&(o.accessToken=t.accessToken),t.userId&&(o.userId=t.userId),o}))}let n=new e._protected.Promise.Deferred;function r(t){return t&&(t.startsWith("https://")||t.startsWith("http://"))?t:(t&&0e._protected.Rest.get(i,t,o,n,r)))},this.post=function(t,o,n,r,i){return e._protected.getUserId().then((s=>e._protected.Rest.post(s,t,o,n,r,i)))},this.postEventuallyAnonymously=function(t,o,n){return Promise.all([e._protected.getUserId(),e._protected.Init.getDeviceId()]).then((r=>{var[r,i]=r;return e._protected.Rest.postEventuallyAnonymously(r,i,t,o,n)}))},this.postEventually=function(t,o,n){return e._protected.getUserId().then((r=>e._protected.Rest.postEventually(r,t,o,n)))},this.postBeacon=function(t,n,s){return e.prototype.getInitializationPromise().then((function(){return e._protected.getUserId().then((e=>o(e,n,s))).then((function(e){var o=r(t);return e=i(e),navigator.sendBeacon(o,new Blob([e],{type:"application/x-www-form-urlencoded"}))}))}))},this.delete=function(t,o,n,r){return e._protected.getUserId().then((i=>e._protected.Rest.delete(i,t,o,n,r)))},this.fetch=function(e,t,o,n){return"GET"===e?this.get(t,o,void 0,{fetch:!0}):"POST"===e?this.post(t,o,n,void 0,{fetch:!0}):"PUT"===e?this.put(t,o,n,void 0,{fetch:!0}):"PATCH"===e?this.patch(t,o,n,void 0,{fetch:!0}):"DELETE"===e?this.delete(t,o,void 0,{fetch:!0}):Promise.reject("Unsupported method "+e+" for fetch")},this.put=function(t,o,n,r,i){return e._protected.getUserId().then((n=>e._protected.Rest.put(n,t,o,r,i)))},this.patch=function(t,o,n,r,i){return e._protected.getUserId().then((n=>e._protected.Rest.patch(n,t,o,r,i)))}},e._protected.Rest=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.Rest",new function(){this.destroy=function(){},this.get=function(t,n,s,a,c){return o(t,s).then((function(t){var o=r(n);return t=i(t),e._protected.Request.request("GET",o=t?o+"?"+t:o,"",void 0,{},a,c)}))},this.post=function(t,n,s,a,c,d){return o(t,s).then((function(t){var o=r(n);return t=i(t),e._protected.Request.request("POST",o,t,a,{"Content-type":"application/x-www-form-urlencoded"},c,d)}))},this.postEventuallyAnonymously=function(t,s,a,c,d){c.deviceId=s,c.clientId=e._protected.Options.getWebKey(),c.devicePlatform="Web",c.userId=t||"";const p={key:"PostEventuallyAnonymously",limit:6,timeToLive:6e4};return n.promise.then((n=>n.isRateLimited(p).then((u=>{if(!u)return n.increment(p).then((()=>o(t,c))).then((function(t){var o=r(a);return t=i(t),e._protected.Request.requestEventually("POST",o,t,d,{"Content-type":"application/x-www-form-urlencoded"})}));setTimeout((()=>this.postEventuallyAnonymously(t,s,a,c,d)),1e4)}))))},this.postEventually=function(t,n,s,a){return e.prototype.getInitializationPromise().then((function(){const c=t=>{var o;if(t.accessToken)return o=r(n),t=i(t),e._protected.Request.requestEventually("POST",o,t,a,{"Content-type":"application/x-www-form-urlencoded"});e._protected.Helper.error("[rest ]","[postEventually] We have no accessToken! Cannot call WonderPush API.")};return o(t,s).then((function(t){return t.accessToken?c(t):e._protected.getUserId().then((n=>new Promise(((r,i)=>{e._protected.Init.fetchAccessTokenIfNeeded(n,(()=>o(n,t).then((function(e){return c(e)})).then(r,i)),(()=>c(t).then(r,i)))}))))}))}))},this.delete=function(t,n,s,a,c){return o(t,s).then((function(t){var o=r(n);return t=i(t),e._protected.Request.request("DELETE",o=t?o+"?"+t:o,"",void 0,{},a,c)}))},this.fetch=function(e,t,o,n,r){return"GET"===t?this.get(e,o,n,void 0,{fetch:!0}):"POST"===t?this.post(e,o,n,r,void 0,{fetch:!0}):"PUT"===t?this.put(e,o,n,r,void 0,{fetch:!0}):"PATCH"===t?this.patch(e,o,n,r,void 0,{fetch:!0}):"DELETE"===t?this.delete(e,o,n,void 0,{fetch:!0}):Promise.reject("Unsupported method "+t+" for fetch")},this.fetchJson=function(e,t,o,n,r){return this.fetch(e,t,o,n,r).then((function(e){return e.json()}))},this.put=function(t,n,s,a,c,d){return o(t,s).then((function(t){var o=r(n);return t=i(t),e._protected.Request.request("PUT",o,t,a,{"Content-type":"application/x-www-form-urlencoded"},c,d)}))},this.patch=function(t,n,s,a,c,d){return o(t,s).then((function(t){var o=r(n);return t=i(t),e._protected.Request.request("PATCH",o,t,a,{"Content-type":"application/x-www-form-urlencoded"},c,d)}))}}),e.preInstantiationPromise.then((()=>{Promise.all([e._protected.Storage.getModuleInitializationPromise(),e._protected.Locking.getModuleInitializationPromise()]).then((()=>{n.resolve(new t(e._protected.Storage,e._protected.Locking))})),e._protected.Request.addGlobalErrorHandler((async t=>{if((t=t&&t.target&&t.target.responseJSON)&&t.error&&t.error.code===e._protected.Constants.INVALID_ACCESS_TOKEN_ERROR_CODE){const t=await e._protected.getUserId();e._protected.Session.setSession({accessToken:null,sid:null,installationId:null,userId:t}).then((()=>{e._protected.RunModes.Behaviors.CoreProperties&&e._protected.Installation.updateInstallationCoreProperties({force:!0}),e._protected.ServiceWorkerClient.getPushSubscriptionFromServiceWorker().then((function(t){e._protected.Installation.addInstallationPushToken(t,!0)})),e._protected.JsonSyncInstallationCustom.receiveServerStateForUser(t,{}),e._protected.JsonSyncInstallationCustom.flush();var o={preferences:{subscriptionStatus:e.prototype.Notification.getSubscriptionState()===e.prototype.SubscriptionState.UNSUBSCRIBED?"optOut":"optIn"}};e.this.Rest.postEventually("/installation",{body:JSON.stringify(o),overwrite:!1})}))}}))}))}}.apply(t,o),void 0!==t&&(e.exports=t)},6897:(e,t)=>{t=function(){return function(e){e._protected.RunModes.registerBehavior("CoreProperties",(function(t){return 0<=[e._protected.RunModes.Modes.WebSite,e._protected.RunModes.Modes.ServiceWorker,e._protected.RunModes.Modes.Popup].indexOf(t)})),e._protected.RunModes.registerBehavior("Federated",(function(t){return t===e._protected.RunModes.Modes.Slave&&e._protected.Integration.isOnFederatedDomain()})),e._protected.RunModes.registerBehavior("Plugins",(function(t){return 0<=[e._protected.RunModes.Modes.WebSite,e._protected.RunModes.Modes.Frame,e._protected.RunModes.Modes.Popup,e._protected.RunModes.Modes.ServiceWorker].indexOf(t)})),e._protected.RunModes.registerBehavior("Manifest",(function(t){return 0<=[e._protected.RunModes.Modes.WebSite].indexOf(t)})),e._protected.RunModes.registerBehavior("Stylesheets",(function(){return e._protected.RunModes.Behaviors.Visible})),e._protected.RunModes.registerBehavior("NotificationPermission",(function(t){return 0<=[e._protected.RunModes.Modes.WebSite,e._protected.RunModes.Modes.Popup].indexOf(t)})),e._protected.RunModes.registerBehavior("GeolocationPermission",(function(t){return t===e._protected.RunModes.Modes.WebSite})),e._protected.RunModes.registerBehavior("RegisterServiceWorker",(function(t){return 0<=[e._protected.RunModes.Modes.Frame,e._protected.RunModes.Modes.Popup].indexOf(t)||t===e._protected.RunModes.Modes.WebSite&&e._protected.Integration.isOnRightDomain()})),e._protected.RunModes.registerBehavior("UnregisterServiceWorker",(function(t){return t===e._protected.RunModes.Modes.ServiceWorker||e._protected.RunModes.Behaviors.RegisterServiceWorker})),e._protected.RunModes.registerBehavior("CanRegisterServiceWorker",(function(t){return 0<=[e._protected.RunModes.Modes.Frame,e._protected.RunModes.Modes.WebSite,e._protected.RunModes.Modes.Popup].indexOf(t)&&!!navigator.serviceWorker&&!!self.isSecureContext})),e._protected.RunModes.registerBehavior("RefreshPushToken",(function(t){var o=e._protected.Helper.detectBrowser();return"Chrome"===o.name&&t===e._protected.RunModes.Modes.Frame&&71<=parseInt(o.version)?e._protected.Integration.areTopWindowAndSelfOnRightDomain():e._protected.RunModes.Behaviors.SubscribeToPush&&t!==e._protected.RunModes.Modes.Popup})),e._protected.RunModes.registerBehavior("SubscribeToPush",(function(t){return e._protected.RunModes.Behaviors.RegisterServiceWorker||t===e._protected.RunModes.Modes.ServiceWorker&&e._protected.Helper.supportsVAPID()})),e._protected.RunModes.registerBehavior("UnsubscribeToPush",(function(t){return t===e._protected.RunModes.Modes.ServiceWorker||e._protected.RunModes.Behaviors.RegisterServiceWorker})),e._protected.RunModes.registerBehavior("OptionsSource",(function(t){return t===e._protected.RunModes.Modes.WebSite||t===e._protected.RunModes.Modes.Popup})),e._protected.RunModes.registerBehavior("Analytics",(function(e){return!1})),e._protected.RunModes.registerBehavior("ReadCurrentOrigin",(function(t){return 0<=[e._protected.RunModes.Modes.Frame,e._protected.RunModes.Modes.Popup,e._protected.RunModes.Modes.ServiceWorker,e._protected.RunModes.Modes.Slave].indexOf(t)||t===e._protected.RunModes.Modes.WebSite&&e._protected.Integration.isOnRightDomain()}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},7303:(e,t,o)=>{t=function(){return function(e){const{EventAttributionManager:t,ReportingDataUtil:n}=o(6433);e.prototype.subscribeToNotifications=function(t){return e._protected.Notification.setNotificationEnabled(!0,t)},e.prototype.isSubscribedToNotifications=function(){return Promise.resolve(e.prototype.getNotificationEnabled())},e.prototype.unsubscribeFromNotifications=function(){return e._protected.Notification.setNotificationEnabled(!1)},e.prototype.isAllowedSubscriptionDomain=function(t){return Promise.resolve(e._protected.Notification.isAllowedSubscriptionDomain(t))},e.prototype.enableSponsoredNotifications=function(){return e._protected.Notification.setSponsoredNotificationsEnabled(!0)},e.prototype.areSponsoredNotificationsEnabled=function(){return Promise.resolve(e._protected.Notification.getSponsoredNotificationsEnabled())},e.prototype.disableSponsoredNotifications=function(){return e._protected.Notification.setSponsoredNotificationsEnabled(!1)},e.prototype.getLocale=function(){return e._protected.Installation.Profile.getLocale()},e.prototype.setLocale=function(t){return e._protected.Installation.Profile.setLocale(t)},e.prototype.getTimeZone=function(){return e._protected.Installation.Profile.getTimeZone()},e.prototype.setTimeZone=function(t){return e._protected.Installation.Profile.setTimeZone(t)},e.prototype.getCountry=function(){return e._protected.Installation.Profile.getCountry()},e.prototype.setCountry=function(t){return e._protected.Installation.Profile.setCountry(t)},e.prototype.getCurrency=function(){return e._protected.Installation.Profile.getCurrency()},e.prototype.setCurrency=function(t){return e._protected.Installation.Profile.setCurrency(t)},e.prototype.trackEvent=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.trackEvent",(function(t,o){return"string"!=typeof t||""===t||"@"===t.charAt(0)?Promise.reject(new e.prototype.Errors.InvalidArgumentError("Bad event type")):(e._protected.Events.sendEvent(t,null,o),Promise.resolve())})),e.prototype.getProperties=function(){return e._protected.Installation.getProperties()},e.prototype.putProperties=function(t){return e._protected.Installation.putProperties(t)},e.prototype.setProperty=function(t,o){return e._protected.Installation.setProperty(t,o)},e.prototype.unsetProperty=function(t){return e._protected.Installation.unsetProperty(t)},e.prototype.addProperty=function(t,o){return e._protected.Installation.addProperty.apply(null,arguments)},e.prototype.removeProperty=function(t,o){return e._protected.Installation.removeProperty.apply(null,arguments)},e.prototype.getPropertyValue=function(t){return e._protected.Installation.getPropertyValue(t)},e.prototype.getPropertyValues=function(t){return e._protected.Installation.getPropertyValues(t)},e.prototype.addTag=function(t){return e._protected.Installation.addTag.apply(null,Array.from(arguments))},e.prototype.removeTag=function(t){return e._protected.Installation.removeTag.apply(null,Array.from(arguments))},e.prototype.removeAllTags=function(){return e._protected.Installation.removeAllTags()},e.prototype.addRemoveTags=function(t,o){return e._protected.Installation.addRemoveTags(t,o)},e.prototype.getTags=function(){return e._protected.Installation.getTags()},e.prototype.hasTag=function(t){return e._protected.Installation.hasTag(t)},e.prototype.useGeolocation=function(t){return e.prototype.Geo.useGeolocation(t)},e.prototype.showSubscriptionDialog=function(){var t=e.prototype.Plugins.get("optin-dialog");return t&&t.showDialog(),Promise.resolve()},e.prototype.showSubscriptionBell=function(t){var o=e.prototype.Plugins.get("optin-bell");return o&&(t?o.showBell():o.hideBell()),Promise.resolve()},e.prototype.showSubscriptionSwitch=function(t,o){var n=e._protected.Options.getPlugins(),r=e.prototype.Plugins.get("optin-switch"),i=e._protected.gscope.document;if(t&&r&&i){var s=i.createElement("div");s.id=n["optin-switch"]&&n["optin-switch"].switchElementId||"wonderpush-subscription-switch";for(const e in o)s.setAttribute("data-"+e,o[e]);t.appendChild(s),r.setupSubscriptionSwitch()}return Promise.resolve()},e.prototype.showTagSwitches=function(t,o){const n=e._protected.Options.getPlugins();var r=e.prototype.Plugins.get("tag-switch");const i=e._protected.gscope.document;return t&&r&&i&&(Array.isArray(o)?(o.forEach((e=>{var o=i.createElement("div");o.classList.add(n["tag-switch"]&&n["tag-switch"].switchElementClass||"wonderpush-tag-switch");for(const t in e)o.dataset[t]=e[t];t.appendChild(o)})),r.setupTagSwitch()):console.warn("WonderPush.showTagSwitches() expects an array as second argument")),Promise.resolve()},e.prototype.showTagSwitch=e.prototype.showTagSwitches,e.prototype.setInAppMessagingDisplayCallback=function(t){e._protected.InAppMessaging.setDisplayCallback(t)},e.prototype.setInAppMessagesSuppressed=function(t){return e._protected.InAppMessaging.setMessagesSuppressed(t)},e.prototype.getInAppMessagesSuppressed=function(){return e._protected.InAppMessaging.getMessagesSuppressed()},e.prototype.getDisplayedInAppMessage=function(){return e._protected.InAppMessaging.getDisplayedInAppMessage()},e.prototype.getUserConsent=function(){return e._protected.Consent.getUserConsent()},e.prototype.setUserConsent=function(t){return e._protected.Consent.setUserConsent(t)},e.prototype.clearAllData=function(){return e.prototype.Data.clearAll()},e.prototype.clearEventsHistory=function(){return e.prototype.Data.clearEventsHistory()},e.prototype.clearPreferences=function(){return e.prototype.Data.clearPreferences()},e.prototype.downloadAllData=function(){return e.prototype.Data.downloadExport()},e.prototype.addPageView=function(){return e.prototype.newPageLoaded(),Promise.resolve()},e.prototype.setUserId=function(t){return e._protected.setUserId(t)},e.prototype.unsetUserId=function(){return e._protected.setUserId(null)};var r,i=!(e.prototype.getUserId=function(){return e._protected.getUserId()}),s=(e._protected.getUserId=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.getUserId",(function(){return i||e._protected.Helper.warn("[sdk ]","userId requested before being initialized"),e._protected.Storage.get("userId",null).then((e=>e&&e.userId||null))})),e._protected.setUserId=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.setUserId",(function(t){var o=!(i=!0);return t=t||null,e._protected.Storage.bulk([{test:{key:"userId",defaultValue:null,operationsCb:function(e){return e&&t===e.userId?null:(o=!0,{put:{key:"userId",value:{userId:t,updateDate:+new Date}}})}}}]).then((()=>{o&&e._protected.Init.fetchAccessTokenIfNeeded(t,(()=>{e._protected.Installation.updateInstallationCoreProperties(),e._protected.Installation.sendCachedPushToken()}),(()=>{}))}))})),e.prototype.sendSelfNotification=function(t){return e._protected.sendSelfNotification(t)},e._protected.sendSelfNotification=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.sendSelfNotification",(function(t){const o={};return"object"==typeof t&&null!==t&&(t.notification&&(o.notification=JSON.stringify(t.notification)),t.campaignId&&(o.campaignId=t.campaignId),t.notificationId&&(o.notificationId=t.notificationId),t.notificationOverride&&(o.notificationOverride=JSON.stringify(t.notificationOverride)),t.notificationParams)&&(o.notificationParams=JSON.stringify(t.notificationParams)),0===Object.keys(o).length&&(o.notification=JSON.stringify({alert:{title:"Test notification",text:"If you can read this, everything works as it should."}})),e._protected.Consent.awaitUserConsent().then((()=>{var t=e.prototype.Notification.getSubscriptionState();if(t!==e.prototype.SubscriptionState.SUBSCRIBED)throw new e.prototype.Errors.SubscriptionStateError("The user must be subscribed before sending a notification",[e.prototype.SubscriptionState.SUBSCRIBED],t)})).then((()=>e.this.Rest.post("/deliveries",o,void 0))).then((()=>{}))})),e.prototype.getSessionState=function(){return e._protected.Init.getSessionState()},e.prototype.getNotificationIcon=function(){return e._protected.Options.getNotificationIcon()},e.prototype.isNativePushNotificationSupported=function(){return e._protected.Notification.isNativePushNotificationSupported()},e.prototype.askNativePushNotificationPermission=function(){e.prototype.setNotificationEnabled(!0).catch((function(e){console.warn(e)}))},e.prototype.unsubscribeFromPushNotification=function(){return e.prototype.setNotificationEnabled(!1)},e.prototype.isRegistrationInProgress=function(){return e._protected.Notification.isRegistrationInProgress()},e.prototype.setNotificationEnabled=function(t,o){return e._protected.Notification.setNotificationEnabled(t,o)},e.prototype.getNotificationEnabled=function(){return e.prototype.Notification.getSubscriptionState()===e.prototype.SubscriptionState.SUBSCRIBED},e.prototype.isOnRightDomain=function(){return e._protected.Integration.isOnRightDomain()},e.preInstantiationPromise.then((function(){return e.prototype.getInitializationPromise()})).then((function(){return e._protected.Integration.callOnCustomDomain("WonderPushSDK._protected.Session.getCurrentSession")})).then((function(e){r=e})),e.prototype.trackEventOnUnload=function(t,o){return"string"!=typeof t||""===t||"@"===t.charAt(0)?Promise.reject(new e.prototype.Errors.InvalidArgumentError("Bad event type")):e._protected.Events.sendEvent(t,null,o,r,{useBeacon:!0})},e._protected.trackEventWithInternalData=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.trackEventWithInternalData",(function(t,o,n){if("string"!=typeof t||""===t||"@"===t.charAt(0))throw new e.prototype.Errors.InvalidArgumentError("Bad event type");return e._protected.Events.sendEvent(t,o,n)})),e._protected.trackInternalEvent=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.trackInternalEvent",(function(t,o,n){if("@"!==t.charAt(0))throw new e.prototype.Errors.InvalidArgumentError("This method must only be called for internal events, starting with an '@'");return e._protected.Events.sendEvent(t,o,n)})),e._protected.trackInAppEvent=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.trackInAppEvent",(function(t,o,n){return e._protected.Events.sendEvent(t,o,n,void 0,{allowAnonymous:!0})})),e._protected.trackInternalEventWithMeasurementsApi=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.trackInternalEventWithMeasurementsApi",(function(t,o,n){if("@"!==t.charAt(0))throw new e.prototype.Errors.InvalidArgumentError("This method must only be called for internal events, starting with an '@'");return e._protected.Events.sendEvent(t,o,n,void 0,{useMeasurementsApi:!0,postImmediately:!0})})),e._protected.trackInternalEventWithAppropriateApi=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.trackInternalEventWithAppropriateApi",(function(t,o,n,r){return Promise.all([e._protected.Session.getCurrentSession(),r&&r.overrideNotificationReceiptOnly?e._protected.Storage.get("_overrideNotificationReceipt",!1):Promise.resolve(!0)]).then((r=>{var[r,i]=r;return r&&r.accessToken&&i?e._protected.trackInternalEvent(t,o,n):e._protected.trackInternalEventWithMeasurementsApi(t,o,n)}))})),e.prototype.getInstallationId=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.getInstallationId",(function(){return e._protected.Session.getCurrentSession().then((function(e){return e.installationId}))})),e.prototype.getPushToken=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.getPushToken",(function(){return e._protected.Installation.getCachedInstallationPushToken()})),e.prototype.getDeviceId=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.getDeviceId",(function(){return e._protected.Init.getDeviceId()})),e.prototype.getInstallation=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.getInstallation",(function(){return e._protected.Helper.warn("WonderPush","WonderPushSDK.getInstallation() is deprecated. Please use WonderPushSDK.getInstallationCustomProperties()."),Promise.all([e._protected.Session.getCurrentSession(),e._protected.getUserId().then((t=>e._protected.JsonSyncInstallationCustom.getInstallationCustomPropertiesForUser(t))),e._protected.Init.getDeviceId(),e._protected.Installation.getCachedInstallationPushToken()]).then((function(e){var t=e[0],o=e[1],n=e[2];return e=e[3],{id:t.installationId,userId:t.userId,device:{id:n},pushToken:{data:e},custom:o}}))})),e.prototype.getInstallationCustomProperties=function(){return e._protected.Installation.getProperties()},e.prototype.putInstallationCustomProperties=function(t){return e._protected.Installation.putProperties(t)},e.prototype.getAttendance=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.getAttendance",(function(){return e._protected.Storage.bulk([{get:{key:"visitPageViews",defaultValue:1}},{get:{key:"pageViews",defaultValue:1}},{get:{key:"visitCount",defaultValue:1}}]).then((function(e){return{visitPageViews:e.results.byKey.visitPageViews,pageViews:e.results.byKey.pageViews,visitCount:e.results.byKey.visitCount}}))})),e._protected.onInteraction=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.onInteraction",(function(o){const r=new t(e._protected.Storage);return e._protected.Storage.bulk([{get:{key:"lastInteractionDate",defaultValue:0}},{get:{key:"lastAppOpenDate",defaultValue:0}},{get:{key:"lastAppOpenInfoJson",defaultValue:{}}},{get:{key:"lastAppCloseDate",defaultValue:0}},{get:{key:"lastReceivedNotificationInfoJson",defaultValue:{}}},{get:{key:"lastOpenedNotificationInfoJson",defaultValue:{}}}]).then((function(t){var i=[],a=(t=t.results.byKey).lastInteractionDate,c=t.lastAppOpenDate,d=t.lastAppOpenInfoJson,p=t.lastAppCloseDate,u=t.lastReceivedNotificationInfoJson.actionDate||Number.MAX_SAFE_INTEGER,l=(t=t.lastOpenedNotificationInfoJson).actionDate||Number.MAX_SAFE_INTEGER,g=e._protected.Time.getRealTime(),h=g-a>=e._protected.Constants.DIFFERENT_SESSION_REGULAR_MIN_TIME_GAP||a=e._protected.Constants.DIFFERENT_SESSION_NOTIFICATION_MIN_TIME_GAP;return o?h||i.push(e._protected.Storage.set("lastInteractionDate",g)):(h?(p{self.clients.matchAll({includeUncontrolled:!0,type:"window"}).then((o=>{o.length||e._protected.extendPresence(0,{force:!0}),t.resolve()}))}),5e3),t.promise})),e._protected.getLastPresenceInfo=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.getLastPresenceInfo",(function(){return e._protected.Storage.get("lastPresenceInfo",void 0)})),e._protected.extendPresence=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.extendPresence",(function(t){let o=1e._protected.Constants.PRESENCE_UPDATE_SAFETY_MARGIN)){let s;return s=i<0||!n.fromDate?r:new Date(n.fromDate),n=new Date(r.getTime()+t),r={fromDate:s.getTime(),untilDate:n.getTime(),elapsedTime:n.getTime()-s.getTime()},o&&o.skipEvent||e._protected.trackInternalEvent("@PRESENCE",{presence:r}),o.autoRenew&&(n=t-e._protected.Constants.PRESENCE_UPDATE_SAFETY_MARGIN,setTimeout((()=>e._protected.extendPresence(t,o)),n)),[{put:{key:"lastPresenceInfo",value:r}}]}n=i-e._protected.Constants.PRESENCE_UPDATE_SAFETY_MARGIN,setTimeout((()=>e._protected.extendPresence(t,o)),n)}}}]):Promise.resolve()})),e._protected.ensureAppOpenSent=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.ensureAppOpenSent",(function(){const t=(t,o,n)=>e._protected.Storage.bulk([{test:{key:"lastAppOpenDate",defaultValue:0,operationsCb:function(r){return[{test:{key:o,defaultValue:0,operationsCb:function(i){if(i(e.prototype.getAttendance().then((t=>e._protected.Events.fire(new e._protected.Events.NewPageView(t)))),e._protected.Plugins.runRegisteredTriggersCheck())))},e._protected.newPageLoadedProxifiedIncrements=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.newPageLoadedProxifiedIncrements",(function(){Promise.all([e._protected.onInteraction(!1),e._protected.Integration.incrementPageViews(),e._protected.incrementVisitPageViews()])})),e.prototype.newUserInteraction=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK.prototype.newUserInteraction",(function(){e._protected.onInteraction(!1).then((()=>e._protected.Plugins.runRegisteredTriggersCheck()))})),function(){return e._protected.Storage.getModuleInitializationPromise().then((function(){return e._protected.Storage.bulk([{test:{key:"visitCount",defaultValue:0,operationsCb:function(e){return{put:{key:"visitCount",value:++e}}}}},{put:{key:"visitPageViews",value:1}}])}))});return e._protected.incrementVisitPageViews=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.incrementVisitPageViews",(function(){return e._protected.Storage.getModuleInitializationPromise().then((function(){return e._protected.Storage.bulk([{test:{key:"visitPageViews",defaultValue:0,operationsCb:function(e){return{put:{key:"visitPageViews",value:++e}}}}}])}))})),e.instantiationPromise.then((()=>e.prototype.getAttendance())).then((t=>e._protected.Events.fire(new e._protected.Events.NewPageView(t)))),e._protected.Integration.getModuleInitializationPromise().then((function(){var t;if(e._protected.Integration.isOnRightDomain()&&(e._protected.RunModes.Behaviors.ModeFrame||e._protected.RunModes.Behaviors.ModeWebSite)&&e._protected.Options.hasUserId()&&(t=e._protected.Options.getUserId(),e._protected.setUserId(t)),i=!0,(e._protected.RunModes.Behaviors.ModeFrame||e._protected.RunModes.Behaviors.ModeWebSite&&e._protected.Integration.isOnRightDomain())&&window.isSecureContext&&window.addEventListener("beforeunload",(()=>e._protected.reportBeforeUnload())),e._protected.RunModes.Behaviors.ModeWebSite)return window.addEventListener("hashchange",(function(){e._protected.onInteraction(!1)})),window.addEventListener("beforeunload",(function(){e._protected.onInteraction(!0)})),e._protected.incrementVisitPageViews().catch((function(){})).then((function(){return e._protected.onInteraction(!1)}))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},431:(e,t)=>{t=function(){return function(e){var t,o="[sw-client ]";let n=!1;e.instantiationPromise.then((()=>{n=!0}));var r=(e._protected.ServiceWorkerClient.refreshPushToken=function(t,o){return e._protected.gscope.isSecureContext,e._protected.Notification.getTrustedNotificationPermissionState().then((function(n){return n!==e._protected.Notification.PERMISSION_GRANTED?(e._protected.Notification.PERMISSION_UNKNOWN,Promise.reject(new e.prototype.Errors.PermissionError("Notification permission is not granted","notification",n))):r(t,o).then((function(t){return t?(e._protected.Installation.addInstallationPushToken(t),t):Promise.reject(new e.prototype.Errors.InternalError("Could not get push token"))})).catch((function(e){throw e}))}))},function(t,n){var i,s,a,c,d,p;return t&&t.pushManager?(i=!1,t.active?((s={userVisibleOnly:!0,applicationServerKey:e._protected.Helper.arrayBufferFromBase64UrlSafe(e._protected.Options.getApplicationServerKey()||"")}).applicationServerKey||delete s.applicationServerKey,a=2*e._protected.Constants.PUSH_MANAGER_SUBSCRIBE_TOO_LONG,c=3*e._protected.Constants.PUSH_MANAGER_SUBSCRIBE_TOO_LONG,d=new e._protected.Locking.ExpiringUnfairNamedGlobalMutex("pushManager.subscribe",a),p=+new Date,d.acquire({interval:500,timeout:c}).then((function(){var r,a=!1;return setTimeout((function(){a||console.warn("Subscribing to push notifications seems to take too long… Are you on a slow network or using private browsing?")}),e._protected.Constants.PUSH_MANAGER_SUBSCRIBE_TOO_LONG),e._protected.Promise.do(e._protected.Storage.get("pushTokenCache",{}).then((function(e){r=e.date})).then((function(){return t.pushManager.getSubscription()})).catch((function(t){return e._protected.Helper.warn(o,"[subscribeAppropriately] pushManager.getSubscription() rejected",t),null})).then((function(t){if(t){var a=e._protected.Helper.plainObjectCopy({applicationServerKey:t.options.applicationServerKey}),c=e._protected.Helper.plainObjectCopy({applicationServerKey:s.applicationServerKey});if("userVisibleOnly"in PushSubscriptionOptions.prototype||delete c.userVisibleOnly,a=t.options&&!e._protected.JsonUtil.equal(a,c),c=e._protected.Options.getResubscribe(),a&&!c)i=!(n=!0);else if(a||t.expirationTime&&((new Date).getTime()>=t.expirationTime||r&&(new Date).getTime()>(t.expirationTime+r)/2))return e._protected.Helper.info(o,"[subscribeAppropriately] We'll unsubscribe the existing subscription to update its applicationServerKey"),i=!0,t.unsubscribe().then((function(e){return null}),(function(t){e._protected.Helper.warn(o,"[subscribeAppropriately] existingSubscription.unsubscribe() rejected",t)}))}else i=!0;return t})).then((function(e){return n&&!i?e:t.pushManager.subscribe(s)})).then((function(t){return e._protected.Analytics.sendEvent("serviceWorkerClient","subscribeAppropriately",null,+new Date-p),t}),(function(t){e._protected.Helper.error(o,"[subscribeAppropriately] pushManager.subscribe(",s,") rejected",t);var n="";throw t&&(t.name&&(n+=t.name),t.message)&&(n+=": "+t.message),e._protected.Analytics.sendEvent("serviceWorkerClient","subscribeAppropriately-error",n,+new Date-p),t})),(function(){a=!0,d.release()}))}),(function(e){throw e}))):new e._protected.Promise.Poll((()=>t.active),1e4,50).wait().then((()=>r(t,n)))):Promise.reject(new e.prototype.Errors.InvalidArgumentError("No valid registration given"))});e._protected.ServiceWorkerClient.registerForPushNotifications=e._protected.Integration.remotelyCallable((function(){return e._protected.Integration.isOnRightDomain()?(!1===e._protected.gscope.isSecureContext&&e._protected.Helper.log(o,"[registerForPushNotifications] isSecureContext=false, likely because of opener, continuing anyway"),e._protected.RunModes.Behaviors.ContextServiceWorker?Promise.reject(new e._protected.Errors.InternalWrongTargetError):"granted"!==Notification.permission?Promise.reject(new e.prototype.Errors.PermissionError("registerForPushNotifications called without permission granted")):navigator.serviceWorker?e._protected.ServiceWorkerClient.registerServiceWorker().then((function(e){return r(e,!1)})).then((function(e){return e})).catch((function(e){throw e})):new Promise(((e,t)=>{}))):Promise.reject(new e._protected.Errors.InternalWrongDomainError("Current origin "+location.origin+" cannot ask for the notification permission"))}));const i=e._protected.ServiceWorkerClient.registerServiceWorker;e._protected.ServiceWorkerClient.registerServiceWorker=function(){var t;return e._protected.RunModes.Behaviors.CanRegisterServiceWorker?(t=e._protected.Integration.getServiceWorkerUrl(),navigator.serviceWorker&&navigator.serviceWorker.controller&&navigator.serviceWorker.controller.scriptURL&&navigator.serviceWorker.controller.scriptURL!==t&&(e._protected.Helper.warn(o,"[registerServiceWorker] Existing service worker detected! Registering",t,"in place of",navigator.serviceWorker.controller.scriptURL),e._protected.Helper.warn(o,"[registerServiceWorker] Push notifications and offline support might not work."),e._protected.Helper.warn(o,"[registerServiceWorker] Please follow this guide: https://docs.wonderpush.com/docs/service-worker-integration")),i.apply(this,arguments)):Promise.reject("Cannot register service worker from here.")},e._protected.ServiceWorkerClient.unsubscribeFromPush=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.ServiceWorkerClient.unsubscribeFromPush",(function(){return e._protected.Notification.setManuallyUnsubscribed(!0).then((function(){return!0})).catch((function(){return!1}))}));var s=function(){e._protected.ServiceWorkerClient._focusHandlerCalled()};e._protected.ServiceWorkerClient._focusHandlerCalled=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.ServiceWorkerClient._focusHandlerCalled",(function(){t=+new Date})),e._protected.ServiceWorkerClient.addMessageEventListener((function(o){if(("undefined"==typeof ServiceWorkerMessageEvent||o instanceof ServiceWorkerMessageEvent)&&o.data instanceof Object&&o.data.sdk===e._protected.sdkName)switch(o.data.type){case"getLastFocusTimestamp":"ports"in o&&0{e._protected.Installation.addInstallationPushToken(t)})))}))}))}))}))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},5403:(e,t,o)=>{t=function(){return function(e){const{EventAttributionManager:t,ReportingDataUtil:n}=o(6433),r=o(4596).forceDisplayOnNextEvent;var i,s,a,c,d,p;e._protected.RunModes.Behaviors.ContextServiceWorker&&e._protected.Helper.supportsPushManager()&&(i="[sw ]",s=e._protected.gscope,e._protected.ServiceWorker.resendPushToken=function(t){return e.instantiationPromise.then((function(){return e.prototype.getInitializationPromise().then((function(){return e._protected.ServiceWorkerClient.refreshPushToken(registration,!0).then((function(){}),(function(o){e._protected.ServiceWorkerClient.getPushSubscriptionFromServiceWorker().then((function(o){e._protected.Installation.addInstallationPushToken(o,t)}),(function(e){}))}))}))}))},e._protected.ServiceWorker.checkForCustomDomainChange=function(){return e.instantiationPromise.then((function(){return e.prototype.getInitializationPromise().then((function(){e._protected.Integration.getCurrentOperatingOrigin()!==e._protected.Integration.getHomeOrigin()&&Promise.all([e._protected.Init.getDeviceId(),e._protected.Init.getFederatedDeviceId(),e._protected.Storage.get("customDomainMigrationInfo")]).then((function(t){var o=t[0],n=t[1];t=t[2]||{},o===n||t.deviceId===o&&t.federatedDeviceId===n||(e._protected.trackInternalEvent("@WEB_CUSTOM_DOMAIN_MIGRATION"),t.deviceId=o,t.federatedDeviceId=n,t.eventDate=+new Date,e._protected.Storage.set("customDomainMigrationInfo",t))}))}))}))},e._protected.ServiceWorker.ensureLatestSdkVersion=function(t){return t&&0=59){if(e._protected.Integration.getHomeOrigin().endsWith(e._protected.Constants.DEFAULT_DOMAIN_SUFFIX)){var u=[];c&&c!==e._protected.Options.getApplicationName()&&u.push(c),c=e._protected.Options.getApplicationName(),d.body&&u.push(d.body),u.length>0?d.body=u.join(" - "):delete d.body}d.image&&(d.icon=d.image,delete d.image)}return d.image&&"undefined"!=typeof Notification&&!Notification.prototype.hasOwnProperty("image")&&(d.icon=d.image,delete d.image),d.icon&&navigator.userAgent.indexOf("Linux")>=0&&"Firefox"===p.name&&parseInt(p.version)<50&&delete d.icon,"undefined"!=typeof Notification&&Notification.prototype.hasOwnProperty("data")?(d.data=t,null===d.tag?delete d.tag:"tag"in a||"string"!=typeof r.campaignId||(d.tag=r.campaignId)):d.tag=JSON.stringify(t),console.info("[WonderPush] Displaying notification. title:",c,d),s.registration.showNotification(c,d).then((function(e){}),(function(t){e._protected.Helper.error(i,"showNotification(",c,",",JSON.stringify(d),") rejected",t)}))}(t).then((function(){return e._protected.Promise.timeout(Promise.all([function(t){if(!0===e._protected.Options.getDisableConfirmedReceipts())return Promise.resolve();const o=(t||{})._wp||{};var r={actionDate:e._protected.Time.getRealTime()},s=(n.assignEventData(r,n.extract(o)),e._protected.Storage.set("lastReceivedNotificationInfoJson",r),o.receipt);return e._protected.Storage.bulk([{get:{key:"pushTokenCache",defaultValue:{}}},{get:{key:"_overrideNotificationReceipt",defaultValue:null}},{get:{key:e._protected.Constants.LAST_RECEIVED_NOTIFICATION_CHECK_DATE_STORAGE_KEY,defaultValue:null}}]).then((function(t){var n=t.results.byKey.pushTokenCache,a=t.results.byKey[e._protected.Constants.LAST_RECEIVED_NOTIFICATION_CHECK_DATE_STORAGE_KEY];const c=o[e._protected.Constants.LAST_RECEIVED_NOTIFICATION_CHECK_DELAY_PAYLOAD_KEY]||e._protected.Constants.DEFAULT_LAST_RECEIVED_NOTIFICATION_CHECK_DELAY;if("number"!=typeof a||+new Date-a>c){const t=+new Date;e.this.Rest.postEventually("/installation",{body:JSON.stringify({[e._protected.Constants.LAST_RECEIVED_NOTIFICATION_CHECK_DATE_INSTALLATION_KEY]:t}),overwrite:"false"}).then((()=>e._protected.Storage.set(e._protected.Constants.LAST_RECEIVED_NOTIFICATION_CHECK_DATE_STORAGE_KEY,t))).catch((t=>e._protected.Helper.warn(i,"Could not report last received notification check date",t)))}var d=t.results.byKey._overrideNotificationReceipt;return null!=d&&(s=d),n.pushTokenP256dh&&n.pushTokenAuth||(s=!0),s?e._protected.trackInternalEvent("@NOTIFICATION_RECEIVED",r):e._protected.trackInternalEventWithMeasurementsApi("@NOTIFICATION_RECEIVED",r)}))}(t).catch((t=>e._protected.Helper.error(i,"[handlePush] trackNotificationReceivedEvent rejected:",t))).then((()=>e._protected.RequestVault.waitUntilEmptyPromise())),e._protected.ServiceWorker.ensureLatestSdkVersion(o).catch((t=>e._protected.Helper.error(i,"[handlePush] ensureLatestSdkVersion rejected:",t)))]),5e3,void 0,!0)})).then((()=>{}));console.error("Got empty notification!")}),(function(e){console.error("Failed to display a notification",e)}))},c=function(t){return console.log("pushsubscriptionchange event",t),t.newSubscription?e._protected.Installation.addInstallationPushToken(t.newSubscription):e._protected.ServiceWorkerClient.refreshPushToken(registration,!1).then((function(e){console.log("Push subscription renewed",e)}),(function(e){throw console.error("Failed to renew push subscription during the handling of a pushsubscriptionchange event",e),e}))},d=function(o){return new Promise((function(a,c){if("user_visible_auto_notification"===o.notification.tag)return o.notification.close(),a();var d;if("undefined"!=typeof Notification&&Notification.prototype.hasOwnProperty("data"))d=o.notification.data;else try{d=JSON.parse(o.notification.tag)}catch(a){}if("object"!=typeof(d="object"==typeof d&&null!==d?d:{})._wp||null===d._wp)return a();var u,l=d._wp,g=l.targetUrl,h=l.actions,f=(l.alert||{}).actions||[],_=((u="string"==typeof o.action?f.filter((function(e){return e&&"object"==typeof e&&e.action===o.action}))[0]:u)&&(g=u.targetUrl||g,h=u.actions||h,d._wp)&&(d._wp.notificationclickEventAction=o.action),l.inApp&&l.inApp.content&&r(e,["ON_FOREGROUND"],l.inApp),o.notification.close(),f=n.extract(l),new t(e._protected.Storage).setCurrentAttribution(f,e._protected.Constants.DIFFERENT_SESSION_REGULAR_MIN_TIME_GAP),{actionDate:e._protected.Time.getRealTime()});if(n.assignEventData(_,f,{attributionReason:"notificationOpened"}),u&&(_.buttonLabel=u.title),e._protected.Storage.set("lastOpenedNotificationInfoJson",_),e._protected.trackInternalEvent("@NOTIFICATION_OPENED",n.withEventData(_,void 0)),e._protected.Notification.handleActions(f,h),"data"===l.type||"object"!=typeof l.alert||null===l.alert)return a();if(g&&g.startsWith("wonderpush://")){if("wonderpush://notificationOpen/noop"===g)return a();if("wonderpush://notificationOpen/broadcast"===g)return e._protected.Events.fire(e._protected.Events.WonderPushNotificationOpenedEvent(o)),a();g=void 0}(function(t,o){return clients.openWindow?(o=o||e._protected.Options.getDefaultNotificationUrl()||s.registration.scope,clients.openWindow(o).catch((function(t){if(e._protected.Helper.warn(i,"opening window rejected",t,o),t.code===t.SECURITY_ERR){var n=e._protected.Integration.getRedirectionPageUrl(o);return clients.openWindow(n.href)}})).then((function(o){if(o){var n=e._protected.Integration.probeWindowObject({postMessage:(e,t,n)=>{o.postMessage(e,n)}},e._protected.Integration.getTargetOrigin(),{type:"isReady"},(e=>e.data instanceof Object&&"readiness"===e.data.type&&e.data.ready));return e._protected.Promise.timeout(n,e._protected.Constants.SW_MAX_PAGELOAD_MS).then((function(){return p(o,t,"Sending notification to new client")}),(function(){console.log("Waited "+e._protected.Constants.SW_MAX_PAGELOAD_MS/1e3+"s for the newly opened window to be ready before sending it the clicked notification, aborting. (Normal if opening an external website.)")}))}}))):Promise.reject(new e.prototype.Errors.InternalError("Cannot open new client window to display notification"))})(d,g).then(a,c)}))},p=function(t,o,n){function r(){n&&console.log(n),t.postMessage({sdk:e._protected.sdkName,type:"nativeNotificationOpen",data:o})}return t.focus().then(r,r)},e._protected.ServiceWorker.addEventListener("install",(function(t){return e.instantiationPromise.then((function(){return s.skipWaiting()}))})),e._protected.ServiceWorker.addEventListener("activate",(function(e){return s.clients.claim()})),e._protected.ServiceWorker.addEventListener("push",(function(t){return e.instantiationPromise.then((function(){return a(t)})).then((()=>{}))})),e._protected.ServiceWorker.addEventListener("pushsubscriptionchange",(function(t){return e.instantiationPromise.then((function(){return c(t)}))})),e._protected.ServiceWorker.addEventListener("notificationclick",(function(t){return e.instantiationPromise.then((function(){return d(t)}))})),e._protected.ServiceWorker.resendPushToken(),e._protected.ServiceWorker.checkForCustomDomainChange(),"undefined"!=typeof navigator)&&navigator.permissions&&navigator.permissions.query&&navigator.permissions.query({name:"notifications"}).then((t=>{t&&t.addEventListener("change",(t=>{if((t=t.target instanceof PermissionStatus?t.target:void 0)&&"granted"===(t.state||t.status)){const t=()=>{e._protected.Init.getSessionState()===e.this.SessionState.INIT_INPROGRESS&&(e._protected.Notification.refreshSubscriptionState(),setTimeout(t,3e3))};setTimeout(t,3e3)}}))}))}}.apply(t,[]),void 0!==t&&(e.exports=t)},9072:(e,t,o)=>{o=[o(3998),o(6533)],t=function(e,t){return function(e){var t,o=new e._protected.Promise.Deferred;return e._protected.Session=new function(){t=function(){e.preInstantiationPromise.then((function(){e._protected.Blocker.category("accessToken").add("currentSession"),Promise.all([e._protected.Options.getModuleInitializationPromise(),e._protected.Storage.getModuleInitializationPromise()]).then((function(){o.resolve(),e._protected.Blocker.category("accessToken").remove("currentSession")}))}))},this.getModuleInitializationPromise=function(){return o.promise},this.listUsedUserIds=function(){return e._protected.Storage.get("sessions",{}).then((function(e){return Object.keys(e).map((function(e){return""===e?null:e}))}))},this.getSession=function(t){return t=t||"",e._protected.Storage.get("sessions",{}).then((function(e){return e[t]||{}}))},this.getCurrentSession=e._protected.Integration.remotelyCallable((function(){return e._protected.getUserId().then((t=>e._protected.Session.getSession(t))).then((function(e){return e}))})),this.deleteSession=function(t){return t=t||"",e._protected.Storage.get("sessions",{}).then((function(o){return delete o[t],e._protected.Storage.set("sessions",o)}))},this.setSession=function(t){return e._protected.Storage.get("sessions",{}).then((function(o){return o[t.userId||""]=t,e._protected.Storage.set("sessions",o)}))},this.reset=function(){return e._protected.Storage.rm("sessions")},this.serialize=function(){return e._protected.Storage.get("sessions",{}).then((function(e){return JSON.stringify(e)}))},this.deserialize=function(t){t=JSON.parse(t||"{}"),e._protected.Storage.set("sessions",t)}},t(),o.promise}}.apply(t,o),void 0!==t&&(e.exports=t)},6013:(e,t)=>{void 0!==(t=function(){return function(e){e.prototype.SessionState={INIT_FAILED:-1,INIT_UNSTARTED:0,INIT_INPROGRESS:1,INIT_SUCCESS:2},Object.freeze(e.prototype.SessionState)}}.apply(t,[]))&&(e.exports=t)},8167:(e,t)=>{void 0!==(t=function(){return function(e){e._protected.Storage.getDatabaseName=function(){return e._protected.RunModes.Behaviors.Federated?(e._protected.Helper.debug("[storage ]","using federated database"),"WP_federated"):"WP_"+e._protected.Options.getWebKey()},e._protected.CustomDomainStorage=e._protected.Integration.proxifyToCustomDomain("WonderPushSDK._protected.CustomDomainStorage",{getModuleInitializationPromise:e._protected.Storage.getModuleInitializationPromise,getDatabaseName:e._protected.Storage.getDatabaseName,getKeyValueStorageStoreName:e._protected.Storage.getKeyValueStorageStoreName,getMutexStoreName:e._protected.Storage.getMutexStoreName,get:e._protected.Storage.get,set:e._protected.Storage.set,rm:e._protected.Storage.rm,listObjectStores:e._protected.Storage.listObjectStores,deleteDatabase:e._protected.Storage.deleteDatabase})}}.apply(t,[]))&&(e.exports=t)},124:(e,t)=>{void 0!==(t=function(){return function(e){e.prototype.SubscriptionState={DENIED:-3,UNSUPPORTED:-2,UNSUBSCRIBED:-1,UNDETERMINED:0,NOT_SUBSCRIBED:1,SUBSCRIBED:2},Object.freeze(e.prototype.SubscriptionState)}}.apply(t,[]))&&(e.exports=t)},9536:(e,t)=>{void 0!==(t=function(){return function(e){e._protected.Time={},e._protected.Time.getRealTime=function(){return Date.now()}}}.apply(t,[]))&&(e.exports=t)},5792:(e,t)=>{t=function(){return function(e){var t,o,n,r,i,s;e._protected.RunModes.Behaviors.ContextWindow&&(t="[ui ]",o=[],r=function(e){var t=document.getElementById("text-content");t&&(t.innerText=e)},(n={}).clear=function(){r("")},n.close=function(){r("You can now close the window."),window.close()},n.wait=function(e){return new Promise((function(t){setTimeout((function(){t()}),e.ms||1e3)}))},n.reload=function(){r("Reloading…");var o=new URL(window.location.href),n=e._protected.Helper.decodeQueryString(location.search);delete n.wonderpushUi,delete n.wonderpushUI,n.wonderpushUI=i(),o.search="",Object.keys(n).forEach((function(e){o.search+=(o.search?"&":"?")+encodeURIComponent(e)+(null===n[e]?"":"="+encodeURIComponent(n[e]))})),e._protected.Helper.info(t,"[reload] Navigating to",o.href),window.location.href=o.href},n.downloadDataExport=function(){return r("Gathering data for export…"),e.this.Data.downloadExport().then((function(){r("See downloaded file.")}),(function(e){throw r("An error occurred"),e}))},n.clearEventsHistory=function(){return r("Clearing all events…"),e.this.Data.clearEventsHistory().then((function(){r("All events are cleared.")}),(function(e){throw r("An error occurred"),e}))},n.clearPreferences=function(){return r("Clearing preferences…"),e.this.Data.clearPreferences().then((function(){r("Preferences are cleared.")}),(function(e){throw r("An error occurred"),e}))},n.clearAllData=function(){return r("Clearing all local and server-side data…"),e.this.Data.clearAll().then((function(){r("All local and server-side data is cleared.")}),(function(e){throw r("An error occurred"),e}))},n.optIn=function(){return r("Opt-in you in…"),e.this.setNotificationEnabled(!0).then((function(){r("You are now opted in.")}),(function(e){throw r("An error occurred"),e}))},n.optOut=function(){return r("Opt-in you out…"),e.this.setNotificationEnabled(!1).then((function(){r("You are now opted out.")}),(function(e){throw r("An error occurred"),e}))},n.addTag=function(){var t,o,n=window.location.search.split(/[\?&]/);let i=[];for(const r of n)r&&("wonderpushOptIn"===(o=(t=r.split("="))[0])&&e.this.subscribeToNotifications(),"tag"===o)&&decodeURIComponent(t[1]||"").split(",").forEach((e=>{e&&i.push(e)}));e.this.addTag(i),r("Added "+i.length+" tag"+(1===i.length?"":"s")+": "+i.join(", "))},n.invalidateConfig=function(){return r("Invalidating cached configuration…"),e.this.Developer.invalidateConfig().then((function(){r("Cached configuration now invalidated")}),(function(e){throw r("An error occurred"),e}))},n.copyInstallationId=function(){e.prototype.getInstallationId().then((t=>{const o=document.createElement("div"),n=(o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.right="0",o.style.bottom="0",o.style.display="flex",o.style.flexDirection="column",o.style.alignItems="center",o.style.background="white",o.style.justifyContent="center",o.style.font="13px arial",e=>{const t=document.createElement("input");t.type="text",t.value=e,t.style.border="none",t.style.background="transparent",t.style.width="100%",t.style.textAlign="center",o.appendChild(t),(e=document.createElement("button")).addEventListener("click",(()=>{t.focus(),t.select(),document.execCommand("copy"),t.blur(),n.style.display="inline"})),e.textContent="Copy to clipboard",e.style.marginTop="10px",o.appendChild(e);const n=document.createElement("span");n.textContent="Copied!",n.style.display="none",o.appendChild(n)});var r;t?n(t):((t=document.createElement("span")).textContent="You do not have an Installation ID. Please make sure you have subscribed to push notifications.",(r=document.createElement("button")).textContent="Subscribe to notifications",r.addEventListener("click",(t=>{e.prototype.subscribeToNotifications(t).then((()=>e.prototype.getInstallationId())).then((e=>{o.innerHTML="",e?n(e):o.innerText="An error occurred, please try again."}))})),o.appendChild(t),o.appendChild(r)),(document.getElementById("main-content")||document.body).appendChild(o)}))},i=function(){return o.map((function(e){return e.originalCall})).join(";")},s=function(){var e=o.shift();return void 0===e?Promise.resolve():Promise.resolve(e()).then(s)},WonderPush.ready((function(){var r=(r=e._protected.Helper.decodeQueryString(location.search)).wonderpushUI||r.wonderpushUi;(o=(r||"").split(";").map((function(o){var r=o.split("?"),i=(2{"use strict";o.d(t,{Z:()=>r}),t=o(8081),t=o.n(t);var n=o(3645);(o=o.n(n)()(t())).push([e.id,"BODY.modal-open {\n overflow: hidden;\n}\n\n.wp-modal {\n z-index: 10000;\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.75);\n overflow: auto;\n}\n\n.wp-modal > .wp-modal-wrapper-outer {\n display: flex;\n height: 100%;\n}\n\n.wp-modal > .wp-modal-wrapper-outer > .wp-modal-wrapper-inner {\n margin: auto;\n max-height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.wp-modal > .wp-modal-wrapper-outer > .wp-modal-wrapper-inner > .wp-modal-block {\n display: flex;\n flex-direction: column;\n max-width: 30em;\n max-height: 50em;\n border: 1px solid #E0E0E0;\n border-radius: 2px;\n box-shadow: 0 0.2em 2em black;\n background-color: #FFF;\n color: #333;\n margin: 1em;\n}\n\n.wp-modal-block > .wp-modal-title {\n border-bottom: 2px solid #10ACFF;\n color: #10ACFF;\n padding: 0.7em 0.6em;\n line-height: 1.2em;\n font-size: 125%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.wp-modal-title > .wp-modal-title-icon {\n background-size: 2em 2em;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n width: 2em;\n height: 2em;\n flex-shrink: 0;\n flex-grow: 0;\n margin-right: 0.7em;\n}\n\n.wp-modal-title > .wp-modal-title-text {\n flex-grow: 1;\n}\n\nwp-modal-block > .wp-modal-content {\n overflow: auto;\n}\n\n.wp-modal-content > .wp-modal-text {\n padding: 0.7em 0.6em;\n}\n\n.wp-modal-block > .wp-modal-buttons {\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n border-top: 1px solid #E0E0E0;\n}\n\n.wp-modal-buttons > .wp-modal-button {\n flex: 1;\n -moz-user-select: none;\n border-right: 1px solid #E0E0E0;\n cursor: pointer;\n font-weight: normal;\n line-height: 1.2em;\n padding: 0.7em 0.6em;\n text-align: center;\n vertical-align: middle;\n white-space: nowrap;\n}\n\n.wp-modal-buttons > .wp-modal-button:hover {\n background-color: #f0f0f0;\n}\n\n.wp-modal-buttons > .wp-modal-button:last-child {\n border-right: 0;\n}\n",""]);const r=o},5231:(e,t,o)=>{"use strict";o.d(t,{Z:()=>r}),t=o(8081),t=o.n(t);var n=o(3645);(o=o.n(n)()(t())).push([e.id,".wp-popup {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n font-family: arial;\n text-align: center;\n padding-left: 10px;\n padding-right: 10px;\n}\n.wp-popup .wp-popup-content {\n display: flex;\n flex-flow: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n margin: 0 auto;\n max-width: 350px;\n min-width: 231px;\n}\n.wp-popup .wp-popup-title {\n font: bold 18px arial;\n margin-bottom: 12px;\n}\n.wp-popup .wp-popup-message {\n font: 15px arial;\n color: #777;\n margin-bottom: 25px;\n}\n.wp-popup .wp-popup-example {\n background-color: #fff;\n height: 80px;\n box-shadow: 0 0 20px #888888;\n margin-bottom: 20px;\n flex-flow: row nowrap;\n display: flex;\n align-self: stretch;\n}\n\n/* When used inside the notification example */\n.wp-popup .wp-popup-example .wp-popup-icon {\n flex-basis: 80px;\n width: 80px;\n height: 80px;\n flex-grow: 0;\n flex-shrink: 0;\n background-color: #efefef;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n}\n\n/* When used directly on the popup */\n.wp-popup #logo.wp-popup-icon {\n background-size: contain;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n}\n\n.wp-popup .wp-popup-example-text {\n text-align: left;\n flex: 1 auto;\n padding: 10px 17px 8px 17px;\n display: flex;\n flex-flow: column nowrap;\n}\n.wp-popup .wp-popup-example-text>div {\n flex: 0 auto;\n}\n\n.wp-popup .wp-popup-example-text .wp-popup-example-title {\n font: 13px arial;\n color: #3c3c3c;\n margin-bottom: 5px;\n}\n.wp-popup .wp-popup-example-text .wp-popup-example-message {\n flex-grow: 1;\n font: 12px arial;\n color: #3c3c3c;\n}\n.wp-popup .wp-popup-example-text .wp-popup-example-url {\n font: 10px arial;\n color: #9d9d9d;\n}\n.wp-popup .wp-popup-disclaimer {\n font: 10px arial;\n font-style: italic;\n color: #b0b0b0;\n}\n.wp-popup .wp-popup-buttons {\n padding: 20px;\n}\n\n.wp-popup .wp-popup-buttons .wp-popup-negative-button {\n border: none;\n background: none;\n color: #777;\n text-decoration: underline;\n padding: 15px;\n font-size:12px;\n cursor: pointer;\n}\n.wp-popup .wp-popup-buttons .wp-popup-positive-button {\n border: none;\n background: #1a73e8;\n color: white;\n font-weight: bold;\n text-decoration: none;\n border-radius: 5px;\n padding: 15px;\n cursor: pointer;\n font-size:20px;\n}",""]);const r=o},111:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>i}),t=o(8081),t=o.n(t);var n=o(3645),r=(n=o.n(n),o(4125));o=o(5231),(n=n()(t())).i(r.Z),n.i(o.Z),n.push([e.id,"\n",""]);const i=n},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(0{"use strict";e.exports=function(e){return e[1]}}},__webpack_module_cache__={},c,e,t,p,u,i,s;function __webpack_require__(e){var t=__webpack_module_cache__[e];return void 0!==t||(t=__webpack_module_cache__[e]={id:e,exports:{}},__webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__)),t.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},s=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null),n=(__webpack_require__.r(o),{});i=i||[null,s({}),s([]),s(s)];for(var r=2&t&&e;"object"==typeof r&&!~i.indexOf(r);r=s(r))Object.getOwnPropertyNames(r).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,__webpack_require__.d(o,n),o},__webpack_require__.d=(e,t)=>{for(var o in t)__webpack_require__.o(t,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,o)=>(__webpack_require__.f[o](e,t),t)),[])),__webpack_require__.u=e=>"inappmessaging.min.js",__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p={},u="wonderpush-javascript-sdk:",__webpack_require__.l=(e,t,o,n)=>{if(p[e])p[e].push(t);else{var r,i;if(void 0!==o)for(var s=document.getElementsByTagName("script"),a=0;a{r.onerror=r.onload=null,clearTimeout(d);var n=p[e];if(delete p[e],r.parentNode&&r.parentNode.removeChild(r),n&&n.forEach((e=>e(o))),t)return t(o)};var d=setTimeout(t.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=t.bind(null,r.onerror),r.onload=t.bind(null,r.onload),i&&document.head.appendChild(r)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.p="https://cdn.by.wonderpush.com/sdk/1.1.35.2/",c={12:0},__webpack_require__.f.j=(e,t)=>{var o,n,r=__webpack_require__.o(c,e)?c[e]:void 0;0!==r&&(r?t.push(r[2]):(o=new Promise(((t,o)=>r=c[e]=[t,o])),t.push(r[2]=o),t=__webpack_require__.p+__webpack_require__.u(e),n=new Error,__webpack_require__.l(t,(t=>{var o;__webpack_require__.o(c,e)&&(0!==(r=c[e])&&(c[e]=void 0),r)&&(o=t&&("load"===t.type?"missing":t.type),t=t&&t.target&&t.target.src,n.message="Loading chunk "+e+" failed.\n("+o+": "+t+")",n.name="ChunkLoadError",n.type=o,n.request=t,r[1](n))}),"chunk-"+e,e)))},e=(e,t)=>{var o,n,[r,i,s]=t,a=0;if(r.some((e=>0!==c[e]))){for(o in i)__webpack_require__.o(i,o)&&(__webpack_require__.m[o]=i[o]);s&&s(__webpack_require__)}for(e&&e(t);a