(()=>{"use strict";var e={110:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c,detectIncognito:()=>l});var n={d:(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},o={};n.d(o,{A:()=>u,k:()=>s});var i=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},a=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.logDisplayEnabledKey=t.validSubscriberFields=t.skipQueryParamsInWorkerPathSiteIds=t.brandName=t.quieterUIPermissionImage=t.env=t.workerMessengerCommand=t.database=t.defaultMinStorageDuration=t.poweredByReferralUrl=t.pushEngageHomePageUrl=t.defaultNotificationTitle=t.defaultNotificationTag=t.loadingIcon=t.bellPlusIcon=t.bellCheckIcon=t.bellCircleIcon=t.bellRingIcon=t.bellBadgeIcon=t.bellSettingIcon=t.closeIcon=t.bellIcon=t.defaultServiceWorkerSetting=t.widgetOptInType=t.optInTypes=t.storageName=void 0,t.storageName="PushEngageSDK",t.optInTypes={bell:3,floatingBar:2,largeSafari:6,largeSafariWithSegments:8,safari:1,singleStep:4,sleekOptInBox:9},t.widgetOptInType=127,t.defaultServiceWorkerSetting={scope:!0,workerStatus:!0,worker:"service-worker.js",keepMultipleSubscriptions:!1},t.bellIcon='\n\n\n',t.closeIcon='\n\n',t.bellSettingIcon='',t.bellBadgeIcon='',t.bellRingIcon='',t.bellCircleIcon='',t.bellCheckIcon='',t.bellPlusIcon='',t.loadingIcon='',t.defaultNotificationTag="welcome_notification",t.defaultNotificationTitle="Click to see updates",t.pushEngageHomePageUrl="https://www.pushengage.com/",t.poweredByReferralUrl="".concat(t.pushEngageHomePageUrl,"?utm_medium=referral&utm_campaign=powered_by&utm_source=pushengage_sdk"),t.defaultMinStorageDuration=7,t.database={name:"PushEngageSDK",stores:[{name:"ids",keyPath:"id"},{name:"failedViewedNotificationTags",keyPath:"id"},{name:"failedClickedNotificationTags",keyPath:"id"}],version:1},t.workerMessengerCommand={ampSubscriptionState:"amp-web-push-subscription-state",ampSubscribe:"amp-web-push-subscribe",ampUnsubscribe:"amp-web-push-unsubscribe"},t.env={__CDN_SERVER_HOST__:"https://clientcdn.pushengage.com",__SERVER_HOST__:"https://web-sdk.pushengage.com",__SAFARI_WEB_PUSH_PACKAGE_URL__:"https://safari.pushengage.com",__SUBSCRIBER_API_ENDPOINT__:"https://clients-api.pushengage.com/p/v1",__ANALYTICS_API_ENDPOINT__:"https://noti-analytics.pushengage.com/p/v1",__LOG_API_ENDPOINT__:"https://notify.pushengage.com/v1",__DOMAIN_NAME__:"pushengage.com",__OPT_IN_ANALYTICS_API_ENDPOINT__:"https://oeqepmcz7a.execute-api.us-east-1.amazonaws.com/beta/streams/optin/records",__SDK_VERSION__:"3.0.52",__WORKER_VERSION__:"3.0.52",__TABOOLA_API_ENDPOINT__:"https://api.taboola.com/1.2",__TABOOLA_API_KEY__:"a460a30141a022c6dc01526bba996da108798fd0",__TRIGGER_API_ENDPOINT__:"https://m4xrk918t5.execute-api.us-east-1.amazonaws.com/beta/streams/production_triggers/records",__STATIC_STORAGE_ENDPOINT__:"https://assetscdn.pushengage.com"},t.quieterUIPermissionImage={firefox:"".concat(t.env.__STATIC_STORAGE_ENDPOINT__,"/react-dashboard/design/reminder-firefox.png"),chrome:"".concat(t.env.__STATIC_STORAGE_ENDPOINT__,"/react-dashboard/design/reminder-chrome.png")},t.brandName="PushEngage",t.skipQueryParamsInWorkerPathSiteIds=[60413],t.validSubscriberFields=["first_name","last_name","email","phone","gender","dob","language","profile_id","country","city","state","zip"],t.logDisplayEnabledKey="pushengage-log-display-enabled"},392:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]-1&&e.splice(r,1),e};t.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)};t.get=function(e,t,r){for(var n=e,o=0,i=Array.isArray(t)?t:t.split(".");ot?e.slice(-t):e};t.replaceLastNumberFromIpToZero=function(e,t){if(!e||!t)return t;var r=t.includes(".")?".":":",n=t.split(r);return n[n.length-1]="0",n.join(r)},t.debounce=function(e,t){var r=null;return function(){for(var n=[],o=0;o0&&(n[o]=s)}}else("null"===i&&null===t[o]||"array"===i&&Array.isArray(t[o])||typeof t[o]===i)&&(n[o]=t[o])}else{var u=e(t[o],i);(Object.keys(u).length>0||"object"==typeof t[o]&&!Array.isArray(t[o]))&&(n[o]=u)}}};for(var i in r)o(i);return n},t.generateRandomAlphanumeric=function(e){void 0===e&&(e=5);for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r="",n=0;n{Object.defineProperty(t,"__esModule",{value:!0}),t.getChromiumStatus=t.getBrowserInfo=t.detectDeviceType=t.isPrivateBrowser=t.detectBrowser=t.isBrowser=void 0;var n=r(110);t.isBrowser=function(){return"undefined"!=typeof window&&void 0!==window.document};t.detectBrowser=function(e){var t,r,n,o,i,a,s,u,c,l,d;void 0===e&&(e=navigator.userAgent);var f="Unknown",p="";return/Firefox\/\d/.test(e)?(f="Firefox",p=(null===(t=e.match(/Firefox\/(\d+)/))||void 0===t?void 0:t[1])||""):/OPR\/\d/.test(e)?(f="Opera",p=(null===(r=e.match(/OPR\/(\d+)/))||void 0===r?void 0:r[1])||""):/Edg\/\d/.test(e)?(f="Edge",p=(null===(n=e.match(/Edg\/(\d+)/))||void 0===n?void 0:n[1])||""):/Edge\/\d/.test(e)?(f="Edge",p=(null===(o=e.match(/Edge\/(\d+)/))||void 0===o?void 0:o[1])||""):/EdgA\/\d/.test(e)?(f="Edge",p=(null===(i=e.match(/EdgA\/(\d+)/))||void 0===i?void 0:i[1])||""):/UCBrowser\//.test(e)?(f="Ucbrowser",p=(null===(a=e.match(/UCBrowser\/(\d+)/))||void 0===a?void 0:a[1])||""):/SamsungBrowser\//.test(e)?(f="Samsung",p=(null===(s=e.match(/SamsungBrowser\/(\d+)/))||void 0===s?void 0:s[1])||""):/YaBrowser\//.test(e)?(f="Yandex",p=(null===(u=e.match(/YaBrowser\/(\d+)/))||void 0===u?void 0:u[1])||""):/Chrome\//.test(e)?(f="Chrome",p=(null===(c=e.match(/Chrome\/(\d+)/))||void 0===c?void 0:c[1])||""):/Version\//.test(e)?(f="Safari",p=(null===(l=e.match(/Version\/(\d+)/))||void 0===l?void 0:l[1])||""):/MSIE|Trident/.test(e)&&(f="IE",p=(null===(d=e.match(/(?:MSIE |rv:)(\d+)/))||void 0===d?void 0:d[1])||""),p=p.replace(/[^\d.]/g,"").split(".")[0],{name:f,version:Number(p)}};t.isPrivateBrowser=function(){return new Promise((function(e){(0,n.detectIncognito)().then((function(t){e(t.isPrivate)})).catch((function(t){console.debug(t),e(!1)}))}))};t.detectDeviceType=function(e){return void 0===e&&(e=navigator.userAgent),/Mobi/.test(e)?"mobile":"desktop"};t.getBrowserInfo=function(e){void 0===e&&(e="sdk");var r=(0,t.detectBrowser)(),n={name:r.name,version:r.version,language:navigator.language.split("-")[0],device:(0,t.detectDeviceType)(),userAgent:navigator.userAgent};return"worker"===e?Object.assign(n,{host:self.location.host,href:self.location.href,referrer:self.location.origin}):Object.assign(n,{availableScreen:"".concat(screen.availWidth,"*").concat(screen.availHeight),host:location.host,href:location.href,pixelDepth:screen.pixelDepth,referrer:document.referrer,screen:"".concat(screen.width,"*").concat(screen.height)}),n};t.getChromiumStatus=function(){var e=Boolean(window.chrome),t=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return e&&t?{isChromium:!0,version:Number(t[2])}:{isChromium:!1,version:0}}},693:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.logDebug=void 0;t.logDebug=function(e){console.debug("PushEngage:",e)}},381:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=c||d.includes(p.status)?[3,8]:[4,u(h)];case 4:return o.sent(),[3,7];case 5:if(v=o.sent(),g>=c){if("TypeError"===v.name&&"Failed to fetch"===v.message&&!navigator.onLine)throw new s.default({message:"Browser is offline. Request not sent.",name:s.default.ERROR_NAME.OfflineError,details:{fetchOptions:f,requestUrl:e}});throw new s.default({message:v.message,name:v.name||s.default.ERROR_NAME.HttpRequestError,details:{fetchOptions:f,requestUrl:e}})}return[4,u(h)];case 6:return o.sent(),[3,7];case 7:return g++,[3,1];case 8:if(!p)throw new s.default({message:"Request failed and no response was received.",name:s.default.ERROR_NAME.HttpRequestError,details:{fetchOptions:f,requestUrl:e}});return[2,p]}}))}))}},762:function(e,t,r){var n=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o\n \n\n
\n This log is displayed because the ‘').concat(o.logDisplayEnabledKey,'’ query parameter is\n available in the URL.\n
\n \n \n ');t.insertAdjacentHTML("beforeend",r);var n=document.getElementById("pushengage-debug-container");if(n){var i=document.getElementById("pushengage-debug-container-close");return null==i||i.addEventListener("click",(function(){var e=document.getElementById("pushengage-debug-container");null==e||e.remove()})),n}}}}()){var r=document.getElementById("pushengage-debug-container-content");e.forEach((function(e){var t="";t=e instanceof Error?"".concat(e.name,":").concat(e.message):"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)?JSON.stringify(e):e,null==r||r.insertAdjacentHTML("beforeend","
".concat(t,"
"))}))}}var a={debug:function(){for(var e=[],t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.getSubdomainFromUrl=t.detectSiteType=t.detectProtocol=t.isLocalhost=t.getQueryParamsFromUrl=t.addQueryParamsToUrl=t.safeDecodeURIComponent=t.getValueFromUrlByKey=t.getUrlObject=void 0;t.getUrlObject=function(e){var t,r=function(e){if("function"!=typeof e||"URL"!==e.name)return!1;var t;try{t=new e("http://example.com")}catch(e){return!1}return"search"in t&&"searchParams"in t&&"origin"in t&&"host"in t};if(r(URL))try{return new URL(e)}catch(e){return null}else try{var n=document.createElement("iframe");document.body.appendChild(n);var o=null===(t=n.contentWindow)||void 0===t?void 0:t.URL;return document.body.removeChild(n),r(o)?new o(e):null}catch(e){return null}};t.getValueFromUrlByKey=function(e,r){try{var n=(0,t.getUrlObject)(r);if(!n)return;var o=new URLSearchParams(n.search).get(e);return o||void 0}catch(e){return}};t.safeDecodeURIComponent=function(e,t){void 0===t&&(t=0);for(var r=String(e).split(/(%(?:d0|d1)%.{2})/),n="",o=0,i=r.length;o=3?n[0]:null}catch(e){return null}}},964:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.configSchema=t.isPushNotificationSupported=t.handlePushEvent=void 0;var o=n(r(762)),i=r(947),a=r(280);t.handlePushEvent=function(){for(var e=[],t=0;t0){var s=a[0],u=a[1];if("init"===s&&"object"==typeof u){r=u;break}}}if(r){if((0,o.isUndefined)(window.dialog_box)||(r.isSubscriptionOnSubDomain=!0),!r.isLegacySDK)return r;if(!Array.isArray(t))return r;var c=!1;for(i=0;i0){s=a[0],u=a[1];if("init"===s&&(c=!0,("string"==typeof u||Array.isArray(u))&&(r.segment=u)),"config"===s&&"object"==typeof u){var l={};(0,o.isUndefined)(u.worker)||(l.path=u.worker),(0,o.isUndefined)(u.scope)||(l.scope=u.scope),(0,o.isUndefined)(u.workerStatus)||(l.status=u.workerStatus),(0,o.isEmptyObject)(l)||(r.serviceWorker=l)}}}return c?r:n(n({},r),{disabledDefaultPrompt:!0})}}};t.isHostPushEngageSubDomain=function(e){return"".concat(e,".").concat(i.env.__DOMAIN_NAME__)===location.host};t.getColorTheme=function(e){var t=e.replace("#","");return(.299*parseInt(t.substring(0,2),16)+.587*parseInt(t.substring(2,4),16)+.114*parseInt(t.substring(4,6),16))/255>.5?"light":"dark"};t.removeSubscriberIdFromTag=function(e){if(!e.includes("-"))return e;var t=e.lastIndexOf("-");return e.substring(0,t)};t.sleep=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},947:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isTokenRefresh=t.getNotificationPermission=t.isUserGestureRequiredForPermissionPrompt=t.isSupportQuieterUI=t.isPushNotificationSupported=t.supportsVapidPush=t.safariWebPushSupported=t.hasSupportForPushApiInSafari=void 0;var n=r(280),o=r(933),i=r(967);t.hasSupportForPushApiInSafari=function(){return"Safari"===(0,n.detectBrowser)().name&&"serviceWorker"in navigator&&"Notification"in window&&"PushManager"in window};t.safariWebPushSupported=function(){var e=(0,n.detectBrowser)(),t=e.name,r=e.version;return"Safari"===t&&r>=11&&"Notification"in window&&"safari"in window&&"pushNotification"in window.safari};t.supportsVapidPush=function(){var e=(0,n.detectBrowser)(),t=e.name,r=e.version,a=(0,n.detectDeviceType)(),s=(0,o.detectSiteType)();return!("Ucbrowser"===t||"Firefox"===t&&(48===r||49===r)||"Opera"===t&&41===r||"Yandex"===t&&"mobile"===a)&&(!!("http"===s&&"Firefox"===t&&r>=50)||"Notification"in window&&"PushManager"in window&&"undefined"!=typeof PushSubscriptionOptions&&(0,i.hasOwn)(PushSubscriptionOptions.prototype,"applicationServerKey"))};t.isPushNotificationSupported=function(){return(0,t.supportsVapidPush)()||(0,t.safariWebPushSupported)()};t.isSupportQuieterUI=function(){var e=(0,n.detectBrowser)(),t=e.name,r=e.version,o=(0,n.detectDeviceType)(),i=(0,n.getChromiumStatus)();return i.isChromium&&i.version>=80||"desktop"===o&&"Firefox"===t&&r>=72};t.isUserGestureRequiredForPermissionPrompt=function(){var e=(0,n.detectBrowser)(),t=e.name,r=e.version;return"Firefox"===t&&r>=72||"Safari"===t||"Yandex"===t};t.getNotificationPermission=function(e){var r=e.safariWebPushId,o=(0,n.detectBrowser)().name;return r&&"Safari"===o&&window.safari&&!(0,t.hasSupportForPushApiInSafari)()?window.safari.pushNotification.permission(r).permission:Notification.permission};t.isTokenRefresh=function(e){var r=e.safariWebPushId;return"granted"===(0,t.getNotificationPermission)({safariWebPushId:r})}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};r(392)})();