PageSourceSearch

https://www.treatwell.co.uk/nmp/asset/vendors~mparticle_web-braze-kit-ec0a4d.js

js treatwell.co.uk collected 2026-10-01 12:37:25 UTC 250,033 bytes, 2 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{1472:function(t,e){function i(t,e,n){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(i):a.value}},i(t,e,n||t)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,a=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(i.push(o.value),!e||i.length!==e);n=!0);}catch(u){a=!0,r=u}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}return i}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=o(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,u=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){u=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(u)throw r}}}}function r(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return s(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(pi){return!1}}();return function(){var i,n=d(t);if(e){var a=d(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return h(this,i)}}function h(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function v(t,e,i){return e&&b(t.prototype,e),i&&b(t,i),t}function g(t){var e=t.default;if("function"==typeof e){var i=function(){return e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})})),i}
1Object.defineProperty(e,"__esModule",{value:!0});var m={init:function(t){void 0===t&&void 0!==m.zg||(m.zg=!!t),m.t||(m.t=!0)},destroy:function(){m.t=!1,m.zg=void 0,m.vd=void 0},setLogger:function(t){"function"==typeof t?(m.init(),m.vd=t):m.info("Ignoring setLogger call since logger is not a function")},toggleLogging:function(){m.init(),m.zg?(console.log("Disabling Braze logging"),m.zg=!1):(console.log("Enabled Braze logging"),m.zg=!0)},info:function(t){if(m.zg){var e="Braze: "+t;null!=m.vd?m.vd(e):console.log(e)}},warn:function(t){if(m.zg){var e="Braze SDK Warning: "+t+" (v5.5.0)";null!=m.vd?m.vd(e):console.warn(e)}},error:function(t){if(m.zg){var e="Braze SDK Error: "+t+" (v5.5.0)";null!=m.vd?m.vd(e):console.error(e)}}},y=m,k=function(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),i=atob(e),n=new Uint8Array(i.length),a=0;a<i.length;++a)n[a]=i.charCodeAt(a);return n},w={CustomEvent:"ce",Pr:"p",Ku:"pc",vc:"ca",Ua:"i",Ls:"ie",M:"cci",R:"ccic",k:"ccc",F:"ccd",ql:"ss",xl:"se",Xi:"si",$i:"sc",Oi:"sbc",Cc:"sfe",mo:"iec",Ju:"lr",Eu:"uae",O:"ci",D:"cc",Xu:"lcaa",Gu:"lcar",On:"inc",Ln:"add",Rn:"rem",$n:"set",Bn:"ncam",Hu:"sgu",Fr:"ffi"},x={Ar:"feed_displayed",Ec:"content_cards_displayed"},E={W:function(){var t=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=(Math.random().toString(16)+"000000000").substr(2,8);return t?"-"+e.substr(0,4)+"-"+e.substr(4,4):e};return t()+t(!0)+t(!0)+t()}},S=E,C=function(){function t(e,i){p(this,t),this.database=e,this.vd=i,this.parent="undefined"==typeof window?self:window,this.database=e,this.vd=i}return v(t,[{key:"Dd",value:function(){if("indexedDB"in this.parent)return this.parent.indexedDB}},{key:"isSupported",value:function(){var t;try{if(null==this.Dd())return!1;var e=null===(t=this.Dd())||void 0===t?void 0:t.open("Braze IndexedDB Support Test");if(e&&(e.onupgradeneeded=function(){return e.result.close()},e.onsuccess=function(){return e.result.close()}),"undefined"!=typeof window){var i=window,n=i.chrome||i.browser||i.pd;if(n&&n.runtime&&n.runtime.id)return this.vd.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return!0}catch(t){return this.vd.info("Not using IndexedDB for storage due to following error: "+t),!1}}},{key:"Bd",value:function(t,e){var i,n=null===(i=this.Dd())||void 0===i?void 0:i.open(this.database.Sd,this.database.VERSION);if(null==n)return"function"==typeof e&&e(),!1;var a=this;return n.onupgradeneeded=function(t){var e;a.vd.info("Upgrading indexedDB "+a.database.Sd+" to v"+a.database.VERSION+"...");var i=null===(e=t.target)||void 0===e?void 0:e.result;for(var n in a.database.hs){var r=n;a.database.hs.hasOwnProperty(n)&&!i.objectStoreNames.contains(a.database.hs[r])&&i.createObjectStore(a.database.hs[r])}},n.onsuccess=function(i){var n,r=null===(n=i.target)||void 0===n?void 0:n.result;r.onversionchange=function(){r.close(),"function"==typeof e&&e(),a.vd.error("Needed to close the database unexpectedly because of an upgrade in another tab")},t(r)},n.onerror=function(t){var i,n=t;return a.vd.info("Could not open indexedDB "+a.database.Sd+" v"+a.database.VERSION+": "+(null===(i=n.target)||void 0===i?void 0:i.errorCode)),"function"==typeof e&&e(),!0},!0}},{key:"setItem",value:function(t,e,i,n,a){if(!this.isSupported())return"function"==typeof a&&a(),!1;var r=this;return this.Bd((function(o){if(!o.objectStoreNames.contains(t))return r.vd.error("Could not store object "+e+" in "+t+" on indexedDB "+r.database.Sd+" - "+t+" is not a valid objectStore"),"function"==typeof a&&a(),void o.close();var s=o.transaction([t],"readwrite");s.oncomplete=function(){return o.close()};var u=s.objectStore(t).put(i,e);u.onerror=function(){r.vd.error("Could not store object "+e+" in "+t+" on indexedDB "+r.database.Sd),"function"==typeof a&&a()},u.onsuccess=function(){"function"==typeof n&&n()}}),a)}},{key:"getItem",value:function(t,e,i){if(!this.isSupported())return!1;var n=this;return this.Bd((function(a){if(!a.objectStoreNames.contains(t))return n.vd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+n.database.Sd+" - "+t+" is not a valid objectStore"),void a.close();var r=a.transaction([t],"readonly");r.oncomplete=function(){return a.close()};var o=r.objectStore(t).get(e);o.onerror=function(){n.vd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+n.database.Sd)},o.onsuccess=function(t){var e,n=null===(e=t.target)||void 0===e?void 0:e.result;null!=n&&i(n)}}))}}
1,{key:"jr",value:function(t,e,i){if(!this.isSupported())return"function"==typeof i&&i(),!1;var n=this;return this.Bd((function(a){if(!a.objectStoreNames.contains(t))return n.vd.error("Could not retrieve last record from "+t+" on indexedDB "+n.database.Sd+" - "+t+" is not a valid objectStore"),"function"==typeof i&&i(),void a.close();var r=a.transaction([t],"readonly");r.oncomplete=function(){return a.close()};var o=r.objectStore(t).openCursor(null,"prev");o.onerror=function(){n.vd.error("Could not open cursor for "+t+" on indexedDB "+n.database.Sd),"function"==typeof i&&i()},o.onsuccess=function(t){var n,a=null===(n=t.target)||void 0===n?void 0:n.result;null!=a&&null!=a.value&&null!=a.key?e(a.key,a.value):"function"==typeof i&&i()}}),i)}},{key:"re",value:function(t,e){if(!this.isSupported())return!1;var i=this;return this.Bd((function(n){if(!n.objectStoreNames.contains(t))return i.vd.error("Could not delete record "+e+" from "+t+" on indexedDB "+i.database.Sd+" - "+t+" is not a valid objectStore"),void n.close();var a=n.transaction([t],"readwrite");a.oncomplete=function(){return n.close()},a.objectStore(t).delete(e).onerror=function(){i.vd.error("Could not delete record "+e+" from "+t+" on indexedDB "+i.database.Sd)}}))}},{key:"ss",value:function(t,e){if(!this.isSupported())return!1;var i=this;return this.Bd((function(n){if(!n.objectStoreNames.contains(t))return i.vd.error("Could not retrieve objects from "+t+" on indexedDB "+i.database.Sd+" - "+t+" is not a valid objectStore"),void n.close();var a=n.transaction([t],"readwrite");a.oncomplete=function(){return n.close()};var r=a.objectStore(t),o=r.openCursor(),s=[];o.onerror=function(){s.length>0?(i.vd.info("Cursor closed midway through for "+t+" on indexedDB "+i.database.Sd),e(s)):i.vd.error("Could not open cursor for "+t+" on indexedDB "+i.database.Sd)},o.onsuccess=function(t){var i,n=null===(i=t.target)||void 0===i?void 0:i.result;null!=n?(null!=n.value&&null!=n.key&&(r.delete(n.key).onsuccess=function(){s.push(n.value)}),"function"==typeof n.continue&&n.continue()):s.length>0&&e(s)}}))}},{key:"clearData",value:function(){if(!this.isSupported())return!1;var t=[];for(var e in this.database.hs){var i=e;this.database.hs.hasOwnProperty(e)&&this.database.hs[i]!==this.database.hs.ae&&t.push(this.database.hs[i])}var n=this;return this.Bd((function(e){var i=e.transaction(t,"readwrite");i.oncomplete=function(){return e.close()};for(var a=0;a<t.length;a++){var r=t[a];i.objectStore(r).clear().onerror=function(){n.vd.error("Could not clear "+this.source.name+" on indexedDB "+n.database.Sd)}}i.onerror=function(){n.vd.error("Could not clear object stores on indexedDB "+n.database.Sd)}}))}}]),t}();C.ts={Zt:{Sd:"AppboyServiceWorkerAsyncStorage",VERSION:6,hs:{Ka:"data",hr:"pushClicks",cu:"pushSubscribed",Cd:"fallbackDevice",es:"cardUpdates",ae:"optOut",wr:"pendingData",jh:"sdkAuthenticationSignature"},ie:1}};var A={Eo:"allowCrawlerActivity",_o:"baseUrl",Io:"noCookies",So:"devicePropertyAllowlist",Aa:"disablePushTokenMaintenance",Ao:"enableLogging",No:"enableSdkAuthentication",qa:"manageServiceWorkerExternally",Oo:"minimumIntervalBetweenTriggerActionsInSeconds",Ro:"sessionTimeoutInSeconds",Po:"appVersion",Lo:"appVersionNumber",Ma:"serviceWorkerLocation",ka:"safariWebsitePushId",zn:"localization",bo:"contentSecurityNonce",Do:"allowUserSuppliedJavascript",jo:"inAppMessageZIndex",ho:"openInAppMessagesInNewTab",en:"openNewsFeedCardsInNewTab",Lh:"requireExplicitInAppMessageDismissal",Mo:"doNotLoadFontAwesome",Uo:"deviceId",_a:"serviceWorkerScope",Wo:"sdkFlavor",tn:"openCardsInNewTab"};function _(t){var e,i=[];for(var n in t)e=n,Object.prototype.hasOwnProperty.call(t,e)&&void 0!==t[e]&&i.push(t[e]);return i}function N(t,e,i,n){var a=_(t);return-1!==a.indexOf(e)||(y.error("".concat(i," Valid values from ").concat(n,' are "').concat(a.join('"/"'),'".')),!1)}function T(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function I(t){return"[object Date]"===Object.prototype.toString.call(t)}function O(t){return"[object Object]"===Object.prototype.toString.call(t)}function D(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];null==t&&(t=[]);for(var a=[],r=arguments.length,o=0,s=t.length;o<s;o++){var u=t[o];if(-1===a.indexOf(u)){var l=1;for(l=1;l<r&&-1!==arguments[l].indexOf(u);l++);l===r&&a.push(u)}}return a}function P(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.push(i);return e}function z(t,e){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;var i=t.toString();if(i!==e.toString())return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}var n="[object Array]"===i;
1if(!n){if("object"!=f(t)||"object"!=f(e))return!1;var a=t.constructor,r=e.constructor;if(a!==r&&!("function"==typeof a&&a instanceof a&&"function"==typeof r&&r instanceof r)&&"constructor"in t&&"constructor"in e)return!1}for(var o=[],s=[],u=o.length;u--;)if(o[u]===t)return s[u]===e;if(o.push(t),s.push(e),n){if((u=t.length)!==e.length)return!1;for(;u--;)if(!z(t[u],e[u]))return!1}else{var l,c=P(t);if(u=c.length,P(e).length!==u)return!1;for(;u--;)if(l=c[u],!Object.prototype.hasOwnProperty.call(e,l)||!z(t[l],e[l]))return!1}return o.pop(),s.pop(),!0}function U(t){var e=t/1e3;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e=Math.floor(e)),e}function M(t){return 1e3*t}function R(t){if(null==t)return null;var e=parseInt(t.toString());return isNaN(e)?null:new Date(1e3*e)}function L(t){return null!=t&&I(t)?t.toISOString().replace(/\.[0-9]{3}Z$/,""):t}function B(t){return null==t||""===t?null:new Date(t)}function F(t){return((new Date).valueOf()-t.valueOf())/1e3}function q(t){return(t.valueOf()-(new Date).valueOf())/1e3}var j="inAppMessage must be an InAppMessage object",G="must be a Card object",K="setCustomUserAttribute",X="Braze must be initialized before calling methods.",Y=function(){function t(){p(this,t),this._e={}}return v(t,[{key:"Nt",value:function(t){if("function"!=typeof t)return null;var e=S.W();return this._e[e]=t,e}},{key:"removeSubscription",value:function(t){delete this._e[t]}},{key:"removeAllSubscriptions",value:function(){this._e={}}},{key:"ic",value:function(){return Object.keys(this._e).length}},{key:"Rt",value:function(t){var e=[];for(var i in this._e){var n=this._e[i];e.push(n(t))}return e}}]),t}(),H=function(){function t(e,i,n,a,r,o,s,u,l,c,h,d,f,b,v,g){p(this,t),this.id=e,this.viewed=i,this.title=n,this.imageUrl=a,this.description=r,this.created=o,this.updated=s,this.categories=u,this.expiresAt=l,this.url=c,this.linkText=h,this.aspectRatio=d,this.extras=f,this.pinned=b,this.dismissible=v,this.clicked=g,this.id=e,this.viewed=i||!1,this.title=n||"",this.imageUrl=a,this.description=r||"",this.created=o||null,this.updated=s||null,this.categories=u||[],this.expiresAt=l||null,this.url=c,this.linkText=h,null==d?this.aspectRatio=null:(d=parseFloat(d.toString()),this.aspectRatio=isNaN(d)?null:d),this.extras=f||{},this.pinned=b||!1,this.dismissible=v||!1,this.dismissed=!1,this.clicked=g||!1,this.isControl=!1,this.test=!1,this.Et=null,this.Tt=null,this.It=null}return v(t,[{key:"subscribeToClickedEvent",value:function(t){return this.St().Nt(t)}},{key:"subscribeToDismissedEvent",value:function(t){return this.At().Nt(t)}},{key:"removeSubscription",value:function(t){this.St().removeSubscription(t),this.At().removeSubscription(t)}},{key:"removeAllSubscriptions",value:function(){this.St().removeAllSubscriptions(),this.At().removeAllSubscriptions()}},{key:"dismissCard",value:function(){if(this.dismissible&&!this.dismissed){"function"==typeof this.logCardDismissal&&this.logCardDismissal();var e=this.T;!e&&this.id&&(e=document.getElementById(this.id)),e&&(e.style.height=e.offsetHeight+"px",e.className=e.className+" ab-hide",setTimeout((function(){e&&e.parentNode&&(e.style.height="0",e.style.margin="0",setTimeout((function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),t.Dt))}),500))}}},{key:"St",value:function(){return null==this.Et&&(this.Et=new Y),this.Et}},{key:"At",value:function(){return null==this.Tt&&(this.Tt=new Y),this.Tt}},{key:"K",value:function(){var e=(new Date).valueOf();return!(null!=this.It&&e-this.It<t.Ct||(this.It=e,this.viewed=!0,0))}},{key:"p",value:function(){this.viewed=!0,this.clicked=!0,this.St().Rt()}},{key:"N",value:function(){return!(!this.dismissible||this.dismissed||(this.dismissed=!0,this.At().Rt(),0))}},{key:"Lt",value:function(e){if(null==e||e[t._t.ht]!==this.id)return!0;if(e[t._t.Ot])return!1;if(null!=e[t._t.nt]&&null!=this.updated&&parseInt(e[t._t.nt])<U(this.updated.valueOf()))return!0;if(e[t._t.et]&&!this.viewed&&(this.viewed=!0),e[t._t.zt]&&!this.clicked&&(this.clicked=e[t._t.zt]),null!=e[t._t.rt]&&(this.title=e[t._t.rt]),null!=e[t._t.ot]&&(this.imageUrl=e[t._t.ot]),null!=e[t._t.ct]&&(this.description=e[t._t.ct]),null!=e[t._t.nt]){var i=R(e[t._t.nt]);null!=i&&(this.updated=i)}var n;null!=e[t._t.lt]&&(n=e[t._t.lt]===t.Mt?null:R(e[t._t.lt]),this.expiresAt=n);if(null!=e[t._t.URL]&&(this.url=e[t._t.URL]),null!=e[t._t.ft]&&(this.linkText=e[t._t.ft]),null!=e[t._t.xt]){var a=parseFloat(e[t._t.xt].toString());this.aspectRatio=isNaN(a)?null:a}return null!=e[t._t.bt]&&(this.extras=e[t._t.bt]),null!=e[t._t.gt]&&(this.pinned=e[t._t.gt]),null!=e[t._t.jt]&&(this.dismissible=e[t._t.jt]),null!=e[t._t.kt]&&(this.test=e[t._t.kt]),!0}},{key:"Y",value:function(){y.error("Must be implemented in a subclass")}}]),t}();H.Mt=-1,H._t={ht:"id",et:"v",jt:"db",Ot:"r",nt:"ca",gt:"p",lt:"ea",bt:"e",Z:"tp",ot:"i",rt:"tt",ct:"ds",URL:"u",ft:"dm",xt:"ar",zt:"cl",kt:"t"},H.it={st:"captioned_image",Pt:"text_announcement",Ut:"short_news",Gt:"banner_image",Xt:"control"},H.tt={ht:"id",et:"v",jt:"db",dt:"cr",nt:"ca",gt:"p",ut:"t",lt:"ea",bt:"e",Z:"tp",ot:"i",rt:"tt",ct:"ds",URL:"u",ft:"dm",xt:"ar",zt:"cl",kt:"s"},H.vt={Vt:"ADVERTISING",Wt:"ANNOUNCEMENTS",wt:"NEWS",Ft:"SOCIAL"},H.Dt=400,H.Ct=1e4;var J=function(t){u(i,t);var e=c(i);function i(t,n,a,r,o,s,u,l,c,h,d,f,b,v){var g;return p(this,i),(g=e.call(this,t,n,null,a,null,r,o,s,u,l,c,h,d,f,b,v))._="ab-image-only",g.S=!1,g.test=!1,g}return v(i,[{key:"Y",value:function(){var t={};return t[H.tt.Z]=H.it.Gt,t[H.tt.ht]=this.id,t[H.tt.et]=this.viewed,t[H.tt.ot]=this.imageUrl,t[H.tt.nt]=this.updated,t[H.tt.dt]=this.created,t[H.tt.ut]=this.categories,t[H.tt.lt]=this.expiresAt,t[H.tt.URL]=this.url,t[H.tt.ft]=this.linkText,t[H.tt.xt]=this.aspectRatio,t[H.tt.bt]=this.extras,t[H.tt.gt]=this.pinned,t[H.tt.jt]=this.dismissible,t[H.tt.zt]=this.clicked,t[H.tt.kt]=this.test,t}}]),i}(H),W=function(t){u(i,t);var e=c(i);function i(t,n,a,r,o,s,u,l,c,h,d,f,b,v,g,m){var y;return p(this,i),(y=e.call(this,t,n,a,r,o,s,u,l,c,h,d,f,b,v,g,m))._="ab-captioned-image",y.S=!0,y.test=!1,y}return v(i,[{key:"Y",value:function(){var t={};return t[H.tt.Z]=H.it.st,t[H.tt.ht]=this.id,t[H.tt.et]=this.viewed,t[H.tt.rt]=this.title,t[H.tt.ot]=this.imageUrl,t[H.tt.ct]=this.description,t[H.tt.nt]=this.updated,t[H.tt.dt]=this.created,t[H.tt.ut]=this.categories,t[H.tt.lt]=this.expiresAt,t[H.tt.URL]=this.url,t[H.tt.ft]=this.linkText,t[H.tt.xt]=this.aspectRatio,t[H.tt.bt]=this.extras,t[H.tt.gt]=this.pinned,t[H.tt.jt]=this.dismissible,t[H.tt.zt]=this.clicked,t[H.tt.kt]=this.test,t}}]),i}(H),V=function(t){u(i,t);var e=c(i);function i(t,n,a,r,o,s,u,l,c,h,d,f,b,v,g,m){var y;return p(this,i),(y=e.call(this,t,n,a,r,o,s,u,l,c,h,d,f,b,v,g,m))._="ab-classic-card",y.S=!0,y}return v(i,[{key:"Y",value:function(){var t={};return t[H.tt.Z]=H.it.Ut,t[H.tt.ht]=this.id,t[H.tt.et]=this.viewed,t[H.tt.rt]=this.title,t[H.tt.ot]=this.imageUrl,t[H.tt.ct]=this.description,t[H.tt.nt]=this.updated,t[H.tt.dt]=this.created,t[H.tt.ut]=this.categories,t[H.tt.lt]=this.expiresAt,t[H.tt.URL]=this.url,t[H.tt.ft]=this.linkText,t[H.tt.xt]=this.aspectRatio,t[H.tt.bt]=this.extras,t[H.tt.gt]=this.pinned,t[H.tt.jt]=this.dismissible,t[H.tt.zt]=this.clicked,t[H.tt.kt]=this.test,t}}]),i}(H),$=function(t){u(i,t);var e=c(i);function i(t,n,a,r,o,s){var u;return p(this,i),(u=e.call(this,t,n,null,null,null,null,a,null,r,null,null,null,o,s)).isControl
1=!0,u._="ab-control-card",u.S=!1,u}return v(i,[{key:"Y",value:function(){var t={};return t[H.tt.Z]=H.it.Xt,t[H.tt.ht]=this.id,t[H.tt.et]=this.viewed,t[H.tt.nt]=this.updated,t[H.tt.lt]=this.expiresAt,t[H.tt.bt]=this.extras,t[H.tt.gt]=this.pinned,t[H.tt.kt]=this.test,t}}]),i}(H);function Z(t){var e,i=null==t?void 0:t.j(Ot.C._E);return i&&(e={label:i.l,name:i.a}),e}var Q=function(){function t(e,i,n,a,r){p(this,t),this.userId=e,this.type=i,this.time=n,this.sessionId=a,this.data=r,this.userId=e,this.type=i,this.time=function(t){return null==t||""===t?(new Date).valueOf():t}(n),this.sessionId=a,this.data=r}return v(t,[{key:"Mr",value:function(){var t,e={name:this.type,time:U(this.time),data:this.data||{},session_id:this.sessionId};null!=this.userId&&(e.user_id=this.userId);var i=(null===(t=pi.Sr())||void 0===t?void 0:t.Fh())||!1;if(!e.user_id&&!i){var n=Z(pi.l());n&&(e.alias=n)}return e}},{key:"Y",value:function(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}}],[{key:"fromJson",value:function(e){return new t(e.user_id,e.name,e.time,e.session_id,e.data)}},{key:"RE",value:function(t){return null!=t&&O(t)&&null!=t.t&&""!==t.t}},{key:"qn",value:function(e){return new t(e.u,e.t,e.ts,e.s,e.d)}}]),t}(),tt=function(t){return t instanceof Error?t.message:String(t)},et=function(){function t(e,i,n){p(this,t),this.eu=e,null==e&&(e=S.W()),!n||isNaN(n)?this.Dl=(new Date).valueOf():this.Dl=n,this.eu=e,this.Wl=(new Date).valueOf(),this.Hl=i}return v(t,[{key:"Y",value:function(){return"g:".concat(encodeURIComponent(this.eu),"|e:").concat(this.Hl,"|c:").concat(this.Dl,"|l:").concat(this.Wl)}}],[{key:"hE",value:function(t){if("string"!=typeof t)return null;var e,i=t.lastIndexOf("|e:"),n=t.substring(0,i),a=n.split("g:")[1];return e=/[|:]/.test(a)?encodeURIComponent(a):a,t.replace(n,"g:".concat(e))}},{key:"qn",value:function(e){var i;if("string"==typeof e)try{var n=e.split("|");if(!T(n)||4!==n.length)return null;var a=function(t){return t.split(":")[1]},r=function(t){var e=parseInt(a(t));if(!isNaN(e))return e};(i=new t(decodeURIComponent(a(n[0])),r(n[1]),r(n[2]))).Wl=r(n[3])}catch(i){y.info("Unable to parse cookie string ".concat(e,", failed with error: ").concat(tt(i)))}else{if(null==e||null==e.g)return null;(i=new t(e.g,e.e,e.c)).Wl=e.l}return i}}]),t}();function it(t){for(var e=t.length,i=t.length-1;i>=0;i--){var n=t.charCodeAt(i);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=57343&&i--}return e}var nt={types:{ro:"container",logCustomEvent:"logCustomEvent",setEmailNotificationSubscriptionType:"setEmailNotificationSubscriptionType",setPushNotificationSubscriptionType:"setPushNotificationSubscriptionType",setCustomUserAttribute:"setCustomUserAttribute",requestPushPermission:"requestPushPermission",addToSubscriptionGroup:"addToSubscriptionGroup",removeFromSubscriptionGroup:"removeFromSubscriptionGroup",addToCustomAttributeArray:"addToCustomAttributeArray",removeFromCustomAttributeArray:"removeFromCustomAttributeArray",no:"openLink",ao:"openLinkInWebView"},properties:{type:"type",oo:"steps",eo:"args"}},at={Vi:"unknownBrazeAction",Yi:"noPushPrompt"},rt=function(t,e){switch(t){case at.Vi:return"".concat(e," contains an unknown braze action type and will not be displayed.");case at.Yi:return"".concat(e," contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.");default:return""}};function ot(t){try{var e=t.match(pt),i=e?e[0].length:null,n=i?t.substring(i):null;if(null==i||i>t.length-1||!n)return void y.error("Did not find base64 encoded brazeAction in url to process : ".concat(t));var a=function(t){try{t=t.replace(/-/g,"+").replace(/_/g,"/");for(var e=window.atob(t),i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);var a=new Uint16Array(i.buffer);return String.fromCharCode.apply(String,r(a))}catch(t){return y.error("Unable to decode Base64: "+t),null}}(n);return a?JSON.parse(a):void y.error("Failed to decode base64 encoded brazeAction: ".concat(n))}catch(e){return void y.error("Failed to process brazeAction URL ".concat(t," : ").concat(tt(e)))}}function st(t,e){var i=!1;if(e){var n,r=a(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(i=i||t(o))return!0}}catch(s){r.e(s)}finally{r.f()}}return!1}function ut(t){var e=nt.properties.type,i=nt.properties.oo;try{if(null==t)return!0;var n=t[e];return n===nt.types.ro?st(ut,t[i]):!function(t){var e=!1;
1return Object.keys(nt.types).forEach((function(i){nt.types[i]!==t.toString()||(e=!0)})),e}(n)}catch(t){return!0}}function lt(t){if(!t||!xt(t))return!1;var e=nt.properties.type,i=nt.properties.oo,n=t[e];return n===nt.types.ro?st(lt,t[i]):n===nt.types.requestPushPermission}var ct=/^[^\x00-\x1F\x22]+$/,ht=/[$.]/,dt=["$add","$update","$remove","$identifier_key","$identifier_value","$new_object","$time","$google_ad_personalization","$google_ad_user_data"],ft=new RegExp(/^.+@.+\..+$/),pt=/^brazeActions:\/\/v\d+\//;function bt(t,e,i){var n=null!=t&&"string"==typeof t&&(""===t||null!=t.match(ct));return n||y.error("Cannot ".concat(e," because ").concat(i,' "').concat(t,'" is invalid.')),n}function vt(t){return null!=t&&t.match(ht)&&-1===dt.indexOf(t)&&y.warn("Custom attribute keys cannot contain '$' or '.'"),bt(t,"set custom user attribute","the given key")}function gt(t){var e=f(t);return null==t||"number"===e||"boolean"===e||I(t)||"string"===e}function mt(t,e,i){var n=-1!==i;if(n&&i>50)return y.error("Nested attributes cannot be more than 50 levels deep."),!1;var r=n?i+1:-1;if(T(t)&&T(e)){for(var o=0;o<t.length&&o<e.length;o++)if(I(t[o])&&(e[o]=L(t[o])),!mt(t[o],e[o],r))return!1}else{if(!O(t))return gt(t);var s,u=a(P(t));try{for(u.s();!(s=u.n()).done;){var l=s.value,c=t[l];if(n&&!vt(l))return!1;if(I(c)&&(e[l]=L(c)),!mt(c,e[l],r))return!1}}catch(h){u.e(h)}finally{u.f()}}return!0}function yt(t,e,i,n,a){var r;return(r=O(t)||T(t)?mt(t,e,a?1:-1):gt(t))||y.error("Cannot ".concat(i," because ").concat(n,' "').concat(t,'" is invalid.')),r}function kt(t,e,i){var n="string"==typeof t||null===t&&(arguments.length>3&&void 0!==arguments[3]&&arguments[3]);return n||y.error("Cannot ".concat(e," because ").concat(i,' "').concat(t,'" is invalid.')),n}function wt(t,e,i,n,a){if(null==t&&(t={}),"object"!=f(t)||T(t))return y.error("".concat(e," requires that ").concat(i," be an object. Ignoring ").concat(a,".")),[!1,null];var r,o;e===K?(r=76800,o="75KB"):(r=51200,o="50KB");var s,u=JSON.stringify(t);if(it(u)>r)return y.error("Could not ".concat(n," because ").concat(i," was greater than the max size of ").concat(o,".")),[!1,null];try{s=JSON.parse(u)}catch(t){return y.error("Could not ".concat(n," because ").concat(i," did not contain valid JSON.")),[!1,null]}for(var l in t){if(e===K&&!vt(l))return[!1,null];if(!bt(l,n,"the ".concat(a," property name")))return[!1,null];var c=t[l];if(e===K||null!=c){if(I(c)&&(s[l]=L(c)),!yt(c,s[l],n,"the ".concat(a,' property "').concat(l,'"'),e===K))return[!1,null]}else delete t[l],delete s[l]}return[!0,s]}function xt(t){if(!(nt.properties.type in t))return!1;switch(t[nt.properties.type]){case nt.types.ro:if(nt.properties.oo in t)return!0;break;case nt.types.logCustomEvent:case nt.types.setEmailNotificationSubscriptionType:case nt.types.setPushNotificationSubscriptionType:case nt.types.setCustomUserAttribute:case nt.types.addToSubscriptionGroup:case nt.types.removeFromSubscriptionGroup:case nt.types.addToCustomAttributeArray:case nt.types.removeFromCustomAttributeArray:case nt.types.no:case nt.types.ao:if(nt.properties.eo in t)return!0;break;case nt.types.requestPushPermission:return!0;default:return!1}return!1}var Et=function(){function t(e,i){p(this,t),this.yt=e,this.Ui=i,this.yt=e,this.Ui=i}return v(t,[{key:"getUserId",value:function(t){var e=this.yt.getUserId();if("function"!=typeof t)return e;y.warn("The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)"),t(e)}},{key:"addAlias",value:function(t,e){return!kt(t,"add alias","the alias",!1)||t.length<=0?(y.error("addAlias requires a non-empty alias"),!1):!kt(e,"add alias","the label",!1)||e.length<=0?(y.error("addAlias requires a non-empty label"),!1):this.Ui.Cn(t,e).L}},{key:"setFirstName",value:function(t){return!!kt(t,"set first name","the firstName",!0)&&this.yt.nu("first_name",t)}},{key:"setLastName",value:function(t){return!!kt(t,"set last name","the lastName",!0)&&this.yt.nu("last_name",t)}},{key:"setEmail",value:function(t){return null===t||function(t){return"string"==typeof t&&null!=t.toLowerCase().match(ft)}(t)?this.yt.nu("email",t):(y.error('Cannot set email address - "'.concat(t,'" did not pass RFC-5322 validation.')),!1)}},{key:"setGender",value:function(e){return"string"==typeof e&&(e=e.toLowerCase()),!(null!==e&&!N(t.Genders,e,'Gender "'.concat(e,'" is not a valid gender.'),"User.Genders"))&&this.yt.nu("gender",e)}}
1,{key:"setDateOfBirth",value:function(t,e,i){return null===t&&null===e&&null===i?this.yt.nu("dob",null):(t=null!=t?parseInt(t.toString()):null,e=null!=e?parseInt(e.toString()):null,i=null!=i?parseInt(i.toString()):null,null==t||null==e||null==i||isNaN(t)||isNaN(e)||isNaN(i)||e>12||e<1||i>31||i<1?(y.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):this.yt.nu("dob","".concat(t,"-").concat(e,"-").concat(i)))}},{key:"setCountry",value:function(t){return!!kt(t,"set country","the country",!0)&&this.yt.nu("country",t)}},{key:"setHomeCity",value:function(t){return!!kt(t,"set home city","the homeCity",!0)&&this.yt.nu("home_city",t)}},{key:"setLanguage",value:function(t){return!!kt(t,"set language","the language",!0)&&this.yt.nu("language",t)}},{key:"setEmailNotificationSubscriptionType",value:function(e){return!!N(t.NotificationSubscriptionTypes,e,'Email notification setting "'.concat(e,'" is not a valid subscription type.'),"User.NotificationSubscriptionTypes")&&this.yt.nu("email_subscribe",e)}},{key:"setPushNotificationSubscriptionType",value:function(e){return!!N(t.NotificationSubscriptionTypes,e,'Push notification setting "'.concat(e,'" is not a valid subscription type.'),"User.NotificationSubscriptionTypes")&&this.yt.nu("push_subscribe",e)}},{key:"setPhoneNumber",value:function(e){return!!kt(e,"set phone number","the phoneNumber",!0)&&(null===e||e.match(t.En)?this.yt.nu("phone",e):(y.error('Cannot set phone number - "'.concat(e,'" did not pass validation.')),!1))}},{key:"setLastKnownLocation",value:function(t,e,i,n,a){return null==t||null==e?(y.error("Cannot set last-known location - latitude and longitude are required."),!1):(t=parseFloat(t.toString()),e=parseFloat(e.toString()),null!=i&&(i=parseFloat(i.toString())),null!=n&&(n=parseFloat(n.toString())),null!=a&&(a=parseFloat(a.toString())),isNaN(t)||isNaN(e)||null!=i&&isNaN(i)||null!=n&&isNaN(n)||null!=a&&isNaN(a)?(y.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):t>90||t<-90||e>180||e<-180?(y.error("Cannot set last-known location - latitude and longitude are bounded by \xb190 and \xb1180 respectively."),!1):null!=i&&i<0||null!=a&&a<0?(y.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.Ui.setLastKnownLocation(this.yt.getUserId(),t,e,n,i,a).L)}},{key:"setCustomUserAttribute",value:function(t,e,i){if(!vt(t))return!1;var r=function(e){return n(wt(e,K,"attribute value",'set custom user attribute "'.concat(t,'"'),"custom user attribute"),1)[0]};if(T(e)){var o=function(t,e){var i,n=!1,r=!1,o=function(){y.error("Custom attribute arrays must be either string arrays or object arrays.")},s=a(e);try{for(s.s();!(i=s.n()).done;){var u=i.value;if("string"==typeof u){if(r)return o(),[!1,!1];if(!bt(u,'set custom user attribute "'.concat(t,'"'),"the element in the given array"))return[!1,!1];n=!0}else{if(!O(u))return o(),[!1,!1];if(n)return o(),[!1,!1];if(!wt(u,K,"attribute value",'set custom user attribute "'.concat(t,'"'),"custom user attribute"))return[!1,!1];r=!0}}}catch(l){s.e(l)}finally{s.f()}return[n,r]}(t,e),s=n(o,2),u=s[0],l=s[1];if(!u&&!l&&0!==e.length)return!1;if(u||0===e.length)return this.Ui.Fn(w.$n,t,e).L;var c,h=a(e);try{for(h.s();!(c=h.n()).done;){if(!r(c.value))return!1}}catch(d){h.e(d)}finally{h.f()}}else if(O(e)){if(!r(e))return!1;if(i)return this.Ui.Fn(w.Bn,t,e).L}else{if(void 0===e||!gt(e))return!1;if(I(e)&&(e=L(e)),"string"==typeof e&&!bt(e,'set custom user attribute "'.concat(t,'"'),"the element in the given array"))return!1}return this.yt.setCustomUserAttribute(t,e)}},{key:"addToCustomAttributeArray",value:function(t,e){return!!bt(t,"add to custom user attribute array","the given key")&&!(null!=e&&!bt(e,"add to custom user attribute array","the given value"))&&this.Ui.Fn(w.Ln,t,e).L}},{key:"removeFromCustomAttributeArray",value:function(t,e){return!!bt(t,"remove from custom user attribute array","the given key")&&!(null!=e&&!bt(e,"remove from custom user attribute array","the given value"))&&this.Ui.Fn(w.Rn,t,e).L}},{key:"incrementCustomUserAttribute",value:function(t,e){if(!bt(t,"increment custom user attribute","the given key"))return!1;null==e&&(e=1);var i=parseInt(e.toString());return isNaN(i)||i!==parseFloat(e.toString())?(y.error('Cannot increment custom user attribute because the given incrementValue "'.concat(e,'" is not an integer.')),!1):this.Ui.Fn(w.On,t,i).L}}
1,{key:"setCustomLocationAttribute",value:function(t,e,i){return!!bt(t,"set custom location attribute","the given key")&&((null!==e||null!==i)&&(e=null!=e?parseFloat(e.toString()):null,i=null!=i?parseFloat(i.toString()):null,null==e&&null!=i||null!=e&&null==i||null!=e&&(isNaN(e)||e>90||e<-90)||null!=i&&(isNaN(i)||i>180||i<-180))?(y.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by \xb190 and \xb1180 respectively, or must both be null for removal."),!1):this.Ui.Gn(t,e,i).L)}},{key:"addToSubscriptionGroup",value:function(e){return!kt(e,"add user to subscription group","subscription group ID",!1)||e.length<=0?(y.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Ui.Hn(e,t.Kn.SUBSCRIBED).L}},{key:"removeFromSubscriptionGroup",value:function(e){return!kt(e,"remove user from subscription group","subscription group ID",!1)||e.length<=0?(y.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Ui.Hn(e,t.Kn.UNSUBSCRIBED).L}},{key:"Pn",value:function(t,e,i,n,a){this.yt.Pn(t,e,i,n,a),this.Ui.Mn()}},{key:"Sn",value:function(t){this.yt.Sn(t)}}]),t}();Et.Genders={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},Et.NotificationSubscriptionTypes={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},Et.En=/^[0-9 .\\(\\)\\+\\-]+$/,Et.Kn={SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},Et.Yn="user_id",Et.lu="custom",Et.lr=997;var St=function(){function t(){p(this,t)}return v(t,[{key:"ef",value:function(){}},{key:"sf",value:function(){}},{key:"Da",value:function(t){}}],[{key:"ff",value:function(t,e){if(t&&e)if(t=t.toLowerCase(),T(e.nf)){for(var i=0;i<e.nf.length;i++)if(-1!==t.indexOf(e.nf[i].toLowerCase()))return e.identity}else if(-1!==t.indexOf(e.nf.toLowerCase()))return e.identity}}]),t}(),Ct={rO:"Chrome",eO:"Edge",oO:"Opera",Bg:"Safari",OO:"Firefox"},At={xg:"Android",io:"iOS",Pg:"Mac",Og:"Windows"},_t=function(t){u(i,t);var e=c(i);function i(){var t;if(p(this,i),(t=e.call(this)).userAgentData=navigator.userAgentData,t.browser=null,t.version=null,t.userAgentData){var n=t.hc();t.browser=n.browser||"Unknown Browser",t.version=n.version||"Unknown Version"}return t.OS=null,h(t)}return v(i,[{key:"ef",value:function(){return this.browser}},{key:"sf",value:function(){return this.version}},{key:"Da",value:function(t){var e=this;if(this.OS)return Promise.resolve(this.OS);var n=function(n){for(var a=0;a<t.length;a++){var r=i.ff(n,t[a]);if(r)return e.OS=r,e.OS}return n};return this.userAgentData.platform?Promise.resolve(n(this.userAgentData.platform)):this.getHighEntropyValues().then((function(t){return t.platform?n(t.platform):navigator.platform})).catch((function(){return navigator.platform}))}},{key:"hc",value:function(){var t={},e=this.userAgentData.brands;if(e&&e.length){var i,n=a(e);try{for(n.s();!(i=n.n()).done;){var r=i.value,o=this.uc(Ct),s=r.brand.match(o);if(s&&s.length>0){t.browser=s[0],t.version=r.version;break}}}catch(u){n.e(u)}finally{n.f()}}return t}},{key:"uc",value:function(t){var e=[];for(var i in t){var n=i;e.push(t[n])}return new RegExp("("+e.join("|")+")","i")}},{key:"getHighEntropyValues",value:function(){return this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues(["platform"]):Promise.reject()}}]),i}(St),Nt=function(t){u(i,t);var e=c(i);function i(){var t;return p(this,i),(t=e.call(this)).fd=i.hc(navigator.userAgent||""),t}return v(i,[{key:"ef",value:function(){return this.fd[0]||"Unknown Browser"}},{key:"sf",value:function(){return this.fd[1]||"Unknown Version"}},{key:"Da",value:function(t){for(var e=0;e<t.length;e++){var n=t[e].string,a=i.ff(n,t[e]);if(a)return a===At.Pg&&navigator.maxTouchPoints>1&&(a=At.io),Promise.resolve(a)}return Promise.resolve(navigator.platform)}}],[{key:"hc",value:function(t){var e,i=t.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(-1!==t.indexOf("(Web0S; Linux/SmartTV)"))return["LG Smart TV",null];if(-1!==t.indexOf("CrKey"))return["Chromecast",null];if(-1!==t.indexOf("BRAVIA")||-1!==t.indexOf("SonyCEBrowser")||-1!==t.indexOf("SonyDTV"))return["Sony Smart TV",null];if(-1!==t.indexOf("PhilipsTV"))return["Philips Smart TV",null];if(t.match(/\b(Roku)\b/))return["Roku",null];if(t.match(/\bAFTM\b/))return["Amazon Fire Stick",null];if(i[1]===Ct.rO&&null!=(e=t.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/)))return(e=e.slice(1))[0]=e[0].replace("OPR",Ct.oO),e[0]=e[0].replace("EdgA",Ct.eO),"Edg"===e[0]&&(e[0]=Ct.eO),[e[0],e[1]];if(i[1]===Ct.Bg&&null!=(e=t.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/)))return(e=e.slice(1))[0]=e[0].replace("EdgiOS",Ct.eO),[e[0],e[1]];if((i=i[2]?[i[1],i[2]]:[null,null])[0]===Ct.Bg&&null!=(e=t.match(/version\/(\.?\d+(\.\d+)*)/i))&&i.splice(1,1,e[1]),null!=(e=t.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))&&i.splice(1,1,e[2]),i[0]===Ct.oO&&null!=(e=t.match(/mini\/(\.?\d+(\.\d+)*)/i)))return["Opera Mini",e[1]||""];if(i[0]){var n=i[0].toLowerCase();"crios"===n&&(i[0]=Ct.rO),"tizen"===n&&(i[0]="Samsung Smart TV",i[1]=null),"samsungbrowser"===n&&(i[0]="Samsung Browser")}return i}}]),i}(St),Tt=function(){function t(){var e=this;p(this,t);var i=navigator.userAgentData?_t:Nt;this.Sg=new i,this.userAgent=navigator.userAgent,this.browser=this.Sg.ef(),this.version=this.Sg.sf(),this.OS=null,this.Da().then((function(t){return e.OS=t}));var n=navigator;this.language=(n.userLanguage||n.language||n.browserLanguage||n.systemLanguage||"").toLowerCase(),this.Qo=t.vg(this.userAgent)}return v(t,[{key:"IE",value:function(){return this.browser===Ct.Bg}},{key:"Ca",value:function(){return this.OS||null}},{key:"Da",value:function(){var e=this;return this.OS?Promise.resolve(this.OS):this.Sg.Da(t.kg).then((function(t){return e.OS=t,t}))}}],[{key:"vg",value:function(t){t=t.toLowerCase();for(var e=["googlebot","bingbot","slurp","duckduckbot","baiduspider","yandex","facebookexternalhit","sogou","ia_archiver","https://github.com/prerender/prerender","aolbuild","bingpreview","msnbot","adsbot","mediapartners-google","teoma","taiko"],i=0;i<e.length;i++)if(-1!==t.indexOf(e[i]))return!0;return!1}}]),t}();Tt.kg=[{string:navigator.platform,nf:"Win",identity:At.Og},{string:navigator.platform,nf:"Mac",identity:At.Pg},{string:navigator.platform,nf:"BlackBerry",identity:"BlackBerry"},{string:navigator.platform,nf:"FreeBSD",identity:"FreeBSD"},{string:navigator.platform,nf:"OpenBSD",identity:"OpenBSD"},{string:navigator.platform,nf:"Nintendo",identity:"Nintendo"},{string:navigator.platform,nf:"SunOS",identity:"SunOS"},{string:navigator.platform,nf:"PlayStation",identity:"PlayStation"},{string:navigator.platform,nf:"X11",identity:"X11"},{string:navigator.userAgent,nf:["iPhone","iPad","iPod"],identity:At.io},{string:navigator.platform,nf:"Pike v",identity:At.io},{string:navigator.userAgent,nf:["Web0S"],identity:"WebOS"},{string:navigator.platform,nf:["Linux armv7l","Android"],identity:At.xg},{string:navigator.userAgent,nf:["Android"],identity:At.xg},{string:navigator.platform,nf:"Linux",identity:"Linux"}];var It=new Tt,Ot={iu:{su:"ab.storage.userId",Uo:"ab.storage.deviceId",El:"ab.storage.sessionId"},C:{ec:"ab.test",tE:"ab.storage.events",eE:"ab.storage.attributes",sE:"ab.storage.attributes.anonymous_user",Fa:"ab.storage.device",Jh:"ab.storage.sdk_metadata",Qh:"ab.storage.session_id_for_cached_metadata",In:"ab.storage.pushToken",Ai:"ab.storage.newsFeed",Bi:"ab.storage.lastNewsFeedRefresh",J:"ab.storage.cardImpressions",ul:"ab.storage.serverConfig",rE:"ab.storage.triggers",oE:"ab.storage.triggers.ts",Nl:"ab.storage.messagingSessionStart",bs:"ab.storage.cc",js:"ab.storage.ccLastFullSync",Rs:"ab.storage.ccLastCardUpdated",nE:"ab.storage.ccRateLimitCurrentTokenCount",Ru:"ab.storage.globalRateLimitCurrentTokenCount",bu:"ab.storage.dynamicRateLimitCurrentTokenCount",v:"ab.storage.ccClicks",H:"ab.storage.ccImpressions",A:"ab.storage.ccDismissals",aE:"ab.storage.lastDisplayedTriggerTimesById",iE:"ab.storage.lastDisplayedTriggerTime",EE:"ab.storage.triggerFireInstancesById",wh:"ab.storage.signature",xs:"ab.storage.brazeSyncRetryCount",Us:"ab.storage.sdkVersion",vi:"ab.storage.ff",wi:"ab.storage.ffImpressions",zi:"ab.storage.ff
1LastRefreshAt",Si:"ab.storage.ff.sessionId",lE:"ab.storage.lastReqToEndpoint",SE:"ab.storage.requestAttempts",Xr:"ab.storage.deferredIam",du:"ab.storage.lastSdkReq",_E:"ab.storage.alias"},se:"ab.optOut"},Dt=function(){function t(e,i){p(this,t),this.uE=e,this.TE=i,this.uE=e,this.TE=i}return v(t,[{key:"Vh",value:function(e){var i,n=P(Ot.iu),r=new t.ee(e),o=a(n);try{for(o.s();!(i=o.n()).done;){var s=i.value;r.remove(Ot.iu[s])}}catch(u){o.e(u)}finally{o.f()}}},{key:"uu",value:function(t,e){var i=null;null!=e&&e instanceof et&&(i=e.Y()),this.uE.store(t,i)}},{key:"cE",value:function(t){var e=this.tu(t);null!=e&&(e.Wl=(new Date).valueOf(),this.uu(t,e))}},{key:"tu",value:function(t){var e,i=this.uE.br(t),n=function(t){var e;try{e=JSON.parse(t)}catch(t){e=null}return e}(i);if(n)(e=et.qn(n)||null)&&this.uu(t,e);else{var a=et.hE(i);e=et.qn(a)||null,a!==i&&e&&this.uu(t,e)}return e}},{key:"Al",value:function(t){this.uE.remove(t)}},{key:"Kh",value:function(){var t,e,i=a(P(Ot.iu));try{for(i.s();!(e=i.n()).done;){var n=e.value;null!=(t=this.tu(Ot.iu[n]))&&this.uu(Ot.iu[n],t)}}catch(r){i.e(r)}finally{i.f()}}},{key:"zo",value:function(t){var e;if(null==t||0===t.length)return!1;e=T(t)?t:[t];var i=this.TE.br(Ot.C.tE);null!=i&&T(i)||(i=[]);for(var n=0;n<e.length;n++)i.push(e[n].Y());return this.TE.store(Ot.C.tE,i)}},{key:"kl",value:function(t){return null!=t&&this.zo([t])}},{key:"AE",value:function(){var t=this.TE.br(Ot.C.tE);this.TE.remove(Ot.C.tE),null==t&&(t=[]);var e=[],i=!1,n=null;if(T(t))for(var a=0;a<t.length;a++)Q.RE(t[a])?e.push(Q.qn(t[a])):n=a;else i=!0;if(i||null!=n){var r="Stored events could not be deserialized as Events";i&&(r+=", was "+Object.prototype.toString.call(t)+" not an array"),null!=n&&(r+=", value at index "+n+" does not look like an event"),r+=", serialized values were of type "+f(t)+": "+JSON.stringify(t),e.push(new Q(null,w.Ls,(new Date).valueOf(),null,{e:r}))}return e}},{key:"I",value:function(t,e){return!!N(Ot.C,t,"StorageManager cannot store object.","STORAGE_KEYS.OBJECTS")&&this.TE.store(t,e)}},{key:"j",value:function(t){return!!N(Ot.C,t,"StorageManager cannot retrieve object.","STORAGE_KEYS.OBJECTS")&&this.TE.br(t)}},{key:"ii",value:function(t){return!!N(Ot.C,t,"StorageManager cannot remove object.","STORAGE_KEYS.OBJECTS")&&(this.TE.remove(t),!0)}},{key:"clearData",value:function(){for(var t=P(Ot.iu),e=P(Ot.C),i=0;i<t.length;i++){var n=t[i];this.uE.remove(Ot.iu[n])}for(var a=0;a<e.length;a++){var r=e[a];this.TE.remove(Ot.C[r])}}},{key:"gE",value:function(t){return t||Ot.C.sE}},{key:"Pa",value:function(t){var e=this.TE.br(Ot.C.eE);null==e&&(e={});var i=this.gE(t[Et.Yn]),n=e[i];for(var a in t)a!==Et.Yn&&(null==e[i]||n&&null==n[a])&&this.mu(t[Et.Yn],a,t[a])}},{key:"mu",value:function(t,e,i){var n=this.TE.br(Ot.C.eE);null==n&&(n={});var a=this.gE(t),r=n[a];if(null==r&&(r={},null!=t&&(r[Et.Yn]=t)),e===Et.lu)for(var o in null==r[e]&&(r[e]={}),i)r[e][o]=i[o];else r[e]=i;return n[a]=r,this.TE.store(Ot.C.eE,n)}},{key:"OE",value:function(){var t=this.TE.br(Ot.C.eE);this.TE.remove(Ot.C.eE);var e=[];for(var i in t)null!=t[i]&&e.push(t[i]);return e}},{key:"ru",value:function(t){var e=this.TE.br(Ot.C.eE);if(null!=e){var i=this.gE(null),n=e[i];null!=n&&(e[i]=void 0,this.TE.store(Ot.C.eE,e),n[Et.Yn]=t,this.Pa(n))}var a=this.tu(Ot.iu.El),r=null;null!=a&&(r=a.eu);var o=this.AE();if(null!=o)for(var s=0;s<o.length;s++){var u=o[s];null==u.userId&&u.sessionId==r&&(u.userId=t),this.kl(u)}}},{key:"dE",value:function(){return this.TE.fE}}]),t}();Dt.rc=function(){function t(e){p(this,t),this.rn=e,this.rn=e,this.fE=It.IE()?3:10}return v(t,[{key:"bE",value:function(t){return t+"."+this.rn}},{key:"store",value:function(t,e){var i={v:e};try{return localStorage.setItem(this.bE(t),JSON.stringify(i)),!0}catch(t){return y.info("Storage failure: "+tt(t)),!1}}},{key:"br",value:function(t){try{var e=null,i=localStorage.getItem(this.bE(t));return null!=i&&(e=JSON.parse(i)),null==e?null:e.v}catch(t){return y.info("Storage retrieval failure: "+tt(t)),null}}},{key:"remove",value:function(t){try{localStorage.removeItem(this.bE(t))}catch(t){return y.info("Storage removal failure: "+tt(t)),!1}}}]),t}(),Dt.ac=function(){function t(){p(this,t),this.mE={},this.KE=5242880,this.fE=3}return v(t,[{key:"store",value:function(t,e){var i={value:e},n=this.YE(e);return n>
1this.KE?(y.info("Storage failure: object is \u2248"+n+" bytes which is greater than the max of "+this.KE),!1):(this.mE[t]=i,!0)}},{key:"YE",value:function(t){for(var e=[],i=[t],n=0;i.length;){var a=i.pop();if("boolean"==typeof a)n+=4;else if("string"==typeof a)n+=2*a.length;else if("number"==typeof a)n+=8;else if("object"==f(a)&&-1===e.indexOf(a)){var r=void 0,o=void 0;for(var s in e.push(a),a)o=a,r=s,i.push(o[r])}}return n}},{key:"br",value:function(t){var e=this.mE[t];return null==e?null:e.value}},{key:"remove",value:function(t){this.mE[t]=null}}]),t}(),Dt.ee=function(){function t(e,i){p(this,t),this.rn=e,this.NE=i,this.rn=e,this.CE=this.GE(),this.DE=576e3,this.NE=!!i}return v(t,[{key:"bE",value:function(t){return null!=this.rn?t+"."+this.rn:t}},{key:"GE",value:function(){for(var t=0,e=document.location.hostname,i=e.split("."),n="ab._gd";t<i.length-1&&-1===document.cookie.indexOf(n+"="+n);)t++,e="."+i.slice(-1-t).join("."),document.cookie=n+"="+n+";domain="+e+";";return document.cookie=n+"=;expires="+new Date(0).toUTCString()+";domain="+e+";",e}},{key:"ne",value:function(){var t=new Date;return t.setTime(t.getTime()+60*this.DE*1e3),t.getFullYear()}},{key:"ME",value:function(){for(var t=_(Ot.iu),e=document.cookie.split(";"),i=0;i<e.length;i++){for(var n=e[i];" "===n.charAt(0);)n=n.substring(1);for(var a=!1,r=0;r<t.length;r++)if(0===n.indexOf(t[r])){a=!0;break}if(a){var o=n.split("=")[0];-1===o.indexOf("."+this.rn)&&this.pE(o)}}}},{key:"store",value:function(t,e){this.ME();var i=new Date;i.setTime(i.getTime()+60*this.DE*1e3);var n,a="expires="+i.toUTCString(),r="domain="+this.CE;n=this.NE?e:encodeURIComponent(e);var o=this.bE(t)+"="+n+";"+a+";"+r+";path=/";return o.length>=4093?(y.info("Storage failure: string is "+o.length+" chars which is too large to store as a cookie."),!1):(document.cookie=o,!0)}},{key:"br",value:function(t){for(var e=[],i=this.bE(t)+"=",n=document.cookie.split(";"),a=0;a<n.length;a++){for(var r=n[a];" "===r.charAt(0);)r=r.substring(1);if(0===r.indexOf(i))try{var o;o=this.NE?r.substring(i.length,r.length):decodeURIComponent(r.substring(i.length,r.length)),e.push(o)}catch(e){return y.info("Storage retrieval failure: "+tt(e)),this.remove(t),null}}return e.length>0?e[e.length-1]:null}},{key:"remove",value:function(t){this.pE(this.bE(t))}},{key:"pE",value:function(t){var e=t+"=;expires="+new Date(0).toUTCString();document.cookie=e,document.cookie=e+";path=/";var i=e+";domain="+this.CE;document.cookie=i,document.cookie=i+";path=/"}}]),t}(),Dt.tc=function(){function t(e,i,n){p(this,t),this.rn=e,this.vE=[],i&&this.vE.push(new Dt.ee(e)),n&&this.vE.push(new Dt.rc(e)),this.vE.push(new Dt.ac)}return v(t,[{key:"store",value:function(t,e){for(var i=!0,n=0;n<this.vE.length;n++)i=this.vE[n].store(t,e)&&i;return i}},{key:"br",value:function(t){for(var e=0;e<this.vE.length;e++){var i=this.vE[e].br(t);if(null!=i)return i}return null}},{key:"remove",value:function(t){new Dt.ee(this.rn).remove(t);for(var e=0;e<this.vE.length;e++)this.vE[e].remove(t)}}]),t}();var Pt=function(){function t(e,i,n){p(this,t),this.u=e,this.Jn=i,this.Qn=n,this.u=e,this.Jn=i||!1,this.Qn=n,this.Xn=new Y,this.Zn=0,this.gh=1}return v(t,[{key:"Fh",value:function(){return this.Jn}},{key:"kh",value:function(){return this.u.j(Ot.C.wh)}},{key:"setSdkAuthenticationSignature",value:function(t){var e=this.kh();this.u.I(Ot.C.wh,t);var i=C.ts.Zt;new C(i,y).setItem(i.hs.jh,this.gh,t),e!==t&&this.Vs()}},{key:"xh",value:function(){this.u.ii(Ot.C.wh);var t=C.ts.Zt;new C(t,y).re(t.hs.jh,this.gh)}},{key:"subscribeToSdkAuthenticationFailures",value:function(t){return this.Qn.Nt(t)}},{key:"qh",value:function(t){this.Qn.Rt(t)}},{key:"yh",value:function(){this.Xn.removeAllSubscriptions()}},{key:"Bh",value:function(){this.Zn+=1}},{key:"Gh",value:function(){return this.Zn}},{key:"Vs",value:function(){this.Zn=0}}]),t}(),zt=function(){function t(){p(this,t)}return v(t,[{key:"Ss",value:function(t){}},{key:"changeUser",value:function(){}},{key:"clearData",value:function(){}}]),t}(),Ut=function(){function t(e){p(this,t),this.id=e,this.id=e}return v(t,[{key:"Mr",value:function(){var t={};return null!=this.browser&&(t.browser=this.browser),null!=this.Ta&&(t.browser_version=this.Ta),null!=this.os&&(t.os_version=this.os),null!=this.resolution&&(t.resolution=this.resolution),null!=this.language&&(t.locale=this.language),null!=this.timeZone&&(t.time_zone=this.timeZone),null!=this.userAgent&&(t.user_agent=this.userAgent),t}}]),t}(),Mt={BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"},Rt=function(){function t(e,i){p(this,t),this.u=e,this.Ia=i,this.u=e,null==i&&(i=_(Mt)),this.Ia=i}return v(t,[{key:"ce",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.u.tu(Ot.iu.Uo);null==e&&(e=new et(S.W()),t&&this.u.uu(Ot.iu.Uo,e));for(var i=new Ut(e.eu),n=0;n<this.Ia.length;n++)switch(this.Ia[n]){case Mt.BROWSER:i.browser=It.browser;break;case Mt.BROWSER_VERSION:i.Ta=It.version;break;case Mt.OS:i.os=this.Da();break;case Mt.RESOLUTION:i.Sa=screen.width+"x"+screen.height;break;case Mt.LANGUAGE:i.language=It.language;break;case Mt.TIME_ZONE:i.timeZone=this.Oa(new Date);break;case Mt.USER_AGENT:i.userAgent=It.userAgent}return i}},{key:"Da",value:function(){if(It.Ca())return It.Ca();var t=this.u.j(Ot.C.Fa);return t&&t.os_version?t.os_version:It.Da()}},{key:"Oa",value:function(t){var e=!1;if("undefined"!=typeof Intl&&"function"==typeof Intl.DateTimeFormat)try{if("function"==typeof Intl.DateTimeFormat().resolvedOptions){var i=Intl.DateTimeFormat().resolvedOptions().timeZone;if(null!=i&&""!==i)return i}}catch(t){y.info("Intl.DateTimeFormat threw an error, cannot detect user's time zone:"+tt(t)),e=!0}if(e)return"";var n=t.getTimezoneOffset();return this.Ga(n)}},{key:"Ga",value:function(t){var e=Math.trunc(t/60),i=Math.trunc(t%60),n="GMT";return 0!==t&&(n+=t<0?"+":"-",n+=("00"+Math.abs(e)).slice(-2)+":"+("00"+Math.abs(i)).slice(-2)),n}}]),t}
1(),Lt="invalid_api_key",Bt="blacklisted",Ft="no_device_identifier",qt="invalid_json_response",jt="empty_response",Gt={_s:{Ka:"data",Xs:"content_cards/sync",Ri:"feature_flags/sync",Tr:"template"},ku:function(t){return null==t?void 0:t.j(Ot.C.lE)},sm:function(t){return null==t?void 0:t.j(Ot.C.SE)},nm:function(t,e){null==t||t.I(Ot.C.lE,e)},um:function(t,e){null==t||t.I(Ot.C.SE,e)},Wa:function(t,e){if(!t||!e)return-1;var i=Gt.ku(t);if(null==i)return-1;var n=i[e];return null==n||isNaN(n)?-1:n},Ya:function(t,e){var i=1;if(!t||!e)return i;var n=Gt.sm(t);return null==n?i:null==(i=n[e])||isNaN(i)?1:i},Hs:function(t,e,i){if(t&&e){var n=Gt.ku(t);null==n&&(n={}),n[e]=i,Gt.nm(t,n)}},Ws:function(t,e,i){if(t&&e){var n=Gt.sm(t);null==n&&(n={}),n[e]=i,Gt.um(t,n)}},ti:function(t,e){if(t&&e){var i=Gt.Ya(t,e);Gt.Ws(t,e,i+1)}}},Kt=function(){function t(e,i,n,a,r,o,s,u,l,c,h,d){p(this,t),this.on=e,this.u=i,this.Ko=n,this.yt=a,this.oi=r,this.qt=o,this.rn=s,this.Go=u,this.Bo=l,this.Vo=c,this.appVersion=h,this.Xh=d,this.Hh=function(t){return null==t?"":"".concat(t," ")},this.on=e,this.u=i,this.Ko=n,this.yt=a,this.oi=r,this.qt=o,this.rn=s,this.Go=u,this.Bo=l,this.Vo=c,this.appVersion=h,this.Xh=d,this.Yh=["npm"]}return v(t,[{key:"$s",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.on.ce(!i),a=n.Mr();z(this.u.j(Ot.C.Fa),a)||(t.device=a),t.api_key=this.rn,t.time=U((new Date).valueOf(),!0);var r=this.u.j(Ot.C.Jh)||[],o=this.u.j(Ot.C.Qh)||"";if(this.Yh.length>0&&(!z(r,this.Yh)||o!==this.oi.xi())&&(t.sdk_metadata=this.Yh),t.sdk_version=this.Bo,this.Vo&&(t.sdk_flavor=this.Vo),t.app_version=this.appVersion,t.app_version_code=this.Xh,t.device_id=n.id,e){var s=this.yt.getUserId();null!=s&&(t.user_id=s)}if(!t.user_id&&!this.Ko.Fh()){var u=Z(this.u);u&&(t.alias=u)}return t}},{key:"Qs",value:function(t,e,i){var n=e.auth_error,r=e.error;if(!n&&!r)return!0;if(n){var o;this.Ko.Bh();var s,u={errorCode:n.error_code},l=a(i);try{for(l.s();!(s=l.n()).done;){var c=s.value;T(c)&&"X-Braze-Auth-Signature"===c[0]&&(u.signature=c[1])}}catch(p){l.e(p)}finally{l.f()}t.respond_with&&t.respond_with.user_id?u.userId=t.respond_with.user_id:t.user_id&&(u.userId=t.user_id);var h=n.reason;return h?(u.reason=h,o="due to ".concat(h)):o="with error code ".concat(n.error_code,"."),this.Ko.Fh()||(o+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),y.error("SDK Authentication failed ".concat(o)),this.Zh(t.events||[],t.attributes||[]),this.Ko.qh(u),!1}if(r){var d,f=r;switch(f){case jt:return d="Received successful response with empty body.",vi.q(w.Ls,{e:d}),y.info(d),!1;case qt:return d="Received successful response with invalid JSON",vi.q(w.Ls,{e:d+": "+e.response}),y.info(d),!1;case Lt:f='The API key "'.concat(t.api_key,'" is invalid for the baseUrl ').concat(this.Go);break;case Bt:f="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case Ft:f="No device identifier. Please contact [email protected]"}y.error("Backend error: "+f)}return!1}},{key:"La",value:function(t,e,i,n){return!!(t&&0!==t.length||e&&0!==e.length||i||n)}},{key:"Ea",value:function(t,e,i,n){var r,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=[],u=function(t){return t||""},l=u(this.yt.getUserId()),c=this.Ir(t,e),h=[],d=[],f=null;if(i.length>0){var p,b=[],v=a(i);try{for(v.s();!(p=v.n()).done;){if(r=p.value.Mr(),this.Ko.Fh()){if(l&&!r.user_id){f||(f={}),f.events||(f.events=[]),f.events.push(r);continue}if(u(r.user_id)!==l){d.push(r);continue}}b.push(r)}}catch(E){v.e(E)}finally{v.f()}b.length>0&&(c.events=b)}if(n.length>0){var g,m=[],y=a(n);try{for(y.s();!(g=y.n()).done;){var k=g.value;k&&(this.Ko.Fh()&&u(k.user_id)!==l?h.push(k):m.push(k))}}catch(E){y.e(E)}finally{y.f()}m.length>0&&(c.attributes=m)}if(this.Zh(d,h),c=this.$s(c,!0,o),f){var w={requestData:f=this.$s(f,!1,o),headers:this.Ps(f,Gt._s.Ka)};s.push(w)}if(c&&!this.La(c.events,c.attributes,t,e))return f?s:null;var x={requestData:c,headers:this.Ps(c,Gt._s.Ka)};return s.push(x),s}},{key:"Zh",value:function(t,e){if(t){var i,n=[],r=a(t);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=Q.fromJson(o);s.time=M(s.time),n.push(s)}}catch(h){r.e(h)}finally{r.f()}this.u.zo(n)}if(e){var u,l=a(e);try{for(l.s();!(u=l.n()).done;){var c=u.value;this.u.Pa(c)}}catch(h){l.e(h)}finally{l.f()}}}},{key:"Ys",value:function(t,e){var i="HTTP error ";null!=t&&(i+=t+" "),i+=e,y.error(i)}},{key:"qr",value:function(t){return vi.q(w.Ua,{n:t})}}
1,{key:"Ir",value:function(t,e,i){var n={};t&&(n.feed=!0),e&&(n.triggers=!0);var a=null!=i?i:this.yt.getUserId();if(a&&(n.user_id=a),!n.user_id&&!this.Ko.Fh()){var r=Z(this.u);r&&(n.alias=r)}return n.config={config_time:this.qt.hi()},{respond_with:n}}},{key:"Ha",value:function(t){var e=(new Date).valueOf(),i=72e5.toString(),n=Gt.Wa(this.u,t);return-1!==n&&(i=(e-n).toString()),i}},{key:"Ps",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=[["X-Braze-Api-Key",this.rn]],a=this.Ha(e);n.push(["X-Braze-Last-Req-Ms-Ago",a]);var r=Gt.Ya(this.u,e).toString();n.push(["X-Braze-Req-Attempt",r]);var o=!1;if(null!=t.respond_with&&t.respond_with.triggers&&(n.push(["X-Braze-TriggersRequest","true"]),o=!0),null!=t.respond_with&&t.respond_with.feed&&(n.push(["X-Braze-FeedRequest","true"]),o=!0),e===Gt._s.Xs){n.push(["X-Braze-ContentCardsRequest","true"]);var s=this.u.j(Ot.C.xs);s&&i||(s=0,this.u.I(Ot.C.xs,s)),n.push(["BRAZE-SYNC-RETRY-COUNT",s.toString()]),o=!0}if(e===Gt._s.Ri&&(n.push(["X-Braze-FeatureFlagsRequest","true"]),o=!0),o&&n.push(["X-Braze-DataRequest","true"]),this.Ko.Fh()){var u=this.Ko.kh();null!=u&&n.push(["X-Braze-Auth-Signature",u])}return n}},{key:"Ja",value:function(t,e,i,n){var a=this;window.setTimeout((function(){y.info("Retrying rate limited ".concat(a.Hh(n),"SDK request.")),a.Gs(e,i,n)}),t)}},{key:"Gs",value:function(t,e,i,n){if(!this.Qa(i))return y.info("".concat(this.Hh(i),"SDK request being rate limited.")),void("function"==typeof n&&n());var a=this.Va();if(!a.Za)return y.info("".concat(this.Hh(i),"SDK request being rate limited. Request will be retried in ").concat(Math.trunc(a.au/1e3)," seconds.")),void this.Ja(a.au,t,e,i);this.u.I(Ot.C.du,(new Date).valueOf());var r=t.device;r&&r.os_version instanceof Promise?r.os_version.then((function(i){t.device.os_version=i,e(a.fu)})):e(a.fu)}},{key:"vu",value:function(t){var e;null===(e=this.u)||void 0===e||e.I(Ot.C.Ru,t)}},{key:"gu",value:function(t,e){var i=this.pu();null==i&&(i={}),i[t]=e,this.u.I(Ot.C.bu,i)}},{key:"qu",value:function(){var t;return null===(t=this.u)||void 0===t?void 0:t.j(Ot.C.Ru)}},{key:"pu",value:function(){var t;return null===(t=this.u)||void 0===t?void 0:t.j(Ot.C.bu)}},{key:"Au",value:function(t,e,i,n){var a,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(r){var o=this.pu();a=null==o||isNaN(o[r])?e:o[r]}else(null==(a=this.qu())||isNaN(a))&&(a=e);var s=(t-n)/1e3;return a=Math.min(a+s/i,e)}},{key:"Du",value:function(t,e){return Math.max(0,(1-t)*e*1e3)}},{key:"Tu",value:function(t){var e,i,n,a,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s={Za:!0,fu:-1,au:0};if(null==t&&(t=!0),!t&&!o)return s;var u,l,c=null;if(t)c=null===(e=this.u)||void 0===e?void 0:e.j(Ot.C.du);else{var h=Gt.ku(this.u);if(null==h||null==h[o])return s;c=h[o]}if(null==c||isNaN(c))return s;if(t?(u=(null===(i=this.qt)||void 0===i?void 0:i.Cu())||-1,l=(null===(n=this.qt)||void 0===n?void 0:n.Su())||-1):(u=(null===(a=this.qt)||void 0===a?void 0:a.Bu(o))||-1,l=(null===(r=this.qt)||void 0===r?void 0:r.wu(o))||-1),-1===u||-1===l)return s;var d=(new Date).valueOf(),f=this.Au(d,u,l,c,o);return f<1?(s.Za=!1,s.au=this.Du(f,l),s):(f=Math.trunc(f)-1,s.fu=f,t?this.vu(f):this.gu(o,f),s)}},{key:"Va",value:function(){return this.Tu(!0)}},{key:"Qa",value:function(t){var e=this.Tu(!1,t);return!(e&&!e.Za)}},{key:"Vs",value:function(){this.Ko.Vs()}},{key:"Os",value:function(){return this.Go}},{key:"addSdkMetadata",value:function(t){var e,i=a(t);try{for(i.s();!(e=i.n()).done;){var n=e.value;-1===this.Yh.indexOf(n)&&this.Yh.push(n)}}catch(r){i.e(r)}finally{i.f()}}}]),t}(),Xt=function(t){var e,i;try{var n=!1;if(window.XMLHttpRequest&&(n=!0),!n)return void y.error("This browser does not have any supported ajax options!");e=new XMLHttpRequest;var r=function(){"function"==typeof t.error&&t.error(e.status),"function"==typeof t.Zs&&t.Zs(!1)};e.onload=function(){if(4===e.readyState)if(e.status>=200&&e.status<300||304===e.status){if("function"==typeof t.L){var n,a;try{n=JSON.parse(e.responseText),a=e.getAllResponseHeaders()}catch(i){var o={error:""===e.responseText?jt:qt,response:e.responseText};(0,t.L)(o,a)}n&&t.L(n,a)}"function"==typeof t.Zs&&t.Zs(!0)}else r()},e.onerror=function(){r()},e.ontimeout=function(){r()},i=JSON.stringify(t.data),e.open("POST",t.url,!0),e.setRequestHeader("Content-type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest");var o,s=a(t.headers||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;e.setRequestHeader(u[0],u[1])}}catch(l){s.e(l)}finally{s.f()}e.send(i)}catch(t){y.error("Network request error: ".concat(tt(t)))}},Yt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},Ht=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];p(this,t),this.L=e,this.ge=i,this.L=e,this.ge=i}return v(t,[{key:"P",value:function(t){var e;this.L=this.L&&t.L,(e=this.ge).push.apply(e,r(t.ge))}}]),t}
1(),Jt={pn:function(){return"serviceWorker"in navigator&&"undefined"!=typeof ServiceWorkerRegistration&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window},yn:function(){return"safari"in window&&"pushNotification"in window.safari&&"function"==typeof window.safari.pushNotification.permission&&"function"==typeof window.safari.pushNotification.requestPermission},isPushSupported:function(){return Jt.pn()||Jt.yn()},isPushBlocked:function(){var t=Jt.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"denied"===window.Notification.permission,e=Jt.isPushSupported()&&(!("Notification"in window)||null==window.Notification);return t||e},isPushPermissionGranted:function(){return Jt.isPushSupported()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"granted"===window.Notification.permission},Wi:function(){return!Jt.isPushBlocked()&&Jt.isPushSupported()&&!Jt.isPushPermissionGranted()}},Wt=Jt,Vt=function(){function t(e,i,n,a,r,o,s,u,l,c){p(this,t),this.rn=e,this.baseUrl=i,this.oi=n,this.on=a,this.yt=r,this.qt=o,this.u=s,this.yu=u,this.Ko=l,this.$t=c,this.rn=e,this.baseUrl=i,this.ju=0,this.fE=s.dE()||0,this.$u=null,this.oi=n,this.on=a,this.yt=r,this.qt=o,this.u=s,this.Ko=l,this.$t=c,this.yu=u,this.Fu=new Y,this.Lu=null,this.Mu=50,this.Pu=!1}return v(t,[{key:"xu",value:function(t,e){return!t&&!e&&this.Ko.Gh()>=this.Mu}},{key:"Iu",value:function(t){var e=this.oi.Gl();if(t.length>0){var i,n=this.yt.getUserId(),r=a(t);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=!o.userId&&!n||o.userId===n;o.type===w.ql&&s&&(e=!0)}}catch(u){r.e(u)}finally{r.f()}}return e}},{key:"Nu",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7&&void 0!==arguments[7]&&arguments[7];n&&this.Ou();var c=this.u.AE(),h=this.u.OE(),d=!1,f=this.Iu(c),p=i||f;if(this.xu(u,f))y.info("Declining to flush data due to 50 consecutive authentication failures");else{if(n&&!this.$t.La(c,h,e,p))return this.zu(),void("function"==typeof s&&s(!0));var b=this.$t.Ea(e,p,c,h,l);p&&this.ju++;var v=!1;if(b){var g,m=a(b);try{var k=function(){var e=g.value;t.$t.Gs(e.requestData,(function(i){return function(e,i){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,u=!1,l=(new Date).valueOf();Gt.Hs(t.u,Gt._s.Ka,l),-1!==a&&i.push(["X-Braze-Req-Tokens-Remaining",a.toString()]),Xt({url:t.baseUrl+"/data/",data:e,headers:i,L:function(n){null!=e.respond_with&&e.respond_with.triggers&&(t.ju=Math.max(t.ju-1,0)),t.$t.Qs(e,n,i)?(t.Ko.Vs(),t.qt.al(n),null!=e.respond_with&&e.respond_with.user_id!=t.yt.getUserId()||(null!=e.device&&t.u.I(Ot.C.Fa,e.device),null!=e.sdk_metadata&&(t.u.I(Ot.C.Jh,e.sdk_metadata),t.u.I(Ot.C.Qh,t.oi.xi())),t.yu(n),Gt.Ws(t.u,Gt._s.Ka,1),"function"==typeof r&&r())):n.auth_error&&(u=!0)},error:function(){null!=e.respond_with&&e.respond_with.triggers&&(t.ju=Math.max(t.ju-1,0)),t.$t.Zh(e.events,e.attributes),"function"==typeof o&&o()},Zs:function(e){if("function"==typeof s&&s(e),n&&!d){if(e&&!u)t.zu();else{Gt.ti(t.u,Gt._s.Ka);var i=t.$u;(null==i||i<1e3*t.fE)&&(i=1e3*t.fE),t.zu(Math.min(3e5,Yt(1e3*t.fE,3*i)))}d=!0}}})}(e.requestData,e.headers,i)}),Gt._s.Ka,o),v=!0};for(m.s();!(g=m.n()).done;)k()}catch(w){m.e(w)}finally{m.f()}}this.Ko.Fh()&&n&&!v?this.zu():f&&(y.info("Invoking new session subscriptions"),this.Fu.Rt())}}},{key:"Uu",value:function(){return this.ju>0}},{key:"zu",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3*this.fE;this.Pu||(this.Ou(),this.Lu=window.setTimeout((function(){if(document.hidden){var e="visibilitychange";document.addEventListener(e,(function i(){document.hidden||(document.removeEventListener(e,i,!1),t.Nu())}),!1)}else t.Nu()}),e),this.$u=e)}},{key:"Ou",value:function(){null!=this.Lu&&(clearTimeout(this.Lu),this.Lu=null)}},{key:"initialize",value:function(){this.Pu=!1,this.zu()}},{key:"destroy",value:function(){this.Fu.removeAllSubscriptions(),this.Ko.yh(),this.Ou(),this.Pu=!0,this.Nu(void 0,void 0,!1,void 0,void 0,void 0,void 0,!0),this.Lu=null}},{key:"mr",value:function(t){return this.Fu.Nt(t)}},{key:"openSession",value:function(){var t=this,e=this.oi.xi()!==this.oi.xo();e&&(this.u.cE(Ot.iu.Uo),this.u.cE(Ot.iu.su)),this.Nu(void 0,!1,void 0,(function(){t.u.ii(Ot.C.wi)})),this.Mn(),e&&Promise.resolve().then((function(){return En})).then((function(e){if(!t.Pu){var i=e.default.m();if(null!=i&&(Wt.isPushPermissionGranted()||Wt.isPushBlocked())){var n=function(){i.mn()?y.info("Push token maintenance is disabled, not refreshing token for backend."):i.subscribe()},a=C.ts.Zt;new C(a,y).jr(a.hs.cu,(function(t,e){e&&n()}),(function(){var e=t.u.j(Ot.C.In);(null==e||e)&&n()}))}}}))}},{key:"_u",value:function(){this.u.ii(Ot.C.vi),this.u.ii(Ot.C.bs),this.u.ii(Ot.C.Xr)}}
1,{key:"changeUser",value:function(t,e,i){var n=this.yt.getUserId();if(n!==t){this.oi.yl(),this._u(),null!=n&&this.Nu(void 0,!1,void 0,void 0,void 0),this.yt.ou(t),i?this.Ko.setSdkAuthenticationSignature(i):this.Ko.xh();for(var a=0;a<e.length;a++)e[a].changeUser(null==n);null!=n&&this.u.ii(Ot.C.J),this.u.ii(Ot.C.Fa),this.u.ii(Ot.C.nE),this.u.ii(Ot.C._E),this.openSession(),y.info('Changed user to "'+t+'".')}else{var r="Doing nothing.";i&&this.Ko.kh()!==i&&(this.Ko.setSdkAuthenticationSignature(i),r="Updated SDK authentication signature"),y.info("Current user is already ".concat(t,". ").concat(r))}}},{key:"requestImmediateDataFlush",value:function(t){this.Ou(),this.oi.xo(),this.Nu(void 0,void 0,void 0,void 0,(function(){y.error("Failed to flush data, request will be retried automatically.")}),t,!0)}},{key:"requestFeedRefresh",value:function(){this.oi.xo(),this.Nu(!0)}},{key:"$r",value:function(t,e){this.oi.xo(),y.info("Requesting explicit trigger refresh."),this.Nu(void 0,!0,void 0,t,e)}},{key:"Cn",value:function(t,e){var i=w.Eu,n={a:t,l:e},a=vi.q(i,n);return a&&(y.info("Logged alias ".concat(t," with label ").concat(e)),this.u.I(Ot.C._E,n)),a}},{key:"Fn",value:function(t,e,i){if(this.qt.hu(e))return y.info('Custom Attribute "'.concat(e,'" is blocklisted, ignoring.')),new Ht;var n={key:e,value:i},a=vi.q(t,n);if(a){var r="object"==f(i)?JSON.stringify(i,null,2):i;y.info("Logged custom attribute: ".concat(e," with value: ").concat(r))}return a}},{key:"setLastKnownLocation",value:function(t,e,i,n,a,r){var o={latitude:e,longitude:i};null!=n&&(o.altitude=n),null!=a&&(o.ll_accuracy=a),null!=r&&(o.alt_accuracy=r);var s=vi.q(w.Ju,o,t||void 0);return s&&y.info("Set user last known location as ".concat(JSON.stringify(o,null,2))),s}},{key:"kr",value:function(t,e){var i=this.oi.xo();return new Q(this.yt.getUserId(),w.Ku,t,i,{cid:e})}},{key:"Wu",value:function(t,e){return new C(t,e)}},{key:"Mn",value:function(){var t=C.ts.Zt;this.Wu(t,y).setItem(t.hs.Ka,1,{baseUrl:this.baseUrl,data:{api_key:this.rn,device_id:this.on.ce().id},userId:this.yt.getUserId(),sdkAuthEnabled:this.Ko.Fh()})}},{key:"yr",value:function(t){var e,i=a(t);try{for(i.s();!(e=i.n()).done;){var n=e.value;if(n.api_key===this.rn)this.$t.Zh(n.events,n.attributes);else{var r=C.ts.Zt;new C(r,y).setItem(r.hs.wr,S.W(),n)}}}catch(o){i.e(o)}finally{i.f()}}},{key:"Gn",value:function(t,e,i){return this.qt.hu(t)?(y.info('Custom Attribute "'.concat(t,'" is blocklisted, ignoring.')),new Ht):(null===e&&null===i?(n=w.Gu,a={key:t}):(n=w.Xu,a={key:t,latitude:e,longitude:i}),vi.q(n,a));var n,a}},{key:"Hn",value:function(t,e){var i={group_id:t,status:e};return vi.q(w.Hu,i)}}]),t}(),$t=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{enabled:!1},u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{enabled:!1,refresh_rate_limit:void 0},l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{enabled:!0,capacity:30,refill_rate:30,endpoint_overrides:{}};p(this,t),this.hl=e,this.gl=i,this.fl=n,this.bl=a,this.Rl=r,this.cl=o,this.ml=s,this.ai=u,this.ol=l,this.hl=e,this.gl=i,this.fl=n,this.bl=a,this.Rl=r,this.cl=o,this.ml=s,this.ai=u,this.ol=l}return v(t,[{key:"Y",value:function(){return{s:"5.5.0",l:this.hl,e:this.gl,a:this.fl,p:this.bl,m:this.Rl,v:this.cl,c:this.ml,f:this.ai,grl:this.ol}}}],[{key:"qn",value:function(e){var i=e.l;return"5.5.0"!==e.s&&(i=0),new t(i,e.e,e.a,e.p,e.m,e.v,e.c,e.f,e.grl)}}]),t}(),Zt=function(){function t(e){p(this,t),this.u=e,this.u=e,this.tl=new Y,this.el=new Y,this.il=new Y,this.sl=null,this.rl=null}return v(t,[{key:"ll",value:function(){if(null==this.rl){var t=this.u.j(Ot.C.ul);this.rl=null!=t?$t.qn(t):new $t}return this.rl}},{key:"hi",value:function(){return this.ll().hl}},{key:"al",value:function(t){var e=this;if(null!=t&&null!=t.config){var i=t.config;if(i.time>this.ll().hl){var n=new $t(i.time,i.events_blacklist,i.attributes_blacklist,i.purchases_blacklist,i.messaging_session_timeout,i.vapid_public_key,i.content_cards,i.feature_flags,function(t){return null==t?e.ll().ol:t}(i.global_request_rate_limit)),a=!1;null!=n.cl&&this.Wn()!==n.cl&&(a=!0);var r=!1;null!=n.ml.enabled&&this.ei()!==n.ml.enabled&&(r=!0);var o=!1;null!=n.ai.enabled&&this.mi()!==n.ai.enabled&&(o=!0),this.rl=n,this.u.I(Ot.C.ul,n.Y()),a&&this.tl.Rt(),r&&this.el.Rt(),o&&this.il.Rt()}}}},{key:"_n",value:function(t){var e=this.tl.Nt(t);return this.sl&&this.tl.removeSubscription(this.sl),this.sl=e,e}},{key:"Ms",value:function(t){return this.el.Nt(t)}},{key:"bi",value:function(t){return this.il.Nt(t)}},{key:"me",value:function(t){return-1!==this.ll().gl.indexOf(t)}},{key:"hu",value:function(t){return-1!==this.ll().fl.indexOf(t)}},{key:"Dr",value:function(t){return-1!==this.ll().bl.indexOf(t)}},{key:"dl",value:function(){return this.ll().Rl}},{key:"Wn",value:function(){return this.ll().cl}}
1,{key:"ei",value:function(){return this.ll().ml.enabled||!1}},{key:"Cl",value:function(){var t=this.ll().ol;return!(!t||null==t.enabled)&&t.enabled}},{key:"Cu",value:function(){if(!this.Cl())return-1;var t=this.ll().ol;return null==t.capacity||t.capacity<10?-1:t.capacity}},{key:"Su",value:function(){if(!this.Cl())return-1;var t=this.ll().ol;return null==t.refill_rate||t.refill_rate<=0?-1:t.refill_rate}},{key:"vl",value:function(t){var e=this.ll().ol.endpoint_overrides;return null==e?null:e[t]}},{key:"Bu",value:function(t){var e=this.vl(t);return null==e||isNaN(e.capacity)||e.capacity<=0?-1:e.capacity}},{key:"wu",value:function(t){var e=this.vl(t);return null==e||isNaN(e.refill_rate)||e.refill_rate<=0?-1:e.refill_rate}},{key:"mi",value:function(){return this.ll().ai.enabled&&null==this.Di()?(vi.q(w.Ls,{e:"Missing feature flag refresh_rate_limit."}),!1):this.ll().ai.enabled||!1}},{key:"Di",value:function(){return this.ll().ai.refresh_rate_limit}}]),t}(),Qt=function(){function t(e,i,n,a){p(this,t),this.u=e,this.yt=i,this.qt=n,this.wl=a,this.u=e,this.yt=i,this.qt=n,this.Sl=1e3,(null==a||isNaN(a))&&(a=1800),a<this.Sl/1e3&&(y.info("Specified session timeout of "+a+"s is too small, using the minimum session timeout of "+this.Sl/1e3+"s instead."),a=this.Sl/1e3),this.wl=a}return v(t,[{key:"jl",value:function(t,e){return new Q(this.yt.getUserId(),w.xl,t,e.eu,{d:U(t-e.Dl)})}},{key:"xi",value:function(){var t=this.u.tu(Ot.iu.El);return null==t?null:t.eu}},{key:"Gl",value:function(){var t=(new Date).valueOf(),e=this.qt.dl(),i=this.u.j(Ot.C.Nl);if(null!=i&&null==e)return!1;var n=!1;return null==i?n=!0:null!=e&&(n=t-i>1e3*e),n&&this.u.I(Ot.C.Nl,t),n}},{key:"zl",value:function(t,e){return null==e||null==e.Hl||!(t-e.Dl<this.Sl)&&e.Hl<t}},{key:"xo",value:function(){var t=(new Date).valueOf(),e=t+1e3*this.wl,i=this.u.tu(Ot.iu.El);if(this.zl(t,i)){var n="Generating session start event with time "+t;if(null!=i){var a=i.Wl;a-i.Dl<this.Sl&&(a=i.Dl+this.Sl),this.u.kl(this.jl(a,i)),n+=" (old session ended "+a+")"}n+=". Will expire "+e.valueOf(),y.info(n);var r=new et(S.W(),e);return this.u.kl(new Q(this.yt.getUserId(),w.ql,t,r.eu)),this.u.uu(Ot.iu.El,r),null==this.u.j(Ot.C.Nl)&&this.u.I(Ot.C.Nl,t),r.eu}if(null!=i)return i.Wl=t,i.Hl=e,this.u.uu(Ot.iu.El,i),i.eu}},{key:"yl",value:function(){var t=this.u.tu(Ot.iu.El);null!=t&&(this.u.Al(Ot.iu.El),this.u.kl(this.jl((new Date).valueOf(),t)))}}]),t}(),te={Wh:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(Ot.C.ec,"true"),localStorage.getItem(Ot.C.ec)&&(localStorage.removeItem(Ot.C.ec),i=!0)}catch(t){if(!(t instanceof Error&&("QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&localStorage.length>0))throw t;i=!0}}catch(t){y.info("Local Storage not supported!")}var n,a=te.oc(),r=new Dt.tc(t,a&&!e,i);return n=i?new Dt.rc(t):new Dt.ac,new Dt(r,n)},oc:function(){return navigator.cookieEnabled||"cookie"in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1)}},ee=function(){function t(e,i){p(this,t),this.triggerId=e,this.messageExtras=i,this.triggerId=e,this.messageExtras=i,this.extras={},this.isControl=!0}return v(t,null,[{key:"fromJson",value:function(e){return new t(e.trigger_id,e.message_extras)}}]),t}();var ie={dc:null,po:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(null==t)return!1;e=e||!1,i=i||!1;var a=t.getBoundingClientRect();return null!=a&&(a.top>=0&&a.top<=(window.innerHeight||document.documentElement.clientHeight)||!e)&&(a.left>=0||!n)&&(a.bottom>=0&&a.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!i)&&(a.right<=(window.innerWidth||document.documentElement.clientWidth)||!n)}},ne={Oe:"up",Qe:"down",U:"left",V:"right"};function ae(){if(null==ie.dc){ie.dc=!1;try{var t=Object.defineProperty({},"passive",{get:function(){ie.dc=!0}});window.addEventListener("testPassive",(function(){}),t),window.removeEventListener("testPassive",(function(){}),t)}catch(bi){y.error(tt(bi))}}return ie.dc}function re(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};t.addEventListener(e,i,!!ae()&&{passive:!0})}function oe(t){return ie.po(t,!0,!1,!1)}function se(t){return ie.po(t,!1,!0,!1)}function ue(t){if(t.onclick){var e=document.createEvent("MouseEvents");e.initEvent("click",!0,!0),t.onclick.apply(t,[e])}}function le(t,e,i){var n=null,a=null;re(t,"touchstart",(function(t){n=t.touches[0].clientX,a=t.touches[0].clientY})),re(t,"touchmove",(function(r){if(null!=n&&null!=a){var o=n-r.touches[0].clientX,s=a-r.touches[0].clientY;Math.abs(o)>Math.abs(s)&&Math.abs(o)>=25?((o>0&&e===ne.U||o<0&&e===ne.V)&&i(r),n=null,a=null):Math.abs(s)>=25&&((s>0&&e===ne.Oe&&t.scrollTop===t.scrollHeight-t.offsetHeight||s<0&&e===ne.Qe&&0===t.scrollTop)&&i(r),n=null,a=null)}}))}function ce(t,e,i){var n="http://www.w3.org/2000/svg",a=document.createElementNS(n,"svg");a.setAttribute("viewBox",t),a.setAttribute("xmlns",n);var r=document.createElementNS(n,"path");return r.setAttribute("d",e),null!=i&&r.setAttribute("fill",i),a.appendChild(r),a}
1var he={Fo:32,lo:9,To:13,mh:27},de=function(t){return null!==t&&"IFRAME"===t.tagName},fe=function(){function t(e,i,n,a,r,o,s,u,l,c,h,d,f,b,v,g,m,y,k,w,x,E,S,C,A,_,N,T,I,O){p(this,t),this.message=e,this.messageAlignment=i,this.slideFrom=n,this.extras=a,this.triggerId=r,this.clickAction=o,this.uri=s,this.openTarget=u,this.dismissType=l,this.duration=c,this.icon=h,this.imageUrl=d,this.imageStyle=f,this.iconColor=b,this.iconBackgroundColor=v,this.backgroundColor=g,this.textColor=m,this.closeButtonColor=y,this.animateIn=k,this.animateOut=w,this.header=x,this.headerAlignment=E,this.headerTextColor=S,this.frameColor=C,this.buttons=A,this.cropType=_,this.orientation=N,this.htmlId=T,this.css=I,this.messageExtras=O,this.message=e,this.messageAlignment=i||t.TextAlignment.CENTER,this.duration=c||5e3,this.slideFrom=n||t.SlideFrom.BOTTOM,this.extras=a||{},this.triggerId=r,this.clickAction=o||t.ClickAction.NONE,this.uri=s,this.openTarget=u||t.OpenTarget.NONE,this.dismissType=l||t.DismissType.AUTO_DISMISS,this.icon=h,this.imageUrl=d,this.imageStyle=f||t.ImageStyle.TOP,this.iconColor=b||t.th.ih,this.iconBackgroundColor=v||t.th.sh,this.backgroundColor=g||t.th.ih,this.textColor=m||t.th.hh,this.closeButtonColor=y||t.th.eh,this.animateIn=k,null==this.animateIn&&(this.animateIn=!0),this.animateOut=w,null==this.animateOut&&(this.animateOut=!0),this.header=x,this.headerAlignment=E||t.TextAlignment.CENTER,this.headerTextColor=S||t.th.hh,this.frameColor=C||t.th.Eh,this.buttons=A||[],this.cropType=_||t.CropType.FIT_CENTER,this.orientation=N,this.htmlId=T,this.css=I,this.isControl=!1,this.messageExtras=O,this.nh=!1,this.Th=!1,this.vo=!1,this.oh=!1,this.Re=null,this.ke=null,this.Et=new Y,this.rh=new Y,this.qe=t.TextAlignment.CENTER}return v(t,[{key:"subscribeToClickedEvent",value:function(t){return this.Et.Nt(t)}},{key:"subscribeToDismissedEvent",value:function(t){return this.rh.Nt(t)}},{key:"removeSubscription",value:function(t){this.Et.removeSubscription(t),this.rh.removeSubscription(t)}},{key:"removeAllSubscriptions",value:function(){this.Et.removeAllSubscriptions(),this.rh.removeAllSubscriptions()}},{key:"closeMessage",value:function(){this.Cr(this.Re)}},{key:"$e",value:function(){return!0}},{key:"do",value:function(){return this.$e()}},{key:"Ce",value:function(){return null!=this.htmlId&&this.htmlId.length>4}},{key:"ve",value:function(){return this.Ce()&&null!=this.css&&this.css.length>0}},{key:"we",value:function(){if(this.Ce()&&this.ve())return this.htmlId+"-css"}},{key:"K",value:function(){return!this.Th&&(this.Th=!0,!0)}},{key:"Wr",value:function(){return this.Th}},{key:"p",value:function(t){return!this.vo&&(this.vo=!0,this.Et.Rt(),!0)}},{key:"N",value:function(){return!this.oh&&(this.oh=!0,this.rh.Rt(),!0)}},{key:"hide",value:function(e){if(e&&e.parentNode){var i=e.closest(".ab-iam-root");if(null==i&&(i=e),this.$e()&&null!=i.parentNode){var n=i.parentNode.classList;n&&n.contains(t.lh)&&n.remove(t.lh),document.body.removeEventListener("touchmove",t.uh)}i.className=i.className.replace(t.ah,t.Ih)}return this.animateOut||!1}},{key:"Cr",value:function(e,i){var n=this;if(null!=e){var a;this.Re=null;var r=!1;(a=-1===e.className.indexOf("ab-in-app-message")?e.getElementsByClassName("ab-in-app-message")[0]:e)&&(r=this.hide(a));var o,s=document.body;null!=s&&(o=s.scrollTop);var u=function(){if(e&&e.parentNode){var t=e.closest(".ab-iam-root");null==t&&(t=e),t.parentNode&&t.parentNode.removeChild(t)}var a=n.we();if(null!=a){var r=document.getElementById(a);r&&r.parentNode&&r.parentNode.removeChild(r)}null!=s&&"Safari"===It.browser&&(s.scrollTop=o),i?i():n.N()};r?setTimeout(u,t.Ah):u(),this.ke&&this.ke.focus()}}},{key:"Ge",value:function(){return document.createTextNode(this.message||"")}},{key:"Ae",value:function(t){var e="";this.message||this.header||!this.$e()||(e="Modal Image"),t.setAttribute("alt",e)}},{key:"Oh",value:function(e){var i=e.parentNode;this.$e()&&null!=i&&this.orientation!==t.Orientation.LANDSCAPE&&(null!=i.classList&&i.classList.add(t.lh),document.body.addEventListener("touchmove",t.uh,!!ae()&&{passive:!1})),e.className+=" "+t.ah}},{key:"Nh",value:function(){this.nh||pi.nn(di.Lh)||(document.addEventListener("keydown",t._h,!1),pi.Sh((function(){document.removeEventListener("keydown",t._h)})),this.nh=!0)}},{key:"Y",value:function(e){var i={};return e?(i[t.tt.Yr]=this.message,i[t.tt.Zr]=this.messageAlignment,i[t.tt.Rh]=this.slideFrom,i[t.tt.bt]=this.extras,i[t.tt.ea]=this.triggerId,i[t.tt.ra]=this.clickAction,i[t.tt.URI]=this.uri,i[t.tt.sa]=this.openTarget,i[t.tt.ta]=this.dismissType,i[t.tt.ia]=this.duration,i[t.tt.aa]=this.icon,i[t.tt.ot]=this.imageUrl,i[t.tt.oa]=this.imageStyle,i[t.tt.pa]=this.iconColor,i[t.tt.ma]=this.iconBackgroun
1dColor,i[t.tt.na]=this.backgroundColor,i[t.tt.ua]=this.textColor,i[t.tt.ca]=this.closeButtonColor,i[t.tt.fa]=this.animateIn,i[t.tt.da]=this.animateOut,i[t.tt.la]=this.header,i[t.tt.ga]=this.headerAlignment,i[t.tt.ja]=this.headerTextColor,i[t.tt.xa]=this.frameColor,i[t.tt.za]=this.buttons,i[t.tt.ha]=this.cropType,i[t.tt.va]=this.orientation,i[t.tt.wa]=this.htmlId,i[t.tt.CSS]=this.css,i[t.tt.Z]=e,i[t.tt.ya]=this.messageExtras,i):i}}],[{key:"uh",value:function(e){if(!(e.targetTouches&&e.targetTouches.length>1)){var i=e.target;i&&i.classList&&i.classList.contains("ab-message-text")&&i.scrollHeight>i.clientHeight||document.querySelector(".".concat(t.lh))&&e.cancelable&&e.preventDefault()}}},{key:"_h",value:function(t){if(t.keyCode===he.mh&&!pi.nn(di.Lh)&&document.querySelectorAll(".ab-modal-interactions").length>0){var e,i=!1,n=a(document.getElementsByClassName("ab-html-message"));try{for(n.s();!(e=n.n()).done;){var r=e.value,o=null;de(r)&&r.contentWindow&&(o=r.contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0]),null!=o&&(ue(o),i=!0)}}catch(u){n.e(u)}finally{n.f()}if(!i){var s=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];null!=s&&ue(s)}}}}]),t}();fe.th={hh:4281545523,ih:4294967295,sh:4278219733,Mh:4293914607,Dh:4283782485,Eh:3224580915,eh:4288387995},fe.Le={Ch:"hd",ze:"ias",dh:"of",Uh:"do",bh:"umt",Ph:"tf",ph:"te"},fe.SlideFrom={TOP:"TOP",BOTTOM:"BOTTOM"},fe.ClickAction={NEWS_FEED:"NEWS_FEED",URI:"URI",NONE:"NONE"},fe.DismissType={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},fe.OpenTarget={NONE:"NONE",BLANK:"BLANK"},fe.ImageStyle={TOP:"TOP",GRAPHIC:"GRAPHIC"},fe.Orientation={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},fe.TextAlignment={START:"START",CENTER:"CENTER",END:"END"},fe.CropType={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},fe.Be={Qr:"SLIDEUP",Lr:"MODAL",Ue:"MODAL_STYLED",Hr:"FULL",Kr:"WEB_HTML",Me:"HTML",Ve:"HTML_FULL"},fe.Ah=500,fe.fh=200,fe.ah="ab-show",fe.Ih="ab-hide",fe.lh="ab-pause-scrolling",fe.tt={Yr:"m",Zr:"ma",Rh:"sf",bt:"e",ea:"ti",ra:"ca",URI:"u",sa:"oa",ta:"dt",ia:"d",aa:"i",ot:"iu",oa:"is",pa:"ic",ma:"ibc",na:"bc",ua:"tc",ca:"cbc",fa:"ai",da:"ao",la:"h",ga:"ha",ja:"htc",xa:"fc",za:"b",ha:"ct",va:"o",wa:"hi",CSS:"css",Z:"type",uo:"messageFields",ya:"me"};var pe=function(t){u(n,t);var e=c(n);function n(t,i,a,r,o,s,u,l,c,h,d,f){var b;return p(this,n),(b=e.call(this,t,void 0,void 0,i,a,void 0,void 0,void 0,r=r||fe.DismissType.MANUAL,o,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,s,u,void 0,void 0,void 0,l,void 0,void 0,void 0,c,h,f)).messageFields=d,b.messageFields=d,b}return v(n,[{key:"do",value:function(){return!1}},{key:"p",value:function(t){if(this.xe===fe.Be.Kr){if(this.vo)return!1;this.vo=!0}return this.Et.Rt(t),!0}},{key:"Y",value:function(){var t=i(d(n.prototype),"Y",this).call(this,n.it);return t[fe.tt.uo]=this.messageFields,t}}],[{key:"Jr",value:function(t){return new n(t[fe.tt.Yr],t[fe.tt.bt],t[fe.tt.ea],t[fe.tt.ta],t[fe.tt.ia],t[fe.tt.fa],t[fe.tt.da],t[fe.tt.xa],t[fe.tt.wa],t[fe.tt.CSS],t[fe.tt.uo],t[fe.tt.ya])}}]),n}(fe);pe.it=fe.Be.Kr;var be=function(){function t(e,i,n,a,r,o,s){p(this,t),this.text=e,this.backgroundColor=i,this.textColor=n,this.borderColor=a,this.clickAction=r,this.uri=o,this.id=s,this.text=e||"",this.backgroundColor=i||fe.th.sh,this.textColor=n||fe.th.ih,this.borderColor=a||this.backgroundColor,this.clickAction=r||fe.ClickAction.NONE,this.uri=o,null==s&&(s=t.Ki),this.id=s,this.vo=!1,this.Et=new Y}return v(t,[{key:"subscribeToClickedEvent",value:function(t){return this.Et.Nt(t)}},{key:"removeSubscription",value:function(t){this.Et.removeSubscription(t)}},{key:"removeAllSubscriptions",value:function(){this.Et.removeAllSubscriptions()}},{key:"p",value:function(){return!this.vo&&(this.vo=!0,this.Et.Rt(),!0)}}],[{key:"fromJson",value:function(e){return new t(e.text,e.bg_color,e.text_color,e.border_color,e.click_action,e.uri,e.id)}}]),t}();be.Ki=-1;var ve=function(t){u(n,t);var e=c(n);function n(t,i,a,r,o,s,u,l,c,h,d,f,b,v,g,m,y,k,w,x,E,S,C,A,_,N,T,I,O){var D;return p(this,n),l=l||fe.DismissType.MANUAL,N=N||fe.Orientation.PORTRAIT,(D=e.call(this,t,i,void 0,a,r,o,s,u,l,c,h,d,f,b,v,g,m,y,k,w,x,E,S,C,A,_=_||fe.CropType.CENTER_CROP,N,T,I,O)).qe=fe.TextAlignment.CENTER,D}return v(n,[{key:"Y",value:function(){return i(d(n.prototype),"Y",this).call(this,n.it)}}],[{key:"Jr",value:function(t){return new n(t[fe.tt.Yr],t[fe.tt.Zr],t[fe.tt.bt],t[fe.tt.ea],t[fe.tt.ra],t[fe.tt.URI],t[fe.tt.sa],t[fe.tt.ta],t[fe.tt.i
1a],t[fe.tt.aa],t[fe.tt.ot],t[fe.tt.oa],t[fe.tt.pa],t[fe.tt.ma],t[fe.tt.na],t[fe.tt.ua],t[fe.tt.ca],t[fe.tt.fa],t[fe.tt.da],t[fe.tt.la],t[fe.tt.ga],t[fe.tt.ja],t[fe.tt.xa],ke(t[fe.tt.za]),t[fe.tt.ha],t[fe.tt.va],t[fe.tt.wa],t[fe.tt.CSS],t[fe.tt.ya])}}]),n}(fe);ve.it=fe.Be.Hr;var ge=function(t){u(n,t);var e=c(n);function n(t,i,a,r,o,s,u,l,c,h,d,f,b,v,g,m,y,k,w,x,E,S,C,A,_,N,T,I){var O;return p(this,n),(O=e.call(this,t,i,void 0,a,r,o,s,u,l=l||fe.DismissType.MANUAL,c,h,d,f,b,v,g,m,y,k,w,x,E,S,C,A,_=_||fe.CropType.FIT_CENTER,void 0,N,T,I)).qe=fe.TextAlignment.CENTER,O}return v(n,[{key:"Y",value:function(){return i(d(n.prototype),"Y",this).call(this,n.it)}}],[{key:"Jr",value:function(t){return new n(t[fe.tt.Yr],t[fe.tt.Zr],t[fe.tt.bt],t[fe.tt.ea],t[fe.tt.ra],t[fe.tt.URI],t[fe.tt.sa],t[fe.tt.ta],t[fe.tt.ia],t[fe.tt.aa],t[fe.tt.ot],t[fe.tt.oa],t[fe.tt.pa],t[fe.tt.ma],t[fe.tt.na],t[fe.tt.ua],t[fe.tt.ca],t[fe.tt.fa],t[fe.tt.da],t[fe.tt.la],t[fe.tt.ga],t[fe.tt.ja],t[fe.tt.xa],ke(t[fe.tt.za]),t[fe.tt.ha],t[fe.tt.wa],t[fe.tt.CSS],t[fe.tt.ya])}}]),n}(fe);ge.it=fe.Be.Lr;var me=function(t){u(n,t);var e=c(n);function n(t,i,a,r,o,s,u,l,c,h,d,f,b,v,g,m,y,k,w,x,E,S){var C;return p(this,n),m=m||fe.th.Dh,g=g||fe.th.Mh,(C=e.call(this,t,i=i||fe.TextAlignment.START,a,r,o,s,u,l,c,h,d,f,void 0,b,v,g,m,y,k,w,void 0,void 0,void 0,void 0,void 0,void 0,void 0,x,E,S)).qe=fe.TextAlignment.START,C}return v(n,[{key:"$e",value:function(){return!1}},{key:"Ge",value:function(){var t=document.createElement("span");return t.appendChild(document.createTextNode(this.message||"")),t}},{key:"Oh",value:function(t){var e=t.getElementsByClassName("ab-in-app-message")[0];ie.po(e,!0,!0)||(this.slideFrom===fe.SlideFrom.TOP?e.style.top="0px":e.style.bottom="0px"),i(d(n.prototype),"Oh",this).call(this,t)}},{key:"Y",value:function(){return i(d(n.prototype),"Y",this).call(this,n.it)}}],[{key:"Jr",value:function(t){return new n(t[fe.tt.Yr],t[fe.tt.Zr],t[fe.tt.Rh],t[fe.tt.bt],t[fe.tt.ea],t[fe.tt.ra],t[fe.tt.URI],t[fe.tt.sa],t[fe.tt.ta],t[fe.tt.ia],t[fe.tt.aa],t[fe.tt.ot],t[fe.tt.pa],t[fe.tt.ma],t[fe.tt.na],t[fe.tt.ua],t[fe.tt.ca],t[fe.tt.fa],t[fe.tt.da],t[fe.tt.wa],t[fe.tt.CSS],t[fe.tt.ya])}}]),n}(fe);function ye(t){if(!t)return null;if(t.is_control)return ee.fromJson(t);var e=t.type;null!=e&&(e=e.toUpperCase());var i=t.message,n=t.text_align_message,a=t.slide_from,r=t.extras,o=t.trigger_id,s=t.click_action,u=t.uri,l=t.open_target,c=t.message_close,h=t.duration,d=t.icon,f=t.image_url,p=t.image_style,b=t.icon_color,v=t.icon_bg_color,g=t.bg_color,m=t.text_color,k=t.close_btn_color,w=t.header,x=t.text_align_header,E=t.header_text_color,S=t.frame_color,C=[],A=t.btns;null==A&&(A=[]);for(var _=0;_<A.length;_++)C.push(be.fromJson(A[_]));var N=t.crop_type,T=t.orientation,I=t.animate_in,O=t.animate_out,D=t.html_id,P=t.css;null!=D&&""!==D&&null!=P&&""!==P||(D=void 0,P=void 0);var z,U=t.message_extras;if(e===ge.it||e===fe.Be.Ue)z=new ge(i,n,r,o,s,u,l,c,h,d,f,p,b,v,g,m,k,I,O,w,x,E,S,C,N,D,P,U);else if(e===ve.it)z=new ve(i,n,r,o,s,u,l,c,h,d,f,p,b,v,g,m,k,I,O,w,x,E,S,C,N,T,D,P,U);else if(e===me.it)z=new me(i,n,a,r,o,s,u,l,c,h,d,f,b,v,g,m,k,I,O,D,P,U);else{if(e!==pe.it&&e!==fe.Be.Me&&e!==fe.Be.Ve)return void y.error("Ignoring message with unknown type "+e);var M=t.message_fields;(z=new pe(i,r,o,c,h,I,O,S,D,P,M,U)).trusted=t.trusted||!1}return z.xe=e,z}function ke(t){var e,i=[],n=a(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;i.push(new be(r.text,r.backgroundColor,r.textColor,r.borderColor,r.clickAction,r.uri,r.id))}}catch(o){n.e(o)}finally{n.f()}return i}me.it=fe.Be.Qr;var we=function(){function t(e){p(this,t),this.Bl=e,this.Bl=e}return v(t,[{key:"Jl",value:function(t){return null==this.Bl||this.Bl===t[0]}},{key:"Y",value:function(){return this.Bl}}],[{key:"fromJson",value:function(e){return new t(e?e.event_name:null)}}]),t}(),xe=function(){function t(e,i,n,a){p(this,t),this.Tl=e,this._l=i,this.comparator=n,this.Ll=a,this.Tl=e,this._l=i,this.comparator=n,this.Ll=a,this._l===t.Ol.Il&&this.comparator!==t.Ql.Ul&&this.comparator!==t.Ql.Xl&&this.comparator!==t.Ql.Fl&&this.comparator!==t.Ql.Kl&&(this.Ll=R(this.Ll))}return v(t,[{key:"Jl",value:function(e){var i=null;switch(null!=e&&(i=e[this.Tl]),this.comparator){case t.Ql.Pl:return null!=i&&i.valueOf()===this.Ll.valueOf();case t.Ql.Yl:return null==i||i.valueOf()!==this.Ll.valueOf();case t.Ql.Zl:return null!=i&&f(i)==f(this.Ll)&&i>this.Ll;case t.Ql.Ul:return this._l===t.Ol.Il?null!=i&&I(i)&&F(i)<=this.Ll.valueOf():null!=i&&f(i)==f(this.Ll)&&i>=this.Ll;case t.Ql.$l:return null!=i&&f(i)==f(this.Ll)&&i<this.Ll;case t.Ql.Xl:return this._l===t.Ol.Il?null!=i&&I(i)&&F(i)>=this.Ll.valueOf():null!=i&&f(i)==f(this.Ll)&&i<=this.Ll;case t.Ql.Qu:return null!=i&&"string"==typeof i&&f(i)==f(this.Ll)&&null!=i.match(this.Ll);case t.Ql.Vu:return null!=i;case t.Ql.Yu:return null==i;case t.Ql.Fl:return null!=i&&I(i)&&q(i)<this.Ll;case t.Ql.Kl:return null!=i&&I(i)&&q(i)>this.Ll;case t.Ql.Zu:return null==i||f(i)!=f(this.Ll)||"string"!=typeof i||null==i.match(this.Ll)}return!1}},{key:"Y",value:function(){var t=this.Ll;return I(this.Ll)&&(t=U(t.valueOf())),{k:this.Tl,t:this._l,c:this.comparator,v:t}}}],[{key:"fromJson",value:function(e){return new t(e.property_key,e.property_type,e.comparator,e.property_value)}},{key:"qn",value:function(e){return new t(e.k,e.t,e.c,e.v)}}]),t}();xe.Ol={yE:"boolean",HE:"number",LE:"string",Il:"date"},xe.Ql={Pl:1,Yl:2,Zl:3,Ul:4,$l:5,Xl:6,Qu:10,Vu:11,Yu:12,Fl:15,Kl:16,Zu:17};var Ee=function(){function t(e){p(this,t),this.filters=e,this.filters=e}return v(t,[{key:"Jl",value:function(t){for(var e=!0,i=0;i<this.filters.length;i++){for(var n=this.filters[i],a=!1,r=0;r<n.length;r++)if(n[r].Jl(t)){a=!0;break}if(!a){e=!1;break}}return e}},{key:"Y",value:function(){for(var t=[],e=0;e<this.filters.length;e++){for(var i=this.filters[e],n=[],a=0;a<i.length;a++)n.push(i[a].Y());t.push(n)}return t}}],[{key:"fromJson",value:function(e){if(null==e||!T(e))return null;for(var i=[],n=0;n<e.length;n++){for(var a=[],r=e[n],o=0;o<r.length;o++)a.push(xe.fromJson(r[o]));i.push(a)}return new t(i)}},{key:"qn",value:function(e){for(var i=[],n=0;n<e.length;n++){for(var a=[],r=e[n],o=0;o<r.length;o++)a.push(xe.qn(r[o]));i.push(a)}return new t(i)}}]),t}(),Se=function(){function t(e,i){p(this,t),this.Bl=e,this.Ml=i,this.Bl=e,this.Ml=i}return v(t,[{key:"Jl",value:function(t){if(null==this.Bl||null==this.Ml)return!1;var e=t[0],i=t[1];return e===this.Bl&&this.Ml.Jl(i)}},{key:"Y",value:function(){return{e:this.Bl,pf:this.Ml?this.Ml.Y():null}}}],[{key:"fromJson",value:function(e){return new t(e?e.event_name:null,e?Ee.fromJson(e.property_filters):null)}}]),t}(),Ce=function(){function t(e,i){p(this,t),this.tf=e,this.if=i,this.tf=e,this.if=i}return v(t,[{key:"Jl",value:function(t){if(null==this.tf)return!1;var e=Ie.rf(t[0],this.tf);if(!e)return!1;var i=null==this.if||0===this.if.length;if(null!=this.if)for(var n=0;n<this.if.length;n++)if(this.if[n]===t[1]){i=!0;break}return e&&i}},{key:"Y",value:function(){return this.tf}}],[{key:"fromJson",value:function(e){return new t(e?e.id:null,e?e.buttons:null)}}]),t}(),Ae=function(){function t(e){p(this,t),this.productId=e,this.productId=e}return v(t,[{key:"Jl",value:function(t){return null==this.productId||t[0]===this.productId}},{key:"Y",value:function(){return this.productId}}],[{key:"fromJson",value:function(e){return new t(e?e.product_id:null)}}]),t}(),_e=function(){function t(e,i){p(this,t),this.productId=e,this.Ml=i,this.productId=e,this.Ml=i}return v(t,[{key:"Jl",value:function(t){if(null==this.productId||null==this.Ml)return!1;var e=t[0],i=t[1];return e===this.productId&&this.Ml.Jl(i)}},{key:"Y",value:function(){return{id:this.productId,pf:this.Ml?this.Ml.Y():null}}}],[{key:"fromJson",value:function(e){return new t(e?e.product_id:null,e?Ee.fromJson(e.property_filters):null)}}]),t}(),Ne=function(){function t(e){p(this,t),this.tf=e,this.tf=e}return v(t,[{key:"Jl",value:function(t){return null==this.tf||Ie.rf(t[0],this.tf)}},{key:"Y",value:function(){return this.tf}}],[{key:"fromJson",value:function(e){return new t(e?e.campaign_id:null)}}]),t}(),Te={OPEN:"open",Rr:"purchase",vr:"push_click",ue:"custom_event",Vr:"iam_click",kt:"test"},Ie=function(){function t(e,i){p(this,t),this.type=e,this.data=i,this.type=e,this.data=i}return v(t,[{key:"sc",value:function(e,i){return t.cc[this.type]===e&&(null==this.data||this.data.Jl(i))}}
1,{key:"Y",value:function(){return{t:this.type,d:this.data?this.data.Y():null}}}],[{key:"rf",value:function(t,e){var i=null;try{i=window.atob(t)}catch(e){return y.info("Failed to unencode analytics id "+t+": "+tt(e)),!1}return e===i.split("_")[0]}},{key:"fromJson",value:function(e){var i=e.type,n=null;switch(i){case t.Er.OPEN:case t.Er.kt:break;case t.Er.Rr:n=Ae.fromJson(e.data);break;case t.Er.nc:n=_e.fromJson(e.data);break;case t.Er.vr:n=Ne.fromJson(e.data);break;case t.Er.ue:n=we.fromJson(e.data);break;case t.Er.lc:n=Se.fromJson(e.data);break;case t.Er.Vr:n=Ce.fromJson(e.data)}return new t(i,n)}},{key:"qn",value:function(e){var i,n=null;switch(e.t){case t.Er.OPEN:case t.Er.kt:break;case t.Er.Rr:n=new Ae(e.d);break;case t.Er.nc:i=e.d||{},n=new _e(i.id,Ee.qn(i.pf||[]));break;case t.Er.vr:n=new Ne(e.d);break;case t.Er.ue:n=new we(e.d);break;case t.Er.lc:i=e.d||{},n=new Se(i.e,Ee.qn(i.pf||[]));break;case t.Er.Vr:n=new Ce(e.d)}return new t(e.t,n)}}]),t}();Ie.Er={OPEN:"open",Rr:"purchase",nc:"purchase_property",vr:"push_click",ue:"custom_event",lc:"custom_event_property",Vr:"iam_click",kt:"test"},Ie.cc={},Ie.cc[Ie.Er.OPEN]=Te.OPEN,Ie.cc[Ie.Er.Rr]=Te.Rr,Ie.cc[Ie.Er.nc]=Te.Rr,Ie.cc[Ie.Er.vr]=Te.vr,Ie.cc[Ie.Er.ue]=Te.ue,Ie.cc[Ie.Er.lc]=Te.ue,Ie.cc[Ie.Er.Vr]=Te.Vr,Ie.cc[Ie.Er.kt]=Te.kt;var Oe=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:t.td,c=arguments.length>9?arguments[9]:void 0,h=arguments.length>10?arguments[10]:void 0,d=arguments.length>11?arguments[11]:void 0;p(this,t),this.id=e,this.sd=i,this.startTime=n,this.endTime=a,this.priority=r,this.type=o,this.data=s,this.ed=u,this.rd=l,this.Or=c,this.hd=h,this.od=d,this.id=e,this.sd=i||[],void 0===n&&(n=null),this.startTime=n,void 0===a&&(a=null),this.endTime=a,this.priority=r||0,this.type=o,this.ed=u||0,null==c&&(c=1e3*(this.ed+30)),this.Or=c,this.data=s,null!=l&&(this.rd=l),this.hd=h,this.od=d||null}return v(t,[{key:"nd",value:function(e){return null==this.od||this.rd!==t.td&&e-this.od>=1e3*this.rd}},{key:"ad",value:function(t){this.od=t}},{key:"ud",value:function(t){var e=t+1e3*this.ed;return Math.max(e-(new Date).valueOf(),0)}},{key:"dd",value:function(t){var e=(new Date).valueOf()-t,i=null==t||isNaN(e)||null==this.Or||e<this.Or;return i||y.info("Trigger action ".concat(this.type," is no longer eligible for display - fired ").concat(e,"ms ago and has a timeout of ").concat(this.Or,"ms.")),!i}},{key:"Y",value:function(){for(var t=[],e=0;e<this.sd.length;e++)t.push(this.sd[e].Y());return{i:this.id,c:t,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.ed,r:this.rd,tm:this.Or,ss:this.hd,ld:this.od}}}],[{key:"fromJson",value:function(e){for(var i=e.id,n=[],a=0;a<e.trigger_condition.length;a++)n.push(Ie.fromJson(e.trigger_condition[a]));var r=R(e.start_time),o=R(e.end_time),s=e.priority,u=e.type,l=e.delay,c=e.re_eligibility,h=e.timeout,d=e.data,f=e.min_seconds_since_last_trigger;return N(t.Er,u,"Could not construct Trigger from server data","Trigger.Types")?new t(i,n,r,o,s,u,d,l,c,h,f):null}},{key:"qn",value:function(e){for(var i=[],n=e.c||[],a=0;a<n.length;a++)i.push(Ie.qn(n[a]));return new t(e.i,i,B(e.s),B(e.e),e.p,e.t,e.da,e.d,e.r,e.tm,e.ss,e.ld)}}]),t}();function De(t,e,i){var n=t||document.querySelector("head"),a="ab-".concat(e,"-css-definitions-").concat("5.5.0".replace(/\./g,"-"));if(n){var r=n.ownerDocument||document;if(null==r.getElementById(a)){var o=r.createElement("style");o.innerHTML=i||"",o.id=a;var s=pi.nn(di.bo);null!=s&&o.setAttribute("nonce",s),n.appendChild(o)}}}function Pe(){if(!pi.nn(di.Mo)){var t="https://use.fontawesome.com/7f85a56ba4.css";if(null===document.querySelector('link[rel=stylesheet][href="'+t+'"]')){var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),document.getElementsByTagName("head")[0].appendChild(e)}}}function ze(){(function(t){De(t,"feed","body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
1ans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button[dir=rtl]{left:0}.ab-feed .ab-card .ab-close-button[dir=ltr]{right:0}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}
1.ab-feed .ab-card.ab-image-only .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
1ans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body[dir=ltr]{padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body[dir=rtl]{padding-right:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area[dir=rtl]{padding:20px 25px 25px 0}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}")})(),Pe()}function Ue(){(function(t){De(t,"iam",".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
1ans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
1ans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text[dir=rtl]{border-width:5px 10px 5px 25px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{dis
1play:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}
1.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
1ans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-
1area-inset-bottom,0)}}")})(),Pe()}function Me(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ltr",a=document.createElement("button");a.setAttribute("aria-label",t),a.setAttribute("tabindex","0"),a.setAttribute("role","button"),a.dir=n,re(a,"touchstart"),a.className="ab-close-button";var r=ce("0 0 15 15","M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z",e);return a.appendChild(r),a.addEventListener("keydown",(function(t){t.keyCode!==he.Fo&&t.keyCode!==he.To||(i(),t.stopPropagation())})),a.onclick=function(t){i(),t.stopPropagation()},a}function Re(t,e){return null==t?"":(t=parseInt(t.toString()),isNaN(t)?"":(e&&!isNaN(parseFloat(e.toString()))||(e=1),"rgba("+[(16711680&(t>>>=0))>>>16,(65280&t)>>>8,255&t,((4278190080&t)>>>24)/255*e].join(",")+")"))}function Le(t){if(!pi.X())return!1;if(!(t instanceof fe||t instanceof ee))return y.error(j),!1;var e=t instanceof ee?w.mo:w.Xi;return oi.m().q(t,e).L}function Be(t){if(!pi.X())return!1;if(!(t instanceof fe))return y.error(j),!1;var e=oi.m().q(t,w.$i);if(e){t.Wr()||Le(t);for(var i=0;i<e.ge.length;i++)li.rr().fe(Te.Vr,[t.triggerId],e.ge[i])}return e.L}Oe.Er={_r:"inapp",md:"templated_iam"},Oe.td=-1;var Fe={PORTRAIT:0,LANDSCAPE:1};var qe={openUri:function(t,e,i){t&&(e||null!=i&&i.metaKey?window.open(t):window.location=t)},fo:function(){return screen.width<=600},co:function(){if("orientation"in window)return 90===Math.abs(window.orientation)||270===window.orientation?Fe.LANDSCAPE:Fe.PORTRAIT;var t=window;if("screen"in t){var e=t.screen.orientation||screen.mozOrientation||screen.msOrientation;return null!=e&&"object"==f(e)&&(e=e.type),"landscape-primary"===e||"landscape-secondary"===e?Fe.LANDSCAPE:Fe.PORTRAIT}return Fe.PORTRAIT},Zo:function(){return window.location.href}};function je(){if(pi.X())return pi.pr()}function Ge(t,e,i){if(pi.X())if(pt.test(t)){var n=ot(t);if(!n)return;!function t(e){if(xt(e)){var i=nt.properties.type,n=nt.properties.oo,o=nt.properties.eo,s=e[i];if(s===nt.types.ro){var u,l=a(e[n]);try{for(l.s();!(u=l.n()).done;){t(u.value)}}catch(p){l.e(p)}finally{l.f()}}else{var c,h,d=e[o];switch(s){case nt.types.logCustomEvent:Promise.resolve().then((function(){return rn})).then((function(t){var e=t.logCustomEvent;pi.so()?(h=Array.prototype.slice.call(d),e.apply(void 0,r(h))):y.error(X)}));break;case nt.types.requestPushPermission:Promise.resolve().then((function(){return Cn})).then((function(t){var e=t.requestPushPermission;pi.so()?"Safari"===It.browser&&It.OS===At.io?window.navigator.standalone&&e():e():y.error(X)}));break;case nt.types.setEmailNotificationSubscriptionType:case nt.types.setPushNotificationSubscriptionType:case nt.types.setCustomUserAttribute:case nt.types.addToSubscriptionGroup:case nt.types.removeFromSubscriptionGroup:case nt.types.addToCustomAttributeArray:case nt.types.removeFromCustomAttributeArray:var f;if(c=je())(f=c)[s].apply(f,r(Array.prototype.slice.call(d)));break;case nt.types.no:case nt.types.ao:h=Array.prototype.slice.call(d),qe.openUri.apply(qe,r(h));break;default:y.info("Ignoring unknown Braze Action: ".concat(s))}}}else y.error("Decoded Braze Action json is invalid: ".concat(JSON.stringify(e,null,2)))}(n)}else qe.openUri(t,e,i)}function Ke(t){null==t&&(t="");var e=t.split("?").slice(1).join("?"),i={};if(null!=e)for(var n=e.split("&"),a=0;a<n.length;a++){var r=n[a].split("=");""!==r[0]&&(i[r[0]]=r[1])}return i}function Xe(t){return!(!t||0!==(t=t.toString().toLowerCase()).lastIndexOf("javascript:",0)&&0!==t.lastIndexOf("data:",0))}function Ye(t,e,i){if(!pi.X())return!1;if(!(t instanceof pe))return y.error("inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object."),!1;var n=w.$i;null!=e&&(n=w.Oi);var a=oi.m().q(t,n,e,i);if(a.L)for(var r=0;r<a.ge.length;r++)li.rr().fe(Te.Vr,[t.triggerId,e],a.ge[r]);return a.L}var He=function(t,e,i,n){var a=i.getAttribute("href"),r=i.onclick;return function(o){if(null==r||"function"!=typeof r||!1!==r.bind(i)(o)){var s=Ke(a).abButtonId;if(null!=s&&""!==s||(s=i.getAttribute("id")||void 0),null!=a&&""!==a&&0!==a.indexOf("#")){var u="blank"===(i.getAttribute("target")||"").toLowerCase().replace("_",""),l=n||t.openTarget===fe.OpenTarget.BLANK||u,c=function(){Ye(t,s,a),qe.openUri(a,l,o)};l?c():t.Cr(e,c)}else Ye(t,s,a||void 0);return o.stopPropagation(),!1}}}
1,Je=function(t,e,i){var n="([\\w]+)\\s*=\\s*document.createElement\\(['\"]".concat(i,"['\"]\\)"),a=t.match(new RegExp(n));if(a){var r="".concat(a[1],'.setAttribute("nonce", "').concat(e,'")');return"".concat(t.slice(0,a.index+a[0].length),";").concat(r,";").concat(t.slice(a.index+a[0].length))}return null},We=function(t,e,i){var n,o={closeMessage:function(){t.Cr(e)},logClick:function(){Ye.apply(void 0,[t].concat(Array.prototype.slice.call(arguments)))},display:{},web:{}},s=function(){return function(){var t=arguments;Promise.resolve().then((function(){return Cn})).then((function(e){pi.so()?e.requestPushPermission.apply(e,r(Array.prototype.slice.call(t))):y.error(X)}))}},u={requestImmediateDataFlush:function(){var t=arguments;Promise.resolve().then((function(){return ln})).then((function(e){var i=e.requestImmediateDataFlush;pi.so()?i.apply(void 0,r(Array.prototype.slice.call(t))):y.error(X)}))},logCustomEvent:function(){var t=arguments;Promise.resolve().then((function(){return rn})).then((function(e){var i=e.logCustomEvent;pi.so()?i.apply(void 0,r(Array.prototype.slice.call(t))):y.error(X)}))},logPurchase:function(){var t=arguments;Promise.resolve().then((function(){return sn})).then((function(e){var i=e.logPurchase;pi.so()?i.apply(void 0,r(Array.prototype.slice.call(t))):y.error(X)}))},unregisterPush:function(){var t=arguments;Promise.resolve().then((function(){return _n})).then((function(e){var i=e.unregisterPush;pi.so()?i.apply(void 0,r(Array.prototype.slice.call(t))):y.error(X)}))},requestPushPermission:s(),changeUser:function(){var t=arguments;Promise.resolve().then((function(){return nn})).then((function(e){var i=e.changeUser;pi.so()?i.apply(void 0,r(Array.prototype.slice.call(t))):y.error(X)}))}},l=function(t){return function(){u[t].apply(u,r(Array.prototype.slice.call(arguments)))}},c=a(P(u));try{for(c.s();!(n=c.n()).done;){var h=n.value;o[h]=l(h)}}catch(T){c.e(T)}finally{c.f()}for(var d=["setFirstName","setLastName","setEmail","setGender","setDateOfBirth","setCountry","setHomeCity","setEmailNotificationSubscriptionType","setLanguage","addAlias","setPushNotificationSubscriptionType","setPhoneNumber","setCustomUserAttribute","addToCustomAttributeArray","removeFromCustomAttributeArray","incrementCustomUserAttribute","setCustomLocationAttribute","addToSubscriptionGroup","removeFromSubscriptionGroup"],f=function(t){return function(){var e=je();e&&e[t].apply(e,r(Array.prototype.slice.call(arguments)))}},p={},b=0;b<d.length;b++)p[d[b]]=f(d[b]);o.getUser=function(){return p};var v,g={showFeed:i},m=function(i){return function(){var n=arguments;t.Cr(e,(function(){g[i].apply(g,r(Array.prototype.slice.call(n)))}))}},k=o.display,w=a(P(g));try{for(w.s();!(v=w.n()).done;){var x=v.value;k[x]=m(x)}}catch(T){w.e(T)}finally{w.f()}var E,S={registerAppboyPushMessages:s()},C=function(t){return function(){S[t].apply(S,r(Array.prototype.slice.call(arguments)))}},A=o.web,_=a(P(S));try{for(_.s();!(E=_.n()).done;){var N=E.value;A[N]=C(N)}}catch(T){_.e(T)}finally{_.f()}return o};function Ve(t,e){var i;if(!pi.X())return!1;if(!(t instanceof be))return y.error("button must be an InAppMessageButton object"),!1;if(!(e instanceof fe))return y.error(j),!1;var n=oi.m().Ji(t,e);if(n.L)for(var a=0;a<n.ge.length;a++)li.rr().fe(Te.Vr,[e.triggerId,null===(i=t.id)||void 0===i?void 0:i.toString()],n.ge[a]);return n.L}var $e={Je:function(t){for(var e=t.querySelectorAll(".ab-close-button, .ab-message-text, .ab-message-button"),i=0;i<e.length;i++)e[i].tabIndex=0;if(e.length>0){var n=e[0],a=e[e.length-1];t.addEventListener("keydown",(function(e){var i=document.activeElement;e.keyCode===he.lo&&(e.shiftKey||i!==a&&i!==t?!e.shiftKey||i!==n&&i!==t||(e.preventDefault(),a.focus()):(e.preventDefault(),n.focus()))}))}},Ke:function(t,e){e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label","Modal Message"),t&&e.setAttribute("aria-labelledby",t)},He:function(t,e,i,n){if(t.buttons&&t.buttons.length>0){var a=document.createElement("div");a.className="ab-message-buttons",i.appendChild(a);var r=i.getElementsByClassName("ab-message-text")[0];null!=r&&(r.className+=" ab-with-buttons");for(var o=function(a){return function(r){return t.Cr(i,(function(){Ve(a,t),a.clickAction===fe.ClickAction.URI?Ge(a.uri||"",n||t.openTarget===fe.OpenTarget.BLANK,r):a.clickAction===fe.ClickAction.NEWS_FEED&&e()})),r.stopPropagation(),!1}},s=0;s<t.buttons.length;s++){var u=t.buttons[s],l=document.createElement("button");l.className="ab-message-button",l.setAttribute("type","button"),re(l,"touchstart");var c=u.text;""===u.text&&(c="\xa0"),l.appendChild(document.createTextNode(c)),t.ve()||(l.style.backgroundColor=Re(u.backgroundColor),l.style.color=Re(u.textColor),l.style.borderColor=Re(u.borderColor)),l.onclick=o(u),a.appendChild(l)}}}};function Ze(t,e,i,n,a,r,o){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:document.body,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"ltr";if(t.ke=document.activeElement,t instanceof pe)return function(t,e,
1i,n,a,r){var o=document.createElement("iframe");o.setAttribute("title","Modal Message"),a&&(o.style.zIndex=(a+1).toString());var s=null;if(null!=r){(s=document.createElement("html")).innerHTML=t.message||"";for(var u=s.getElementsByTagName("style"),l=0;l<u.length;l++)u[l].setAttribute("nonce",r);for(var c=s.getElementsByTagName("script"),h=0;h<c.length;h++){c[h].setAttribute("nonce",r),c[h].innerHTML=c[h].innerHTML.replace(/<style>/g,"<style nonce='".concat(r,"'>"));var d=Je(c[h].innerHTML,r,"script");d&&(c[h].innerHTML=d);var f=Je(c[h].innerHTML,r,"style");f&&(c[h].innerHTML=f)}}if(o.srcdoc=s?s.innerHTML:t.message||"",o.onload=function(){var a=o.contentWindow;a.focus();var s=a.document.getElementsByTagName("head")[0];if(null!=s){if(t.ve()){var u=document.createElement("style");u.innerHTML=t.css||"",u.id=t.we()||"",null!=r&&u.setAttribute("nonce",r),s.appendChild(u)}var l=a.document.createElement("base");null!=l&&(l.setAttribute("target","_parent"),s.appendChild(l))}var c=a.document.getElementsByTagName("title");c&&c.length>0&&o.setAttribute("title",c[0].textContent||"");var h=We(t,o,e);if(a.appboyBridge=h,a.brazeBridge=h,t.xe!==fe.Be.Me){for(var d=a.document.getElementsByTagName("a"),f=0;f<d.length;f++)d[f].onclick=He(t,o,d[f],n);for(var p=a.document.getElementsByTagName("button"),b=0;b<p.length;b++)p[b].onclick=He(t,o,p[b],n)}var v=a.document.body;if(null!=v){t.Ce()&&(v.id=t.htmlId||"");var g=document.createElement("hidden");g.onclick=h.closeMessage,g.className="ab-programmatic-close-button",v.appendChild(g)}a.dispatchEvent(new CustomEvent("ab.BridgeReady")),-1!==o.className.indexOf("ab-start-hidden")&&(o.className=o.className.replace("ab-start-hidden",""),i(o))},o.className="ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions",It.OS===At.io){var p=document.createElement("div");return p.className="ab-ios-scroll-wrapper",p.appendChild(o),t.Re=p,p}return t.Re=o,o}(t,e,i,a,r,o);var l=function(t,e,i,n,a,r){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:document.body,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"ltr",u=null,l=document.createElement("div");l.dir=s,l.className="ab-in-app-message ab-start-hidden ab-background",r&&(l.style.zIndex=(r+1).toString()),t.$e()&&(l.className+=" ab-modal-interactions",l.setAttribute("tabindex","-1")),t.ve()||(l.style.color=Re(t.textColor),l.style.backgroundColor=Re(t.backgroundColor),function(t){return null!=t&&(t=parseInt(t.toString()),!isNaN(t)&&(4278190080&t)>>>24==0)}(t.backgroundColor)&&(l.className+=" ab-no-shadow"));var c=function(){-1!==l.className.indexOf("ab-start-hidden")&&(l.className=l.className.replace("ab-start-hidden",""),document.querySelectorAll(".ab-iam-img-loading").length>0?n("Cannot show in-app message ".concat(t.message," because another message is being shown."),fe.Le.ze):i(l))},h=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=document.querySelectorAll(".ab-iam-root");i&&0!==i.length||(i=o.querySelectorAll(".ab-iam-root")),i&&i.length>0&&(i[0].classList.remove("ab-iam-img-loading"),u&&(clearTimeout(u),u=null),e?c():y.error("Cannot show in-app message ".concat(t.message," because the image failed to load.")))};t.imageStyle===fe.ImageStyle.GRAPHIC&&(l.className+=" graphic"),t.orientation===fe.Orientation.LANDSCAPE&&(l.className+=" landscape"),null!=t.buttons&&0===t.buttons.length&&(t.clickAction!==fe.ClickAction.NONE&&(l.className+=" ab-clickable"),l.onclick=function(i){return t.Cr(l,(function(){Be(t),t.clickAction===fe.ClickAction.URI?Ge(t.uri||"",a||t.openTarget===fe.OpenTarget.BLANK,i):t.clickAction===fe.ClickAction.NEWS_FEED&&e()})),i.stopPropagation(),!1});var d=Me("Close Message",t.ve()?void 0:Re(t.closeButtonColor),(function(){t.Cr(l)}),s);l.appendChild(d),r&&(d.style.zIndex=(r+2).toString());var f=document.createElement("div");f.className="ab-message-text",f.dir=s;var p=(t.messageAlignment||t.qe).toLowerCase();f.className+=" "+p+"-aligned";var b=!1,v=document.createElement("div");if(v.className="ab-image-area",t.imageUrl){if(t.cropType===fe.CropType.CENTER_CROP){var g=document.createElement("span");g.className="ab-center-cropped-img",g.style.backgroundImage="url("+t.imageUrl+")",g.setAttribute("role","img"),g.setAttribute("aria-label","Modal Image"),t.Ae(g),v.appendChild(g)}else{var m=document.createElement("img");if(m.setAttribute("src",t.imageUrl),t.Ae(m),0===document.querySelectorAll(".ab-iam-img-loading").length){b=!0;var k=document.querySelectorAll(".ab-iam-root");k&&k.length>0&&k[0].classList.add("ab-iam-img-loading"),u=window.setTimeout((function(){h(!1)}),6e4),m.onload=function(){h()},m.onerror=function(){h(!1)}}v.appendChild(m)}l.appendChild(v),f.className+=" ab-with-image"}else if(t.icon){v.className+=" ab-icon-area";var w=document.createElement("span");w.className="ab-icon",t.ve()||(w.style.backgroundColor=Re(t.iconBackgroun
1dColor),w.style.color=Re(t.iconColor));var x=document.createElement("i");x.className="fa",x.appendChild(document.createTextNode(t.icon)),x.setAttribute("aria-hidden","true"),w.appendChild(x),v.appendChild(w),l.appendChild(v),f.className+=" ab-with-icon"}if(re(f,"touchstart"),t.header&&t.header.length>0){var E=document.createElement("h1");E.className="ab-message-header",t.De=S.W(),E.id=t.De;var C=(t.headerAlignment||fe.TextAlignment.CENTER).toLowerCase();E.className+=" "+C+"-aligned",t.ve()||(E.style.color=Re(t.headerTextColor)),E.appendChild(document.createTextNode(t.header)),f.appendChild(E)}return f.appendChild(t.Ge()),l.appendChild(f),b||c(),t.Re=l,l}(t,e,i,n,a,r,s,u);if(t instanceof ve||t instanceof ge){var c=t instanceof ve?"ab-fullscreen":"ab-modal";l.className+=" ".concat(c," ab-centered"),$e.He(t,e,l,a),$e.Je(l),$e.Ke(t.De,l)}else if(t instanceof me){l.className+=" ab-slideup";var h,d,f=l.getElementsByClassName("ab-close-button")[0];if(null!=f){var p=ce("0 0 11.38 19.44","M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z",t.ve(
1)?void 0:Re(t.closeButtonColor));p.setAttribute("class","ab-chevron"),f.appendChild(p)}le(l,ne.U,(function(t){l.className+=" ab-swiped-left",null!=f&&null!=f.onclick&&f.onclick(t)})),le(l,ne.V,(function(t){l.className+=" ab-swiped-right",null!=f&&null!=f.onclick&&f.onclick(t)})),t.slideFrom===fe.SlideFrom.TOP?(h=ne.Oe,d=" ab-swiped-up"):(h=ne.Qe,d=" ab-swiped-down"),le(l,h,(function(t){l.className+=d,null!=f&&null!=f.onclick&&f.onclick(t)}))}return l}var Qe={en:{NO_CARDS_MESSAGE:"We have no updates for you at this time.<br/>Please check again later.",FEED_TIMEOUT_MESSAGE:"Sorry, this refresh timed out.<br/>Please try again later."},ar:{NO_CARDS_MESSAGE:"\u0644\u064a\u0633 \u0644\u062f\u064a\u0646\u0627 \u0623\u064a \u062a\u062d\u062f\u064a\u062b. \u064a\u0631\u062c\u0649 \u0627\u0644\u062a\u062d\u0642\u0642 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649 \u0644\u0627\u062d\u0642\u0627\u064b",FEED_TIMEOUT_MESSAGE:"\u064a\u0631\u062c\u0649 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629 \u0644\u0627\u062d\u0642\u0627"},cs:{NO_CARDS_MESSAGE:"V tuto chv\xedli pro v\xe1s nem\xe1me \u017e\xe1dn\xe9 aktualizace.<br/>Zkontrolujte pros\xedm znovu pozd\u011bji.",FEED_TIMEOUT_MESSAGE:"Pros\xedm zkuste to znovu pozd\u011bji."},da:{NO_CARDS_MESSAGE:"Vi har ingen updates.<br/>Pr\xf8v venligst senere.",FEED_TIMEOUT_MESSAGE:"Pr\xf8v venligst senere."},de:{NO_CARDS_MESSAGE:"Derzeit sind keine Updates verf\xfcgbar.<br/>Bitte sp\xe4ter noch einmal versuchen.",FEED_TIMEOUT_MESSAGE:"Bitte sp\xe4ter noch einmal versuchen."},es:{NO_CARDS_MESSAGE:"No tenemos actualizaciones.<br/>Por favor compru\xe9belo m\xe1s tarde.",FEED_TIMEOUT_MESSAGE:"Por favor int\xe9ntelo m\xe1s tarde."},"es-mx":{NO_CARDS_MESSAGE:"No tenemos ninguna actualizaci\xf3n.<br/>Vuelva a verificar m\xe1s tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, vuelva a intentarlo m\xe1s tarde."},et:{NO_CARDS_MESSAGE:"Uuendusi pole praegu saadaval.<br/>Proovige hiljem uuesti.",FEED_TIMEOUT_MESSAGE:"Palun proovige hiljem uuesti."},fi:{NO_CARDS_MESSAGE:"P\xe4ivityksi\xe4 ei ole saatavilla.<br/>Tarkista my\xf6hemmin uudelleen.",FEED_TIMEOUT_MESSAGE:"Yrit\xe4 my\xf6hemmin uudelleen."},fr:{NO_CARDS_MESSAGE:"Aucune mise \xe0 jour disponible.<br/>Veuillez v\xe9rifier ult\xe9rieurement.",FEED_TIMEOUT_MESSAGE:"Veuillez r\xe9essayer ult\xe9rieurement."},he:{NO_CARDS_MESSAGE:".\u05d0\u05d9\u05df \u05dc\u05e0\u05d5 \u05e2\u05d3\u05db\u05d5\u05e0\u05d9\u05dd. \u05d1\u05d1\u05e7\u05e9\u05d4 \u05d1\u05d3\u05d5\u05e7 \u05e9\u05d5\u05d1 \u05d1\u05e7\u05e8\u05d5\u05d1",FEED_TIMEOUT_MESSAGE:".\u05d1\u05d1\u05e7\u05e9\u05d4 \u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1 \u05d1\u05e7\u05e8\u05d5\u05d1"},hi:{NO_CARDS_MESSAGE:"\u0939\u092e\u093e\u0930\u0947 \u092a\u093e\u0938 \u0915\u094b\u0908 \u0905\u092a\u0921\u0947\u091f \u0928\u0939\u0940\u0902 \u0939\u0948\u0902\u0964 \u0915\u0943\u092a\u092f\u093e \u092c\u093e\u0926 \u092e\u0947\u0902 \u092b\u093f\u0930 \u0938\u0947 \u091c\u093e\u0901\u091a \u0915\u0930\u0947\u0902.\u0964",FEED_TIMEOUT_MESSAGE:"\u0915\u0943\u092a\u092f\u093e \u092c\u093e\u0926 \u092e\u0947\u0902 \u0926\u094b\u092c\u093e\u0930\u093e \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947\u0902\u0964."},id:{NO_CARDS_MESSAGE:"Kami tidak memiliki pembaruan. Coba lagi nanti.",FEED_TIMEOUT_MESSAGE:"Coba lagi nanti."},it:{NO_CARDS_MESSAGE:"Non ci sono aggiornamenti.<br/>Ricontrollare pi\xf9 tardi.",FEED_TIMEOUT_MESSAGE:"Riprovare pi\xf9 tardi."},ja:{NO_CARDS_MESSAGE:"\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br/>\u5f8c\u3067\u3082\u3046\u4e00\u5ea6\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",FEED_TIMEOUT_MESSAGE:"\u5f8c\u3067\u3082\u3046\u4e00\u5ea6\u8a66\u3057\u3066\u304f\u3060\u3055\u3044\u3002"},ko:{NO_CARDS_MESSAGE:"\uc5c5\ub370\uc774\ud2b8\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc5d0 \ub2e4\uc2dc \ud655\uc778\ud574 \uc8fc\uc2ed\uc2dc\uc624.",FEED_TIMEOUT_MESSAGE:"\ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc2ed\uc2dc\uc624."},ms:{NO_CARDS_MESSAGE:"Tiada kemas kini. Sila periksa kemudian.",FEED_TIMEOUT_MESSAGE:"Sila cuba kemudian."},nl:{NO_CARDS_MESSAGE:"Er zijn geen updates.<br/>Probeer het later opnieuw.",FEED_TIMEOUT_MESSAGE:"Probeer het later opnieuw."},no:{NO_CARDS_MESSAGE:"Vi har ingen oppdateringer.<br/>Vennligst sjekk igjen senere.",FEED_TIMEOUT_MESSAGE:"Vennligst pr\xf8v igjen senere."},pl:{NO_CARDS_MESSAGE:"Brak aktualizacji.<br/>Prosz\u0119 sprawdzi\u0107 ponownie p\xf3\u017aniej.",FEED_TIMEOUT_MESSAGE:"Prosz\u0119 spr\xf3bowa\u0107 ponownie p\xf3\u017aniej."},pt:{NO_CARDS_MESSAGE:"N\xe3o temos atualiza\xe7\xf5es.<br/>Por favor, verifique mais tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, tente mais tarde."},"pt-br":{NO_CARDS_MESSAGE:"N\xe3o temos nenhuma atualiza\xe7\xe3o.<br/>Verifique novamente mais tarde.",FEED_TIMEOUT_MESSAGE:"Tente novamente mais tarde."},ru:{NO_CARDS_MESSAGE:"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b.<br/>
1\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0437\u0436\u0435.",FEED_TIMEOUT_MESSAGE:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043f\u043e\u0437\u0436\u0435."},sv:{NO_CARDS_MESSAGE:"Det finns inga uppdateringar.<br/>F\xf6rs\xf6k igen senare.",FEED_TIMEOUT_MESSAGE:"F\xf6rs\xf6k igen senare."},th:{NO_CARDS_MESSAGE:"\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e21\u0e35\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e15 \u0e01\u0e23\u0e38\u0e13\u0e32\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e20\u0e32\u0e22\u0e2b\u0e25\u0e31\u0e07.",FEED_TIMEOUT_MESSAGE:"\u0e01\u0e23\u0e38\u0e13\u0e32\u0e25\u0e2d\u0e07\u0e43\u0e2b\u0e21\u0e48\u0e20\u0e32\u0e22\u0e2b\u0e25\u0e31\u0e07."},uk:{NO_CARDS_MESSAGE:"\u041e\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0456.<br/>\u043b\u0430\u0441\u043a\u0430, \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435 \u0437\u043d\u043e\u0432\u0443 \u043f\u0456\u0437\u043d\u0456\u0448\u0435.",FEED_TIMEOUT_MESSAGE:"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0441\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0449\u0435 \u0440\u0430\u0437 \u043f\u0456\u0437\u043d\u0456\u0448\u0435."},vi:{NO_CARDS_MESSAGE:"Ch\xfang t\xf4i kh\xf4ng c\xf3 c\u1eadp nh\u1eadt n\xe0o.<br/>Vui l\xf2ng ki\u1ec3m tra l\u1ea1i sau.",FEED_TIMEOUT_MESSAGE:"Vui l\xf2ng th\u1eed l\u1ea1i sau."},"zh-hk":{NO_CARDS_MESSAGE:"\u66ab\u6642\u6c92\u6709\u66f4\u65b0.<br/>\u8acb\u7a0d\u5019\u518d\u8a66.",FEED_TIMEOUT_MESSAGE:"\u8acb\u7a0d\u5019\u518d\u8a66."},"zh-hans":{NO_CARDS_MESSAGE:"\u6682\u65f6\u6ca1\u6709\u66f4\u65b0.<br/>\u8bf7\u7a0d\u540e\u518d\u8bd5.",FEED_TIMEOUT_MESSAGE:"\u8bf7\u7a0d\u5019\u518d\u8bd5."},"zh-hant":{NO_CARDS_MESSAGE:"\u66ab\u6642\u6c92\u6709\u66f4\u65b0.<br/>\u8acb\u7a0d\u5019\u518d\u8a66.",FEED_TIMEOUT_MESSAGE:"\u8acb\u7a0d\u5019\u518d\u8a66."},"zh-tw":{NO_CARDS_MESSAGE:"\u66ab\u6642\u6c92\u6709\u66f4\u65b0.<br/>\u8acb\u7a0d\u5019\u518d\u8a66.",FEED_TIMEOUT_MESSAGE:"\u8acb\u7a0d\u5019\u518d\u8a66."},zh:{NO_CARDS_MESSAGE:"\u6682\u65f6\u6ca1\u6709\u66f4\u65b0.<br/>\u8bf7\u7a0d\u540e\u518d\u8bd5.",FEED_TIMEOUT_MESSAGE:"\u8bf7\u7a0d\u5019\u518d\u8bd5."}},ti=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(p(this,t),this.language=e,null!=e&&(e=e.toLowerCase()),null!=e&&null==Qe[e]){var n=e.indexOf("-");n>0&&(e=e.substring(0,n))}if(null==Qe[e]){var a="Braze does not yet have a localization for language "+e+", defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.";i?y.error(a):y.info(a),e="en"}this.language=e}return v(t,[{key:"get",value:function(t){return Qe[this.language][t]}},{key:"wo",value:function(){switch(this.language){case"ar":case"he":case"fa":return"rtl";default:return"ltr"}}}]),t}(),ei={t:!1,i:null,m:function(){if(ei.o(),!ei.i){var t=It.language,e=!1;pi.nn(di.zn)&&(t=pi.nn(di.zn),e=!0),ei.i=new ti(t,e)}return ei.i},o:function(){ei.t||(pi.g(ei),ei.t=!0)},destroy:function(){ei.i=null,ei.t=!1}};function ii(t,e,i){if(pi.X()){if(Ue(),null==t)return!1;if(t instanceof ee)return y.info("User received control for a multivariate test, logging to Braze servers."),Le(t),!0;if(!(t instanceof fe))return!1;if(t.constructor===fe)return!1;t.Nh();var n=t instanceof pe;if(n&&!t.trusted&&!pi.tr())return y.error('HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.'),!1;if(null==e&&(e=document.body),t.$e()&&e.querySelectorAll(".ab-modal-interactions").length>0)return y.info("Cannot show in-app message ".concat(t.message," because another message is being shown.")),!1;if(qe.fo()){var a=qe.co();if(a===Fe.PORTRAIT&&t.orientation===fe.Orientation.LANDSCAPE||a===Fe.LANDSCAPE&&t.orientation===fe.Orientation.PORTRAIT){var r=a===Fe.PORTRAIT?"portrait":"landscape",o=t.orientation===fe.Orientation.PORTRAIT?"portrait":"landscape";return y.info("Not showing ".concat(o," in-app message ").concat(t.message," because the screen is currently ").concat(r)),!1}}if(!pi.tr()){var s=!1;if(t.buttons&&t.buttons.length>0)for(var u=t.buttons,l=0;l<u.length;l++){if(u[l].clickAction===fe.ClickAction.URI)s=Xe(u[l].uri)}else t.clickAction===fe.ClickAction.URI&&(s=Xe(t.uri));if(s)return y.error('Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.'),!1}var c=document.createElement("div");if(c.className="ab-iam-root v3",c.className+=function(t){var e="";return t.animateIn&&(e+=" ab-animate-in"),t.animateOut&&(e+=" ab-animate-out"),t instanceof ve?e+=" ab-effect-fullscreen":t instanceof pe?e+=" ab-effect-html":t instanceof ge?e+=" ab-effect-modal":t instanceof me&&(e+=" ab-effect-slide"),e}(t),c.setAttribute("role","complementary"),t.Ce()&&(c.id=t.htmlId),pi.nn(di.jo)&&(c.style.zIndex=(pi.nn(di.jo)+1).toString()),e.appendChild(c),t.ve()){var h=document.createElement("style");h.innerHTML=t.css,h.id=t.we(),null!=pi.nn(di.bo)&&h.setAttribute("nonce",pi.nn(di.bo)),document.getElementsByTagName("head")[0].appendChild(h)}var d=t instanceof me,f=Ze(t,(function(){Promise.resolve().then((function(){return mn})).then((function(t){pi.so()?t.showFeed():y.error(X)}))}),(function(e){if(t.$e()&&t.do()){var a=document.createElement("div");
1if(a.className="ab-page-blocker",t.ve()||(a.style.backgroundColor=Re(t.frameColor)),pi.nn(di.jo)&&(a.style.zIndex=pi.nn(di.jo).toString()),c.appendChild(a),!pi.nn(di.Lh)){var r=(new Date).valueOf();a.onclick=function(i){(new Date).valueOf()-r>fe.fh&&(t.Cr(e),i.stopPropagation())}}c.appendChild(e),e.focus(),t.Oh(c)}else if(d){for(var o=document.querySelectorAll(".ab-slideup"),s=null,u=o.length-1;u>=0;u--)if(o[u]!==e){s=o[u];break}if(t.slideFrom===fe.SlideFrom.TOP){var l=0;null!=s&&(l=s.offsetTop+s.offsetHeight),e.style.top=Math.max(l,0)+"px"}else{var h=0;null!=s&&(h=(window.innerHeight||document.documentElement.clientHeight)-s.offsetTop),e.style.bottom=Math.max(h,0)+"px"}}else if(n&&!pi.nn(di.Lh)){var f=t;de(e)&&e.contentWindow&&e.contentWindow.addEventListener("keydown",(function(t){t.keyCode===he.mh&&f.closeMessage()}))}Le(t),t.dismissType===fe.DismissType.AUTO_DISMISS&&setTimeout((function(){c.contains(e)&&t.Cr(e)}),t.duration),"function"==typeof i&&i()}),(function(t){y.info(t)}),pi.nn(di.ho),pi.nn(di.jo),pi.nn(di.bo),e,ei.m().wo());return(n||d)&&(c.appendChild(f),t.Oh(c)),!0}}function ni(t){if(pi.X())return"function"!=typeof t?null:oi.m().Mi((function(e){return t(e[0]),e.slice(1)}))}var ai=function(){function t(e,i,n,a){p(this,t),this.$t=e,this.oi=i,this.u=n,this.yt=a,this.$t=e,this.oi=i,this.u=n,this.yt=a,this._e=new Y,pi.Ht(this._e),this.Xe=1e3,this.We=6e4,this.Ye=null}return v(t,[{key:"Ze",value:function(){return this._e}},{key:"Mi",value:function(t){return this._e.Nt(t)}},{key:"_i",value:function(){return this.Ye}},{key:"Pi",value:function(t){this.Ye=t}},{key:"q",value:function(t,e,i,n){var a,r=new Ht;if(t instanceof ee)a={trigger_ids:[t.triggerId]};else{if(e===w.$i||t instanceof pe&&e===w.Oi){if(!t.p(n))return y.info("This in-app message has already received a click. Ignoring analytics event."),r}else if(e===w.Xi&&!t.K())return y.info("This in-app message has already received an impression. Ignoring analytics event."),r;a=this.Hi(t)}return null==a?r:(t.messageExtras&&(a.message_extras=t.messageExtras),null!=i&&(a.bid=i),vi.q(e,a))}},{key:"Ji",value:function(t,e){var i=new Ht;if(!t.p())return y.info("This in-app message button has already received a click. Ignoring analytics event."),i;var n=this.Hi(e);return null==n?i:t.id===be.Ki?(y.info("This in-app message button does not have a tracking id. Not logging event to Braze servers."),i):(null!=t.id&&(n.bid=t.id),vi.q(w.Oi,n))}},{key:"Li",value:function(t){var e=t.messageFields;return null!=e&&e.is_push_primer||!1}},{key:"Qi",value:function(t){if(t instanceof fe){var e=function(t){if(t){var e=ot(t);return ut(e)?rt(at.Vi,"In-App Message"):lt(e)&&!Wt.Wi()?rt(at.Yi,"In-App Message"):void 0}};if(this.Li(t)&&!Wt.Wi())return"In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.";var i,n,r=a(t.buttons||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.clickAction===fe.ClickAction.URI&&o.uri&&pt.test(o.uri)&&(i=e(o.uri)))return i}}catch(s){r.e(s)}finally{r.f()}return t.clickAction===fe.ClickAction.URI&&t.uri&&pt.test(t.uri)?e(t.uri):void 0}}},{key:"Zi",value:function(t,e,i,n){var a=this,r=this.$t;if(r){var o=r.Ir(!1,!1),s=r.$s(o);s.template={trigger_id:t.triggerId,trigger_event_type:e},null!=i&&(s.template.data=i.Mr());var u=r.Ps(s,Gt._s.Tr);r.Gs(s,(function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(a.$t){var o=(new Date).valueOf();Gt.Hs(a.u,Gt._s.Tr,o),-1!==r&&u.push(["X-Braze-Req-Tokens-Remaining",r.toString()]),Xt({url:"".concat(a.$t.Os(),"/template/"),data:s,headers:u,L:function(e){if(Gt.Ws(a.u,Gt._s.Tr,1),a.$t.Qs(s,e,u)){if(a.$t.Vs(),null!=e&&null!=e.templated_message){var i=e.templated_message;if(i.type===Oe.Er._r){var n=ye(i.data);if(null!=n){var r=a.Qi(n);if(r)return y.error(r),void("function"==typeof t.Br&&t.Br());"function"==typeof t.Gr&&t.Gr(n)}}}}else"function"==typeof t.Br&&t.Br()},error:function(r){var o="getting user personalization for message ".concat(t.triggerId);if((new Date).valueOf()-t.Nr<t.Or){Gt.ti(a.u,Gt._s.Tr);var s=Math.min(t.Or,a.We),u=a.Xe;null==n&&(n=u);var l=Math.min(s,Yt(u,3*n));o+=". Retrying in ".concat(l," ms"),setTimeout((function(){a.Zi(t,e,i,l)}),l)}a.$t.Ys(r,o)}})}}),Gt._s.Tr)}}},{key:"Hi",value:function(t){if(null==t.triggerId)return y.info("The in-app message has no analytics id. Not logging event to Braze servers."),null;var e={};return null!=t.triggerId&&(e.trigger_ids=[t.triggerId]),e}},{key:"je",value:function(t){return!!this.u&&!(!(t&&t instanceof fe&&t.constructor!==fe)||t instanceof ee)&&this.u.I(Ot.C.Xr,t.Y())}},{key:"Se",value:function(){if(!this.u)return null;var t,e=this.u.j(Ot.C.Xr);if(!e)return null;switch(e.type){case fe.Be.Hr:t=ve.Jr(e);break;case fe.Be.Kr:case fe.Be.Me:case fe.Be.Ve:t=pe.Jr(e);break;case fe.Be.Lr:case fe.Be.Ue:t=ge.Jr(e);break;case fe.Be.Qr:t=me.Jr(e)}return t&&this.Ur(),t}},{key:"Ur",value:function(){this.u&&this.u.ii(Ot.C.Xr)}}]),t}(),ri={i:null,t:!1,m:function(){return ri.o(),ri.i||(ri.i=new ai(pi.nr(),pi.zr(),pi.l(),pi.er())),ri.i},o:function(){ri.t||(pi.g(ri),ri.t=!0)},destroy:function(){ri.i=null,ri.t=!1}},oi=ri,si=function(){function t(e,i,n,a,r){p(this,t),this.triggerId=e,this.Gr=i,this.Br=n,this.Nr=a,this.Or=r,this.triggerId=e,this.Gr=i,this.Br=n,this.Nr=a,this.Or=r}return v(t,null,[{key:"fromJson",value:function(e,i,n,a,r){return null==e||null==e.trigger_id?null:new t(e.trigger_id,i,n,a,r)}}]),t}(),ui=function(t){u(i,t);var e=c(i);function i(t,n,a,r,o){var s;return p(this,i),(s=e.call(this)).tg=t,s.Bt=n,s.u=a,s.Ui=r,s.ig=o,s.tg=t,s.Bt=n,s.u=a,s.Ui=r,s.ig=o,s.sg=[],s.eg=[],s.hg=null,s.ng={},s.og={},s.triggers=[],s.lg=0,s.ag(),s.gg(),s}return v(i,[{key:"fg",value:function(){if(this.u){this.hg=this.u.j(Ot.C.iE)||this.hg,this.ng=this.u.j(Ot.C.EE)||this.ng,this.og=this.u.j(Ot.C.aE)||this.og;for(var t=0;t<this.triggers.length;t++){var e=this.triggers[t];e.id&&null!=this.og[e.id]&&e.ad(this.og[e.id])}}}},{key:"ag",value:function(){if(this.u){this.lg=this.u.j(Ot.C.oE)||0;for(var t=this.u.j(Ot.C.rE)||[],e=[],i=0;i<t.length;i++)e.push(Oe.qn(t[i]));this.triggers=e,this.fg()}}},{key:"gg",value:function(){var t,e=this,i=function(t,i,n,a,r){return function(){e.cg(t,i,n,a,r)}},n={},r=a(this.triggers);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.id&&(n[o.id]=o)}}catch(k){r.e(k)}finally{r.f()}for(var s=!1,u=0;u<this.triggers.length;u++){var l=this.triggers[u];if(l.id&&null!=this.ng[l.id]){for(var c=this.ng[l.id],h=[],d=0;d<c.length;d++){var f=c[d],p=l.ud(f.Nr||0);if(p>0){var b=void 0,v=void 0;h.push(f),null!=f.ug&&(b=f.ug),null!=f.dg&&Q.RE(f.dg)&&(v=Q.qn(f.dg));var g=[];if(f.pg&&T(f.pg))for(var m=0;m<f.pg.length;m++){var y=n[f.pg[m]];null!=y&&g.push(y)}this.eg.push(window.setTimeout(i(l,f.Nr||0,b,v,g),p))}}this.ng[l.id].length>h.length&&(this.ng[l.id]=h,s=!0,0===this.ng[l.id].length&&delete this.ng[l.id])}}s&&this.u&&this.u.I(Ot.C.EE,this.ng)}},{key:"mg",value:function(){if(this.u){for(var t=[],e=0;e<this.triggers.length;e++)t.push(this.triggers[e].Y());this.lg=(new Date).valueOf(),this.u.I(Ot.C.rE,t),this.u.I(Ot.C.oE,this.lg)}}},{key:"bg",value:function(){this.u&&((this.u.j(Ot.C.oE)||0)>this.lg?this.ag():this.fg())}},{key:"Ss",value:function(t){var e=!1;if(null!=t&&t.triggers){this.ig.Ur(),this.fg();var i={},n={};this.triggers=[];for(var a=0;a<t.triggers.length;a++){var o=Oe.fromJson(t.triggers[a]);if(o){o.id&&null!=this.og[o.id]&&(o.ad(this.og[o.id]),i[o.id]=this.og[o.id]),o.id&&null!=this.ng[o.id]&&(n[o.id]=this.ng[o.id]);for(var s=0;s<o.sd.length;s++)if(o.sd[s].sc(Te.kt,null)){e=!0;break}this.triggers.push(o)}}z(this.og,i)||(this.og=i,this.u&&this.u.I(Ot.C.aE,this.og)),z(this.ng,n)||(this.ng=n,this.u&&this.u.I(Ot.C.EE,this.ng)),this.mg(),e&&(y.info("Trigger with test c
1ondition found, firing test."),this.fe(Te.kt)),this.fe(Te.OPEN);var u,l=this.sg;this.sg=[];for(var c=0;c<l.length;c++)u=Array.prototype.slice.call(l[c]),this.fe.apply(this,r(u))}}},{key:"cg",value:function(t,e,i,n,a){var r,o,s,u=this,l=function(n){u.fg();var a=(new Date).valueOf();t.dd(e)||(!1===navigator.onLine&&t.type===Oe.Er._r&&n.imageUrl?y.info("Not showing ".concat(t.type," trigger action ").concat(t.id," due to offline state.")):t.nd(a)&&u.wg(t,a,i)?0===u.Bt.ic()?y.info("Not displaying trigger ".concat(t.id," because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.")):(u.Bt.Rt([n]),u.yg(t,a)):y.info("Not displaying trigger ".concat(t.id," because display time fell outside of the acceptable time window.")))},c=function r(){u.fg();var o=a.pop();if(null!=o)if(u.Tg(o,e,i,n,a),o.dd(e)){var s="Server aborted in-app message display, but the timeout on fallback trigger ".concat(o.id," has already elapsed.");a.length>0&&(s+=" Continuing to fall back."),y.info(s),r()}else{y.info("Server aborted in-app message display. Falling back to lower priority ".concat(o.type," trigger action ").concat(t.id,"."));var l=1e3*o.ed-((new Date).valueOf()-e);l>0?u.eg.push(window.setTimeout((function(){u.cg(o,e,i,n,a)}),l)):u.cg(o,e,i,n,a)}};switch(t.type){case Oe.Er._r:if(null==(r=ye(t.data))){y.error("Could not parse trigger data for trigger ".concat(t.id,", ignoring."));break}if(o=this.ig.Qi(r)){y.error(o),c();break}l(r);break;case Oe.Er.md:if(null==(s=si.fromJson(t.data,l,c,e,t.Or||0))){y.error("Could not parse trigger data for trigger ".concat(t.id,", ignoring."));break}this.ig.Zi(s,i,n);break;default:y.error("Trigger ".concat(t.id," was of unexpected type ").concat(t.type,", ignoring."))}}},{key:"fe",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;if(N(Te,t,"Cannot fire trigger action.","TriggerEvents")){if(this.Ui&&this.Ui.Uu())return y.info("Trigger sync is currently in progress, awaiting sync completion before firing trigger event."),void this.sg.push(arguments);this.bg();for(var a=(new Date).valueOf(),r=a-(this.hg||0),o=!0,s=!0,u=[],l=0;l<this.triggers.length;l++){var c=this.triggers[l],h=a+1e3*c.ed;if(c.nd(h)&&(null==c.startTime||c.startTime.valueOf()<=a)&&(null==c.endTime||c.endTime.valueOf()>=a)){for(var d=!1,f=0;f<c.sd.length;f++)if(c.sd[f].sc(t,i)){d=!0;break}d&&(o=!1,this.wg(c,h,t)&&(s=!1,u.push(c)))}}if(o)y.info("Trigger event ".concat(t," did not match any trigger conditions."));else if(s)y.info("Ignoring ".concat(t," trigger event because a trigger was displayed ").concat(r/1e3,"s ago."));else{u.sort((function(t,e){return t.priority-e.priority}));var p=u.pop();null!=p&&(y.info("Firing ".concat(p.type," trigger action ").concat(p.id," from trigger event ").concat(t,".")),this.Tg(p,a,t,n,u),0===p.ed?this.cg(p,a,t,n,u):this.eg.push(window.setTimeout((function(){e.cg(p,a,t,n,u)}),1e3*p.ed)))}}}},{key:"changeUser",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.triggers=[],this.u&&this.u.ii(Ot.C.rE),!t){this.sg=[],this.hg=null,this.og={},this.ng={};for(var e=0;e<this.eg.length;e++)clearTimeout(this.eg[e]);this.eg=[],this.u&&(this.u.ii(Ot.C.iE),this.u.ii(Ot.C.aE),this.u.ii(Ot.C.EE))}}},{key:"clearData",value:function(){this.triggers=[],this.hg=null,this.og={},this.ng={};for(var t=0;t<this.eg.length;t++)clearTimeout(this.eg[t]);this.eg=[]}},{key:"wg",value:function(t,e,i){if(null==this.hg)return!0;if(i===Te.kt)return y.info("Ignoring minimum interval between trigger because it is a test type."),!0;var n=t.hd;return null==n&&(n=this.tg),e-this.hg>=1e3*n}},{key:"Tg",value:function(t,e,i,n,r){this.fg(),t.id&&(this.ng[t.id]=this.ng[t.id]||[]);var o,s={};s.Nr=e,s.ug=i,null!=n&&(o=n.Y()),s.dg=o;var u,l=[],c=a(r);try{for(c.s();!(u=c.n()).done;){var h=u.value;h.id&&l.push(h.id)}}catch(d){c.e(d)}finally{c.f()}s.pg=l,t.id&&this.ng[t.id].push(s),this.u&&this.u.I(Ot.C.EE,this.ng)}},{key:"yg",value:function(t,e){this.fg(),t.ad(e),this.hg=e,t.id&&(this.og[t.id]=e),this.u&&(this.u.I(Ot.C.iE,e),this.u.I(Ot.C.aE,this.og))}}]),i}(zt),li={t:!1,provider:null,rr:function(){return li.o(),li.provider||li.rg(),li.provider},rg:function(){if(!li.provider){var t=pi.nn(di.Oo);li.provider=new ui(null!=t?t:30,oi.m().Ze(),pi.l(),pi.cr(),oi.m()),pi.ar(li.provider)}},o:function(){li.t||(li.rg(),pi.g(li),li.t=!0)},destroy:function(){li.provider=null,li.t=!1}},ci=function(){function t(e,i,n,a,r){p(this,t),this.endpoint=e,this.Vn=i,this.publicKey=n,this.Vl=a,this.cl=r,this.endpoint=e||null,this.Vn=i||null,this.publicKey=n||null,this.Vl=a||null,this.cl=r||null}return v(t,[{key:"Y",value:function(){return{e:this.endpoint,c:this.Vn,p:this.publicKey,u:this.Vl,v:this.cl}}}],[{key:"qn",value:function(e){return new t(e.e,B(e.c),e.p,e.u,e.v)}}]),t}(),hi=function(){function t(e,i){p(this,t),this.qt=e,this.u=i,this.qt=e,this.u=i}return v(t,[{key:"getUserId",value:function(){var t=this.u.tu(Ot.iu.su);if(null==t)return null;var e=t.eu,i=it(e);if(i>Et.lr){for(;i>Et.lr;)i=it(e=e.slice(0,e.length-1));t.eu=e,this.u.uu(Ot.iu.su,t)}return e}},{key:"ou",value:function(t){var e=null==this.getUserId();this.u.uu(Ot.iu.su,new et(t)),e&&this.u.ru(t)}},{key:"setCustomUserAttribute",value:function(t,e){if(this.qt.hu(t))return y.info('Custom Attribute "'+t+'" is blocklisted, ignoring.'),!1;var i={};return i[t]=e,this.nu(Et.lu,i,!0)}},{key:"nu",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=this.u.mu(this.getUserId(),t,e),r="",o=t,s=e;return i&&(r=" custom","object"==f(e)&&("object"==f(s=e[o=Object.keys(e)[0]])&&(s=JSON.stringify(s,null,2)))),!n&&a&&y.info("Logged".concat(r," attribute ").
1concat(o," with value ").concat(s)),a}},{key:"Pn",value:function(t,e,i,n,a){this.nu("push_token",t,!1,!0),this.nu("custom_push_public_key",i,!1,!0),this.nu("custom_push_user_auth",n,!1,!0),this.nu("custom_push_vapid_public_key",a,!1,!0);var r=C.ts.Zt,o=new C(r,y),s=new ci(t,e,i,n,a);this.u.I(Ot.C.In,s.Y()),o.setItem(r.hs.cu,r.ie,!0)}},{key:"Sn",value:function(t){if(this.nu("push_token",null,!1,!0),this.nu("custom_push_public_key",null,!1,!0),this.nu("custom_push_user_auth",null,!1,!0),this.nu("custom_push_vapid_public_key",null,!1,!0),t){var e=C.ts.Zt,i=new C(e,y);this.u.I(Ot.C.In,!1),i.setItem(e.hs.cu,e.ie,!1)}}}]),t}(),di={Eo:"allowCrawlerActivity",_o:"baseUrl",Io:"noCookies",So:"devicePropertyAllowlist",Aa:"disablePushTokenMaintenance",Ao:"enableLogging",No:"enableSdkAuthentication",qa:"manageServiceWorkerExternally",Oo:"minimumIntervalBetweenTriggerActionsInSeconds",Ro:"sessionTimeoutInSeconds",Po:"appVersion",Lo:"appVersionNumber",Ma:"serviceWorkerLocation",ka:"safariWebsitePushId",zn:"localization",bo:"contentSecurityNonce",Do:"allowUserSuppliedJavascript",jo:"inAppMessageZIndex",ho:"openInAppMessagesInNewTab",tn:"openCardsInNewTab",en:"openNewsFeedCardsInNewTab",Lh:"requireExplicitInAppMessageDismissal",Mo:"doNotLoadFontAwesome",Uo:"deviceId",_a:"serviceWorkerScope",Wo:"sdkFlavor"},fi=function(){function t(){p(this,t),this.rn="",this.Bo="",this.Vo=void 0,this.Ko=null,this.on=null,this.$t=null,this.Ui=null,this.qt=null,this.oi=null,this.u=null,this.yt=null,this.Go="",this.isInitialized=!1,this.$o=!1,this.qo=new Y,this.Jo=new Y,this.options={},this.Yo=[],this.Ho=[],this._e=[],this.Bo="5.5.0"}return v(t,[{key:"Xo",value:function(t){this.qo.Nt(t)}},{key:"Sh",value:function(t){this.Jo.Nt(t)}},{key:"initialize",value:function(t,e){var i=this;if(this.so())return y.info("Braze has already been initialized with an API key."),!0;this.options=e||{};var n=this.nn(di.Ao),r=Ke(qe.Zo());if(r&&"true"===r.brazeLogging&&(n=!0),y.init(n),y.info("Initialization Options: ".concat(JSON.stringify(this.options,null,2))),null==t||""===t||"string"!=typeof t)return y.error("Braze requires a valid API key to be initialized."),!1;this.rn=t;var o=this.nn(di._o);if(null==o||""===o||"string"!=typeof o)return y.error("Braze requires a valid baseUrl to be initialized."),!1;!1===/^https?:/.test(o)&&(o="https://".concat(o));var s=o;if((o=document.createElement("a")).href=s,"/"===o.pathname&&(o="".concat(o,"api/v3")),this.Go=o.toString(),It.Qo&&!this.nn(di.Eo))return y.info("Ignoring activity from crawler bot "+navigator.userAgent),this.$o=!0,!1;var u=this.nn(di.Io)||!1;if(this.u=te.Wh(t,u),u&&this.u.Vh(t),new Dt.ee(null,!0).br(Ot.se))return y.info("Ignoring all activity due to previous opt out"),this.$o=!0,!1;var l,c=a(P(this.options));try{for(c.s();!(l=c.n()).done;){var h=l.value;-1===_(A).indexOf(h)&&y.warn("Ignoring unknown initialization option '".concat(h,"'."))}}catch(k){c.e(k)}finally{c.f()}if(null!=this.nn(di.Wo)){var d=this.nn(di.Wo);-1!==["mparticle","wordpress","tealium"].indexOf(d)?this.Vo=d:y.error("Invalid sdk flavor passed: "+d)}var f=this.nn(A.So);if(null!=f)if(T(f)){for(var p=[],b=0;b<f.length;b++)N(Mt,f[b],"devicePropertyAllowlist contained an invalid value.","DeviceProperties")&&p.push(f[b]);f=p}else y.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),f=null;var v=this.nn(di.Uo);if(v){var g=new et(v);this.u.uu(Ot.iu.Uo,g)}this.on=new Rt(this.u,f),this.qt=new Zt(this.u),this.yt=new hi(this.qt,this.u),this.oi=new Qt(this.u,this.yt,this.qt,this.nn(di.Ro));var m=new Y;return this.Ko=new Pt(this.u,this.nn(di.No),m),this.Ht(m),this.$t=new Kt(this.on,this.u,this.Ko,this.yt,this.oi,this.qt,this.rn,this.Go,this.Bo,this.Vo||"",this.nn(di.Po),this.nn(di.Lo)),this.Ui=new Vt(this.rn,this.Go,this.oi,this.on,this.yt,this.qt,this.u,(function(t){if(i.so()){var e,n=a(i.gr());try{for(n.s();!(e=n.n()).done;){e.value.Ss(t)}}catch(k){n.e(k)}finally{n.f()}}}),this.Ko,this.$t),this.Ui.initialize(),u||this.u.Kh(),y.info('Initialized for the Braze backend at "'.concat(this.nn(di._o),'" with API key "').concat(this.rn,'".')),li.o(),this.qt.bi((function(){var t;i.isInitialized&&(null===(t=i.qt)||void 0===t?void 0:t.mi())&&Promise.resolve().then((function(){return Mn})).then((function(t){i.isInitialized&&(0,t.default)()}))})),this.Ui.mr((function(){var t;i.isInitialized&&(null===(t=i.qt)||void 0===t?void 0:t.mi())&&Promise.resolve().then((function(){return Mn})).then((function(t){i.isInitialized&&(0,t.default)(void 0,void 0,!0)}))})),this.qo.Rt(this.options),this.isInitialized=!0,window.dispatchEvent(new CustomEvent("braze.initialized")),!0}},{key:"destroy",value:function(t){if(y.destroy(),this.so()){this.Jo.Rt(),this.Jo.removeAllSubscriptions();var e,i=a(this.Yo);try{for(i.s();!(e=i.n()).done;){e.value.destroy()}}catch(o){i.e(o)}finally{i.f()}this.Yo=[];var n,r=a(this.Ho);try{for(r.s();!(n=r.n()).done;){n.value.clearData(!1)}}catch(o){r.e(o)}finally{r.f()}this.Ho=[],this.removeAllSubscriptions(),this._e=[],null!=this.Ui&&this.Ui.destroy(),this.Ui=null,this.Ko=null,this.on=null,this.$t
1=null,this.qt=null,this.oi=null,this.yt=null,this.options={},this.Vo=void 0,this.isInitialized=!1,this.$o=!1,t&&(this.u=null)}}},{key:"X",value:function(){return!(this.$h()||!this.so()&&(console.warn(X),1))}},{key:"ba",value:function(){return this.rn}},{key:"Sr",value:function(){return this.Ko}},{key:"Os",value:function(){return this.Go}},{key:"te",value:function(){return this.on}},{key:"nr",value:function(){return this.$t}},{key:"nn",value:function(t){return this.options[t]}},{key:"gr",value:function(){return this.Ho}},{key:"cr",value:function(){return this.Ui}},{key:"ir",value:function(){return this.qt}},{key:"zr",value:function(){return this.oi}},{key:"l",value:function(){return this.u}},{key:"pr",value:function(){if(this.yt&&this.Ui)return new Et(this.yt,this.Ui)}},{key:"er",value:function(){return this.yt}},{key:"tr",value:function(){return!0===this.nn(di.Do)}},{key:"g",value:function(t){var e,i=!1,n=a(this.Yo);try{for(n.s();!(e=n.n()).done;){e.value===t&&(i=!0)}}catch(r){n.e(r)}finally{n.f()}i||this.Yo.push(t)}},{key:"ar",value:function(t){var e,i=!1,n=a(this.Ho);try{for(n.s();!(e=n.n()).done;){e.value.constructor===t.constructor&&(i=!0)}}catch(r){n.e(r)}finally{n.f()}t instanceof zt&&!i&&this.Ho.push(t)}},{key:"Ht",value:function(t){t instanceof Y&&this._e.push(t)}},{key:"removeAllSubscriptions",value:function(){if(this.X()){var t,e=a(this._e);try{for(e.s();!(t=e.n()).done;){t.value.removeAllSubscriptions()}}catch(i){e.e(i)}finally{e.f()}}}},{key:"removeSubscription",value:function(t){if(this.X()){var e,i=a(this._e);try{for(i.s();!(e=i.n()).done;){e.value.removeSubscription(t)}}catch(n){i.e(n)}finally{i.f()}}}},{key:"oe",value:function(t){this.$o=t}},{key:"so",value:function(){return this.isInitialized}},{key:"$h",value:function(){return this.$o}},{key:"ks",value:function(){return this.Bo}}]),t}(),pi=new fi,bi={q:function(t,e,i){var n,a,r=new Ht,o=pi.zr();if(!o)return y.info('Not logging event with type "'.concat(t,'" because the current session ID could not be found.')),r;var s=o.xo();return r.ge.push(new Q(i||(null===(n=pi.er())||void 0===n?void 0:n.getUserId()),t,(new Date).valueOf(),s,e)),r.L=(null===(a=pi.l())||void 0===a?void 0:a.zo(r.ge))||!1,r}},vi=bi,gi=function(){function t(e){p(this,t),this.u=e,this.u=e}return v(t,[{key:"h",value:function(t,e){var i=new Ht;if(t.p(),null==t.url||""===t.url)return y.info("Card ".concat(t.id," has no url. Not logging click to Braze servers.")),i;if(e&&t.id&&this.u){var n=this.u.j(Ot.C.v)||{};n[t.id]=!0,this.u.I(Ot.C.v,n)}var a=this.$([t]);if(null==a)return i;var r=e?w.k:w.D;return vi.q(r,a)}},{key:"B",value:function(t){var e=new Ht;if(!t.N())return y.info("Card ".concat(t.id," refused this dismissal. Ignoring analytics event.")),e;if(t.id&&this.u){var i=this.u.j(Ot.C.A)||{};i[t.id]=!0,this.u.I(Ot.C.A,i)}var n=this.$([t]);return null==n?e:vi.q(w.F,n)}},{key:"G",value:function(t,e){var i=new Ht(!0),n=[],r=[],o={};this.u&&(o=e?this.u.j(Ot.C.H)||{}:this.u.j(Ot.C.J)||{});var s,u=a(t);try{for(u.s();!(s=u.n()).done;){var l=s.value;l.K()?(l instanceof $?r.push(l):n.push(l),l.id&&(o[l.id]=!0)):y.info("Card ".concat(l.id," logged an impression too recently. Ignoring analytics event."))}}catch(b){u.e(b)}finally{u.f()}var c=this.$(n),h=this.$(r);if(null==c&&null==h)return i.L=!1,i;if(this.u&&(e?this.u.I(Ot.C.H,o):this.u.I(Ot.C.J,o)),null!=c){var d=e?w.M:w.O,f=vi.q(d,c);i.P(f)}if(null!=h&&e){var p=vi.q(w.R,h);i.P(p)}return i}},{key:"$",value:function(t){for(var e,i=null,n=0;n<t.length;n++)null!=(e=t[n].id)&&""!==e&&((i=i||{}).ids=i.ids||[],i.ids.push(e));return i}}]),t}(),mi={t:!1,i:null,m:function(){return mi.o(),mi.i||(mi.i=new gi(pi.l())),mi.i},o:function(){mi.t||(pi.g(mi),mi.t=!0)},destroy:function(){mi.i=null,mi.t=!1}},yi=mi;function ki(t,e){return!!pi.X()&&(t instanceof H?yi.m().h(t,e).L:(y.error("card "+G),!1))}function wi(t){return!!pi.X()&&(t instanceof H?yi.m().B(t).L:(y.error("card "+G),!1))}function xi(t,e){if(!pi.X())return!1;if(!T(t))return y.error("cards must be an array"),!1;var i,n=a(t);try{for(n.s();!(i=n.n()).done;){if(!(i.value instanceof H))return y.error("Each card in cards ".concat(G)),!1}}catch(r){n.e(r)}finally{n.f()}return yi.m().G(t,e).L}var Ei=function(){function t(e,i){p(this,t),this.cards=e,this.lastUpdated=i,this.cards=e,this.lastUpdated=i}return v(t,[{key:"getUnreadCardCount",value:function(){var t,e=0,i=a(this.cards);try{for(i.s();!(t=i.n()).done;){var n=t.value;
1n.viewed||n instanceof $||e++}}catch(r){i.e(r)}finally{i.f()}return e}},{key:"dr",value:function(){y.error("Must be implemented in a subclass")}},{key:"logCardImpressions",value:function(t){y.error("Must be implemented in a subclass")}},{key:"logCardClick",value:function(t){y.error("Must be implemented in a subclass")}},{key:"sr",value:function(){y.error("Must be implemented in a subclass")}}]),t}();function Si(t,e,i,n,a,r,o,s,u,l,c,h,d,f,p,b,v,g){var m;if(e===H.it.Pt||e===H.it.Ut)m=new V(t,i,n,a,r,o,s,u,l,c,h,d,f,p,b,v);else if(e===H.it.st)m=new W(t,i,n,a,r,o,s,u,l,c,h,d,f,p,b,v);else if(e===H.it.Gt)m=new J(t,i,a,o,s,u,l,c,h,d,f,p,b,v);else{if(e!==H.it.Xt)return y.error("Ignoring card with unknown type "+e),null;m=new $(t,i,s,l,f,p)}return g&&(m.test=g),m}function Ci(t){if(t[H._t.Ot])return null;var e=t[H._t.ht],i=t[H._t.Z],n=t[H._t.et],a=t[H._t.rt],r=t[H._t.ot],o=t[H._t.ct],s=R(t[H._t.nt]);return Si(e,i,n,a,r,o,s,s,null,t[H._t.lt]===H.Mt?null:R(t[H._t.lt]),t[H._t.URL],t[H._t.ft],t[H._t.xt],t[H._t.bt],t[H._t.gt],t[H._t.jt],t[H._t.zt],t[H._t.kt]||!1)}function Ai(t){return Si(t.id,t.type,t.viewed,t.title,t.image,t.description,R(t.created),R(t.updated),t.categories,R(t.expires_at),t.url,t.domain,t.aspect_ratio,t.extras,!1,
1!1)}function _i(t){return Si(t[H.tt.ht],t[H.tt.Z],t[H.tt.et],t[H.tt.rt],t[H.tt.ot],t[H.tt.ct],B(t[H.tt.dt]),B(t[H.tt.nt]),t[H.tt.ut],B(t[H.tt.lt]),t[H.tt.URL],t[H.tt.ft],t[H.tt.xt],t[H.tt.bt],t[H.tt.gt],t[H.tt.jt],t[H.tt.zt],t[H.tt.kt]||!1)||void 0}Ei.ur=6e4,Ei.Ah=500,Ei.Co=1e4;var Ni=function(t){u(i,t);var e=c(i);function i(t,n,a,r,o){var s;p(this,i),(s=e.call(this)).yt=t,s.u=n,s.qt=a,s.Jt=r,s.$t=o,s.yt=t,s.u=n,s.qt=a,s.Jt=r,s.$t=o,s.Bt=new Y,pi.Ht(s.Bt),s.Kt=0,s.Qt=0,s.cards=[],s.Yt();var u=C.ts.Zt;return new C(u,y).ss(u.hs.es,(function(t){s.rs(t)})),s.ns=null,s.os=null,s.ls=null,s.us=null,s.cs=null,s.fs=10,s.ds=0,s}return v(i,[{key:"ps",value:function(){return this.ns}},{key:"vs",value:function(t){this.ns=t}},{key:"ws",value:function(){return this.os}},{key:"Cs",value:function(t){this.os=t}},{key:"Yt",value:function(){if(this.u){for(var t=this.u.j(Ot.C.bs)||[],e=[],i=0;i<t.length;i++){var n=_i(t[i]);null!=n&&e.push(n)}this.cards=this.gs(this.ys(e,!1)),this.Kt=this.u.j(Ot.C.js)||this.Kt,this.Qt=this.u.j(Ot.C.Rs)||this.Qt}}},{key:"Ns",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
1if(i){e=[];var o,s=a(this.cards);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.test&&e.push(u)}}catch(v){s.e(v)}finally{s.f()}}else e=this.cards.slice();for(var l=0;l<t.length;l++){for(var c=t[l],h=null,d=0;d<this.cards.length;d++)if(c.id===this.cards[d].id){h=this.cards[d];break}if(i){var f=Ci(c);null!=h&&h.viewed&&f&&(f.viewed=!0),null!=f&&e.push(f)}else if(null==h){var p=Ci(c);null!=p&&e.push(p)}else if(!h.Lt(c))for(var b=0;b<e.length;b++)if(c.id===e[b].id){e.splice(b,1);break}}this.cards=this.gs(this.ys(e,i)),this.Ts(),this.Kt=n,this.Qt=r,this.u&&(this.u.I(Ot.C.js,this.Kt),this.u.I(Ot.C.Rs,this.Qt))}},{key:"Ss",value:function(t){if(this.Ds()&&null!=t&&t.cards){this.u&&this.u.I(Ot.C.Us,pi.ks());var e=t.full_sync;e||this.Yt(),this.Ns(t.cards,e,t.last_full_sync_at,t.last_card_updated_at),this.Bt.Rt(this.As(!0))}}},{key:"Fs",value:function(t){this.u&&this.u.I(Ot.C.xs,t)}},{key:"zs",value:function(t,e,i){var n,r=this,o=function(){r.qs(e,i,!0)},s=t?function(t){var e,i,n={},r=t.toString().split("\r\n");if(!r)return n;var o,s=a(r);try{for(s.s();!(o=s.n()).done;){var u=o.value;u&&(e=u.slice(0,u.indexOf(":")).toLowerCase().trim(),i=u.slice(u.indexOf(":")+1).trim(),n[e]=i)}}catch(l){s.e(l)}finally{s.f()}return n}(t):null;if(this.Es(),s&&s["retry-after"]){var u=s["retry-after"];if(isNaN(u)&&!isNaN(Date.parse(u)))(n=Date.parse(u)-(new Date).getTime())<0&&o();else{if(isNaN(parseFloat(u.toString()))){return vi.q(w.Ls,{e:"Received unexpected value for retry-after header in /sync response: "+u}),void this.Fs(0)}n=1e3*parseFloat(u.toString())}this.ls=window.setTimeout((function(){o()}),n);var l=0;this.u&&(l=this.u.j(Ot.C.xs)),(null==l||isNaN(parseInt(l.toString())))&&(l=0),this.Fs(parseInt(l.toString())+1)}else this.Fs(0)}},{key:"rs",value:function(t){var e;if(this.Ds()){this.Yt();var i,n=this.cards.slice();i=null===(e=this.yt)||void 0===e?void 0:e.getUserId();for(var a=0;a<t.length;a++)if(i===t[a].userId||null==i&&null==t[a].userId){for(var r=t[a].card,o=null,s=0;s<this.cards.length;s++)if(r.id===this.cards[s].id){o=this.cards[s];break}if(null==o){var u=Ci(r);null!=u&&n.push(u)}else if(!o.Lt(r))for(var l=0;l<n.length;l++)if(r.id===n[l].id){n.splice(l,1);break}}this.cards=this.gs(this.ys(n,!1)),this.Ts(),this.Bt.Rt(this.As(!0))}}},{key:"ys",value:function(t,e){var i={},n={},a={};this.u&&(i=this.u.j(Ot.C.v)||{},n=this.u.j(Ot.C.H)||{},a=this.u.j(Ot.C.A)||{});for(var r={},o={},s={},u=0;u<t.length;u++){var l=t[u].id;l&&(i[l]&&(t[u].clicked=!0,r[l]=!0),n[l]&&(t[u].viewed=!0,o[l]=!0),a[l]&&(t[u].dismissed=!0,s[l]=!0))}return e&&this.u&&(this.u.I(Ot.C.v,r),this.u.I(Ot.C.H,o),this.u.I(Ot.C.A,s)),t}},{key:"gs",value:function(t){var e=[],i=new Date,n={};this.u&&(n=this.u.j(Ot.C.A)||{});for(var a=!1,r=0;r<t.length;r++){var o=t[r].url;if(!this.Jt&&o&&Xe(o))y.error("Card with url ".concat(o,' will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable this card.'));else{var s=t[r].expiresAt,u=!0;if(null!=s&&(u=s>=i),u=u&&!t[r].dismissed)e.push(t[r]);else{var l=t[r].id;l&&(n[l]=!0),a=!0}}}return a&&this.u&&this.u.I(Ot.C.A,n),e}},{key:"Ts",value:function(){for(var t,e=[],i=0;i<this.cards.length;i++)e.push(this.cards[i].Y());null===(t=this.u)||void 0===t||t.I(Ot.C.bs,e)}},{key:"Es",value:function(){this.ls&&(clearTimeout(this.ls),this.ls=null)}},{key:"Is",value:function(){null!=this.us&&(clearTimeout(this.us),this.us=null)}},{key:"Js",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3*this.fs,i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;this.Is(),this.us=window.setTimeout((function(){t.qs(i,n,!0)}),e),this.cs=e}},{key:"qs",value:function(t,e){var i,n=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.$t,s=this.u;if(o&&s)if(!a&&(this.Es(),this.Fs(0)),this.Ds()){r&&this.Is();var u=o.$s({},!0);s.j(Ot.C.Us)!==pi.ks()&&this.Bs(),u.last_full_sync_at=this.Kt,u.last_card_updated_at=this.Qt;var l=o.Ps(u,Gt._s.Xs,a),c=!1;o.Gs(u,(function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(n.u){var a=(new Date).valueOf();Gt.Hs(n.u,Gt._s.Xs,a)}-1!==i&&l.push(["X-Braze-Req-Tokens-Remaining",i.toString()]),Xt({url:"".concat(o.Os(),"/content_cards/sync"),data:u,headers:l,L:function(i,a){if(!o.Qs(u,i,l))return c=!0,void("function"==typeof e&&e());o.Vs(),n.zs(a,t,e),n.Ss(i),c=!1,Gt.Ws(n.u,Gt._s.Xs,1),"function"==typeof t&&t()},error:function(t){o.Ys(t,"retrieving content cards"),c=!0,"function"==typeof e&&e()},Zs:function(){if(c&&r&&!n.us&&n.ds+1<3){Gt.ti(n.u,Gt._s.Xs);var i=n.cs;
1(null==i||i<1e3*n.fs)&&(i=1e3*n.fs),n.Js(Math.min(3e5,Yt(1e3*n.fs,3*i)),t,e),n.ds=n.ds+1}}})}),Gt._s.Xs,e)}else null===(i=this.qt)||void 0===i||i.Ms((function(){n.qs(t,e)}));else"function"==typeof e&&e()}},{key:"As",value:function(t){t||this.Yt();var e=this.gs(this.cards);e.sort((function(t,e){return t.pinned&&!e.pinned?-1:e.pinned&&!t.pinned?1:t.updated&&e.updated&&t.updated>e.updated?-1:t.updated&&e.updated&&e.updated>t.updated?1:0}));var i=Math.max(this.Qt||0,this.Kt||0);return 0===i&&(i=void 0),this.u&&this.u.j(Ot.C.Rs)===this.Qt&&void 0===i&&(i=this.Qt),new Di(e,R(i))}},{key:"si",value:function(t){return this.Bt.Nt(t)}},{key:"Bs",value:function(){this.Kt=0,this.Qt=0,this.u&&(this.u.ii(Ot.C.js),this.u.ii(Ot.C.Rs))}},{key:"changeUser",value:function(t){t||(this.cards=[],this.Bt.Rt(new Di(this.cards.slice(),null)),this.u&&(this.u.ii(Ot.C.bs),this.u.ii(Ot.C.v),this.u.ii(Ot.C.H),this.u.ii(Ot.C.A))),this.Bs()}},{key:"clearData",value:function(t){this.Kt=0,this.Qt=0,this.cards=[],this.Bt.Rt(new Di(this.cards.slice(),null)),t&&this.u&&(this.u.ii(Ot.C.bs),this.u.ii(Ot.C.v),this.u.ii(Ot.C.H),this.u.ii(Ot.C.A),this.u.ii(Ot.C.js),this.u.ii(Ot.C.Rs))}},{key:"Ds",value:function(){return!(!this.qt||!this.qt.ei()&&(0!==this.qt.hi()&&this.ri(),1))}},{key:"ri",value:function(){this.Bt.Rt(new Di([],new Date)),this.u&&this.u.ii(Ot.C.bs)}}]),i}(zt),Ti={t:!1,provider:null,rr:function(){return Ti.o(),Ti.provider||(Ti.provider=new Ni(pi.er(),pi.l(),pi.ir(),pi.tr(),pi.nr()),pi.ar(Ti.provider)),Ti.provider},o:function(){Ti.t||(pi.g(Ti),Ti.t=!0)},destroy:function(){Ti.provider=null,Ti.t=!1}},Ii=Ti;function Oi(t,e){if(pi.X())return Ii.rr().qs(t,e)}var Di=function(t){u(n,t);var e=c(n);function n(t,i){return p(this,n),e.call(this,t,i)}return v(n,[{key:"getUnviewedCardCount",value:function(){return i(d(n.prototype),"getUnreadCardCount",this).call(this)}},{key:"logCardImpressions",value:function(t){xi(t,!0)}},{key:"logCardClick",value:function(t){return ki(t,!0)}},{key:"sr",value:function(){Oi()}},{key:"dr",value:function(){return!0}}]),n}(Ei);function Pi(t){return null!=t&&!!t.getAttribute("data-ab-had-top-impression")}function zi(t){null!=t&&t.setAttribute("data-ab-had-top-impression","true")}function Ui(t){return null!=t&&!!t.getAttribute("data-ab-had-bottom-impression")}function Mi(t){null!=t&&t.setAttribute("data-ab-had-bottom-impression","true")}function Ri(t){if(null!=t){var e=t.querySelectorAll(".ab-unread-indicator")[0];null!=e&&(e.className+=" read")}}function Li(t){return t.getAttribute("data-ab-card-id")}function Bi(t,e){var i,n=e.querySelectorAll(".ab-image-area"),r=0;n.length>0&&(r=n[0].offsetWidth);var o,s=a(t);try{for(s.s();!(o=s.n()).done;){var u=o.value;if((i=u.T)&&u.imageUrl&&"number"==typeof u.aspectRatio){var l=r/u.aspectRatio;l&&(i.style.height="".concat(l,"px"))}}}catch(c){s.e(c)}finally{s.f()}}function Fi(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ltr",a=document.createElement("div");a.dir=n,a.className="ab-card ab-effect-card "+t._,t.id&&(a.setAttribute("data-ab-card-id",t.id),a.setAttribute("id",t.id)),a.setAttribute("role","article"),a.setAttribute("tabindex","0");var r="",o=!1;t.url&&""!==t.url&&(r=t.url,o=!0);var s=function(n){return Ri(a),o&&(e(t),Ge(r,i,n)),!1};if(t.pinned){var u=document.createElement("div");u.className="ab-pinned-indicator";var l=document.createElement("i");l.className="fa fa-star",u.appendChild(l),a.appendChild(u)}if(t.imageUrl&&""!==t.imageUrl){var c=document.createElement("div");c.dir=n,c.className="ab-image-area";var h=document.createElement("img");if(h.setAttribute("src",t.imageUrl),h.onload=function(){a.style.height="auto"},function(t,e){var i="";t.title||t.description||(i="Feed Image"),e.setAttribute("alt",i)}(t,h),c.appendChild(h),a.className+=" with-image",o&&!t.S){var d=document.createElement("a");d.setAttribute("href",r),d.onclick=s,d.appendChild(c),a.appendChild(d)}else a.appendChild(c)}var f=document.createElement("div");if(f.className="ab-card-body",f.dir=n,t.dismissible){t.logCardDismissal=function(){return wi(t)};var p=Me("Dismiss Card",void 0,t.dismissCard.bind(t),n);
1a.appendChild(p),le(f,ne.U,(function(t){a.className+=" ab-swiped-left",p.onclick(t)})),le(f,ne.V,(function(t){a.className+=" ab-swiped-right",p.onclick(t)}))}var b="",v=!1;if(t.title&&""!==t.title&&(b=t.title,v=!0),v){var g=document.createElement("h1");if(g.className="ab-title",g.id=S.W(),a.setAttribute("aria-labelledby",g.id),o){var m=document.createElement("a");m.setAttribute("href",r),m.onclick=s,m.appendChild(document.createTextNode(b)),g.appendChild(m)}else g.appendChild(document.createTextNode(b));f.appendChild(g)}var y=document.createElement("div");if(y.className=v?"ab-description":"ab-description ab-no-title",y.id=S.W(),a.setAttribute("aria-describedby",y.id),t.description&&y.appendChild(document.createTextNode(t.description)),o){var k=document.createElement("div");k.className="ab-url-area";var w=document.createElement("a");w.setAttribute("href",r),t.linkText&&w.appendChild(document.createTextNode(t.linkText)),w.onclick=s,k.appendChild(w),y.appendChild(k)}f.appendChild(y),a.appendChild(f);var x=document.createElement("div");return x.className="ab-unread-indicator",t.viewed&&(x.className+=" read"),a.appendChild(x),t.T=a,a}function qi(t){pi.X()&&pi.removeSubscription(t)}Di.ur=6e4;var ji="data-last-requested-refresh",Gi={};function Ki(t){t&&(t.className=t.className.replace("ab-show","ab-hide"),setTimeout((function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),Ei.Ah));var e=t.getAttribute("data-update-subscription-id");null!=e&&qi(e);var i=t.getAttribute("data-listener-id");null!=i&&(window.removeEventListener("scroll",Gi[i]),delete Gi[i])}function Xi(t,e){var i=ei.m(),n=document.createElement("div");if(n.className="ab-feed-body",n.setAttribute("aria-label","Feed"),n.setAttribute("role","feed"),null==t.lastUpdated){var r=document.createElement("div");r.className="ab-no-cards-message";var o=document.createElement("i");o.className="fa fa-spinner fa-spin fa-4x ab-initial-spinner",r.appendChild(o),n.appendChild(r)}else{var s,u=!1,l=function(e){return t.logCardClick(e)},c=a(t.cards);try{for(c.s();!(s=c.n()).done;){var h=s.value,d=h instanceof $;!d||t.dr()?(n.appendChild(Fi(h,l,e,i.wo())),u=u||!d):y.error("Received a control card for a legacy news feed. Control cards are only supported with content cards.")}}catch(p){c.e(p)}finally{c.f()}if(!u){var f=document.createElement("div");f.className="ab-no-cards-message",f.innerHTML=i.get("NO_CARDS_MESSAGE")||"",f.setAttribute("role","article"),n.appendChild(f)}}return n}function Yi(t,e){if(null!=t&&null!=e){var i=[],n=e.querySelectorAll(".ab-card");t.yo||(t.yo={});for(var r=0;r<n.length;r++){var o=Li(n[r]),s=oe(n[r]),u=se(n[r]);if(t.yo[o])s||u||Ri(n[r]);else{var l=Pi(n[r]),c=Ui(n[r]),h=l,d=c;if(!l&&s&&(l=!0,zi(n[r])),!c&&u&&(c=!0,Mi(n[r])),l&&c){if(h&&d)continue;var f,p=a(t.cards);try{for(p.s();!(f=p.n()).done;){var b=f.value;if(b.id===o){t.yo[b.id]=!0,i.push(b);break}}}catch(v){p.e(v)}finally{p.f()}}}}i.length>0&&t.logCardImpressions(i)}}function Hi(t,e){if(null!=t&&null!=e){e.setAttribute("aria-busy","true");var i=e.querySelectorAll(".ab-refresh-button")[0];null!=i&&(i.className+=" fa-spin");var n=(new Date).valueOf().toString();e.setAttribute("data-last-requested-refresh",n),setTimeout((function(){if(e.getAttribute("data-last-requested-refresh")===n){for(var t=e.querySelectorAll(".fa-spin"),i=0;i<t.length;i++)t[i].className=t[i].className.replace(/fa-spin/g,"");var a=e.querySelectorAll(".ab-initial-spinner")[0];if(null!=a){var r=document.createElement("span");r.innerHTML=ei.m().get("FEED_TIMEOUT_MESSAGE")||"",null!=a.parentNode&&(a.parentNode.appendChild(r),a.parentNode.removeChild(a))}"true"===e.getAttribute("aria-busy")&&e.setAttribute("aria-busy","false")}}),Ei.Co),t.sr()}}function Ji(t,e,i){var n=document.createElement("div");n.className="ab-feed ab-hide ab-effect-slide",n.setAttribute("role","dialog"),n.setAttribute("aria-label","Feed"),n.setAttribute("tabindex","-1");var a=document.createElement("div");a.className="ab-feed-buttons-wrapper",a.setAttribute("role","group"),n.appendChild(a);var r=document.createElement("i");r.className="fa fa-times ab-close-button",r.setAttribute("aria-label","Close Feed"),r.setAttribute("tabindex","0"),r.setAttribute("role","button");var o=function(t){Ki(n),t.stopPropagation()};r.addEventListener("keydown",(function(t){t.keyCode!==he.Fo&&t.keyCode!==he.To||o(t)})),r.onclick=o;var s=document.createElement("i");s.className="fa fa-refresh ab-refresh-button",t&&null==t.lastUpdated&&(s.className+=" fa-spin"),s.setAttribute("aria-label","Refresh Feed"),s.setAttribute("tabindex","0"),s.setAttribute("role","button");var u=function(e){Hi(t,n),e.stopPropagation()};s.addEventListener("keydown",(function(t){t.keyCode!==he.Fo&&t.keyCode!==he.To||u(t)})),s.onclick=u,a.appendChild(s),a.appendChild(r),n.appendChild(Xi(t,e));var l=function(){return Yi(t,n)};if(n.addEventListener("scroll",l),!i){window.addEventListener("scroll",l);var c=S.W();Gi[c]=l,n.setAttribute("data-listener-id",c)}return n}function Wi(t,e,i,n,r){if(T(e)){var o,s=[],u=a(e);try{for(u.s();!(o=u.n()).done;){var l=o.value;if(l instanceof H){if(l.url&&pt.test(l.url))if(ut(ot(l.url))){y.error(rt(at.Vi,"Content Card"));continue}s.push(l)}}}catch(d){u.e(d)}finally{u.f()}if(t.cards=s,t.lastUpdated=i,null!=n)if(n.setAttribute("aria-busy","false"),null==t.lastUpdated)Ki(n);else{var c=n.querySelectorAll(".ab-feed-body")[0];if(null!=c){var h=Xi(t,r);c.parentNode&&c.parentNode.replaceChild(h,c),Yi(t,h.parentNode)}}}}function Vi(t,e){t&&e.setAttribute("data-update-subscription-id",t)}function $i(t){if(pi.X())for(var e=document.querySelectorAll(".ab-feed"),i=0;i<e.length;i++)(null==t||null!=t&&e[i].parentNode===t)&&Ki(e[i])}function Zi(t,e){if(pi.X()){ze();var i=!1;null==t&&(t=document.body,i=!0);var n=pi.nn(di.tn)||pi.nn(di.en)||!1,a=Ii.rr().As(!1);"function"==typeof e&&Wi(a,e(a.cards.slice()),a.lastUpdated,null,
1n);var r=Ji(a,n,i),o=Ii.rr(),s=o.ps();(null==a.lastUpdated||(new Date).valueOf()-a.lastUpdated.valueOf()>Di.ur)&&(null==s||(new Date).valueOf()-s>Di.ur)&&(y.info("Cached content cards were older than max TTL of ".concat(Di.ur," ms, requesting an update from the server.")),Hi(a,r),o.vs((new Date).valueOf()));var u=(new Date).valueOf(),l=Qi((function(t){var i=r.querySelectorAll(".ab-refresh-button")[0];if(null!=i){var o=500,s=o-=(new Date).valueOf()-u,l=r.getAttribute(ji);l&&(s=parseInt(l),isNaN(s)||(o-=(new Date).valueOf()-s)),setTimeout((function(){i.className=i.className.replace(/fa-spin/g,"")}),Math.max(o,0))}var c=t.cards;"function"==typeof e&&(c=e(c.slice())),Wi(a,c,t.lastUpdated,r,n)}));Vi(l,r);var c,h=function(t){for(var e=t.querySelectorAll(".ab-feed"),n=null,o=0;o<e.length;o++)e[o].parentNode===t&&(n=e[o]);null!=n?(Ki(n),null!=n.parentNode&&n.parentNode.replaceChild(r,n)):t.appendChild(r),setTimeout((function(){r.className=r.className.replace("ab-hide","ab-show")}),0),i&&r.focus(),Yi(a,r),Bi(a.cards,t)};null!=t?h(t):window.onload=(c=window.onload,function(){"function"==typeof c&&c(new Event("oldLoad")),h(document.body)})}}function Qi(t){if(pi.X()){var e=Ii.rr(),i=e.si(t);if(!e.ws()){var n=pi.cr();if(n){var a=n.mr((function(){e.qs()}));a&&e.Cs(a)}}return i}}var tn={GOOGLE_TAG_MANAGER:"gg",MPARTICLE:"mp",SEGMENT:"sg",TEALIUM:"tl",MANUAL:"manu",NPM:"npm",CDN:"wcd",SHOPIFY:"shp"};function en(t,e){if(pi.X())if(null!=t&&0!==t.length&&t==t){if(it(t)>Et.lr)y.error('Rejected user id "'.concat(t,'" because it is longer than ').concat(Et.lr," bytes."));else if(null==e||kt(e,"set signature for new user","signature")){var i=pi.cr();i&&i.changeUser(t.toString(),pi.gr(),e)}}else y.error("changeUser requires a non-empty userId.")}var nn=Object.freeze({__proto__:null,changeUser:en});function an(t,e){if(!pi.X())return!1;if(null==t||t.length<=0)return y.error('logCustomEvent requires a non-empty eventName, got "'.concat(t,'". Ignoring event.')),!1;if(!bt(t,"log custom event","the event name"))return!1;var i=n(wt(e,"logCustomEvent","eventProperties",'log custom event "'.concat(t,'"'),"event"),2),r=i[0],o=i[1];if(!r)return!1;var s=pi.ir();if(s&&s.me(t))return y.info('Custom Event "'.concat(t,'" is blocklisted, ignoring.')),!1;var u=vi.q(w.CustomEvent,{n:t,p:o});if(u.L){y.info('Logged custom event "'.concat(t,'".'));var l,c=a(u.ge);try{for(c.s();!(l=c.n()).done;){var h=l.value;li.rr().fe(Te.ue,[t,e],h)}}catch(d){c.e(d)}finally{c.f()}}return u.L}var rn=Object.freeze({__proto__:null,logCustomEvent:an});function on(t,e,i,r,o){if(!pi.X())return!1;if(null==i&&(i="USD"),null==r&&(r=1),null==t||t.length<=0)return y.error('logPurchase requires a non-empty productId, got "'.concat(t,'", ignoring.')),!1;if(!bt(t,"log purchase","the purchase name"))return!1;if(null==e||isNaN(parseFloat(e.toString())))return y.error("logPurchase requires a numeric price, got ".concat(e,", ignoring.")),!1;var s=parseFloat(e.toString()).toFixed(2);if(null==r||isNaN(parseInt(r.toString())))return y.error("logPurchase requires an integer quantity, got ".concat(r,", ignoring.")),!1;var u=parseInt(r.toString());if(u<1||u>100)return y.error("logPurchase requires a quantity >1 and <".concat(100,", got ").concat(u,", ignoring.")),!1;if(i=null!=i?i.toUpperCase():i,-1===["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTC","BTN","BWP","BYR","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MTL","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XCD","XDR","XOF","XPD","XPF","XPT","YER","ZAR","ZMK","ZMW","ZWL"].indexOf(i))return y.error("logPurchase requires a valid currencyCode, got ".concat(i,", ignoring.")),!1;var l=n(wt(o,"logPurchase","purchaseProperties",'log purchase "'.concat(t,'"'),"purchase"),2),c=l[0],h=l[1];if(!c)return!1;var d=pi.ir();if(d&&d.Dr(t))return y.info('Purchase "'.concat(t,'" is blocklisted, ignoring.')),!1;var f=vi.q(w.Pr,{pid:t,c:i,p:s,q:u,pr:h});if(f.L){y.info("Logged ".concat(u," purchase").concat(u>1?"s":"",' of "').concat(t,'" for ').concat(i," ").concat(s,"."));var p,b=a(f.ge);try{for(b.s();!(p=b.n()).done;){var v=p.value;li.rr().fe(Te.Rr,[t,o],v)}}catch(g){b.e(g)}finally{b.f()}}return f.L}var sn=Object.freeze({__proto__:null,logPurchase:on}
1);function un(t){if(pi.X()){var e=pi.cr();e&&e.requestImmediateDataFlush(t)}}var ln=Object.freeze({__proto__:null,requestImmediateDataFlush:un});var cn=function(t){u(i,t);var e=c(i);function i(t,n){var a;return p(this,i),(a=e.call(this)).u=t,a.Ui=n,a.cards=[],a.ki=null,a.u=t,a.Ui=n,a.Bt=new Y,pi.Ht(a.Bt),a.Yt(),a}return v(i,[{key:"Yt",value:function(){var t=[];this.u&&(t=this.u.j(Ot.C.Ai)||[]);for(var e=[],i=0;i<t.length;i++){var n=_i(t[i]);null!=n&&e.push(n)}this.cards=e,this.u&&(this.ki=B(this.u.j(Ot.C.Bi)))}},{key:"Ei",value:function(t){var e=[],i={};this.u&&(i=this.u.j(Ot.C.J)||{});for(var n={},a=0;a<t.length;a++){var r=Ai(t[a]);if(null!=r){var o=r.id;o&&i[o]&&(r.viewed=!0,n[o]=!0),e.push(r)}}this.cards=e,this.Ts(),this.ki=new Date,this.u&&(this.u.I(Ot.C.J,n),this.u.I(Ot.C.Bi,this.ki))}},{key:"Ts",value:function(){for(var t,e=[],i=0;i<this.cards.length;i++)e.push(this.cards[i].Y());null===(t=this.u)||void 0===t||t.I(Ot.C.Ai,e)}},{key:"Ss",value:function(t){null!=t&&t.feed&&(this.Yt(),this.Ei(t.feed),this.Bt.Rt(new pn(this.cards.slice(),this.ki)))}},{key:"Gi",value:function(){this.Yt();for(var t=[],e=new Date,i=0;i<this.cards.length;i++){var n=this.cards[i].expiresAt,a=!0;null!=n&&(a=n>=e),a&&t.push(this.cards[i])}return new pn(t,this.ki)}},{key:"qs",value:function(){this.Ui&&this.Ui.requestFeedRefresh()}},{key:"si",value:function(t){return this.Bt.Nt(t)}},{key:"clearData",value:function(t){null==t&&(t=!1),this.cards=[],this.ki=null,t&&this.u&&(this.u.ii(Ot.C.Ai),this.u.ii(Ot.C.Bi)),this.Bt.Rt(new pn(this.cards.slice(),this.ki))}}]),i}(zt),hn={t:!1,provider:null,rr:function(){return hn.o(),hn.provider||(hn.provider=new cn(pi.l(),pi.cr()),pi.ar(hn.provider)),hn.provider},o:function(){hn.t||(pi.g(hn),hn.t=!0)},destroy:function(){hn.provider=null,hn.t=!1}},dn=hn;function fn(){if(pi.X())return dn.rr().qs()}var pn=function(t){u(i,t);var e=c(i);function i(t,n){return p(this,i),e.call(this,t,n)}return v(i,[{key:"logCardImpressions",value:function(t){xi(t,!1)}},{key:"logCardClick",value:function(t){return ki(t,!1)}},{key:"sr",value:function(){fn()}},{key:"dr",value:function(){return!1}}]),i}(Ei);function bn(){if(pi.X())for(var t=document.querySelectorAll(".ab-feed"),e=0;e<t.length;e++)Ki(t[e])}function vn(){var t;if(pi.X())return null===(t=pi.nr())||void 0===t?void 0:t.qr(x.Ar).L}function gn(t,e,i){if(pi.X()){ze();var n=function(t,e){if(null==e)return t;for(var i=[],n=0;n<e.length;n++)i.push(e[n].toLowerCase());for(var a=[],r=0;r<t.length;r++){for(var o=[],s=t[r].categories||[],u=0;u<s.length;u++)o.push(s[u].toLowerCase());D(o,i).length>0&&a.push(t[r])}return a},a=pi.nn(di.tn)||pi.nn(di.en)||!1,r=!1;null==t&&(t=document.body,r=!0);var o,s=!1;null==e?(Wi(o=dn.rr().Gi(),n(o.cards,i),o.lastUpdated,null,a),s=!0):o=new pn(n(e,i),new Date);var u=Ji(o,a,r);if(s){(null==o.lastUpdated||(new Date).valueOf()-o.lastUpdated.valueOf()>pn.ur)&&(y.info("Cached feed was older than max TTL of ".concat(pn.ur," ms, requesting an update from the server.")),Hi(o,u));var l=(new Date).valueOf(),c=yn((function(t){var e=u.querySelectorAll(".ab-refresh-button")[0];if(null!=e){var r=500;r-=(new Date).valueOf()-l;var s=u.getAttribute(ji);if(s){var c=parseInt(s);isNaN(c)||(r-=(new Date).valueOf()-c)}setTimeout((function(){e.className=e.className.replace(/fa-spin/g,"")}),Math.max(r,0))}Wi(o,n(t.cards,i),t.lastUpdated,u,a)}));Vi(c,u)}var h,d=function(t){for(var e=t.querySelectorAll(".ab-feed"),i=null,n=0;n<e.length;n++)e[n].parentNode===t&&(i=e[n]);null!=i?(Ki(i),i.parentNode&&i.parentNode.replaceChild(u,i)):t.appendChild(u),setTimeout((function(){u.className=u.className.replace("ab-hide","ab-show")}),0),r&&u.focus(),vn(),Yi(o,u),o&&Bi(o.cards,t)};null!=t?d(t):window.onload=(h=window.onload,function(){"function"==typeof h&&h(new Event("oldLoad")),d(document.body)})}}var mn=Object.freeze({__proto__:null,showFeed:gn});function yn(t){if(pi.X())return dn.rr().si(t)}var kn=function(){function t(e,i,n,a,r,o,s,u,l,c,h){p(this,t),this.sn=e,this.rn=i,this.on=n,this.un=r,this.an=o,this.hn=s,this.qt=u,this.cn=l,this.fn=c,this.u=h,this.sn=e,this.rn=i,this.on=n,this.ln=a+"/safari/"+i,this.un=r||"/service-worker.js",this.hn=s,this.qt=u,this.cn=l||!1,this.fn=c||!1,this.u=h,this.dn=Wt.pn(),this.bn=Wt.yn()}return v(t,[{key:"mn",value:function(){return this.fn}}
1,{key:"gn",value:function(t,e,i,n,a){var r=this;t.unsubscribe().then((function(t){t?r.vn(e,i,n,a):(y.error("Failed to unsubscribe device from push."),"function"==typeof a&&a(!1))})).catch((function(t){y.error("Push unsubscription error: "+t),"function"==typeof a&&a(!1)}))}},{key:"wn",value:function(t,e,i){var n,a=function(t){if("string"==typeof t)return t;if(0!==t.endpoint.indexOf("https://android.googleapis.com/gcm/send"))return t.endpoint;var e=t.endpoint,i=t;return i.kn&&-1===t.endpoint.indexOf(i.kn)&&(e=t.endpoint+"/"+i.kn),e}(t),r=null,o=null,s=t;if(null!=s.getKey)try{var u=Array.from(new Uint8Array(s.getKey("p256dh"))),l=Array.from(new Uint8Array(s.getKey("auth")));r=btoa(String.fromCharCode.apply(null,u)),o=btoa(String.fromCharCode.apply(null,l))}catch(t){y.error(tt(t))}var c=function(t){var e;return t.options&&(e=t.options.applicationServerKey)&&e.byteLength&&e.byteLength>0?btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(e)))).replace(/\+/g,"-").replace(/\//g,"_"):null}(s);null===(n=this.sn)||void 0===n||n.Pn(a,e,r,o,c),a&&"function"==typeof i&&i(a,r,o)}},{key:"Dn",value:function(){var t;null===(t=this.sn)||void 0===t||t.Sn(!0)}},{key:"An",value:function(t,e){var i;null===(i=this.sn)||void 0===i||i.Sn(!1),y.info(t),"function"==typeof e&&e(!1)}},{key:"jn",value:function(t,e,i,n){var a,r=this;if("default"===e.permission)try{window.safari.pushNotification.requestPermission(this.ln,t,{api_key:this.rn,device_id:(null===(a=this.on)||void 0===a?void 0:a.ce().id)||""},(function(e){"granted"===e.permission&&r.sn&&r.sn.setPushNotificationSubscriptionType(Et.NotificationSubscriptionTypes.OPTED_IN),r.jn(t,e,i,n)}))}catch(t){this.An("Could not request permission for push: "+t,n)}else"denied"===e.permission?this.An("The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",n):"granted"===e.permission&&(y.info("Device successfully subscribed to push."),this.wn(e.deviceToken,new Date,i))}},{key:"requestPermission",value:function(t,e,i){var n=function(n){switch(n){case"granted":return void("function"==typeof t&&t());case"default":return void("function"==typeof e&&e());case"denied":return void("function"==typeof i&&i());default:y.error("Received unexpected permission result "+n)}},a=!1;if("default"!==window.Notification.permission)n(Notification.permission);else{var r=window.Notification.requestPermission((function(t){a&&n(t)}));r?r.then((function(t){n(t)})):a=!0}}},{key:"vn",value:function(t,e,i,n){var a=this,r={userVisibleOnly:!0};null!=e&&(r.applicationServerKey=e),t.pushManager.subscribe(r).then((function(t){y.info("Device successfully subscribed to push."),a.wn(t,new Date,i)})).catch((function(t){Wt.isPushBlocked()?(y.info("Permission for push notifications was denied."),"function"==typeof n&&n(!1)):(y.error("Push subscription failed: "+t),"function"==typeof n&&n(!0))}))}},{key:"xn",value:function(){if(this.cn)return navigator.serviceWorker.getRegistration(this.un);var t=this.an?{scope:this.an}:void 0;return navigator.serviceWorker.register(this.un,t).then((function(){return navigator.serviceWorker.ready.then((function(t){return t&&"function"==typeof t.update&&t.update().catch((function(t){y.info("ServiceWorker update failed: "+t)})),t}))}))}},{key:"Nn",value:function(t){this.cn||(t.unregister(),y.info("Service worker successfully unregistered."))}},{key:"subscribe",value:function(e,i){var n=this;if(!Wt.isPushSupported())return y.info(t.Un),void("function"==typeof i&&i(!1));if(this.dn){if(!this.cn&&null!=window.location){var a=this.un;-1===a.indexOf(window.location.host)&&(a=window.location.host+a),-1===a.indexOf(window.location.protocol)&&(a=window.location.protocol+"//"+a)}if(Wt.isPushBlocked())return void this.An("Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",i);if(this.qt&&!this.qt.Wn()&&0===this.qt.hi())return y.info("Waiting for VAPID key from server config before subscribing to push."),void this.qt._n((function(){n.subscribe(e,i)}));var r=Wt.isPushPermissionGranted();this.requestPermission((function(){!r&&n.sn&&n.sn.setPushNotificationSubscriptionType(Et.NotificationSubscriptionTypes.OPTED_IN),n.xn().then((function(t){if(null==t)return y.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to fal
1se or ensure that your service worker is registered before calling registerPush."),void("function"==typeof i&&i(!0));t.pushManager.getSubscription().then((function(a){var r,o=null;if(null!=(null===(r=n.qt)||void 0===r?void 0:r.Wn())&&(o=k(n.qt.Wn())),a){var s,u=null,l=null;if(n.u&&(s=n.u.j(Ot.C.In)),s&&!T(s)){var c;try{c=ci.qn(s).Vn}catch(i){c=null}null==c||isNaN(c.getTime())||0===c.getTime()||(u=c,(l=new Date(u)).setMonth(u.getMonth()+6))}null!=o&&a.options&&a.options.applicationServerKey&&a.options.applicationServerKey.byteLength&&a.options.applicationServerKey.byteLength>0&&!z(o,new Uint8Array(a.options.applicationServerKey))?(a.options.applicationServerKey.byteLength>12?y.info("Device was already subscribed to push using a different VAPID provider, creating new subscription."):y.info("Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depending on the browser this may or may not result in the same gcm_sender_id-based subscription."),n.gn(a,t,o,e,i)):a.expirationTime&&new Date(a.expirationTime).valueOf()<=(new Date).valueOf()?(y.info("Push subscription is expired, creating new subscription."),n.gn(a,t,o,e,i)):s&&T(s)?n.gn(a,t,o,e,i):null==l?(y.info("No push subscription creation date found, creating new subscription."),n.gn(a,t,o,e,i)):l.valueOf()<=(new Date).valueOf()?(y.info("Push subscription older than 6 months, creating new subscription."),n.gn(a,t,o,e,i)):(y.info("Device already subscribed to push, sending existing subscription to backend."),n.wn(a,u,e))}else n.vn(t,o,e,i)})).catch((function(t){y.error("Error checking current push subscriptions: "+t)}))})).catch((function(t){y.error("ServiceWorker registration failed: "+t)}))}),(function(){var t="Permission for push notifications was ignored.";Wt.isPushBlocked()&&(t+=" The browser has automatically blocked further permission requests for a period (probably 1 week)."),y.info(t),"function"==typeof i&&i(!0)}),(function(){y.info("Permission for push notifications was denied."),"function"==typeof i&&i(!1)}))}else if(this.bn){if(null==this.hn||""===this.hn)return y.error("You must supply the safariWebsitePushId initialization option in order to use registerPush on Safari"),void("function"==typeof i&&i(!0));var o=window.safari.pushNotification.permission(this.hn);this.jn(this.hn,o,e,i)}}},{key:"unsubscribe",value:function(e,i){var n=this;if(!Wt.isPushSupported())return y.info(t.Un),void("function"==typeof i&&i());this.dn?navigator.serviceWorker.getRegistration(this.un).then((function(t){t?t.pushManager.getSubscription().then((function(a){a?(n.Dn(),a.unsubscribe().then((function(a){a?(y.info("Device successfully unsubscribed from push."),"function"==typeof e&&e()):(y.error("Failed to unsubscribe device from push."),"function"==typeof i&&i()),n.Nn(t)})).catch((function(t){y.error("Push unsubscription error: "+t),"function"==typeof i&&i()}))):(y.info("Device already unsubscribed from push."),"function"==typeof e&&e())})).catch((function(t){y.error("Error unsubscribing from push: "+t),"function"==typeof i&&i()})):(y.info("Device already unsubscribed from push."),"function"==typeof e&&e())})):this.bn&&(this.Dn(),y.info("Device unsubscribed from push."),"function"==typeof e&&e())}}]),t}();kn.Un="Push notifications are not supported in this browser.";var wn={t:!1,i:null,m:function(){return wn.o(),wn.i||(wn.i=new kn(pi.pr(),pi.ba(),pi.te(),pi.Os(),pi.nn(di.Ma),pi.nn(di._a),pi.nn(di.ka),pi.ir(),pi.nn(di.qa),pi.nn(di.Aa),pi.l())),wn.i},o:function(){wn.t||(pi.g(wn),wn.t=!0)},destroy:function(){wn.i=null,wn.t=!1}},xn=wn,En=Object.freeze({__proto__:null,default:xn});function Sn(t,e){if(pi.X())return xn.m().subscribe((function(e,i,n){var a=pi.cr();a&&a.requestImmediateDataFlush(),"function"==typeof t&&t(e,i,n)}),e)}var Cn=Object.freeze({__proto__:null,requestPushPermission:Sn});function An(t,e){if(pi.X())return xn.m().unsubscribe(t,e)}var _n=Object.freeze({__proto__:null,unregisterPush:An}),Nn=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;p(this,t),this.id=e,this.enabled=i,this.properties=n,this.trackingString=a,this.id=e,this.enabled=i,this.properties=n,this.trackingString=a}
1return v(t,[{key:"he",value:function(t,e,i){var n=this.properties[t];return null==n?(this.ye(t),null):e(n)?n.value:(this.Pe(i),null)}},{key:"getStringProperty",value:function(t){return this.he(t,this.be,"string")}},{key:"getNumberProperty",value:function(t){return this.he(t,this.Ie,"number")}},{key:"getBooleanProperty",value:function(t){return this.he(t,this.de,"boolean")}},{key:"getImageProperty",value:function(t){return this.he(t,this.Te,"image")}},{key:"getJsonProperty",value:function(t){return this.he(t,this.Ee,"jsonobject")}},{key:"getTimestampProperty",value:function(t){return this.he(t,this.Ne,"datetime")}},{key:"Y",value:function(){var e={};return e[t.tt.ht]=this.id,e[t.tt.le]=this.enabled,e[t.tt.pe]=this.properties,e[t.tt.Fe]=this.trackingString,e}},{key:"Pe",value:function(t){y.info("Property is not of type ".concat(t,"."))}},{key:"ye",value:function(t){y.info("".concat(t," not found in feature flag properties."))}},{key:"be",value:function(t){return"string"===t.type&&"string"==typeof t.value}},{key:"Ie",value:function(t){return"number"===t.type&&"number"==typeof t.value}},{key:"de",value:function(t){return"boolean"===t.type&&"boolean"==typeof t.value}},{key:"Te",value:function(t){return"image"===t.type&&"string"==typeof t.value}},{key:"Ee",value:function(t){return"jsonobject"===t.type&&"object"==f(t.value)&&t.value.constructor==Object}},{key:"Ne",value:function(t){return"datetime"===t.type&&"number"==typeof t.value}}]),t}();function Tn(t){if(t[Nn._t.ht]&&"boolean"==typeof t[Nn._t.le])return new Nn(t[Nn._t.ht],t[Nn._t.le],t[Nn._t.pe],t[Nn._t.Fe]);y.info("Unable to create feature flag from ".concat(JSON.stringify(t,null,2)))}function In(t){if(t[Nn.tt.ht]&&"boolean"==typeof t[Nn.tt.le])return new Nn(t[Nn.tt.ht],t[Nn.tt.le],t[Nn.tt.pe],t[Nn.tt.Fe]);y.info("Unable to deserialize feature flag from ".concat(JSON.stringify(t,null,2)))}Nn.tt={ht:"id",le:"e",pe:"pr",Fe:"fts"},Nn._t={ht:"id",le:"enabled",pe:"properties",Fe:"fts"};var On=function(t){u(i,t);var e=c(i);function i(t,n,a,r){var o;return p(this,i),(o=e.call(this)).qt=t,o.$t=n,o.u=a,o.oi=r,o.ai=[],o.ni=0,o.qt=t,o.$t=n,o.u=a,o.oi=r,o.li=null,o.ui=new Y,o.fi=10,o.ci=null,o.di=null,pi.Ht(o.ui),o}return v(i,[{key:"Ss",value:function(t){var e;if((null===(e=this.qt)||void 0===e?void 0:e.mi())&&null!=t&&t.feature_flags){this.ai=[];var i,n=a(t.feature_flags);try{for(n.s();!(i=n.n()).done;){var r=Tn(i.value);r&&this.ai.push(r)}}catch(o){n.e(o)}finally{n.f()}this.ni=(new Date).getTime(),this.gi(),this.ui.Rt(this.ai)}}},{key:"Fi",value:function(){var t={};this.u&&(t=this.u.j(Ot.C.vi));var e={};for(var i in t){var n=In(t[i]);n&&(e[n.id]=n)}return e}},{key:"pi",value:function(){var t;return(null===(t=this.u)||void 0===t?void 0:t.j(Ot.C.wi))||{}}},{key:"ji",value:function(t){this.u&&this.u.I(Ot.C.wi,t)}},{key:"si",value:function(t){return this.ui.Nt(t)}},{key:"refreshFeatureFlags",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=function(){"function"==typeof e&&e(),i.ui.Rt(i.ai)};if(!this.yi(n))return!this.li&&this.qt&&(this.li=this.qt.bi((function(){i.refreshFeatureFlags(t,e)}))),void r();var o=this.$t;if(o){a&&this.Ci();var s=o.$s({},!0),u=o.Ps(s,Gt._s.Ri),l=!1;o.Gs(s,(function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(i.$t){var c=(new Date).valueOf();Gt.Hs(i.u,Gt._s.Ri,c),-1!==o&&u.push(["X-Braze-Req-Tokens-Remaining",o.toString()]),Xt({url:"".concat(i.$t.Os(),"/feature_flags/sync"),headers:u,data:s,L:function(e){if(!i.$t.Qs(s,e,u))return l=!0,void r();i.$t.Vs(),i.Ss(e),l=!1,Gt.Ws(i.u,Gt._s.Ri,1),"function"==typeof t&&t()},error:function(t){i.$t.Ys(t,"retrieving feature flags"),l=!0,r()},Zs:function(){if(a&&l&&!i.di){Gt.ti(i.u,Gt._s.Ri);var r=i.ci;(null==r||r<1e3*i.fi)&&(r=1e3*i.fi),i.Ti(Math.min(3e5,Yt(1e3*i.fi,3*r)),t,e,n)}}})}else r()}),Gt._s.Ri,e)}else r()}},{key:"Ci",value:function(){null!=this.di&&(clearTimeout(this.di),this.di=null)}},{key:"Ti",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3*this.fi,i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.Ci(),this.di=window.setTimeout((function(){t.refreshFeatureFlags(i,n,a)}),e),this.ci=e}},{key:"yi",value:function(t){if(!this.qt)return!1;if(!t){var e=this.qt.Di();if(null==e)return!1;var i=!1;if(!isNaN(e)){if(-1===e)return y.info("Feature flag refreshes not allowed"),!1;i=(new Date).getTime()>=(this.ni||0)+1e3*e}if(!i)return y.info("Feature flag refreshes were rate limited to ".concat(e," seconds")),!1}return this.qt.mi()}},{key:"Ii",value:function(){var t;return(null===(t=this.u)||void 0===t?void 0:t.j(Ot.C.Si))||null}},{key:"qi",value:function(){var t,e;null===(t=this.u)||void 0===t||t.I(Ot.C.Si,null===(e=this.oi)||void 0===e?void 0:e.xi())}},{key:"Ni",value:function(){var t,e=null===(t=this.oi)||void 0===t?void 0:t.xi(),i=this.Ii();return null==i||e===i}},{key:"gi",value:function(){if(this.u){var t,e={},i=a(this.ai);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.Y();e[n.id]=r}}catch(o){i.e(o)}finally{i.f()}this.u.I(Ot.C.vi,e),this.u.I(Ot.C.zi,this.ni),this.qi()}}}]),i}(zt),Dn={t:!1,provider:null,rr:function(){return Dn.o(),Dn.provider||(Dn.provider=new On(pi.ir(),pi.nr(),pi.l(),pi.zr()),pi.ar(Dn.provider)),Dn.provider},o:function(){Dn.t||(pi.g(Dn),Dn.t=!0)},destroy:function(){Dn.provider=null,Dn.t=!1}},Pn=Dn;function zn(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(pi.X())return Pn.rr().refreshFeatureFlags(t,e,i)}function Un(t,e){zn(t,e)}var Mn=Object.freeze({__proto__:null,refreshFeatureFlags:Un,default:zn});function Rn(){if(pi.X()){var t=[],e=pi.ir();if(e&&!e.mi())return y.info("Feature flags are not enabled."),t;var i=Pn.rr().Fi();for(var n in i)t.push(i[n]);return t}}var Ln=Object.freeze({__proto__:null,WindowUtils:qe,logCardClick:ki,logCardDismissal:wi,logCardImpressions:xi,logContentCardImpressions:function(t){return xi(t,!0)},logContentCardClick:function(t){return ki(t,!0)},Card:H,ImageOnly:J,CaptionedImage:W,ClassicCard:V,ControlCard:$,ContentCards:Di,getCachedContentCards:function(){if(pi.X())return Ii.rr().As(!1)},hideContentCards:$i,requestContentCardsRefresh:Oi,showContentCards:Zi,subscribeToContentCardsUpdates:Qi,toggleContentCards:function(t,e){pi.X()&&(document.querySelectorAll(".ab-feed").length>0?$i():Zi(t,e))},addSdkMetadata:function(t){if(pi.X()){var e=pi.nr();if(e){if(!T(t))return y.error("Cannot set SDK metadata because metadata is not an array."),!1;var i,n=a(t);try{for(n.s();!(i=n.n()).done;){var r=i.value;
1if(!N(tn,r,"sdkMetadata contained an invalid value.","BrazeSdkMetadata"))return!1}}catch(o){n.e(o)}finally{n.f()}return e.addSdkMetadata(t),!0}}},changeUser:en,destroy:function(){y.info("Destroying Braze instance"),pi.destroy(!0)},BrazeSdkMetadata:tn,DeviceProperties:Mt,disableSDK:function(){var t=pi.cr();t&&t.requestImmediateDataFlush();var e=new Dt.ee(null,!0),i="This-cookie-will-expire-in-"+e.ne();e.store(Ot.se,i);var n=C.ts.Zt;new C(n,y).setItem(n.hs.ae,n.ie,!0),y.info("disableSDK was called"),pi.destroy(!1),pi.oe(!0)},enableSDK:function(){new Dt.ee(null,!0).remove(Ot.se);var t=C.ts.Zt;new C(t,y).re(t.hs.ae,t.ie),y.info("enableSDK was called"),pi.destroy(!1),pi.oe(!1)},getDeviceId:function(t){if(pi.X()){var e=pi.te();if(e){var i=e.ce().id;if("function"!=typeof t)return i;y.warn("The callback for getDeviceId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getDeviceId()`)"),t(i)}}},getUser:je,initialize:function(t,e){return pi.initialize(t,e)},isDisabled:function(){return!!new Dt.ee(null,!0).br(Ot.se)},isInitialized:function(){return pi.so()},logCustomEvent:an,logPurchase:on,openSession:function(){if(pi.X()){var t=pi.cr();if(t){t.openSession();var e=C.ts.Zt,i=new C(e,y);i.jr(e.hs.hr,(function(n,a){var r=a.lastClick,o=a.trackingString;y.info("Firing push click trigger from ".concat(o," push click at ").concat(r));var s=t.kr(r,o),u=function(){li.rr().fe(Te.vr,[o],s)};t.$r(u,u),i.re(e.hs.hr,n)})),i.ss(e.hs.wr,(function(e){t.yr(e)}))}}},removeAllSubscriptions:function(){pi.X()&&pi.removeAllSubscriptions()},removeSubscription:qi,requestImmediateDataFlush:un,setLogger:function(t){y.setLogger(t)},setSdkAuthenticationSignature:function(t){if(!pi.X())return!1;if(""===t||!kt(t,"set signature","signature",!1))return!1;var e=pi.Sr();return!!e&&(e.setSdkAuthenticationSignature(t),!0)},subscribeToSdkAuthenticationFailures:function(t){var e;if(pi.X())return null===(e=pi.Sr())||void 0===e?void 0:e.subscribeToSdkAuthenticationFailures(t)},toggleLogging:function(){y.toggleLogging()},wipeData:function(){var t=pi.l();if(null!=t){t.clearData();for(var e=P(C.ts),i=0;i<e.length;i++){var n=e[i],r=C.ts[n];new C(r,y).clearData()}if(pi.X()){var o,s=a(pi.gr());try{for(s.s();!(o=s.n()).done;){o.value.clearData(!0)}}catch(u){s.e(u)}finally{s.f()}}}else y.warn(X)},handleBrazeAction:function(t,e){Ge(t,e)},Feed:pn,getCachedFeed:function(){if(pi.X())return dn.rr().Gi()},destroyFeed:bn,logFeedDisplayed:vn,requestFeedRefresh:fn,showFeed:gn,subscribeToFeedUpdates:yn,toggleFeed:function(t,e,i){pi.X()&&(document.querySelectorAll(".ab-feed").length>0?bn():gn(t,e,i))},InAppMessage:fe,InAppMessageButton:be,ControlMessage:ee,FullScreenMessage:ve,HtmlMessage:pe,ModalMessage:ge,SlideUpMessage:me,automaticallyShowInAppMessages:function(){if(pi.X()){Ue();var t=oi.m();if(null==t._i()){var e=ni((function(t){return ii(t)}));t.Pi(e)}return t._i()}},logInAppMessageButtonClick:Ve,logInAppMessageClick:Be,logInAppMessageHtmlClick:Ye,logInAppMessageImpression:Le,showInAppMessage:ii,subscribeToInAppMessage:ni,deferInAppMessage:function(t){if(pi.X())return t instanceof ee?(y.info("Not deferring since this is a ControlMessage."),!1):t instanceof fe?oi.m().je(t):(y.info("Not an instance of InAppMessage, ignoring."),!1)},getDeferredInAppMessage:function(){if(pi.X())return oi.m().Se()},isPushBlocked:function(){if(pi.X())return Wt.isPushBlocked()},isPushPermissionGranted:function(){if(pi.X())return Wt.isPushPermissionGranted()},isPushSupported:function(){if(pi.X())return Wt.isPushSupported()},requestPushPermission:Sn,unregisterPush:An,User:Et,FeatureFlag:Nn,refreshFeatureFlags:Un,getFeatureFlag:function(t){if(pi.X()){var e=pi.ir();if(e&&!e.mi())return y.info("Feature flags are not enabled."),null;var i=Pn.rr().Fi();return i[t]?i[t]:null}},subscribeToFeatureFlagsUpdates:function(t){if(pi.X()){var e=Pn.rr();if(e.Ni()){var i=Rn();i&&"function"==typeof t&&t(i)}return e.si(t)}},getAllFeatureFlags:Rn,logFeatureFlagImpression:function(t){if(pi.X()){if(!t)return!1;var e="Not logging a feature flag impression. The feature flag was not part of any matching experiment.",i=Pn.rr().Fi();if(!i[t])return y.info(e),!1;var n=i[t].trackingString;if(!n)return y.info(e),!1;var a=Pn.rr().pi();if(a[n])return y.info("Not logging another feature flag impression. This ID was already logged this session."),!1;a[n]=!0,Pn.rr().ji(a);var r={fid:t,fts:n};return vi.q(w.Fr,r).L}}}),Bn=g(Ln);window.braze=Bn;var Fn="Appboy",qn="v5",jn=3,Gn=4,Kn=16,Xn=mParticle.CommerceEventType,Yn={"01":"sdk.iad-01.braze.com","02":"sdk.iad-02.braze.com","03":"sdk.iad-03.braze.com","04":"sdk.iad-04.braze.com","05":"sdk.iad-05.braze.com","06":"sdk.iad-06.braze.com","08":"sdk.iad-08.braze.com",EU:"sdk.fra-01.braze.eu",EU02:"sdk.fra-02.braze.eu"},Hn=function(){var t,e,i,n,a,r=this,o={};r.name=Fn,r.suffix=qn;var s,u={$LastName:"setLastName",$FirstName:"setFirstName",Email:"setEmail",$Gender:"setGender",$Country:"setCountry",$City:"setHomeCity",$Mobile:"setPhoneNumber",$Age:"setDateOfBirth",last_name:"setLastName",first_name:"setFirstName",email:"setEmail",gender:"setGender",country:"setCountry",home_city:"setHomeCity",email_subscribe:"setEmailNotificationSubscriptionType",push_subscribe:"setPushNotificationSubscriptionType",phone:"setPhoneNumber",dob:"setDateOfBirth"},l=!1,c=!1,h=["$google_ad_user_data","$google_ad_personalization"];function d(t){var e=!1;return e=l?function(t){var e=1,i=Jn(t.EventAttributes,{products:[]}),n=p(t.EventCategory);if(!t.ProductAction)return!1;t.ProductAction.TransactionId&&(i["Transaction Id"]=t.ProductAction.TransactionId);t.ProductAction.ProductList&&t.ProductAction.ProductList.length&&(i.products=g(t.ProductAction.ProductList));_("braze.logPurchase",n,t.ProductAction.TotalAmount,t.CurrencyCode,e,i);var a=braze.logPurchase(n,t.ProductAction.TotalAmount,t.CurrencyCode,e,i);return!0===a}(t):function(t){var e=!1;t.ProductAction.ProductList&&t.ProductAction.ProductList.forEach((function(i){var n=C(c?i.Sku:i.Name);null==i.Attributes&&(i.Attributes={}),i.Attributes.Sku=i.Sku;var a=A(Jn(i.Attributes,{"Transaction Id":t.ProductAction.TransactionId}));if(null==a)return"Properties did not pass validation for "+n;var r=parseFloat(i.Price);_("braze.logPurchase",n,r,t.CurrencyCode,i.Quantity,a),e=braze.logPurchase(n,r,t.CurrencyCode,i.Quantity,a)}));return!0===e}(t),!0===e}function p(t){var e;switch(t){case Xn.ProductAddToCart:e="add_to_cart";break;case Xn.ProductRemoveFromCart:e="remove_from_cart";break;case Xn.ProductCheckout:e="checkout";break;case Xn.ProductCheckoutOption:e="checkout_option";break;case Xn.ProductClick:e="click";break;case Xn.ProductViewDetail:e="view_detail";break;case Xn.ProductPurchase:e="purchase";break;case Xn.ProductRefund:e="refund";break;case Xn.ProductAddToWishlist:e="add_to_wishlist";break;case Xn.ProductRemoveFromWishlist:e="remove_from_wishlist";break;case Xn.PromotionView:e="view";break;case Xn.PromotionClick:e="click";break;case Xn.ProductImpression:e="Impression";break;default:e="unknown"}return["eCommerce",e].join(" - ")}function b(t,e){if("dob"===t){if(!(e instanceof Date))return"Can't call removeUserAttribute or setUserAttribute on forwarder "+Fn+", removeUserAttribute or setUserAttribute must set 'dob' to a date";_("braze.getUser().setDateOfBirth",e.getFullYear(),e.getMonth()+1,e.getDate()),braze.getUser().setDateOfBirth(e.getFullYear(),e.getMonth()+1,e.getDate())}else if("$Age"===t){if("number"!=typeof e)return"$Age must be a number";var i=(new Date).getFullYear()-e;_("braze.getUser().setDateOfBirth",i,1,1),braze.getUser().setDateOfBirth(i,1,1)}else{if(null==e&&(e=""),"string"!=typeof e)return"Can't call removeUserAttribute or setUserAttribute on forwarder "+Fn+", removeUserAttribute or setUserAttribute must set this value to a string";var n=[];n.push(e),_("braze.getUser()."+u[t],n);var a=braze.getUser();
1if(!a[u[t]].apply(a,n))return"removeUserAttribute or setUserAttribute on forwarder "+Fn+" failed to call, an invalid attribute value was passed in"}}function v(t){var e=C(t.EventName),i=A(t.EventAttributes);return null==i?"Properties did not pass validation for "+e:(_("braze.logCustomEvent",e,i),!0===braze.logCustomEvent(e,i))}function g(t){var e=[];return t&&0!==t.length?(t.forEach((function(t){var i=function(t){var e={};for(var i in t)switch(i){case"Sku":e.Id=t[i];break;case"Name":e.Name=c?t.Sku:t.Name;break;case"CouponCode":e["Coupon Code"]=t[i];break;case"TotalAmount":e["Total Product Amount"]=t[i];break;default:e[i]=t[i]}return e}(A(t));e.push(i)})),e):e}function m(e){_("calling MpBrazeKit.onUserIdentified");try{var i,n=e.getUserIdentities().userIdentities;(i="MPID"===t.userIdentificationType?e.getMPID():n[t.userIdentificationType.toLowerCase()])&&(_("braze.changeUser",i),braze.changeUser(i)),n.email&&(_("braze.getUser().setEmail",n.email),braze.getUser().setEmail(n.email))}catch(pi){_("Error in calling MpBrazeKit.onUserIdentified",pi.message)}}function y(){braze.subscribeToInAppMessage((function(e){var i=!0,n=!1;if(e instanceof braze.InAppMessage&&"push-primer"===(e.extras||{})["msg-id"]){if(n=!0,!1===braze.isPushSupported()||braze.isPushPermissionGranted()||braze.isPushBlocked())return void(i=!1);e.buttons[0]&&e.buttons[0].subscribeToClickedEvent((function(){braze.requestPushPermission()}))}(n&&i||!n&&"True"===t.register_inapp)&&braze.showInAppMessage(e)}))}function k(t){for(var e in t)braze.getUser().setCustomUserAttribute(e,t[e])}function w(t){if(!n)return{};for(var e={},i={google_ad_user_data:"$google_ad_user_data",google_ad_personalization:"$google_ad_personalization"},a=0;a<=n.length-1;a++){var r=n[a],o=r.map.toLowerCase(),s=i[r.value];t[o]&&s&&-1!==h.indexOf(s)&&(e[s]=t[o].Consented)}return e}function x(t){braze.addSdkMetadata(["mp"]),y();var e,n=null!==mParticle.Identity?mParticle.Identity.getCurrentUser():null,a=n?n.getMPID():null;n&&a&&(m(n),i&&(Vn(e=w(function(t){var e={},i=t.getConsentState();return i&&i.getGDPRConsentState&&(e=i.getGDPRConsentState()),e}(n)))||(s=JSON.stringify(e),k(e)))),function(t){braze.openSession(),t.softPushCustomEventName&&(_("braze.logCustomEvent",t.softPushCustomEventName),braze.logCustomEvent(t.softPushCustomEventName))}(t)}function E(t){if(t){var e=t.replace(/&amp;/g,"&");e=t.replace(/&quot;/g,'"');try{var i=JSON.parse(e);if(i&&i.JS)return"https://"+i.JS+"/api/v3"}catch(pi){console.log("Unable to configure custom Braze cluster: "+pi.toString())}}}function S(t){return"string"==typeof t?"$"===t.substr(0,1)?t.replace(/^\$+/g,""):t:null}function C(t){if("string"==typeof t)return S(t);if(Array.isArray(t)){var e=[];for(var i in t){var n=S(t[i]);if(null==n)return null;e.push(n)}return e}return t}function A(t){var e,i,n,a={};if(null==t&&(t={}),"object"!==f(t))return null;for(var r in t)e=t[r],i=C(r),n="string"==typeof e?C(e):e,a[i]=n;return a}function _(t){var e="mParticle - Braze Web Kit log:",i=Array.prototype.slice.call(arguments,1);e+="\n"+t+":\n",i.forEach((function(t){Wn(t)||Array.isArray(t)?e+=JSON.stringify(t):e+=t,e+=",\n"})),r.logger.verbose(e)}this.init=function(s,u,h,d,f,p,b,v,g){r.logger||(r.logger={verbose:function(){}}),a=g;try{l="True"===(t=s).bundleCommerceEventData,c="True"===t.forwardSkuAsProductName,e=u,o.sessionTimeoutInSeconds=t.ABKSessionTimeoutKey||1800,o.sdkFlavor="mparticle",o.allowUserSuppliedJavascript="True"==t.enableHtmlInAppMessages,o.doNotLoadFontAwesome="True"==t.doNotLoadFontAwesome,t.safariWebsitePushId&&(o.safariWebsitePushId=t.safariWebsitePushId),t.serviceWorkerLocation&&(o.serviceWorkerLocation=t.serviceWorkerLocation),t.consentMappingSDK&&(w=t.consentMappingSDK,(n=JSON.parse(w.replace(/&quot;/g,'"'))).length&&(i=!0));var m=t.cluster||t.dataCenterLocation;if(Yn.hasOwnProperty(m))o.baseUrl=Yn[m];else{var y=E(m);y&&(o.baseUrl=y)}if(a&&a[28..toString()]){var k=a[28..toString()];"function"==typeof k.initOptions&&k.initOptions(o)}if(!0!==h)braze.initialize(t.apiKey,o),x(t);else{if(!braze.initialize(t.apiKey,o))return"Failed to initialize: "+Fn;x(t)}return"Successfully initialized: "+Fn}catch(pi){return"Failed to initialize: "+Fn+" with error: "+pi.message}var w},this.process=function(i){var a=!1;if(function(t){if(s&&!Vn(n)){var e=function(t){return t&&t.getGDPRConsentState?t.getGDPRConsentState():{}}(t.ConsentState);if(!Vn(e)){var i=w(e),a=JSON.stringify(i);a!==s&&(k(i),s=a)}}}(i),i.EventDataType==Kn)a=function(t){var e=!1;return t.EventCategory===Xn.ProductPurchase?!0===(e=d(t)):(e=function(t){return l?function(t){var e={},i=p(t.EventCategory);try{switch(t.EventCategory){case Xn.PromotionClick:case Xn.PromotionView:e.promotions=function(t){if(t&&t.PromotionList)return t.PromotionList;return[]}(t.PromotionAction);break;case Xn.ProductImpression:e.impressions=(u=t.ProductImpressions).length?u.map((function(t){return{"Product Impression List":t.ProductImpressionList,products:g(t.ProductList)}})):[];break;default:t.ProductAction.ProductList&&(e.products=g(t.ProductAction.ProductList));var n=t.ProductAction.TransactionId,a=t.ProductAction.TotalAmount,r=t.ProductAction.TaxAmount,o=t.ProductAction.ShippingAmount,s=t.ProductAction.Affiliation;n&&(e["Transaction Id"]=n),a&&(e["Total Amount"]=a),r&&(e["Tax Amount"]=r),o&&(e["Shipping Amou
1nt"]=o),s&&(e.Affiliation=s)}return v({EventName:i,EventAttributes:Jn(e,A(t.EventAttributes))})}catch(l){return"Error logging commerce event"+l.message}var u}(t):function(t){var e=!1,i=mParticle.eCommerce.expandCommerceEvent(t);if(null!==i){for(var n=0;n<i.length;n++){var a=!1;try{!0===(e=v(i[n]))&&(a=!0)}catch(r){return"Error logging page event"+r.message}}e=!0===a}return e}(t)}(t),!0===e)}(i);else if(i.EventDataType==Gn)a=v(i);else{if(i.EventDataType!=jn)return"Can't send event type to forwarder "+Fn+", event type is not supported";"True"==t.forwardScreenViews&&(a=function(e){var i,n,a=e.EventAttributes||{};return a.hostname=window.location.hostname,a.title=window.document.title,_("braze.logCustomEvent",i=C("True"===t.setEventNameForPageView?e.EventName:window.location.pathname),n=A(a)),!0===braze.logCustomEvent(i,n)}(i))}!0===a&&e&&e(r,i)},this.setUserIdentity=function(t,e){if("1"===window.mParticle.getVersion().split(".")[0])if(e==window.mParticle.IdentityType.CustomerId)_("braze.changeUser",t),braze.changeUser(t);else{if(e!=window.mParticle.IdentityType.Email)return"Can't call setUserIdentity on forwarder "+Fn+", identity type not supported.";_("braze.getUser().setEmail",t),braze.getUser().setEmail(t)}},this.setUserAttribute=function(t,e){if(t in u)return b(t,e);var i=C(t),n=C(e);if(null!=e&&null==n)return"Value did not pass validation for "+t;_("braze.getUser().setCustomUserAttribute",i,n),braze.getUser().setCustomUserAttribute(i,n)},this.onUserIdentified=m,this.removeUserAttribute=function(t){if(t in u)return b(t,null);var e=C(t);_("braze.getUser().setCustomUserAttribute",e,null),braze.getUser().setCustomUserAttribute(e,null)},this.decodeClusterSetting=E};function Jn(){for(var t={},e=0;e<arguments.length;e+=1)for(var i=arguments[e],n=Object.keys(i),a=0;a<n.length;a+=1)t[n[a]]=i[n[a]];return t}function Wn(t){return null!=t&&"object"===f(t)&&!1===Array.isArray(t)}function Vn(t){return null==t||!(Object.keys(t)||t).length}window&&window.mParticle&&window.mParticle.addForwarder&&window.mParticle.addForwarder({name:Fn,constructor:Hn,getId:function(){return 28},suffix:qn});var $n={register:function(t){var e=[Fn,qn].join("-");t?Wn(t)?(Wn(t.kits)||(t.kits={}),t.kits[e]={constructor:Hn},window.console.log("Successfully registered "+e+" to your mParticle configuration")):window.console.log("'config' must be an object. You passed in a "+f(t)):window.console.log("You must pass a config object to register the kit "+e)},getVersion:function(){return"5.0.1"}};e.default=$n}}]);
2//# sourceMappingURL=vendors~mparticle_web-braze-kit-ec0a4d.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.