LocalCDN-Firefox-Chrome-Brave/resources/appboy-web-sdk/3.4.0/appboy.min.jsm

275 lines
188 KiB
JavaScript
Raw Normal View History

2021-09-26 08:58:20 +02:00
/*
* Braze Web SDK v3.4.0
* (c) Braze, Inc. 2021 - http://braze.com
* License available at https://github.com/Appboy/appboy-web-sdk/blob/master/LICENSE
* Compiled on 2021-09-24
*/
(function(){(function(b,a){if("function"===typeof define&&define.amd)define([],a);else if("object"===typeof module&&module.exports){var e = a();module.exports=e;module.exports.default=e}else if(b.appboy){var d=a(),c;for(c in d)b.appboy[c]=d[c]}else b.appboy=a()})("undefined"!==typeof self?self:this,function(){var appboyInterface={};var p;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ba(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}var ca="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},da="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function ea(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var fa=ea(this);function ia(a,b){if(b)a:{var c=fa;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&da(c,a,{configurable:!0,writable:!0,value:b})}}var ja;
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={Kg:!0},ma={};try{ma.__proto__=la;ka=ma.Kg;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var na=ja;
function oa(a,b){a.prototype=ca(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Zh=b.prototype}
ia("String.prototype.repeat",function(a){return a?a:function(b){if(null==this)throw new TypeError("The 'this' value for String.prototype.repeat must not be null or undefined");var c=this+"";if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
ia("Promise",function(a){function b(g){this.Ob=0;this.Pd=void 0;this.pb=[];var h=this.xd();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.Ha=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.Pe=function(g){if(null==this.Ha){this.Ha=[];var h=this;this.Qe(function(){h.Yg()})}this.Ha.push(g)};var e=fa.setTimeout;c.prototype.Qe=function(g){e(g,0)};c.prototype.Yg=function(){for(;this.Ha&&this.Ha.length;){var g=this.Ha;this.Ha=[];for(var h=
0;h<g.length;++h){var k=g[h];g[h]=null;try{k()}catch(l){this.Og(l)}}}this.Ha=null};c.prototype.Og=function(g){this.Qe(function(){throw g;})};b.prototype.xd=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.mh),reject:g(this.Od)}};b.prototype.mh=function(g){if(g===this)this.Od(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.Dh(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;
default:h=!1}h?this.lh(g):this.af(g)}};b.prototype.lh=function(g){var h=void 0;try{h=g.then}catch(k){this.Od(k);return}"function"==typeof h?this.Eh(h,g):this.af(g)};b.prototype.Od=function(g){this.kf(2,g)};b.prototype.af=function(g){this.kf(1,g)};b.prototype.kf=function(g,h){if(0!=this.Ob)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.Ob);this.Ob=g;this.Pd=h;this.Zg()};b.prototype.Zg=function(){if(null!=this.pb){for(var g=0;g<this.pb.length;++g)f.Pe(this.pb[g]);this.pb=
null}};var f=new c;b.prototype.Dh=function(g){var h=this.xd();g.yc(h.resolve,h.reject)};b.prototype.Eh=function(g,h){var k=this.xd();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,v){return"function"==typeof q?function(t){try{l(q(t))}catch(A){m(A)}}:v}var l,m,r=new b(function(q,v){l=q;m=v});this.yc(k(g,l),k(h,m));return r};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.yc=function(g,h){function k(){switch(l.Ob){case 1:g(l.Pd);
break;case 2:h(l.Pd);break;default:throw Error("Unexpected state: "+l.Ob);}}var l=this;null==this.pb?f.Pe(k):this.pb.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=ba(g),m=l.next();!m.done;m=l.next())d(m.value).yc(h,k)})};b.all=function(g){var h=ba(g),k=h.next();return k.done?d([]):new b(function(l,m){function r(t){return function(A){q[t]=A;v--;0==v&&l(q)}}var q=[],v=0;do q.push(void 0),v++,d(k.value).yc(r(q.length-
1),m),k=h.next();while(!k.done)})};return b});var pa={Oh:function(a){var b="=".repeat((4-a.length%4)%4);a=(a+b).replace(/\-/g,"+").replace(/_/g,"/");a=atob(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}};var qa={Ia:function(){function a(b){var c=(Math.random().toString(16)+"000000000").substr(2,8);return b?"-"+c.substr(0,4)+"-"+c.substr(4,4):c}return a()+a(!0)+a(!0)+a()}};function ra(a){var b=w;this.He="undefined"===typeof window?self:window;this.C=a;this.D=b}function sa(a){if("indexedDB"in a.He)return a.He.indexedDB}
function ta(a){try{if(null==sa(a))return!1;sa(a).open("Braze IndexedDB Support Test");if("undefined"!==typeof window){var b=window.Vh||window.Ya||window.Xh;if(b&&b.oh&&b.oh.id)return a.D.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return!0}catch(c){return a.D.info("Not using IndexedDB for storage due to following error: "+c),!1}}
function ua(a,b,c){var d=sa(a).open(a.C.P,a.C.VERSION);if(null==d)return"function"===typeof c&&c(),!1;d.onupgradeneeded=function(e){a.D.info("Upgrading indexedDB "+a.C.P+" to v"+a.C.VERSION+"...");e=e.target.result;for(var f in a.C.H)a.C.H.hasOwnProperty(f)&&!e.objectStoreNames.contains(a.C.H[f])&&e.createObjectStore(a.C.H[f])};d.onsuccess=function(e){var f=e.target.result;f.onversionchange=function(){f.close();"function"===typeof c&&c();a.D.error("Needed to close the database unexpectedly because of an upgrade in another tab")};
b(f)};d.onerror=function(e){a.D.info("Could not open indexedDB "+a.C.P+" v"+a.C.VERSION+": "+e.target.errorCode);"function"===typeof c&&c();return!0};return!0}
ra.prototype.setItem=function(a,b,c,d,e){if(!ta(this))return"function"===typeof e&&e(),!1;var f=this;return ua(this,function(g){g.objectStoreNames.contains(a)?(g=g.transaction([a],"readwrite").objectStore(a).put(c,b),g.onerror=function(){f.D.error("Could not store object "+b+" in "+a+" on indexedDB "+f.C.P);"function"===typeof e&&e()},g.onsuccess=function(){"function"===typeof d&&d()}):(f.D.error("Could not store object "+b+" in "+a+" on indexedDB "+f.C.P+" - "+a+" is not a valid objectStore"),"function"===
typeof e&&e())},e)};ra.prototype.getItem=function(a,b,c){if(!ta(this))return!1;var d=this;return ua(this,function(e){e.objectStoreNames.contains(a)?(e=e.transaction([a],"readonly").objectStore(a).get(b),e.onerror=function(){d.D.error("Could not retrieve object "+b+" in "+a+" on indexedDB "+d.C.P)},e.onsuccess=function(f){f=f.target.result;null!=f&&c(f)}):d.D.error("Could not retrieve object "+b+" in "+a+" on indexedDB "+d.C.P+" - "+a+" is not a valid objectStore")})};
function va(a,b,c,d){ta(a)?ua(a,function(e){e.objectStoreNames.contains(b)?(e=e.transaction([b],"readonly").objectStore(b).openCursor(null,"prev"),e.onerror=function(){a.D.error("Could not open cursor for "+b+" on indexedDB "+a.C.P);"function"===typeof d&&d()},e.onsuccess=function(f){f=f.target.result;null!=f&&null!=f.value&&null!=f.key?c(f.key,f.value):"function"===typeof d&&d()}):(a.D.error("Could not retrieve last record from "+b+" on indexedDB "+a.C.P+" - "+b+" is not a valid objectStore"),"function"===
typeof d&&d())},d):"function"===typeof d&&d()}function wa(a,b,c){ta(a)&&ua(a,function(d){d.objectStoreNames.contains(b)?d.transaction([b],"readwrite").objectStore(b)["delete"](c).onerror=function(){a.D.error("Could not delete record "+c+" from "+b+" on indexedDB "+a.C.P)}:a.D.error("Could not delete record "+c+" from "+b+" on indexedDB "+a.C.P+" - "+b+" is not a valid objectStore")})}
function xa(a,b,c){ta(a)&&ua(a,function(d){if(d.objectStoreNames.contains(b)){var e=d.transaction([b],"readwrite").objectStore(b);d=e.openCursor();var f=[];d.onerror=function(){0<f.length?(a.D.info("Cursor closed midway through for "+b+" on indexedDB "+a.C.P),c(f)):a.D.error("Could not open cursor for "+b+" on indexedDB "+a.C.P)};d.onsuccess=function(g){var h=g.target.result;null!=h?(null!=h.value&&null!=h.key&&(e["delete"](h.key).onsuccess=function(){f.push(h.value)}),h.continue()):0<f.length&&c(f)}}else a.D.error("Could not retrieve objects from "+
b+" on indexedDB "+a.C.P+" - "+b+" is not a valid objectStore")})}
ra.prototype.clearData=function(){if(!ta(this))return!1;var a=[],b;for(b in this.C.H)this.C.H.hasOwnProperty(b)&&this.C.H[b]!==this.C.H.cd&&a.push(this.C.H[b]);var c=this;return ua(this,function(d){d=d.transaction(a,"readwrite");for(var e=0;e<a.length;e++)d.objectStore(a[e]).clear().onerror=function(){c.D.error("Could not clear "+this.source.name+" on indexedDB "+c.C.P)};d.onerror=function(){c.D.error("Could not clear object stores on indexedDB "+c.C.P)}})};var ya={Ed:function(a){if(void 0!==a||void 0===ya.Ea)ya.Ea=!!a;ya.De||(ya.De=!0)},Eb:function(){ya.De=!1;ya.Ea=void 0;ya.D=void 0},Rd:function(a){"function"!==typeof a?ya.info("Ignoring setLogger call since logger is not a function"):(ya.Ed(),ya.D=a)},Wd:function(){ya.Ed();ya.Ea?(console.log("Disabling Appboy logging"),ya.Ea=!1):(console.log("Enabled Appboy logging"),ya.Ea=!0)},info:function(a){ya.Ea&&(a="Appboy: "+a,null!=ya.D?ya.D(a):console.log(a))},warn:function(a){ya.Ea&&(a="Appboy SDK Warning: "+
a+" (v3.4.0)",null!=ya.D?ya.D(a):console.warn(a))},error:function(a){ya.Ea&&(a="Appboy SDK Error: "+a+" (v3.4.0)",null!=ya.D?ya.D(a):console.error(a))}};var x={CustomEvent:"ce",ag:"p",og:"pc",Th:"ca",bg:"i",Vc:"ie",Ff:"cci",Hf:"ccic",Df:"ccc",Ef:"ccd",re:"ss",ug:"se",$f:"si",ie:"sc",ge:"sbc",Zf:"sfe",If:"iec",hg:"lr",zf:"uae",Cf:"ci",Bf:"cc",fg:"lcaa",gg:"lcar",Kf:"inc",Jf:"add",Lf:"rem",Mf:"set",vg:"sgu"},za={Wf:"feed_displayed",Gf:"content_cards_displayed"},Aa={ga:{P:"AppboyServiceWorkerAsyncStorage",VERSION:6,H:{Nf:"data",me:"pushClicks",ed:"pushSubscribed",Rh:"fallbackDevice",Af:"cardUpdates",cd:"optOut",ke:"pendingData",oe:"sdkAuthenticationSignature"},
fc:1}},w=ya,C={wf:"allowCrawlerActivity",Oc:"baseUrl",jg:"noCookies",be:"devicePropertyAllowlist",Sc:"devicePropertyWhitelist",Sf:"disablePushTokenMaintenance",Uf:"enableLogging",Vf:"enableSdkAuthentication",ig:"manageServiceWorkerExternally",Xf:"minimumIntervalBetweenTriggerActionsInSeconds",tg:"sessionTimeoutInSeconds",yf:"appVersion",sg:"serviceWorkerLocation",qg:"safariWebsitePushId",$c:"localization",$d:"contentSecurityNonce",ce:"enableHtmlInAppMessages",Xd:"allowUserSuppliedJavascript",Yf:"inAppMessageZIndex",
lg:"openInAppMessagesInNewTab",mg:"openNewsFeedCardsInNewTab",pg:"requireExplicitInAppMessageDismissal",Tf:"doNotLoadFontAwesome",pe:"sdkFlavor",Xc:"language",kg:"openCardsInNewTab"};function Ba(a,b,c,d){a=Ca(a);return-1===a.indexOf(b)?(w.error(c+" Valid values from "+d+' are "'+a.join('"/"')+'".'),!1):!0}function Da(a){return Array.isArray?Array.isArray(a):"[object Array]"===Object.prototype.toString.call(a)}function Ea(a){return"[object Date]"===Object.prototype.toString.call(a)}function Fa(a){return"[object Object]"===Object.prototype.toString.call(a)}
function Ga(a){null==a&&(a=[]);for(var b=[],c=arguments.length,d=0,e=a.length;d<e;d++){var f=a[d];if(-1===b.indexOf(f)){var g;for(g=1;g<c&&-1!==arguments[g].indexOf(f);g++);g===c&&b.push(f)}}return b}function Ha(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b}function Ca(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&void 0!==a[c]&&b.push(a[c]);return b}
function Ia(a,b){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var c=a.toString();if(c!==b.toString())return!1;switch(c){case "[object RegExp]":case "[object String]":return""+a===""+b;case "[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case "[object Date]":case "[object Boolean]":return+a===+b}c="[object Array]"===c;if(!c){if("object"!==typeof a||"object"!==typeof b)return!1;var d=a.constructor,e=b.constructor;if(d!==e&&!("function"===typeof d&&d instanceof
d&&"function"===typeof e&&e instanceof e)&&"constructor"in a&&"constructor"in b)return!1}d=[];e=[];for(var f=d.length;f--;)if(d[f]===a)return e[f]===b;d.push(a);e.push(b);if(c){f=a.length;if(f!==b.length)return!1;for(;f--;)if(!Ia(a[f],b[f]))return!1}else{c=Ha(a);f=c.length;if(Ha(b).length!==f)return!1;for(;f--;){var g=c[f];if(!b.hasOwnProperty(g)||!Ia(a[g],b[g]))return!1}}d.pop();e.pop();return!0};function Ja(a,b){a/=1E3;b&&(a=Math.floor(a));return a}function Ka(a){var b=parseInt(a);return null==a||isNaN(b)?null:new Date(1E3*b)}function La(a){return null!=a&&Ea(a)?a.toISOString().replace(/\.[0-9]{3}Z$/,""):a}function Ma(a){return null==a||""===a?null:new Date(a)};function E(a,b,c,d,e){this.Qb=a;this.type=b;this.time=null==c||""===c?(new Date).valueOf():c;this.sessionId=d;this.data=e}E.prototype.wc=function(){var a={name:this.type,time:Ja(this.time),data:this.data||{},session_id:this.sessionId};null!=this.Qb&&(a.user_id=this.Qb);return a};E.prototype.A=function(){return{u:this.Qb,t:this.type,ts:this.time,s:this.sessionId,d:this.data}};function Na(a){return null!=a&&Fa(a)&&null!=a.t&&""!==a.t}function Oa(a){return new E(a.u,a.t,a.ts,a.s,a.d)};function Pa(a,b,c){null==a&&(a=qa.Ia());c=parseInt(c);if(isNaN(c)||0===c)c=(new Date).valueOf();this.ia=a;this.Db=c;this.Ib=(new Date).valueOf();this.zd=b}Pa.prototype.A=function(){return{g:this.ia,e:this.zd,c:this.Db,l:this.Ib}};function Qa(a){for(var b=a.length,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);127<d&&2047>=d?b++:2047<d&&65535>=d&&(b+=2);56320<=d&&57343>=d&&c--}return b};function Ra(a,b,c,d){(d="string"===typeof a||null===a&&d)||w.error("Cannot "+b+" because "+c+' "'+a+'" is invalid.');return d}function Sa(a,b,c){var d=null!=a&&"string"===typeof a&&(""===a||a.match(Ta));d||w.error("Cannot "+b+" because "+c+' "'+a+'" is invalid.');return d}
function Ua(a,b,c,d,e){null==a&&(a={});if("object"!==typeof a||Da(a))return w.error(b+" requires that "+c+" be an object. Ignoring "+e+"."),[!1,null];b=JSON.stringify(a);if(Qa(b)>Va)return w.error("Could not "+d+" because "+c+" was greater than the max size of "+Xa+"."),[!1,null];try{var f=JSON.parse(b)}catch(l){return w.error("Could not "+d+" because "+c+" did not contain valid JSON."),[!1,null]}for(var g in a){if(!Sa(g,d,"the "+e+" property name"))return[!1,null];c=a[g];if(null==c)delete a[g],delete f[g];
else{Ea(c)&&(f[g]=La(c));var h=d,k="the "+e+' property "'+g+'"';(b=Fa(c)||Da(c)?Ya(c,f[g]):Za(c))||w.error("Cannot "+h+" because "+k+' "'+c+'" is invalid.');if(!b)return[!1,null]}}return[!0,f]}function Ya(a,b){if(Da(a)&&Da(b))for(var c=0;c<a.length&&c<b.length;c++){if(Ea(a[c])&&(b[c]=La(a[c])),!Ya(a[c],b[c]))return!1}else if(Fa(a)){c=ba(Ha(a));for(var d=c.next();!d.done;d=c.next())if(d=d.value,Ea(a[d])&&(b[d]=La(a[d])),!Ya(a[d],b[d]))return!1}else return Za(a);return!0}
function Za(a){var b=typeof a;return null==a||"number"===b||"boolean"===b||Ea(a)||"string"===b}var Ta=/^[^\x00-\x1F\x22]+$/,$a=new RegExp(/^.+@.+\..+$/),Va=51200,Xa="50KB";var J={};function L(a,b){this.f=a;this.G=b}p=L.prototype;p.o=function(a){null==a&&w.error("getUserId must be supplied with a callback. e.g., appboy.getUser().getUserId(function(userId) {console.log('the user id is ' + userId)})");"function"===typeof a&&a(this.f.o())};
p.Lg=function(a,b){if(!Ra(a,"add alias","the alias",!1)||0>=a.length)return w.error("addAlias requires a non-empty alias"),!1;if(!Ra(b,"add alias","the label",!1)||0>=b.length)return w.error("addAlias requires a non-empty label"),!1;var c=this.G,d=new ab,e=bb(c.F),f=x.zf;d.j.push(new E(c.f.o(),f,(new Date).valueOf(),e,{a:a,l:b}));d.h=cb(c.b,d.j);return d.h};p.wh=function(a){return Ra(a,"set first name","the firstName",!0)?db(this.f,"first_name",a):!1};
p.Bh=function(a){return Ra(a,"set last name","the lastName",!0)?db(this.f,"last_name",a):!1};p.uh=function(a){return null===a||"string"===typeof a&&null!=a.toLowerCase().match($a)?db(this.f,"email",a):(w.error('Cannot set email address - "'+a+'" did not pass RFC-5322 validation.'),!1)};p.xh=function(a){"string"===typeof a&&(a=a.toLowerCase());return null===a||Ba(eb,a,'Gender "'+a+'" is not a valid gender.',"User.Genders")?db(this.f,"gender",a):!1};
p.sh=function(a,b,c){if(null===a&&null===b&&null===c)return db(this.f,"dob",null);a=parseInt(a);b=parseInt(b);c=parseInt(c);return isNaN(a)||isNaN(b)||isNaN(c)||12<b||1>b||31<c||1>c?(w.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):db(this.f,"dob",""+a+"-"+b+"-"+c)};p.qh=function(a){return Ra(a,"set country","the country",!0)?db(this.f,"country",a):!1};
p.yh=function(a){return Ra(a,"set home city","the homeCity",!0)?db(this.f,"home_city",a):!1};p.Ah=function(a){return Ra(a,"set language","the language",!0)?db(this.f,"language",a):!1};p.vh=function(a){return Ba(fb,a,'Email notification setting "'+a+'" is not a valid subscription type.',"User.NotificationSubscriptionTypes")?db(this.f,"email_subscribe",a):!1};
p.Sd=function(a){return Ba(fb,a,'Push notification setting "'+a+'" is not a valid subscription type.',"User.NotificationSubscriptionTypes")?db(this.f,"push_subscribe",a):!1};p.Ch=function(a){return Ra(a,"set phone number","the phoneNumber",!0)?null===a||a.match(gb)?db(this.f,"phone",a):(w.error('Cannot set phone number - "'+a+'" did not pass validation.'),!1):!1};p.ph=function(a){return db(this.f,"image_url",a)};
p.Kc=function(a,b,c,d,e){if(null==a||null==b)return w.error("Cannot set last-known location - latitude and longitude are required."),!1;a=parseFloat(a);b=parseFloat(b);null!=c&&(c=parseFloat(c));null!=d&&(d=parseFloat(d));null!=e&&(e=parseFloat(e));return isNaN(a)||isNaN(b)||null!=c&&isNaN(c)||null!=d&&isNaN(d)||null!=e&&isNaN(e)?(w.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):90<a||-90>a||180<b||-180>b?(w.error("Cannot set last-known location - latitude and longitude are bounded by \u00b190 and \u00b1180 respectively."),
!1):null!=c&&0>c||null!=e&&0>e?(w.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.G.Kc(this.f.o(),a,b,d,c,e).h};
p.Qd=function(a,b){if(!Sa(a,"set custom user attribute","the given key"))return!1;var c=typeof b,d=Ea(b),e=Da(b);if("number"!==c&&"boolean"!==c&&!d&&!e&&null!==b&&!Sa(b,'set custom user attribute "'+a+'"',"the given value"))return!1;d&&(b=La(b));if(e){for(c=0;c<b.length;c++)if(!Sa(b[c],'set custom user attribute "'+a+'"',"the element in the given array"))return!1;return hb(this.G,x.Mf,a,b).h}return this.f.Qd(a,b)};
p.Mg=function(a,b){return!Sa(a,"add to custom user attribute array","the given key")||null!=b&&!Sa(b,"add to custom user attribute array","the given value")?!1:hb(this.G,x.Jf,a,b).h};p.jh=function(a,b){return!Sa(a,"remove from custom user attribute array","the given key")||null!=b&&!Sa(b,"remove from custom user attribute array","the given value")?!1:hb(this.G,x.Lf,a,b).h};
p.eh=function(a,b){if(!Sa(a,"increment custom user attribute","the given key"))return!1;null==b&&(b=1);var c=parseInt(b);return isNaN(c)||c!==parseFloat(b)?(w.error('Cannot increment custom user attribute because the given incrementValue "'+b+'" is not an integer.'),!1):hb(this.G,x.Kf,a,c).h};p.Nd=function(a,b,c,d,e){this.f.Nd(a,b,c,d,e);ib(this.G)};p.Mb=function(a){this.f.Mb(a)};
p.rh=function(a,b,c){if(!Sa(a,"set custom location attribute","the given key"))return!1;if(null!==b||null!==c)if(b=parseFloat(b),c=parseFloat(c),isNaN(b)||90<b||-90>b||isNaN(c)||180<c||-180>c)return w.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by \u00b190 and \u00b1180 respectively, or must both be null for removal."),!1;var d=this.G,e=c;c=new ab;if(jb(d.J,a))w.info('Custom Attribute "'+a+'" is blocklisted, ignoring.'),c.h=!1;else{var f=bb(d.F);
if(null===b&&null===e){var g=x.gg;a={key:a}}else g=x.fg,a={key:a,latitude:b,longitude:e};c.j.push(new E(d.f.o(),g,(new Date).valueOf(),f,a));c.h=cb(d.b,c.j)}return c.h};p.Ng=function(a){return!Ra(a,"add user to subscription group","subscription group ID",!1)||0>=a.length?(w.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):kb(this.G,a,lb).h};
p.kh=function(a){return!Ra(a,"remove user from subscription group","subscription group ID",!1)||0>=a.length?(w.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):kb(this.G,a,mb).h};var gb=/^[0-9 .\\(\\)\\+\\-]+$/,eb={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},fb={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},lb="subscribed",mb="unsubscribed";J.User=L;J.User.Genders=eb;
J.User.NotificationSubscriptionTypes=fb;J.User.prototype.getUserId=L.prototype.o;J.User.prototype.setFirstName=L.prototype.wh;J.User.prototype.setLastName=L.prototype.Bh;J.User.prototype.setEmail=L.prototype.uh;J.User.prototype.setGender=L.prototype.xh;J.User.prototype.setDateOfBirth=L.prototype.sh;J.User.prototype.setCountry=L.prototype.qh;J.User.prototype.setHomeCity=L.prototype.yh;J.User.prototype.setLanguage=L.prototype.Ah;J.User.prototype.setEmailNotificationSubscriptionType=L.prototype.vh;
J.User.prototype.setPushNotificationSubscriptionType=L.prototype.Sd;J.User.prototype.setPhoneNumber=L.prototype.Ch;J.User.prototype.setAvatarImageUrl=L.prototype.ph;J.User.prototype.setLastKnownLocation=L.prototype.Kc;J.User.prototype.setCustomUserAttribute=L.prototype.Qd;J.User.prototype.addToCustomAttributeArray=L.prototype.Mg;J.User.prototype.removeFromCustomAttributeArray=L.prototype.jh;J.User.prototype.incrementCustomUserAttribute=L.prototype.eh;J.User.prototype.addAlias=L.prototype.Lg;
J.User.prototype.setCustomLocationAttribute=L.prototype.rh;J.User.prototype.addToSubscriptionGroup=L.prototype.Ng;J.User.prototype.removeFromSubscriptionGroup=L.prototype.kh;function nb(){}nb.prototype.Bd=function(){};nb.prototype.Dd=function(){};nb.prototype.nb=function(){};function ob(a,b){if(a&&b)if(a=a.toLowerCase(),Da(b.O))for(var c=0;c<b.O.length;c++){if(-1!==a.indexOf(b.O[c].toLowerCase()))return b.S}else if(-1!==a.indexOf(b.O.toLowerCase()))return b.S};var pb={Zd:"Chrome",Tc:"Edge",Zb:"Internet Explorer",je:"Opera",fd:"Safari",Sh:"Firefox"};function qb(){if(this.userAgentData=navigator.userAgentData){var a=this.userAgentData.brands;if(a&&a.length){a=ba(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=void 0,d=[];for(c in pb)pb[c]!==pb.Zb&&d.push(pb[c]);if((c=b.brand.match(new RegExp("("+d.join("|")+")","i")))&&0<c.length){var e=c[0];var f=b.version;break}}}this.Ya=e||"Unknown Browser";this.version=f||"Unknown Version"}}oa(qb,nb);qb.prototype.Bd=function(){return this.Ya};qb.prototype.Dd=function(){return this.version};
qb.prototype.nb=function(a){var b=this;return this.fa?Promise.resolve(this.fa):(this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues(["platform"]):Promise.reject()).then(function(c){c=c.platform;for(var d=0;d<a.length;d++){var e=ob(c,a[d]);if(e)return b.fa=e,b.fa}return c}).catch(function(){return navigator.platform})};function rb(){this.Se=sb()}oa(rb,nb);rb.prototype.Bd=function(){return this.Se[0]||"Unknown Browser"};rb.prototype.Dd=function(){return this.Se[1]||"Unknown Version"};rb.prototype.nb=function(a){for(var b=0;b<a.length;b++){var c=ob(a[b].U,a[b]);if(c)return"Mac"===c&&1<navigator.maxTouchPoints&&(c="iOS"),Promise.resolve(c)}return Promise.resolve(navigator.platform)};
function sb(){var a=navigator.userAgent||"",b=a.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(/trident/i.test(b[1])){var c=/\brv[ :]+(\.?\d+(\.\d+)*)/g.exec(a)||[];return[pb.Zb,c[1]||""]}if(-1!==a.indexOf("(Web0S; Linux/SmartTV)"))return["LG Smart TV",null];if(-1!==a.indexOf("CrKey"))return["Chromecast",null];if(-1!==a.indexOf("BRAVIA")||-1!==a.indexOf("SonyCEBrowser")||-1!==a.indexOf("SonyDTV"))return["Sony Smart TV",
null];if(-1!==a.indexOf("PhilipsTV"))return["Philips Smart TV",null];if(a.match(/\b(Roku)\b/))return["Roku",null];if(a.match(/\bAFTM\b/))return["Amazon Fire Stick",null];if(b[1]===pb.Zd&&(c=a.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),null!=c))return c=c.slice(1),c[0]=c[0].replace("OPR",pb.je),c[0]=c[0].replace("EdgA",pb.Tc),"Edg"===c[0]&&(c[0]=pb.Tc),[c[0],c[1]];if(b[1]===pb.fd&&(c=a.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),null!=c))return c=c.slice(1),c[0]=c[0].replace("EdgiOS",pb.Tc),
[c[0],c[1]];b=b[2]?[b[1],b[2]]:[null,null];b[0]===pb.fd&&null!=(c=a.match(/version\/(\.?\d+(\.\d+)*)/i))&&b.splice(1,1,c[1]);null!=(c=a.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))&&b.splice(1,1,c[2]);if(b[0]===pb.je&&null!=(c=a.match(/mini\/(\.?\d+(\.\d+)*)/i)))return["Opera Mini",c[1]||""];b[0]&&(a=b[0].toLowerCase(),"msie"===a&&(b[0]=pb.Zb),"crios"===a&&(b[0]=pb.Zd),"tizen"===a&&(b[0]="Samsung Smart TV",b[1]=null),"samsungbrowser"===a&&(b[0]="Samsung Browser"));return b};function tb(){var a=this;this.Kd=new (navigator.userAgentData?qb:rb);this.userAgent=navigator.userAgent;this.Ya=this.Kd.Bd();this.version=this.Kd.Dd();this.nb().then(function(b){return a.fa=b});this.language=(navigator.ai||navigator.language||navigator.browserLanguage||navigator.$h||"").toLowerCase();this.fh=ub(this.userAgent)}tb.prototype.nb=function(){var a=this;return this.fa?Promise.resolve(this.fa):this.Kd.nb(vb).then(function(b){return a.fa=b})};
function ub(a){a=a.toLowerCase();for(var b="googlebot bingbot slurp duckduckbot baiduspider yandex facebookexternalhit sogou ia_archiver https://github.com/prerender/prerender aolbuild bingpreview msnbot adsbot mediapartners-google teoma".split(" "),c=0;c<b.length;c++)if(-1!==a.indexOf(b[c]))return!0;return!1}
var vb=[{U:navigator.platform,O:"Win",S:"Windows"},{U:navigator.platform,O:"Mac",S:"Mac"},{U:navigator.platform,O:"BlackBerry",S:"BlackBerry"},{U:navigator.platform,O:"FreeBSD",S:"FreeBSD"},{U:navigator.platform,O:"OpenBSD",S:"OpenBSD"},{U:navigator.platform,O:"Nintendo",S:"Nintendo"},{U:navigator.platform,O:"SunOS",S:"SunOS"},{U:navigator.platform,O:"PlayStation",S:"PlayStation"},{U:navigator.platform,O:"X11",S:"X11"},{U:navigator.userAgent,O:["iPhone","iPad","iPod"],S:"iOS"},{U:navigator.platform,
O:"Pike v",S:"iOS"},{U:navigator.userAgent,O:["Web0S"],S:"WebOS"},{U:navigator.platform,O:["Linux armv7l","Android"],S:"Android"},{U:navigator.userAgent,O:["Android"],S:"Android"},{U:navigator.platform,O:"Linux",S:"Linux"}],wb=new tb;function xb(a,b){this.nc=a;this.R=b}function yb(a,b,c){var d=c;null!=c&&c instanceof Pa&&(d=c.A());a.nc.store(b,d)}function zb(a,b){var c=Ab(a,b);null!=c&&(c.Ib=(new Date).valueOf(),yb(a,b,c))}function Ab(a,b){a=a.nc.Z(b);null==a||null==a.g?a=null:(b=new Pa(a.g,a.e,a.c),b.Ib=a.l,a=b);return a}function cb(a,b){if(null==b||0===b.length)return!1;Da(b)||(b=[b]);var c=a.R.Z(M.Rb);null!=c&&Da(c)||(c=[]);for(var d=0;d<b.length;d++)c.push(b[d].A());return a.R.store(M.Rb,c)}
function Bb(a){var b=a.R.Z(M.Rb);a.R.remove(M.Rb);null==b&&(b=[]);a=[];var c=!1,d=null;if(Da(b))for(var e=0;e<b.length;e++)Na(b[e])?a.push(Oa(b[e])):d=e;else c=!0;if(c||null!=d)e="Stored events could not be deserialized as Events",c&&(e+=", was "+Object.prototype.toString.call(b)+" not an array"),null!=d&&(e+=", value at index "+d+" does not look like an event"),e+=", serialized values were of type "+typeof b+": "+JSON.stringify(b),a.push(new E(null,x.Vc,(new Date).valueOf(),null,{e:e}));return a}
function O(a,b,c){Ba(M,b,"StorageManager cannot store object.","StorageManager.KEYS.OBJECTS")&&a.R.store(b,c)}function R(a,b){return Ba(M,b,"StorageManager cannot retrieve object.","StorageManager.KEYS.OBJECTS")?a.R.Z(b):!1}function S(a,b){Ba(M,b,"StorageManager cannot remove object.","StorageManager.KEYS.OBJECTS")&&a.R.remove(b)}xb.prototype.clearData=function(){for(var a=Ha(Cb),b=Ha(M),c=0;c<a.length;c++)this.nc.remove(Cb[a[c]]);for(a=0;a<b.length;a++)this.R.remove(M[b[a]])};
function Eb(a,b){var c=a.R.Z(M.Qa);null==c&&(c={});var d=b.user_id||M.Nc,e;for(e in b)"user_id"===e||null!=c[d]&&null!=c[d][e]||Fb(a,b.user_id,e,b[e])}function Fb(a,b,c,d){var e=a.R.Z(M.Qa);null==e&&(e={});var f=b||M.Nc,g=e[f];null==g&&(g={},null!=b&&(g.user_id=b));if("custom"===c){null==g[c]&&(g[c]={});for(var h in d)g[c][h]=d[h]}else g[c]=d;e[f]=g;return a.R.store(M.Qa,e)}function Gb(a){var b=a.R.Z(M.Qa);a.R.remove(M.Qa);a=[];for(var c in b)null!=b[c]&&a.push(b[c]);return a}
var Cb={hc:"ab.storage.userId",Rc:"ab.storage.deviceId",Ta:"ab.storage.sessionId"},M={gd:"ab.test",Rb:"ab.storage.events",Qa:"ab.storage.attributes",Nc:"ab.storage.attributes.anonymous_user",Yb:"ab.storage.device",ec:"ab.storage.pushToken",ad:"ab.storage.newsFeed",Zc:"ab.storage.lastNewsFeedRefresh",rb:"ab.storage.cardImpressions",qe:"ab.storage.serverConfig",hd:"ab.storage.triggers",jd:"ab.storage.triggers.ts",dg:"ab.storage.lastTriggeredTime",cg:"ab.storage.lastTriggeredTimesById",eg:"ab.storage.lastTriggerEventDataById",
bc:"ab.storage.messagingSessionStart",sb:"ab.storage.cc",Wb:"ab.storage.ccLastFullSync",Vb:"ab.storage.ccLastCardUpdated",gb:"ab.storage.ccClicks",hb:"ab.storage.ccImpressions",ua:"ab.storage.ccDismissals",ac:"ab.storage.lastDisplayedTriggerTimesById",Yc:"ab.storage.lastDisplayedTriggerTime",vb:"ab.storage.triggerFireInstancesById",tb:"ab.storage.signature"};function Hb(a){this.Y=a;this.$e=wb.Ya===pb.fd?3:10}Hb.prototype.Xa=function(a){return a+"."+this.Y};
Hb.prototype.store=function(a,b){b={v:b};try{return localStorage.setItem(this.Xa(a),JSON.stringify(b)),!0}catch(c){return w.info("Storage failure: "+c.message),!1}};Hb.prototype.Z=function(a){try{var b=JSON.parse(localStorage.getItem(this.Xa(a)));return null==b?null:b.v}catch(c){return w.info("Storage retrieval failure: "+c.message),null}};Hb.prototype.remove=function(a){try{localStorage.removeItem(this.Xa(a))}catch(b){return w.info("Storage removal failure: "+b.message),!1}};
function Ib(a,b){this.Y=a;a=0;for(var c=document.domain,d=c.split(".");a<d.length-1&&-1===document.cookie.indexOf("ab._gd=ab._gd");)a++,c="."+d.slice(-1-a).join("."),document.cookie="ab._gd=ab._gd;domain="+c+";";document.cookie="ab._gd=;expires="+(new Date(0)).toGMTString()+";domain="+c+";";this.Ie=c;this.Ae=525949;this.Me=!!b}Ib.prototype.Xa=function(a){return null!=this.Y?a+"."+this.Y:a};function Jb(a){var b=new Date;b.setTime(b.getTime()+6E4*a.Ae);return b.getFullYear()}
Ib.prototype.store=function(a,b){for(var c=Ca(Cb),d=document.cookie.split(";"),e=0;e<d.length;e++){for(var f=d[e];" "===f.charAt(0);)f=f.substring(1);for(var g=!1,h=0;h<c.length;h++)if(0===f.indexOf(c[h])){g=!0;break}g&&(f=f.split("=")[0],-1===f.indexOf("."+this.Y)&&Kb(this,f))}c=new Date;c.setTime(c.getTime()+6E4*this.Ae);c="expires="+c.toUTCString();d="domain="+this.Ie;b=this.Me?b:encodeURIComponent(JSON.stringify(b));a=this.Xa(a)+"="+b+";"+c+";"+d+";path=/";if(4093<=a.length)return w.info("Storage failure: string is "+
a.length+" chars which is too large to store as a cookie."),!1;document.cookie=a;return!0};
Ib.prototype.Z=function(a){for(var b=[],c=this.Xa(a)+"=",d=document.cookie.split(";"),e=0;e<d.length;e++){for(var f=d[e];" "===f.charAt(0);)f=f.substring(1);if(0===f.indexOf(c))try{var g=void 0;g=this.Me?f.substring(c.length,f.length):JSON.parse(decodeURIComponent(f.substring(c.length,f.length)));b.push(g)}catch(h){return w.info("Storage retrieval failure: "+h.message),this.remove(a),null}}return 0<b.length?b[b.length-1]:null};Ib.prototype.remove=function(a){Kb(this,this.Xa(a))};
function Kb(a,b){b=b+"=;expires="+(new Date(0)).toGMTString();document.cookie=b;document.cookie=b+";path=/";document.cookie=b+";path="+document.location.pathname;a=b+";domain="+a.Ie;document.cookie=a;document.cookie=a+";path=/";document.cookie=a+";path="+document.location.pathname}function Lb(){this.sd={};this.Ge=5242880;this.$e=3}
Lb.prototype.store=function(a,b){var c={value:b};var d=[];b=[b];for(var e=0;b.length;){var f=b.pop();if("boolean"===typeof f)e+=4;else if("string"===typeof f)e+=2*f.length;else if("number"===typeof f)e+=8;else if("object"===typeof f&&-1===d.indexOf(f)){d.push(f);for(var g in f)b.push(f[g])}}d=e;if(d>this.Ge)return w.info("Storage failure: object is \u2248"+d+" bytes which is greater than the max of "+this.Ge),!1;this.sd[a]=c;return!0};Lb.prototype.Z=function(a){a=this.sd[a];return null==a?null:a.value};
Lb.prototype.remove=function(a){this.sd[a]=null};function Mb(a,b,c){this.ma=[];b&&this.ma.push(new Ib(a));c&&this.ma.push(new Hb(a));this.ma.push(new Lb)}Mb.prototype.store=function(a,b){for(var c=!0,d=0;d<this.ma.length;d++)c=this.ma[d].store(a,b)&&c;return c};Mb.prototype.Z=function(a){for(var b=0;b<this.ma.length;b++){var c=this.ma[b].Z(a);if(null!=c)return c}return null};Mb.prototype.remove=function(a){for(var b=0;b<this.ma.length;b++)this.ma[b].remove(a)};function Nb(){this.Ab={}}function Ob(a,b){if("function"!==typeof b)return null;var c=qa.Ia();a.Ab[c]=b;return c}Nb.prototype.N=function(a){delete this.Ab[a]};Nb.prototype.K=function(){this.Ab={}};function Pb(a,b){var c=[],d;for(d in a.Ab)c.push(a.Ab[d](b))};function Qb(){if(null==Rb){Rb=!1;try{var a=Object.defineProperty({},"passive",{get:function(){Rb=!0}});window.addEventListener("testPassive",null,a);window.removeEventListener("testPassive",null,a)}catch(b){}}return Rb}function Sb(a,b,c){a.addEventListener(b,c,Qb()?{passive:!0}:!1)}
function Tb(a,b,c,d){if(null==a)return!1;b=b||!1;c=c||!1;a=a.getBoundingClientRect();return null==a?!1:(0<=a.top&&a.top<=(window.innerHeight||document.documentElement.clientHeight)||!b)&&(0<=a.left||!d)&&(0<=a.bottom&&a.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!c)&&(a.right<=(window.innerWidth||document.documentElement.clientWidth)||!d)}function Ub(a){if(a.onclick){var b=document.createEvent("MouseEvents");b.initEvent("click",!0,!0);a.onclick.apply(a,[b])}}
function Vb(a,b,c){var d=null,e=null;Sb(a,"touchstart",function(f){d=f.touches[0].clientX;e=f.touches[0].clientY});Sb(a,"touchmove",function(f){if(null!=d&&null!=e){var g=d-f.touches[0].clientX,h=e-f.touches[0].clientY;Math.abs(g)>Math.abs(h)&&25<=Math.abs(g)?(0<g&&b===Wb?c(f):0>g&&b===Xb&&c(f),e=d=null):25<=Math.abs(h)&&(0<h&&b===Yb&&a.scrollTop===a.scrollHeight-a.offsetHeight?c(f):0>h&&b===Zb&&0===a.scrollTop&&c(f),e=d=null)}})}
function $b(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("viewBox",a);d.setAttribute("xmlns","http://www.w3.org/2000/svg");a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d",b);null!=c&&a.setAttribute("fill",c);d.appendChild(a);return d}var Rb=null,Yb="up",Zb="down",Wb="left",Xb="right";function ac(a,b,c){var d=document.createElement("button");d.setAttribute("aria-label",a);d.setAttribute("tabindex","0");d.setAttribute("role","button");Sb(d,"touchstart",function(){});d.className="ab-close-button";a=$b("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",b);d.appendChild(a);d.addEventListener("keydown",function(e){if(32===e.keyCode||13===e.keyCode)c(),e.stopPropagation()});d.onclick=function(e){c();e.stopPropagation()};return d};var bc={gh:function(){return 600>=screen.width},ah:function(){if("orientation"in window)return 90===Math.abs(window.orientation)||270===window.orientation?bc.Sa.Wc:bc.Sa.dc;if("screen"in window){var a=window.screen.orientation||screen.Wh||screen.Yh;null!=a&&"object"===typeof a&&(a=a.type);if("landscape-primary"===a||"landscape-secondary"===a)return bc.Sa.Wc}return bc.Sa.dc},hh:function(a,b,c){c||null!=b&&b.metaKey?window.open(a):window.location=a},Sa:{dc:0,Wc:1}};J.WindowUtils=bc;
J.WindowUtils.openUri=bc.hh;function cc(a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A){this.id=a;this.viewed=b||!1;this.title=c||"";this.imageUrl=d;this.description=e||"";this.created=f||null;this.updated=g||null;this.categories=h||[];this.expiresAt=k||null;this.url=l;this.linkText=m;r=parseFloat(r);this.aspectRatio=isNaN(r)?null:r;this.extras=q;this.pinned=v||!1;this.dismissible=t||!1;this.dismissed=!1;this.clicked=A||!1;this.test=!1;this.nd=this.W=null}function dc(a){null==a.W&&(a.W=new Nb);return a.W}
function ec(a){null==a.nd&&(a.nd=new Nb);return a.nd}p=cc.prototype;p.Pb=function(a){return Ob(dc(this),a)};p.Ud=function(a){return Ob(ec(this),a)};p.N=function(a){dc(this).N(a);ec(this).N(a)};p.K=function(){dc(this).K();ec(this).K()};p.Md=function(){this.viewed=!0};p.fb=function(){this.clicked=this.viewed=!0;Pb(dc(this))};p.Ld=function(){return this.dismissible&&!this.dismissed?(this.dismissed=!0,Pb(ec(this)),!0):!1};
function fc(a,b){if(null==b||b[T.wa]!==a.id)return!0;if(b[T.ne])return!1;if(null!=b[T.ca]&&null!=a.updated&&b[T.ca]<Ja(a.updated.valueOf()))return!0;b[T.za]&&!a.viewed&&(a.viewed=!0);b[T.ta]&&!a.clicked&&(a.clicked=b[T.ta]);null!=b[T.Ua]&&(a.title=b[T.Ua]);null!=b[T.xa]&&(a.imageUrl=b[T.xa]);null!=b[T.Ra]&&(a.description=b[T.Ra]);if(null!=b[T.ca]){var c=Ka(b[T.ca]);null!=c&&(a.updated=c)}null!=b[T.ba]&&(a.expiresAt=b[T.ba]===gc?null:Ka(b[T.ba]));null!=b[T.URL]&&(a.url=b[T.URL]);null!=b[T.ya]&&(a.linkText=
b[T.ya]);null!=b[T.sa]&&(c=parseFloat(b[T.sa]),a.aspectRatio=isNaN(c)?null:c);null!=b[T.ka]&&(a.extras=b[T.ka]);null!=b[T.la]&&(a.pinned=b[T.la]);null!=b[T.va]&&(a.dismissible=b[T.va]);null!=b[T.V]&&(a.test=b[T.V]);return!0}
function hc(a){if(a[T.ne])return null;var b=a[T.wa],c=a[T.TYPE],d=a[T.za],e=a[T.Ua],f=a[T.xa],g=a[T.Ra],h=Ka(a[T.ca]);var k=a[T.ba]===gc?null:Ka(a[T.ba]);var l=a[T.URL],m=a[T.ya],r=a[T.sa],q=a[T.ka],v=a[T.la],t=a[T.va],A=a[T.ta];a=a[T.V]||!1;if(c===ic.te||c===ic.cc)b=new jc(b,d,e,f,g,null,h,null,k,l,m,r,q,v,t,A);else if(c===ic.Tb)b=new kc(b,d,e,f,g,null,h,null,k,l,m,r,q,v,t,A);else if(c===ic.Sb)b=new lc(b,d,f,null,h,null,k,l,m,r,q,v,t,A);else if(c===ic.Pc)b=new mc(b,d,h,k,q,v);else return w.error("Ignoring card with unknown type "+
c),null;b.test=a;return b}function nc(a){var b=a[U.wa],c=a[U.TYPE],d=a[U.za],e=a[U.Ua],f=a[U.xa],g=a[U.Ra],h=Ma(a[U.Xb]),k=Ma(a[U.ca]),l=a[U.Ub],m=Ma(a[U.ba]),r=a[U.URL],q=a[U.ya],v=a[U.sa],t=a[U.ka],A=a[U.la],H=a[U.va],z=a[U.ta];a=a[U.V]||!1;if(c===ic.cc)b=new jc(b,d,e,f,g,h,k,l,m,r,q,v,t,A,H,z);else if(c===ic.Tb)b=new kc(b,d,e,f,g,h,k,l,m,r,q,v,t,A,H,z);else if(c===ic.Sb)b=new lc(b,d,f,h,k,l,m,r,q,v,t,A,H,z);else if(c===ic.Pc)b=new mc(b,d,k,m,t,A);else return;b.test=a;return b}
function oc(a){null!=a&&(a=a.querySelectorAll(".ab-unread-indicator")[0],null!=a&&(a.className+=" read"))}
p.$=function(a,b,c){function d(r){oc(f);g&&(a(e),bc.openUri(e.url,r,c));return!1}var e=this,f=document.createElement("div");f.className="ab-card ab-effect-card "+this.zc;f.setAttribute("data-ab-card-id",this.id);f.setAttribute("role","article");f.setAttribute("tabindex","0");var g=this.url&&""!==this.url;if(this.pinned){var h=document.createElement("div");h.className="ab-pinned-indicator";var k=document.createElement("i");k.className="fa fa-star";h.appendChild(k);f.appendChild(h)}this.imageUrl&&""!==
this.imageUrl&&(h=document.createElement("div"),h.className="ab-image-area",k=document.createElement("img"),k.setAttribute("src",this.imageUrl),this.tc(k),h.appendChild(k),f.className+=" with-image",g&&!this.Cc?(k=document.createElement("a"),k.setAttribute("href",this.url),k.onclick=d,k.appendChild(h),f.appendChild(k)):f.appendChild(h));h=document.createElement("div");h.className="ab-card-body";if(this.dismissible){this.Fe=b;var l=ac("Dismiss Card",void 0,this.Ye.bind(this));f.appendChild(l);Vb(h,
Wb,function(r){f.className+=" ab-swiped-left";l.onclick(r)});Vb(h,Xb,function(r){f.className+=" ab-swiped-right";l.onclick(r)})}if(b=this.title&&""!==this.title){k=document.createElement("h1");k.className="ab-title";k.id=qa.Ia();f.setAttribute("aria-labelledby",k.id);if(g){var m=document.createElement("a");m.setAttribute("href",this.url);m.onclick=d;m.appendChild(document.createTextNode(this.title));k.appendChild(m)}else k.appendChild(document.createTextNode(this.title));h.appendChild(k)}k=document.createElement("div");
k.className=b?"ab-description":"ab-description ab-no-title";k.id=qa.Ia();f.setAttribute("aria-describedby",k.id);k.appendChild(document.createTextNode(this.description));g&&(b=document.createElement("div"),b.className="ab-url-area",m=document.createElement("a"),m.setAttribute("href",this.url),m.appendChild(document.createTextNode(this.linkText)),m.onclick=d,b.appendChild(m),k.appendChild(b));h.appendChild(k);f.appendChild(h);h=document.createElement("div");h.className="ab-unread-indicator";this.viewed&&
(h.className+=" read");f.appendChild(h);return this.Cg=f};p.tc=function(a){var b="";this.title||this.description||(b="Feed Image");a.setAttribute("alt",b)};p.Ye=function(){if(this.dismissible&&!this.dismissed){this.Fe&&this.Fe(this);var a=this.Cg;a&&(a.style.height=a.offsetHeight+"px",a.className+=" ab-hide",setTimeout(function(){a&&a.parentNode&&(a.style.height="0",a.style.margin="0",setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},pc))},qc))}};
var gc=-1,ic={Tb:"captioned_image",te:"text_announcement",cc:"short_news",Sb:"banner_image",Pc:"control"},T={wa:"id",za:"v",va:"db",ne:"r",ca:"ca",la:"p",ba:"ea",ka:"e",TYPE:"tp",xa:"i",Ua:"tt",Ra:"ds",URL:"u",ya:"dm",sa:"ar",ta:"cl",V:"t"},U={wa:"id",za:"v",va:"db",Xb:"cr",ca:"ca",la:"p",Ub:"t",ba:"ea",ka:"e",TYPE:"tp",xa:"i",Ua:"tt",Ra:"ds",URL:"u",ya:"dm",sa:"ar",ta:"cl",V:"s"},pc=400;J.Card=cc;J.Card.prototype.dismissCard=cc.prototype.Ye;J.Card.prototype.subscribeToClickedEvent=cc.prototype.Pb;
J.Card.prototype.subscribeToDismissedEvent=cc.prototype.Ud;J.Card.prototype.removeSubscription=cc.prototype.N;J.Card.prototype.removeAllSubscriptions=cc.prototype.K;function lc(a,b,c,d,e,f,g,h,k,l,m,r,q,v){cc.call(this,a,b,null,c,null,d,e,f,g,h,k,l,m,r,q,v);this.zc="ab-banner";this.Cc=!1}oa(lc,cc);lc.prototype.A=function(){var a={};a[U.TYPE]=ic.Sb;a[U.wa]=this.id;a[U.za]=this.viewed;a[U.xa]=this.imageUrl;a[U.ca]=this.updated;a[U.Xb]=this.created;a[U.Ub]=this.categories;a[U.ba]=this.expiresAt;a[U.URL]=this.url;a[U.ya]=this.linkText;a[U.sa]=this.aspectRatio;a[U.ka]=this.extras;a[U.la]=this.pinned;a[U.va]=this.dismissible;a[U.ta]=this.clicked;a[U.V]=this.test;return a};
J.Banner=lc;function kc(a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A){cc.call(this,a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A);this.zc="ab-captioned-image";this.Cc=!0}oa(kc,cc);
kc.prototype.A=function(){var a={};a[U.TYPE]=ic.Tb;a[U.wa]=this.id;a[U.za]=this.viewed;a[U.Ua]=this.title;a[U.xa]=this.imageUrl;a[U.Ra]=this.description;a[U.ca]=this.updated;a[U.Xb]=this.created;a[U.Ub]=this.categories;a[U.ba]=this.expiresAt;a[U.URL]=this.url;a[U.ya]=this.linkText;a[U.sa]=this.aspectRatio;a[U.ka]=this.extras;a[U.la]=this.pinned;a[U.va]=this.dismissible;a[U.ta]=this.clicked;a[U.V]=this.test;return a};J.CaptionedImage=kc;function jc(a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A){cc.call(this,a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A);this.zc="ab-classic-card";this.Cc=!0}oa(jc,cc);
jc.prototype.A=function(){var a={};a[U.TYPE]=ic.cc;a[U.wa]=this.id;a[U.za]=this.viewed;a[U.Ua]=this.title;a[U.xa]=this.imageUrl;a[U.Ra]=this.description;a[U.ca]=this.updated;a[U.Xb]=this.created;a[U.Ub]=this.categories;a[U.ba]=this.expiresAt;a[U.URL]=this.url;a[U.ya]=this.linkText;a[U.sa]=this.aspectRatio;a[U.ka]=this.extras;a[U.la]=this.pinned;a[U.va]=this.dismissible;a[U.ta]=this.clicked;a[U.V]=this.test;return a};J.ClassicCard=jc;function mc(a,b,c,d,e,f){cc.call(this,a,b,null,null,null,null,c,null,d,null,null,null,e,f,null);this.zc="ab-control-card";this.Cc=!1}oa(mc,cc);mc.prototype.A=function(){var a={};a[U.TYPE]=ic.Pc;a[U.wa]=this.id;a[U.za]=this.viewed;a[U.ca]=this.updated;a[U.ba]=this.expiresAt;a[U.ka]=this.extras;a[U.la]=this.pinned;a[U.V]=this.test;return a};J.ControlCard=mc;function rc(a){a=parseInt(a);return!isNaN(a)&&0===(a&4278190080)>>>24}function sc(a){a=parseInt(a);if(isNaN(a))return"";var b=parseFloat(b);isNaN(b)&&(b=1);a>>>=0;var c=a&255,d=(a&65280)>>>8,e=(a&16711680)>>>16;return(wb.Ya===pb.Zb?8<wb.version:1)?"rgba("+[e,d,c,((a&4278190080)>>>24)/255*b].join()+")":"rgb("+[e,d,c].join()+")"};function V(a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A,H,z,F,I,D,K,G,N,X,ha,n,u,y,B,P){this.message=a;this.messageAlignment=b||tc;this.duration=r||5E3;this.slideFrom=c||uc;this.extras=d||{};this.campaignId=e;this.cardId=f;this.triggerId=g;this.clickAction=h||vc;this.uri=k;this.openTarget=l||wc;this.dismissType=m||xc;this.icon=q;this.imageUrl=v;this.imageStyle=t||yc;this.iconColor=A||zc.kd;this.iconBackgroundColor=H||zc.Yd;this.backgroundColor=z||zc.kd;this.textColor=F||zc.ae;this.closeButtonColor=I||zc.Of;this.animateIn=
D;null==this.animateIn&&(this.animateIn=!0);this.animateOut=K;null==this.animateOut&&(this.animateOut=!0);this.header=G;this.headerAlignment=N||tc;this.headerTextColor=X||zc.ae;this.frameColor=ha||zc.rg;this.buttons=n||[];this.cropType=u||Ac;this.orientation=y;this.htmlId=B;this.css=P;this.Be=this.Wa=this.Ce=!1;this.W=new Nb;this.jc=new Nb}p=V.prototype;p.Ja=function(){return!0};p.tf=function(){return this.Ja()};function Bc(a){return null!=a.htmlId&&4<a.htmlId.length}
function Cc(a){return Bc(a)&&null!=a.css&&0<a.css.length}function Dc(a){if(Bc(a)&&Cc(a))return a.htmlId+"-css"}p.Pb=function(a){return Ob(this.W,a)};p.Ud=function(a){return Ob(this.jc,a)};p.N=function(a){this.W.N(a);this.jc.N(a)};p.K=function(){this.W.K();this.jc.K()};p.Md=function(){return this.Ce?!1:this.Ce=!0};p.fb=function(){return this.Wa?!1:(this.Wa=!0,Pb(this.W),!0)};p.Ld=function(){return this.Be?!1:(this.Be=!0,Pb(this.jc),!0)};
function Ec(a){if(a.is_control)return new Fc(a.trigger_id);var b=a.type;null!=b&&(b=b.toUpperCase());var c=a.message,d=a.text_align_message,e=a.slide_from,f=a.extras,g=a.campaign_id,h=a.card_id,k=a.trigger_id,l=a.click_action,m=a.uri,r=a.open_target,q=a.message_close,v=a.duration,t=a.icon,A=a.image_url,H=a.image_style,z=a.icon_color,F=a.icon_bg_color,I=a.bg_color,D=a.text_color,K=a.close_btn_color,G=a.header,N=a.text_align_header,X=a.header_text_color,ha=a.frame_color,n=[],u=a.btns;null==u&&(u=[]);
for(var y=0;y<u.length;y++){var B=u[y];n.push(new Gc(B.text,B.bg_color,B.text_color,B.border_color,B.click_action,B.uri,B.id))}u=a.crop_type;y=a.orientation;B=a.animate_in;var P=a.animate_out,Q=a.html_id,W=a.css;if(null==Q||""===Q||null==W||""===W)W=Q=void 0;if(b===Hc||b===Ic)c=new Jc(c,d,f,g,h,k,l,m,r,q,v,t,A,H,z,F,I,D,K,B,P,G,N,X,ha,n,u,Q,W);else if(b===Kc)c=new Lc(c,d,f,g,h,k,l,m,r,q,v,t,A,H,z,F,I,D,K,B,P,G,N,X,ha,n,u,y,Q,W);else if(b===Mc)c=new Nc(c,d,e,f,g,h,k,l,m,r,q,v,t,A,z,F,I,D,K,B,P,Q,W);
else if(b===Oc||b===Pc)c=new Qc(c,f,g,h,k,q,v,B,P,ha,Q,W,a.message_fields),c.Mh=a.trusted||!1;else{w.error("Ignoring message with unknown type "+b);return}c.jf=b;return c}function Rc(a,b){if(b&&b.parentNode){var c=b.closest(".ab-iam-root");null==c&&(c=b);a.Ja()&&null!=c.parentNode&&((b=c.parentNode.classList)&&b.contains(Sc)&&b.remove(Sc),document.body.removeEventListener("touchmove",Tc));c.className=c.className.replace(Uc,Vc)}return a.animateOut}
function Wc(a,b,c){if(null!=b){a.oc=null;var d=-1===b.className.indexOf("ab-in-app-message")?b.getElementsByClassName("ab-in-app-message")[0]:b;var e=!1;d&&(e=Rc(a,d));var f=document.body;if(null!=f)var g=f.scrollTop;d=function(){if(b&&b.parentNode){var h=b.closest(".ab-iam-root");null==h&&(h=b);h.parentNode&&h.parentNode.removeChild(h)}null!=Dc(a)&&(h=document.getElementById(Dc(a)))&&h.parentNode&&h.parentNode.removeChild(h);null!=f&&"Safari"===wb.Ya&&(f.scrollTop=g);c?c():a.Ld()};e?setTimeout(d,
Xc):d();a.pc&&a.pc.focus()}}p.Ue=function(){Wc(this,this.oc)};
p.$=function(a,b,c,d,e){function f(){-1!==h.className.indexOf("ab-start-hidden")&&(h.className=h.className.replace("ab-start-hidden",""),c(h))}var g=this,h=document.createElement("div");h.className="ab-in-app-message ab-start-hidden ab-background";e&&(h.style.zIndex=e+1);this.Ja()&&(h.className+=" ab-modal-interactions",h.setAttribute("tabindex","-1"));Cc(this)||(h.style.color=sc(this.textColor),h.style.backgroundColor=sc(this.backgroundColor),rc(this.backgroundColor)&&(h.className+=" ab-no-shadow"));
this.imageStyle===Yc&&(h.className+=" graphic");this.orientation===Zc&&(h.className+=" landscape");0===this.buttons.length&&(this.clickAction!==vc&&(h.className+=" ab-clickable"),h.onclick=function(q){Wc(g,h,function(){a.Fc(g);g.clickAction===$c?bc.openUri(g.uri,q,d||g.openTarget===ad):g.clickAction===bd&&b()});q.stopPropagation();return!1});var k=ac("Close Message",Cc(this)?void 0:sc(this.closeButtonColor),function(){Wc(g,h)});h.appendChild(k);e&&(k.style.zIndex=e+2);e=document.createElement("div");
e.className="ab-message-text";e.className+=" "+(this.messageAlignment||this.yd).toLowerCase()+"-aligned";k=!1;var l=document.createElement("div");l.className="ab-image-area";if(this.imageUrl){if(this.cropType===cd){var m=document.createElement("span");m.className="ab-center-cropped-img";m.style.backgroundImage="url("+this.imageUrl+")";m.setAttribute("role","img");this.tc(m);l.appendChild(m)}else m=document.createElement("img"),m.setAttribute("src",this.imageUrl),this.tc(m),k=!0,m.onload=f,setTimeout(f,
1E3),l.appendChild(m);h.appendChild(l);e.className+=" ab-with-image"}else if(this.icon){l.className+=" ab-icon-area";m=document.createElement("span");m.className="ab-icon";Cc(this)||(m.style.backgroundColor=sc(this.iconBackgroundColor),m.style.color=sc(this.iconColor));var r=document.createElement("i");r.className="fa";r.appendChild(document.createTextNode(this.icon));r.setAttribute("aria-hidden",!0);m.appendChild(r);l.appendChild(m);h.appendChild(l);e.className+=" ab-with-icon"}Sb(e,"touchstart",
function(){});this.header&&0<this.header.length&&(l=document.createElement("h1"),l.className="ab-message-header",this.od=qa.Ia(),l.id=this.od,l.className+=" "+(this.headerAlignment||tc).toLowerCase()+"-aligned",Cc(this)||(l.style.color=sc(this.headerTextColor)),l.appendChild(document.createTextNode(this.header)),e.appendChild(l));e.appendChild(this.Te());h.appendChild(e);k||f();return this.oc=h};p.Te=function(){return document.createTextNode(this.message)};
p.tc=function(a){var b="";this.message||this.header||!this.Ja()||(b="Modal Image");a.setAttribute("alt",b)};function Tc(a){a.targetTouches&&1<a.targetTouches.length||a.target.classList&&a.target.classList.contains("ab-message-text")&&a.target.scrollHeight>a.target.clientHeight||a.preventDefault()}
p.Gc=function(a){this.Ja()&&null!=a.parentNode&&this.orientation!==Zc&&(null!=a.parentNode.classList&&a.parentNode.classList.add(Sc),document.body.addEventListener("touchmove",Tc,Qb()?{passive:!1}:!1));a.className+=" "+Uc};p.oa=function(){var a="";this.animateIn&&(a+=" ab-animate-in");this.animateOut&&(a+=" ab-animate-out");return a};
var zc={ae:4281545523,kd:4294967295,Yd:4278219733,Pf:4293914607,Qf:4283782485,rg:3224580915,Of:4288387995},dd={ee:"hd",xf:"ias",ng:"of",Rf:"do",wb:"umt",ub:"tf",fe:"te"},uc="BOTTOM",ed={TOP:"TOP",BOTTOM:uc},bd="NEWS_FEED",$c="URI",vc="NONE",fd={NEWS_FEED:bd,URI:$c,NONE:vc},xc="AUTO_DISMISS",gd={AUTO_DISMISS:xc,MANUAL:"SWIPE"},wc="NONE",ad="BLANK",hd={NONE:wc,BLANK:ad},yc="TOP",Yc="GRAPHIC",id={TOP:yc,GRAPHIC:Yc},Zc="LANDSCAPE",jd={PORTRAIT:"PORTRAIT",LANDSCAPE:Zc},tc="CENTER",kd={START:"START",CENTER:tc,
END:"END"},cd="CENTER_CROP",Ac="FIT_CENTER",ld={CENTER_CROP:cd,FIT_CENTER:Ac},Mc="SLIDEUP",Hc="MODAL",Ic="MODAL_STYLED",Kc="FULL",Oc="WEB_HTML",Pc="HTML",Xc=500,Uc="ab-show",Vc="ab-hide",Sc="ab-pause-scrolling";J.InAppMessage=V;J.InAppMessage.SlideFrom=ed;J.InAppMessage.ClickAction=fd;J.InAppMessage.DismissType=gd;J.InAppMessage.OpenTarget=hd;J.InAppMessage.ImageStyle=id;J.InAppMessage.TextAlignment=kd;J.InAppMessage.Orientation=jd;J.InAppMessage.CropType=ld;J.InAppMessage.fromJson=Ec;
J.InAppMessage.prototype.subscribeToClickedEvent=V.prototype.Pb;J.InAppMessage.prototype.subscribeToDismissedEvent=V.prototype.Ud;J.InAppMessage.prototype.removeSubscription=V.prototype.N;J.InAppMessage.prototype.removeAllSubscriptions=V.prototype.K;J.InAppMessage.prototype.closeMessage=V.prototype.Ue;function Gc(a,b,c,d,e,f,g){this.text=a||"";this.backgroundColor=b||zc.Yd;this.textColor=c||zc.kd;this.borderColor=d||this.backgroundColor;this.clickAction=e||vc;this.uri=f;null==g&&(g=md);this.id=g;this.Wa=!1;this.W=new Nb}Gc.prototype.Pb=function(a){return Ob(this.W,a)};Gc.prototype.N=function(a){this.W.N(a)};Gc.prototype.K=function(){this.W.K()};Gc.prototype.fb=function(){return this.Wa?!1:(this.Wa=!0,Pb(this.W),!0)};var md=-1;J.InAppMessageButton=Gc;
J.InAppMessageButton.prototype.subscribeToClickedEvent=Gc.prototype.Pb;J.InAppMessageButton.prototype.removeSubscription=Gc.prototype.N;J.InAppMessageButton.prototype.removeAllSubscriptions=Gc.prototype.K;function Fc(a){this.triggerId=a}J.ControlMessage=Fc;function nd(a){var b=a.querySelectorAll(".ab-close-button, .ab-message-button");if(0<b.length){var c=b[0],d=b[b.length-1];a.addEventListener("keydown",function(e){var f=document.activeElement;9===e.keyCode&&(e.shiftKey||f!==d&&f!==a?!e.shiftKey||f!==c&&f!==a||(e.preventDefault(),d.focus()):(e.preventDefault(),c.focus()))})}}function od(a,b){b.setAttribute("role","dialog");b.setAttribute("aria-modal",!0);b.setAttribute("aria-label","Modal Message");a&&b.setAttribute("aria-labelledby",a)}
function pd(a,b,c,d,e){if(0<a.buttons.length){var f=document.createElement("div");f.className="ab-message-buttons";d.appendChild(f);var g=d.getElementsByClassName("ab-message-text")[0];null!=g&&(g.className+=" ab-with-buttons");g=function(r){return function(q){Wc(a,d,function(){b.Ec(r,a);r.clickAction===$c?bc.openUri(r.uri,q,e||a.openTarget===ad):r.clickAction===bd&&c()});q.stopPropagation();return!1}};for(var h=0;h<a.buttons.length;h++){var k=a.buttons[h],l=document.createElement("button");l.className=
"ab-message-button";l.setAttribute("type","button");Sb(l,"touchstart",function(){});var m=k.text;""===k.text&&(m="\u00a0");l.appendChild(document.createTextNode(m));Cc(a)||(l.style.backgroundColor=sc(k.backgroundColor),l.style.color=sc(k.textColor),l.style.borderColor=sc(k.borderColor));l.onclick=g(k);f.appendChild(l)}}};function Lc(a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A,H,z,F,I,D,K,G,N,X,ha,n,u,y,B){n=n||cd;V.call(this,a,b,null,c,d,e,f,g,h,k,l||"SWIPE",m,r,q,v,t,A,H,z,F,I,D,K,G,N,X,ha,n,u||"PORTRAIT",y,B)}oa(Lc,V);Lc.prototype.$=function(a,b,c,d,e,f){this.pc=document.activeElement;b=V.prototype.$.call(this,a,c,d,e,f);b.className+=" ab-fullscreen ab-centered";pd(this,a,c,b,e);nd(b);od(this.od,b);return b};Lc.prototype.oa=function(){return V.prototype.oa.call(this)+" ab-effect-fullscreen"};
fa.Object.defineProperties(Lc.prototype,{yd:{configurable:!0,enumerable:!0,get:function(){return tc}}});J.FullScreenMessage=Lc;var qd=new function(){this.We=".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-centering-div,.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:1050;-webkit-tap-highlight-color:transparent}.ab-centering-div:focus,.ab-iam-root.v3:focus{outline:0}.ab-centering-div.ab-effect-fullscreen,.ab-centering-div.ab-effect-html,.ab-centering-div.ab-effect-modal,.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-centering-div.ab-effect-fullscreen.ab-show,.ab-centering-div.ab-effect-html.ab-show,.ab-centering-div.ab-effect-modal.ab-show,.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-centering-div.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-centering-div.ab-effect-html.ab-show.ab-animate-in,.ab-centering-div.ab-effect-modal.ab-show.ab-animate-in,.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-centering-div.ab-effect-fullscreen.ab-hide,.ab-centering-div.ab-effect-html.ab-hide,.ab-centering-div.ab-effect-modal.ab-hide,.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-centering-div.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-centering-div.ab-effect-html.ab-hide.ab-animate-out,.ab-centering-div.ab-effect-modal.ab-hide.ab-animate-out,.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-centering-div.ab-effect-slide .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-show .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up,.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-centering-div.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down,.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-centering-div.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message,.ab-iam-root.v3.ab-effect-slide.ab-hide.a
Qc.prototype.fb=function(a){if(this.jf===Oc){if(this.Wa)return!1;this.Wa=!0}Pb(this.W,a);return!0};
Qc.prototype.$=function(a,b,c,d,e,f){function g(l){var m=l.getAttribute("href"),r=l.onclick;return function(q){if(null==r||"function"!==typeof r||!1!==r()){var v=rd(m).abButtonId;if(null==v||""===v)v=l.getAttribute("id");if(null!=m&&""!==m&&0!==m.indexOf("#")){var t="blank"===(l.getAttribute("target")||"").toLowerCase().replace("_",""),A=e||h.openTarget===ad||t;t=function(){a.Jb(h,v,m);bc.openUri(m,q,A)};A?t():Wc(h,k,t)}else a.Jb(h,v,m);q.stopPropagation();return!1}}}var h=this;this.pc=document.activeElement;
var k=document.createElement("iframe");k.setAttribute("title","Modal Message");f&&(k.style.zIndex=f+1);k.onload=function(){function l(z){return function(){var F=arguments;Wc(h,k,function(){b.display[z].apply(b.display,Array.prototype.slice.call(F))})}}function m(z){return function(){var F=b.getUser();F[z].apply(F,Array.prototype.slice.call(arguments))}}function r(z){return function(){b[z].apply(b,Array.prototype.slice.call(arguments))}}var q=null,v=a.bh();if(null!=v){q=document.createElement("html");
q.innerHTML=h.message;for(var t=q.getElementsByTagName("style"),A=0;A<t.length;A++)t[A].setAttribute("nonce",v);t=q.getElementsByTagName("script");for(A=0;A<t.length;A++)t[A].setAttribute("nonce",v)}k.contentWindow.focus();k.contentWindow.document.write(q?q.innerHTML:h.message);q=k.contentWindow.document.getElementsByTagName("head")[0];null!=q&&(t=document.createElement("style"),t.innerHTML=qd.We,null!=v&&t.setAttribute("nonce",v),q.appendChild(t),Cc(h)&&(t=document.createElement("style"),t.innerHTML=
h.css,t.id=Dc(h),null!=v&&t.setAttribute("nonce",v),q.appendChild(t)),v=k.contentWindow.document.createElement("base"),v.setAttribute("target","_parent"),q.appendChild(v));v=k.contentWindow.document.getElementsByTagName("title");0<v.length&&k.setAttribute("title",v[0].textContent);v={closeMessage:function(){Wc(h,k)},logClick:function(){var z=[h];0<arguments.length&&z.push(arguments[0]);b.logInAppMessageHtmlClick.apply(b,z)},display:{},web:{}};q=["requestImmediateDataFlush","logCustomEvent","logPurchase",
"unregisterAppboyPushMessages"];for(t=0;t<q.length;t++)v[q[t]]=r(q[t]);q="setFirstName setLastName setEmail setGender setDateOfBirth setCountry setHomeCity setEmailNotificationSubscriptionType setLanguage addAlias setPushNotificationSubscriptionType setPhoneNumber setCustomUserAttribute addToCustomAttributeArray removeFromCustomAttributeArray incrementCustomUserAttribute setCustomLocationAttribute addToSubscriptionGroup removeFromSubscriptionGroup".split(" ");var H={};for(t=0;t<q.length;t++)H[q[t]]=
m(q[t]);v.getUser=function(){return H};q=["showFeed"];for(t=0;t<q.length;t++)v.display[q[t]]=l(q[t]);q=["registerAppboyPushMessages","trackLocation"];for(t=0;t<q.length;t++)v.web[q[t]]=r(q[t]);k.contentWindow.appboyBridge=v;k.contentWindow.brazeBridge=v;if(h.jf!==Pc){q=k.contentWindow.document.getElementsByTagName("a");for(t=0;t<q.length;t++)q[t].onclick=g(q[t]);q=k.contentWindow.document.getElementsByTagName("button");for(t=0;t<q.length;t++)q[t].onclick=g(q[t])}q=k.contentWindow.document.body;null!=
q&&(Bc(h)&&(q.id=h.htmlId),t=document.createElement("hidden"),t.onclick=v.closeMessage,t.className="ab-programmatic-close-button",q.appendChild(t));k.contentWindow.dispatchEvent(new CustomEvent("ab.BridgeReady"));-1!==k.className.indexOf("ab-start-hidden")&&(k.className=k.className.replace("ab-start-hidden",""),d(k));document.activeElement!==k&&k.focus()};k.className="ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions";return"iOS"===wb.fa?(c=document.createElement("div"),c.className=
"ab-ios-scroll-wrapper",c.appendChild(k),this.oc=c):this.oc=k};Qc.prototype.oa=function(){return V.prototype.oa.call(this)+" ab-effect-html"};J.HtmlMessage=Qc;function Jc(a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A,H,z,F,I,D,K,G,N,X,ha,n,u,y){n=n||Ac;V.call(this,a,b,null,c,d,e,f,g,h,k,l||"SWIPE",m,r,q,v,t,A,H,z,F,I,D,K,G,N,X,ha,n,void 0,u,y)}oa(Jc,V);Jc.prototype.$=function(a,b,c,d,e,f){this.pc=document.activeElement;b=V.prototype.$.call(this,a,c,d,e,f);b.className+=" ab-modal ab-centered";pd(this,a,c,b,e);nd(b);od(this.od,b);return b};Jc.prototype.oa=function(){return V.prototype.oa.call(this)+" ab-effect-modal"};
fa.Object.defineProperties(Jc.prototype,{yd:{configurable:!0,enumerable:!0,get:function(){return tc}}});J.ModalMessage=Jc;function Nc(a,b,c,d,e,f,g,h,k,l,m,r,q,v,t,A,H,z,F,I,D,K,G){z=z||zc.Qf;H=H||zc.Pf;V.call(this,a,b||"START",c,d,e,f,g,h,k,l,m,r,q,v,null,t,A,H,z,F,I,D,void 0,void 0,void 0,void 0,void 0,void 0,void 0,K,G)}oa(Nc,V);p=Nc.prototype;p.Ja=function(){return!1};
p.$=function(a,b,c,d,e,f){var g=V.prototype.$.call(this,a,c,d,e,f);g.className+=" ab-slideup";var h=g.getElementsByClassName("ab-close-button")[0];null!=h&&(a=$b("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",Cc(this)?void 0:sc(this.closeButtonColor)),a.setAttribute("class","ab-chevron"),h.appendChild(a));Vb(g,Wb,function(l){g.className+=" ab-swiped-left";h.onclick(l)});Vb(g,Xb,function(l){g.className+=" ab-swiped-right";h.onclick(l)});if("TOP"===this.slideFrom){a=
Yb;var k=" ab-swiped-up"}else a=Zb,k=" ab-swiped-down";Vb(g,a,function(l){g.className+=k;h.onclick(l)});return g};p.Te=function(){var a=document.createElement("span");a.appendChild(document.createTextNode(this.message));return a};p.Gc=function(a){var b=a.getElementsByClassName("ab-in-app-message")[0];Tb(b,!0,!0)||("TOP"===this.slideFrom?b.style.top="0px":b.style.bottom="0px");V.prototype.Gc.call(this,a)};p.oa=function(){return V.prototype.oa.call(this)+" ab-effect-slide"};
fa.Object.defineProperties(Nc.prototype,{yd:{configurable:!0,enumerable:!0,get:function(){return"START"}}});J.SlideUpMessage=Nc;function td(a,b){ud={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\u00edli pro v\u00e1s nem\u00e1me \u017e\u00e1dn\u00e9 aktualizace.<br/>Zkontrolujte pros\u00edm znovu pozd\u011bji.",FEED_TIMEOUT_MESSAGE:"Pros\u00edm zkuste to znovu pozd\u011bji."},da:{NO_CARDS_MESSAGE:"Vi har ingen updates.<br/>Pr\u00f8v venligst senere.",FEED_TIMEOUT_MESSAGE:"Pr\u00f8v venligst senere."},de:{NO_CARDS_MESSAGE:"Derzeit sind keine Updates verf\u00fcgbar.<br/>Bitte sp\u00e4ter noch einmal versuchen.",FEED_TIMEOUT_MESSAGE:"Bitte sp\u00e4ter noch einmal versuchen."},
es:{NO_CARDS_MESSAGE:"No tenemos actualizaciones.<br/>Por favor compru\u00e9belo m\u00e1s tarde.",FEED_TIMEOUT_MESSAGE:"Por favor int\u00e9ntelo m\u00e1s tarde."},"es-mx":{NO_CARDS_MESSAGE:"No tenemos ninguna actualizaci\u00f3n.<br/>Vuelva a verificar m\u00e1s tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, vuelva a intentarlo m\u00e1s 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\u00e4ivityksi\u00e4 ei ole saatavilla.<br/>Tarkista my\u00f6hemmin uudelleen.",
FEED_TIMEOUT_MESSAGE:"Yrit\u00e4 my\u00f6hemmin uudelleen."},fr:{NO_CARDS_MESSAGE:"Aucune mise \u00e0 jour disponible.<br/>Veuillez v\u00e9rifier ult\u00e9rieurement.",FEED_TIMEOUT_MESSAGE:"Veuillez r\u00e9essayer ult\u00e9rieurement."},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\u00f9 tardi.",FEED_TIMEOUT_MESSAGE:"Riprovare pi\u00f9 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\u00f8v igjen senere."},pl:{NO_CARDS_MESSAGE:"Brak aktualizacji.<br/>Prosz\u0119 sprawdzi\u0107 ponownie p\u00f3\u017aniej.",FEED_TIMEOUT_MESSAGE:"Prosz\u0119 spr\u00f3bowa\u0107 ponownie p\u00f3\u017aniej."},pt:{NO_CARDS_MESSAGE:"N\u00e3o temos atualiza\u00e7\u00f5es.<br/>Por favor, verifique mais tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, tente mais tarde."},"pt-br":{NO_CARDS_MESSAGE:"N\u00e3o temos nenhuma atualiza\u00e7\u00e3o.<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/>\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\u00f6rs\u00f6k igen senare.",FEED_TIMEOUT_MESSAGE:"F\u00f6rs\u00f6k 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\u00fang t\u00f4i kh\u00f4ng c\u00f3 c\u1eadp nh\u1eadt n\u00e0o.<br/>Vui l\u00f2ng ki\u1ec3m tra l\u1ea1i sau.",FEED_TIMEOUT_MESSAGE:"Vui l\u00f2ng 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."}};null!=a&&(a=a.toLowerCase());
if(null!=a&&null==ud[a]){var c=a.indexOf("-");0<c&&(a=a.substring(0,c))}null==ud[a]&&(a="Braze does not yet have a localization for language "+a+", defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.",b?w.error(a):w.info(a),a="en");vd=a}var ud,vd;function wd(a,b){this.cards=a;this.lastUpdated=b}p=wd.prototype;p.bf=function(){for(var a=0,b=0;b<this.cards.length;b++)this.cards[b].viewed||this.cards[b]instanceof mc||a++;return a};function xd(a,b){b&&(b.className=b.className.replace("ab-show","ab-hide"),setTimeout(function(){b&&b.parentNode&&b.parentNode.removeChild(b)},qc));var c=b.getAttribute(yd);null!=c&&a.N(c)}p.Ma=function(a,b){a.Ma(b)};p.La=function(a,b){a.La(b)};
function zd(a,b,c){var d=document.createElement("div");d.className="ab-feed-body";d.setAttribute("aria-label","Feed");d.setAttribute("role","feed");if(null==a.lastUpdated){c=document.createElement("div");c.className="ab-no-cards-message";var e=document.createElement("i");e.className="fa fa-spinner fa-spin fa-4x ab-initial-spinner";c.appendChild(e);d.appendChild(c)}else{e=!1;for(var f=function(l){a.La(b,l)},g=function(l){b.Dc(l)},h=0;h<a.cards.length;h++){var k=a.cards[h]instanceof mc;!k||a instanceof
Ad?(d.appendChild(a.cards[h].$(f,g,c)),e=e||!k):w.error("Received a control card for a legacy news feed. Control cards are only supported with content cards.")}e||(c=document.createElement("div"),c.className="ab-no-cards-message",c.innerHTML=ud[vd].NO_CARDS_MESSAGE,c.setAttribute("role","article"),d.appendChild(c))}return d}
function Bd(a,b,c){if(null!=c){var d=[];c=c.querySelectorAll(".ab-card");a.md||(a.md={});for(var e=0;e<c.length;e++){var f=c[e].getAttribute("data-ab-card-id");if(!a.md[f]){var g=c[e];g=null!=g&&!!g.getAttribute("data-ab-had-top-impression");var h=c[e];h=null!=h&&!!h.getAttribute("data-ab-had-bottom-impression");var k=g,l=h,m=Tb(c[e],!0,!1,!1),r=Tb(c[e],!1,!0,!1);if(!g&&m){g=!0;var q=c[e];null!=q&&q.setAttribute("data-ab-had-top-impression",!0)}!h&&r&&(h=!0,q=c[e],null!=q&&q.setAttribute("data-ab-had-bottom-impression",
!0));if(g&&h&&(m||r||oc(c[e]),!k||!l))for(g=0;g<a.cards.length;g++)if(a.cards[e].id===f){a.md[a.cards[e].id]=!0;d.push(a.cards[e]);break}}}0<d.length&&a.Ma(b,d)}}p.Oe=function(a){a.Jc()};
function Cd(a,b,c){c.setAttribute("aria-busy","true");var d=c.querySelectorAll(".ab-refresh-button")[0];null!=d&&(d.className+=" fa-spin");var e=(new Date).valueOf().toString();c.setAttribute(Dd,e);setTimeout(function(){if(c.getAttribute(Dd)===e){for(var f=c.querySelectorAll(".fa-spin"),g=0;g<f.length;g++)f[g].className=f[g].className.replace(/fa-spin/g,"");f=c.querySelectorAll(".ab-initial-spinner")[0];null!=f&&(g=document.createElement("span"),g.innerHTML=ud[vd].FEED_TIMEOUT_MESSAGE,f.parentNode.appendChild(g),
f.parentNode.removeChild(f));"true"===c.getAttribute("aria-busy")&&c.setAttribute("aria-busy","false")}},Ed);a.Oe(b)}
p.$=function(a,b){function c(l){Cd(e,a,f);l.stopPropagation()}function d(l){xd(a,f);l.stopPropagation()}var e=this,f=document.createElement("div");f.className="ab-feed ab-hide ab-effect-slide";f.setAttribute("tabindex","-1");var g=document.createElement("div");g.className="ab-feed-buttons-wrapper";f.appendChild(g);var h=document.createElement("i");h.className="fa fa-times ab-close-button";h.setAttribute("aria-label","Close Feed");h.setAttribute("tabindex","0");h.setAttribute("role","button");h.addEventListener("keydown",
function(l){32!==l.keyCode&&13!==l.keyCode||d(l)});h.onclick=d;var k=document.createElement("i");k.className="fa fa-refresh ab-refresh-button";null==this.lastUpdated&&(k.className+=" fa-spin");k.setAttribute("aria-label","Refresh Feed");k.setAttribute("tabindex","0");k.setAttribute("role","button");k.addEventListener("keydown",function(l){32!==l.keyCode&&13!==l.keyCode||c(l)});k.onclick=c;g.appendChild(k);g.appendChild(h);f.appendChild(zd(this,a,b));f.onscroll=function(){Bd(e,a,f)};return f};
function Fd(a,b,c,d,e,f){if(Da(b)){for(var g=[],h=0;h<b.length;h++)b[h]instanceof cc&&g.push(b[h]);a.cards=g;a.lastUpdated=c;null!=d&&(d.setAttribute("aria-busy","false"),null==a.lastUpdated?xd(e,d):(b=d.querySelectorAll(".ab-feed-body")[0],null!=b&&(f=zd(a,e,f),b.parentNode.replaceChild(f,b),Bd(a,e,f.parentNode))))}}var qc=500,yd="data-update-subscription-id",Dd="data-last-requested-refresh",Ed=1E4;J.Feed=wd;J.Feed.prototype.getUnreadCardCount=wd.prototype.bf;function Ad(a,b){wd.call(this,a,b)}oa(Ad,wd);Ad.prototype.dh=function(){return wd.prototype.bf.call(this)};Ad.prototype.Ma=function(a,b){a.Ma(b,!0)};Ad.prototype.La=function(a,b){a.La(b,!0)};Ad.prototype.Oe=function(a){a.Na()};J.ContentCards=Ad;J.ContentCards.prototype.getUnviewedCardCount=Ad.prototype.dh;function ab(){this.h=!1;this.j=[]};function Gd(a){this.bb=a}Gd.prototype.ea=function(a){return null==this.bb||this.bb===a[0]};Gd.prototype.A=function(){return this.bb};function Hd(a,b,c,d){this.gf=a;this.Ic=b;this.kb=c;this.I=d;this.Ic===Id&&this.kb!==Jd&&this.kb!==Kd&&this.kb!==Ld&&this.kb!==Md&&(this.I=Ka(this.I))}
Hd.prototype.ea=function(a){var b=null;null!=a&&(b=a[this.gf]);switch(this.kb){case Nd:return null!=b&&b.valueOf()===this.I.valueOf();case Od:return null==b||b.valueOf()!==this.I.valueOf();case Pd:return typeof b===typeof this.I&&b>this.I;case Jd:return this.Ic===Id?null!=b&&Ea(b)&&((new Date).valueOf()-b.valueOf())/1E3<=this.I:typeof b===typeof this.I&&b>=this.I;case Qd:return typeof b===typeof this.I&&b<this.I;case Kd:return this.Ic===Id?null!=b&&Ea(b)&&((new Date).valueOf()-b.valueOf())/1E3>=this.I:
typeof b===typeof this.I&&b<=this.I;case Rd:return null!=b&&"string"===typeof b&&typeof b===typeof this.I&&null!=b.match(this.I);case Sd:return null!=b;case Td:return null==b;case Ld:return null!=b&&Ea(b)&&(b.valueOf()-(new Date).valueOf())/1E3<this.I;case Md:return null!=b&&Ea(b)&&(b.valueOf()-(new Date).valueOf())/1E3>this.I;case Ud:return null==b||typeof b!==typeof this.I||"string"!==typeof b||null==b.match(this.I)}return!1};
Hd.prototype.A=function(){var a=this.I;Ea(this.I)&&(a=Ja(a.valueOf()));return{k:this.gf,t:this.Ic,c:this.kb,v:a}};var Nd=1,Od=2,Pd=3,Jd=4,Qd=5,Kd=6,Rd=10,Sd=11,Td=12,Ld=15,Md=16,Ud=17,Id="date";function Vd(a){this.filters=a}Vd.prototype.ea=function(a){for(var b=!0,c=0;c<this.filters.length;c++){for(var d=this.filters[c],e=!1,f=0;f<d.length;f++)if(d[f].ea(a)){e=!0;break}if(!e){b=!1;break}}return b};function Wd(a){if(null==a||!Da(a))return null;for(var b=[],c=0;c<a.length;c++){for(var d=[],e=a[c],f=0;f<e.length;f++){var g=e[f];d.push(new Hd(g.property_key,g.property_type,g.comparator,g.property_value))}b.push(d)}return new Vd(b)}
Vd.prototype.A=function(){for(var a=[],b=0;b<this.filters.length;b++){for(var c=this.filters[b],d=[],e=0;e<c.length;e++)d.push(c[e].A());a.push(d)}return a};function Xd(a){for(var b=[],c=0;c<a.length;c++){for(var d=[],e=a[c],f=0;f<e.length;f++){var g=e[f];d.push(new Hd(g.k,g.t,g.c,g.v))}b.push(d)}return new Vd(b)};function Yd(a,b){this.bb=a;this.eb=b}Yd.prototype.ea=function(a){if(null==this.bb||null==this.eb)return!1;var b=a[1];return a[0]===this.bb&&this.eb.ea(b)};Yd.prototype.A=function(){return{e:this.bb,pf:this.eb.A()}};function Zd(a,b){this.Za=a;this.Bb=b}Zd.prototype.ea=function(a){if(null==this.Za)return!1;var b=$d(a[0],this.Za);if(!b)return!1;var c=null==this.Bb||0===this.Bb.length;if(null!=this.Bb)for(var d=0;d<this.Bb.length;d++)if(this.Bb[d]===a[1]){c=!0;break}return b&&c};Zd.prototype.A=function(){return this.Za};function ae(a){this.cb=a}ae.prototype.ea=function(a){return null==this.cb||a[0]===this.cb};ae.prototype.A=function(){return this.cb};function be(a,b){this.cb=a;this.eb=b}be.prototype.ea=function(a){if(null==this.cb||null==this.eb)return!1;var b=a[1];return a[0]===this.cb&&this.eb.ea(b)};be.prototype.A=function(){return{id:this.cb,pf:this.eb.A()}};function ce(a){this.Za=a}ce.prototype.ea=function(a){return null==this.Za?!0:$d(a[0],this.Za)};ce.prototype.A=function(){return this.Za};var de={OPEN:"open",dd:"purchase",le:"push_click",Qc:"custom_event",$b:"iam_click",V:"test"};function ee(a,b){this.type=a;this.data=b}function fe(a,b,c){return ge[a.type]===b&&(null==a.data||a.data.ea(c))}function $d(a,b){var c=null;try{c=window.atob(a)}catch(d){return w.info("Failed to unencode analytics id "+a+": "+d.message),!1}return b===c.split("_")[0]}
function he(a){var b=a.type;switch(b){case ie:var c=null;break;case je:a=a.data;c=new ae(a?a.product_id:null);break;case ke:a=a.data;c=new be(a?a.product_id:null,a?Wd(a.property_filters):null);break;case le:a=a.data;c=new ce(a?a.campaign_id:null);break;case me:a=a.data;c=new Gd(a?a.event_name:null);break;case ne:a=a.data;c=new Yd(a?a.event_name:null,a?Wd(a.property_filters):null);break;case oe:a=a.data;c=new Zd(a?a.id:null,a?a.buttons:null);break;case pe:c=null}return new ee(b,c)}
ee.prototype.A=function(){return{t:this.type,d:this.data?this.data.A():null}};function qe(a){switch(a.t){case ie:var b=null;break;case je:b=new ae(a.d);break;case ke:b=a.d||{};b=new be(b.id,Xd(b.pf||[]));break;case le:b=new ce(a.d);break;case me:b=new Gd(a.d);break;case ne:b=a.d||{};b=new Yd(b.e,Xd(b.pf||[]));break;case oe:b=new Zd(a.d);break;case pe:b=null}return new ee(a.t,b)}
var ie="open",je="purchase",ke="purchase_property",le="push_click",me="custom_event",ne="custom_event_property",oe="iam_click",pe="test",ge={};ge[ie]=de.OPEN;ge[je]=de.dd;ge[ke]=de.dd;ge[le]=de.le;ge[me]=de.Qc;ge[ne]=de.Qc;ge[oe]=de.$b;ge[pe]=de.V;function re(a,b,c,d,e,f,g,h,k,l,m,r){this.id=a;this.lb=b||[];void 0===c&&(c=null);this.startTime=c;void 0===d&&(d=null);this.endTime=d;this.priority=e||0;this.type=f;this.ab=h||0;null==l&&(l=1E3*(this.ab+30));this.Oa=l;this.data=g;null==k&&(k=se);this.Lb=k;this.ff=m;this.Ca=r||null}
function te(a,b){var c=(new Date).valueOf()-b;(b=null==b||isNaN(c)||null==a.Oa||c<a.Oa)||w.info("Trigger action "+a.type+" is no longer eligible for display - fired "+c+"ms ago and has a timeout of "+a.Oa+"ms");return!b}re.prototype.A=function(){for(var a=[],b=0;b<this.lb.length;b++)a.push(this.lb[b].A());return{i:this.id,c:a,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.ab,r:this.Lb,tm:this.Oa,ss:this.ff,ld:this.Ca}};
function ue(a){for(var b=[],c=0;c<a.c.length;c++)b.push(qe(a.c[c]));return new re(a.i,b,Ma(a.s),Ma(a.e),a.p,a.t,a.da,a.d,a.r,a.tm,a.ss,a.ld)}var se=-1,ve={Uc:"inapp",se:"templated_iam"};function we(a,b){a=Math.ceil(a);b=Math.floor(b);return Math.floor(Math.random()*(b-a+1))+a};function xe(a){var b,c=!1;try{if(window.XMLHttpRequest&&(b=new XMLHttpRequest)&&"undefined"!==typeof b.withCredentials||("undefined"!==typeof XDomainRequest?(b=new XDomainRequest,c=b.async=!0):w.error("This browser does not have any supported ajax options!")),null!=b){var d=function(){"function"===typeof a.error&&a.error(b.status);"function"===typeof a.vc&&a.vc(!1)};b.onload=function(){if(c)var h=!0;else{if(4!==b.readyState)return;h=200<=b.status&&300>b.status||304===b.status}if(h){if("function"===
typeof a.h){try{var k=JSON.parse(b.responseText)}catch(l){a.h({error:""===b.responseText?"empty_response":"invalid_json_response",response:b.responseText})}k&&a.h(k)}"function"===typeof a.vc&&a.vc(!0)}else d()};b.onerror=function(){d()};b.ontimeout=function(){d()};var e=JSON.stringify(a.data);if(c)b.onprogress=function(){},b.open("post",a.url);else{b.open("POST",a.url,!0);b.setRequestHeader("Content-type","application/json");b.setRequestHeader("X-Requested-With","XMLHttpRequest");for(var f=a.headers||
[],g=0;g<f.length;g++)b.setRequestHeader(f[g][0],f[g][1])}b.send(e)}}catch(h){w.error("Network request error: "+h.message)}};function ye(a,b,c,d,e,f,g,h,k,l,m,r){var q=this;this.Y=a;this.Gg=b;this.Ke=c;this.Bg=d;this.xb=e;this.ib=0;this.lc=l.R.$e;this.Ee=null;this.F=f;this.ic=g;this.f=h;this.J=k;this.b=l;this.aa=r;this.zg=m;this.qd=new Nb;this.wg=50;this.Va=0;ze(this.aa,function(){q.Va=0});this.yg=1E3;this.xg=6E4}
function Ae(a,b){var c=Be(a.ic),d=c.wc(),e=R(a.b,M.Yb);Ia(e,d)||(b.device=d);b.api_key=a.Y;b.time=Ja((new Date).valueOf(),!0);b.sdk_version=a.Gg;a.Ke&&(b.sdk_flavor=a.Ke);b.app_version=a.Bg;b.device_id=c.id;return b}
function Ce(a,b,c,d){var e=c.auth_error,f=c.error;if(!e&&!f)return!0;if(e){a.Va+=1;c={errorCode:e.error_code};d=ba(d);for(f=d.next();!f.done;f=d.next())f=f.value,Da(f)&&"X-Braze-Auth-Signature"===f[0]&&(c.signature=f[1]);b.respond_with&&b.respond_with.user_id?c.userId=b.respond_with.user_id:b.user_id&&(c.userId=b.user_id);(d=e.reason)?(c.reason=d,e="due to "+d):e="with error code "+e.error_code+".";a.aa.zb||(e+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.');
w.error("SDK Authentication failed "+e);Ee(a,b);Pb(a.aa.ve,c);return!1}if(f){e=f;switch(e){case "empty_response":return cb(a.b,[new E(a.f.o(),x.Vc,(new Date).valueOf(),a.F.Cd,{e:"Received successful response with empty body."})]),w.info("Received successful response with empty body."),!1;case "invalid_json_response":return cb(a.b,[new E(a.f.o(),x.Vc,(new Date).valueOf(),a.F.Cd,{e:"Received successful response with invalid JSON: "+c.response})]),w.info("Received successful response with invalid JSON"),
!1;case "invalid_api_key":e='The API key "'+b.api_key+'" is invalid for the baseUrl '+a.xb;break;case "blacklisted":e="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case "no_device_identifier":e="No device identifier. Please contact support@braze.com"}w.error("Backend error: "+e)}return!1}
function Fe(a,b,c,d,e,f,g,h){null==d&&(d=!0);d&&Ge(a);var k=Bb(a.b),l=Gb(a.b),m=He(a.F);if(0<k.length)for(var r=0;r<k.length;r++)k[r].type===x.re&&(m=!0);if(!h&&!m&&a.Va>=a.wg)w.info("Declining to flush data due to 50 consecutive authentication failures");else if(h=c||m,!d||0!==k.length||0!==l.length||b||h){var q=!1,v=function(z,F){var I=!1;xe({url:""+a.xb+"/data/",data:z,headers:F,h:function(D){null!=z.respond_with&&z.respond_with.triggers&&(a.ib=Math.max(a.ib-1,0));if(Ce(a,z,D,F)){a.Va=0;var K=
a.J;if(null!=D&&null!=D.config){var G=D.config;if(G.time>Ie(K).Hb){G=new Je(G.time,G.events_blacklist,G.attributes_blacklist,G.purchases_blacklist,G.messaging_session_timeout,G.vapid_public_key,G.content_cards);var N=!1;null!=G.ra&&Ie(K).ra!==G.ra&&(N=!0);var X=!1;null!=G.Cb.enabled&&(Ie(K).Cb.enabled||!1)!==G.Cb.enabled&&(X=!0);K.qc=G;O(K.b,M.qe,G.A());N&&Pb(K.vd);X&&Pb(K.we)}}if(null==z.respond_with||z.respond_with.user_id==a.f.o())null!=z.device&&O(a.b,M.Yb,z.device),a.zg(D),"function"===typeof e&&
e()}else D.auth_error&&(I=!0)},error:function(){null!=z.respond_with&&z.respond_with.triggers&&(a.ib=Math.max(a.ib-1,0));Ee(a,z);"function"===typeof f&&f()},vc:function(D){"function"===typeof g&&g(D);if(d&&!q){if(D&&!I)Ke(a);else{D=a.Ee;if(null==D||D<1E3*a.lc)D=1E3*a.lc;Ke(a,Math.min(3E5,we(1E3*a.lc,3*D)))}q=!0}}})},t=function(z){return null!=z?z:""},A={};c=t(a.f.o());if(b||h)A[c]=Le(a,b,h);b=function(z,F){var I=t(F.user_id);A[I]||(A[I]=Le(a,!1,!1,F.user_id));A[I][z]||(A[I][z]=[]);A[I][z].push(F)};
k=ba(k);for(r=k.next();!r.done;r=k.next())b("events",r.value.wc());l=ba(l);for(k=l.next();!k.done;k=l.next())b("attributes",k.value);h&&a.ib++;l=!1;h={};for(var H in A)a.aa.zb&&H!==c?Ee(a,A[H]):(h.qb=Ae(a,A[H]),h.Mc=Me(a,h.qb),Ne(h.qb,function(z){return function(){return v(z.qb,z.Mc)}}(h)),l=!0),h={qb:h.qb,Mc:h.Mc};d&&!l?Ke(a):m&&(w.info("Invoking new session subscriptions"),Pb(a.qd))}else Ke(a),"function"===typeof g&&g(!0)}
function Ne(a,b){var c=a.device;c&&c.os_version instanceof Promise?c.os_version.then(function(d){a.device.os_version=d;b()}):b()}function Ee(a,b){if(b.events){for(var c=[],d=ba(b.events),e=d.next();!e.done;e=d.next())e=e.value,c.push(new E(e.user_id,e.name,e.time,e.session_id,e.data));cb(a.b,c)}if(b.attributes)for(b=ba(b.attributes),c=b.next();!c.done;c=b.next())Eb(a.b,c.value)}function Oe(a,b){var c="HTTP error ";null!=a&&(c+=a+" ");w.error(c+b)}
function Pe(a,b,c,d,e){var f=Le(a,!1,!1);f=Ae(a,f);f.template={trigger_id:b.Pa,trigger_event_type:c};null!=d&&(f.template.data=d.wc());var g=Me(a,f);Ne(f,function(){xe({url:""+a.xb+"/template/",data:f,headers:g,h:function(h){Ce(a,f,h,g)?(a.Va=0,null==h||null==h.templated_message?a.M(b.Pa,dd.ub):(h=h.templated_message,h.type!==ve.Uc?a.M(b.Pa,dd.wb):(h=Ec(h.data),null==h?a.M(b.Pa,dd.wb):"function"===typeof b.vf?b.vf(h):a.M(b.Pa,dd.ub)))):(a.M(b.Pa,dd.ub),"function"===typeof b.uf&&b.uf())},error:function(h){var k=
"getting user personalization for message "+b.Pa;if((new Date).valueOf()-b.Ac>b.Oa)a.M(b.Pa,dd.ub);else{var l=Math.min(b.Oa,a.xg),m=a.yg;null==e&&(e=m);var r=Math.min(l,we(m,3*e));k+=". Retrying in "+r+"ms";setTimeout(function(){Pe(a,b,c,d,r)},r)}Oe(h,k)}})})}p=ye.prototype;
p.Na=function(a,b,c,d,e){var f=this,g=Ae(this,{});g.last_full_sync_at=a;g.last_card_updated_at=b;a=this.f.o();null!=a&&(g.user_id=a);var h=[["X-Braze-Api-Key",this.Y],["X-Braze-DataRequest","true"],["X-Braze-ContentCardsRequest","true"]];this.aa.zb&&(a=R(this.aa.b,M.tb),null!=a&&h.push(["X-Braze-Auth-Signature",a]));Ne(g,function(){xe({url:""+f.xb+"/content_cards/sync",data:g,headers:h,h:function(k){Ce(f,g,k,h)?(f.Va=0,c(k),"function"===typeof d&&d()):"function"===typeof e&&e()},error:function(k){Oe(k,
"retrieving content cards");"function"===typeof e&&e()}})})};function Le(a,b,c,d){var e={};b&&(e.feed=!0);c&&(e.triggers=!0);b=d||a.f.o();null!=b&&(e.user_id=b);e.config={config_time:Ie(a.J).Hb};return{respond_with:e}}
function Me(a,b){var c=[["X-Braze-Api-Key",a.Y]],d=!1;null!=b.respond_with&&b.respond_with.triggers&&(c.push(["X-Braze-TriggersRequest","true"]),d=!0);null!=b.respond_with&&b.respond_with.feed&&(c.push(["X-Braze-FeedRequest","true"]),d=!0);d&&c.push(["X-Braze-DataRequest","true"]);a.aa.zb&&(a=R(a.aa.b,M.tb),null!=a&&c.push(["X-Braze-Auth-Signature",a]));return c}
function Qe(a){if(null==a.campaignId&&null==a.cardId&&null==a.triggerId)return w.info("The in-app message has no analytics id. Not logging event to Braze servers."),null;var b={};null!=a.cardId&&(b.card_ids=[a.cardId]);null!=a.campaignId&&(b.campaign_ids=[a.campaignId]);null!=a.triggerId&&(b.trigger_ids=[a.triggerId]);return b}function Re(a){for(var b=null,c=0;c<a.length;c++)null!=a[c].id&&""!==a[c].id&&(b=b||{},b.ids=b.ids||[],b.ids.push(a[c].id));return b}
function Ke(a,b){a.ye||(null==b&&(b=1E3*a.lc),Ge(a),a.mc=setTimeout(function(){if(document.hidden){var c=function(){document.hidden||(document.removeEventListener("visibilitychange",c,!1),Fe(a))};document.addEventListener("visibilitychange",c,!1)}else Fe(a)},b),a.Ee=b)}function Ge(a){null!=a.mc&&(clearTimeout(a.mc),a.mc=null)}p.Fd=function(){this.ye=!1;Ke(this)};p.Eb=function(){this.qd.K();this.aa.rd.K();Ge(this);this.ye=!0;Fe(this,null,null,!1);this.mc=null};function Se(a,b){Ob(a.qd,b)}
p.Hc=function(a){var b=this,c=this.F.Cd(),d=bb(this.F);if(c=c!==d)zb(this.b,Cb.Rc),zb(this.b,Cb.hc);Fe(this,null,!1,null,null,null);ib(this);if(c&&null!=a&&(a.Gb()||a.Ka())){var e=function(){a.Dg?w.info("Push token maintenance is disabled, not refreshing token for backend."):a.subscribe()};c=Aa.ga;va(new ra(c),c.H.ed,function(f,g){g&&e()},function(){var f=R(b.b,M.ec);(null==f||f)&&e()})}};
p.$a=function(a,b,c,d){var e=this.f.o();if(e!==a){var f=this.F,g=Ab(f.b,Cb.Ta);null!=g&&(f.b.nc.remove(Cb.Ta),g=Te(f,(new Date).valueOf(),g),null==g||cb(f.b,[g]));null!=e&&Fe(this,null,!1,null,null,null);f=this.f;g=null==f.o();yb(f.b,Cb.hc,new Pa(a));if(g){f=f.b;g=f.R.Z(M.Qa);if(null!=g){var h=M.Nc,k=g[h];null!=k&&(g[h]=void 0,f.R.store(M.Qa,g),k.user_id=a,Eb(f,k))}h=Ab(f,Cb.Ta);g=null;null!=h&&(g=h.ia);h=Bb(f);if(null!=h)for(k=0;k<h.length;k++){var l=h[k];null==l.Qb&&l.sessionId==g&&(l.Qb=a);null==
l||cb(f,[l])}}d?this.aa.Lc(d):(d=this.aa,S(d.b,M.tb),f=Aa.ga,wa(new ra(f),f.H.oe,d.ue));for(d=0;d<b.length;d++)b[d].$a(null==e);null!=e&&S(this.b,M.rb);S(this.b,M.Yb);this.Hc(c);w.info('Changed user to "'+a+'".')}else w.info('Current user is already "'+a+'". Doing nothing.')};p.ob=function(){return new L(this.f,this)};p.Nb=function(a){Ge(this);bb(this.F);Fe(this,null,null,null,null,null,a,!0)};p.Jc=function(){bb(this.F);Fe(this,!0)};
function Ue(a,b,c){bb(a.F);w.info("Requesting explicit trigger refresh.");Fe(a,null,!0,null,b,c)}p.Hd=function(a,b){var c=new ab,d=bb(this.F);if(-1!==Ie(this.J).Ze.indexOf(a))return w.info('Custom Event "'+a+'" is blocklisted, ignoring.'),c;c.j.push(new E(this.f.o(),x.CustomEvent,(new Date).valueOf(),d,{n:a,p:b}));c.h=cb(this.b,c.j);return c};
function hb(a,b,c,d){var e=new ab,f=bb(a.F);if(jb(a.J,c))return w.info('Custom Attribute "'+c+'" is blocklisted, ignoring.'),e;e.j.push(new E(a.f.o(),b,(new Date).valueOf(),f,{key:c,value:d}));e.h=cb(a.b,e.j);return e}p.Id=function(a,b,c,d,e){var f=new ab,g=bb(this.F);if(-1!==Ie(this.J).hf.indexOf(a))return w.info('Purchase "'+a+'" is blocklisted, ignoring.'),f;f.j.push(new E(this.f.o(),x.ag,(new Date).valueOf(),g,{pid:a,c:c,p:b,q:d,pr:e}));f.h=cb(this.b,f.j);return f};
p.Kc=function(a,b,c,d,e,f){var g=new ab,h=bb(this.F);b={latitude:b,longitude:c};null!=d&&(b.altitude=d);null!=e&&(b.ll_accuracy=e);null!=f&&(b.alt_accuracy=f);g.j.push(new E(a,x.hg,(new Date).valueOf(),h,b));g.h=cb(this.b,g.j);return g};
p.Kb=function(a){var b=new ab,c=bb(this.F);if(a instanceof Fc)b.j.push(new E(this.f.o(),x.If,(new Date).valueOf(),c,{trigger_ids:[a.triggerId]}));else{if(!a.Md())return w.info("This in-app message has already received an impression. Ignoring analytics event."),b;a=Qe(a);if(null==a)return b;b.j.push(new E(this.f.o(),x.$f,(new Date).valueOf(),c,a))}b.h=cb(this.b,b.j);return b};
p.Fc=function(a){var b=new ab,c=bb(this.F);if(!a.fb())return w.info("This in-app message has already received a click. Ignoring analytics event."),b;a=Qe(a);if(null==a)return b;b.j.push(new E(this.f.o(),x.ie,(new Date).valueOf(),c,a));b.h=cb(this.b,b.j);return b};
p.Ec=function(a,b){var c=new ab,d=bb(this.F);if(!a.fb())return w.info("This in-app message button has already received a click. Ignoring analytics event."),c;b=Qe(b);if(null==b)return c;if(a.id===md)return w.info("This in-app message button does not have a tracking id. Not logging event to Braze servers."),c;null!=a.id&&(b.bid=a.id);c.j.push(new E(this.f.o(),x.ge,(new Date).valueOf(),d,b));c.h=cb(this.b,c.j);return c};
p.Jb=function(a,b,c){var d=new ab,e=bb(this.F);if(!a.fb(c))return w.info("This in-app message has already received a click. Ignoring analytics event."),d;a=Qe(a);if(null==a)return d;c=x.ie;null!=b&&(a.bid=b,c=x.ge);d.j.push(new E(this.f.o(),c,(new Date).valueOf(),e,a));d.h=cb(this.b,d.j);return d};p.M=function(a,b){var c=new ab,d=bb(this.F);a={trigger_ids:[a],error_code:b};c.j.push(new E(this.f.o(),x.Zf,(new Date).valueOf(),d,a));c.h=cb(this.b,c.j);return c};
p.Ma=function(a,b){var c=new ab,d=bb(this.F),e=[],f=[];var g=b?R(this.b,M.hb)||{}:R(this.b,M.rb)||{};for(var h=0;h<a.length;h++)a[h].Md(),a[h]instanceof mc?f.push(a[h]):e.push(a[h]),g[a[h].id]=!0;a=Re(e);f=Re(f);if(null==a&&null==f)return c;b?O(this.b,M.hb,g):O(this.b,M.rb,g);null!=a&&c.j.push(new E(this.f.o(),b?x.Ff:x.Cf,(new Date).valueOf(),d,a));null!=f&&b&&c.j.push(new E(this.f.o(),x.Hf,(new Date).valueOf(),d,f));c.h=cb(this.b,c.j);return c};
p.La=function(a,b){var c=new ab,d=bb(this.F);a.fb();if(null==a.url||""===a.url)return w.info("Card "+a.id+" has no url. Not logging click to Braze servers."),c;if(b){var e=R(this.b,M.gb)||{};e[a.id]=!0;O(this.b,M.gb,e)}a=Re([a]);if(null==a)return c;c.j.push(new E(this.f.o(),b?x.Df:x.Bf,(new Date).valueOf(),d,a));c.h=cb(this.b,c.j);return c};
p.Dc=function(a){var b=new ab,c=bb(this.F);if(!a.Ld())return w.info("Card "+a.id+" refused this dismissal. Ignoring analytics event."),b;var d=R(this.b,M.ua)||{};d[a.id]=!0;O(this.b,M.ua,d);a=Re([a]);if(null==a)return b;b.j.push(new E(this.f.o(),x.Ef,(new Date).valueOf(),c,a));b.h=cb(this.b,b.j);return b};function Ve(a,b){var c=new ab,d=bb(a.F);c.j.push(new E(a.f.o(),x.bg,(new Date).valueOf(),d,{n:b}));c.h=cb(a.b,c.j);return c}
function We(a,b,c){var d=bb(a.F);return new E(a.f.o(),x.og,b,d,{cid:c})}function ib(a){var b=Aa.ga;(new ra(b)).setItem(b.H.Nf,1,{baseUrl:a.xb,data:{api_key:a.Y,device_id:Be(a.ic).id},userId:a.f.o(),sdkAuthEnabled:a.aa.zb})}function kb(a,b,c){var d=new ab,e=bb(a.F);b={group_id:b,status:c};d.j.push(new E(a.f.o(),x.vg,(new Date).valueOf(),e,b));d.h=cb(a.b,d.j);return d};var Xe={BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"};J.DeviceProperties=Xe;function Ye(a){this.id=a}Ye.prototype.wc=function(){var a={};null!=this.browser&&(a.browser=this.browser);null!=this.browserVersion&&(a.browser_version=this.browserVersion);null!=this.os&&(a.os_version=this.os);null!=this.resolution&&(a.resolution=this.resolution);null!=this.language&&(a.locale=this.language);null!=this.timeZone&&(a.time_zone=this.timeZone);null!=this.userAgent&&(a.user_agent=this.userAgent);return a};function Ze(a,b){this.b=a;null==b&&(b=Ca(Xe));this.ze=b}
function Be(a){var b=Ab(a.b,Cb.Rc);null==b&&(b=new Pa(qa.Ia()),yb(a.b,Cb.Rc,b));b=new Ye(b.ia);for(var c=0;c<a.ze.length;c++){var d=a.ze[c];switch(d){case "browser":b[d]=wb.Ya;break;case "browserVersion":b[d]=wb.version;break;case "os":var e=wb.fa?wb.fa||null:(e=R(a.b,M.Yb))&&e.os_version?e.os_version:wb.nb();b[d]=e;break;case "resolution":b[d]=screen.width+"x"+screen.height;break;case "language":b[d]=wb.language;break;case "timeZone":a:{e=new Date;if("undefined"!==typeof Intl&&"function"===typeof Intl.DateTimeFormat)try{if("function"===
typeof Intl.DateTimeFormat().resolvedOptions){var f=Intl.DateTimeFormat().resolvedOptions().timeZone;if(null!=f&&""!==f){var g=f;break a}}}catch(l){w.info("Intl.DateTimeFormat threw an error, probably https://bugs.chromium.org/p/chromium/issues/detail?id=811403, falling back to GTM offset: "+l.message)}g=e.getTimezoneOffset();e=parseInt(g/60);var h=parseInt(g%60),k="GMT";0!==g&&(k=k+(0>g?"+":"-")+(("00"+Math.abs(e)).slice(-2)+":"+("00"+Math.abs(h)).slice(-2)));g=k}b[d]=g;break;case "userAgent":b[d]=
wb.userAgent}}return b};function $e(a){this.Fa=a;this.sc=null;this.Ne="geolocation"in navigator}$e.prototype.Jg=function(a){var b=this;if(document.hidden){af(this);var c=function(){document.hidden||(document.removeEventListener("visibilitychange",c,!1),b.watchPosition())};document.addEventListener("visibilitychange",c,!1)}this.Fa.Kc(a.coords.latitude,a.coords.longitude,a.coords.accuracy,a.coords.altitude,a.coords.altitudeAccuracy)};
$e.prototype.Ig=function(a){a.code===a.PERMISSION_DENIED?w.info(a.message):w.error("Could not detect user location: "+a.code+" - "+a.message)};$e.prototype.watchPosition=function(){this.Ne?(af(this),this.sc=navigator.geolocation.watchPosition(this.Jg.bind(this),this.Ig.bind(this)),w.info("Requested Geolocation")):w.info(this.bd)};function af(a){a.Ne?null!=a.sc&&(navigator.geolocation.clearWatch(a.sc),a.sc=null,w.info("Stopped watching Geolocation")):w.info(a.bd)};function bf(a,b,c,d,e){this.endpoint=a||null;this.Ve=b||null;this.publicKey=c||null;this.Ph=d||null;this.ra=e||null}bf.prototype.A=function(){return{e:this.endpoint,c:this.Ve,p:this.publicKey,u:this.Ph,v:this.ra}};function cf(a,b,c,d,e,f,g,h,k,l){this.Fa=a;this.Y=b;this.ic=c;this.Fg=d;this.Le=e||"/service-worker.js";this.Je=f;this.J=g;this.pd=h||!1;this.Dg=k||!1;this.b=l;this.rc="serviceWorker"in navigator&&"undefined"!==typeof ServiceWorkerRegistration&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window;this.td="safari"in window&&"pushNotification"in window.safari}p=cf.prototype;p.qa=function(){return this.rc||this.td};
p.Ka=function(){var a=this.qa()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"denied"===window.Notification.permission,b=this.qa()&&(!("Notification"in window)||null==window.Notification);return a||b};p.Gb=function(){return this.qa()&&"Notification"in window&&null!=window.Notification&&null!=window.Notification.permission&&"granted"===window.Notification.permission};
p.Gd=function(a,b,c){var d=this;c=this.Je||c;this.qa()?this.rc?df(this).then(function(e){d.Ka()?b():null==e?b():e.pushManager.getSubscription().then(function(f){f?a():b()}).catch(function(){b()})}).catch(function(){b()}):null==c||""===c?w.error("You must supply the safariWebsitePushId argument in order to use isPushGranted on Safari"):"granted"===window.safari.pushNotification.permission(c).permission?a():b():b()};
function ef(a,b,c,d,e,f){b.unsubscribe().then(function(g){g?ff(a,c,d,e,f):(w.error("Failed to unsubscribe device from push."),"function"===typeof f&&f(!1))}).catch(function(g){w.error("Push unsubscription error: "+g);"function"===typeof f&&f(!1)})}
function gf(a,b,c,d){var e=function(h){if("string"===typeof h)return h;if(0!==h.endpoint.indexOf("https://android.googleapis.com/gcm/send"))return h.endpoint;var k=h.endpoint;h.subscriptionId&&-1===h.endpoint.indexOf(h.subscriptionId)&&(k=h.endpoint+"/"+h.subscriptionId);return k}(b),f=null,g=null;if(null!=b.getKey)try{f=btoa(String.fromCharCode.apply(null,new Uint8Array(b.getKey("p256dh")))),g=btoa(String.fromCharCode.apply(null,new Uint8Array(b.getKey("auth"))))}catch(h){if("invalid arguments"!==
h.message)throw h;}b=function(h){var k;return h.options&&(k=h.options.applicationServerKey)&&k.byteLength&&0<k.byteLength?btoa(String.fromCharCode.apply(null,new Uint8Array(k))).replace(/\+/g,"-").replace(/\//g,"_"):null}(b);a.Fa.Nd(e,d,f,g,b);e&&"function"===typeof c&&c(e,f,g)}function hf(a,b,c){a.Fa.Mb(!1);w.info(b);"function"===typeof c&&c(!1)}
function jf(a,b,c,d,e){if("default"===c.permission)try{window.safari.pushNotification.requestPermission(a.Fg,b,{api_key:a.Y,device_id:Be(a.ic).id},function(f){"granted"===f.permission&&a.Fa.Sd("opted_in");jf(a,b,f,d,e)})}catch(f){hf(a,"Could not request permission for push: "+f,e)}else"denied"===c.permission?hf(a,"The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",e):"granted"===c.permission&&(w.info("Device successfully subscribed to push."),
gf(a,c.deviceToken,d,new Date))}function kf(a,b,c){function d(g){switch(g){case "granted":"function"===typeof a&&a();break;case "default":"function"===typeof b&&b();break;case "denied":"function"===typeof c&&c();break;default:w.error("Received unexpected permission result "+g)}}var e=!1,f=window.Notification.requestPermission(function(g){e&&d(g)});f?f.then(function(g){d(g)}):e=!0}
function ff(a,b,c,d,e){var f={userVisibleOnly:!0};null!=c&&(f.applicationServerKey=c);b.pushManager.subscribe(f).then(function(g){w.info("Device successfully subscribed to push.");gf(a,g,d,new Date)}).catch(function(g){a.Ka()?(w.info("Permission for push notifications was denied."),"function"===typeof e&&e(!1)):w.error("Push subscription failed: "+g)})}
function df(a){return a.pd?navigator.serviceWorker.getRegistration():navigator.serviceWorker.register(a.Le).then(function(){return navigator.serviceWorker.ready.then(function(b){b&&"function"===typeof b.update&&b.update().catch(function(c){w.info("ServiceWorker update failed: "+c)});return b})})}
p.subscribe=function(a,b,c){var d=this;a=this.Je||a;if(this.qa())if(this.rc){if(!this.pd&&null!=window.location){var e=this.Le;-1===e.indexOf(window.location.host)&&(e=window.location.host+e);-1===e.indexOf(window.location.protocol)&&(e=window.location.protocol+"//"+e);if(0!==window.location.href.indexOf(e.substr(0,e.lastIndexOf("/")+1))){w.error("Cannot subscribe to push from a path higher than the service worker location (tried to subscribe from "+window.location.pathname+" but service worker is at "+
e+")");return}}if(this.Ka())hf(this,"Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",c);else if(this.J&&!Ie(this.J).ra&&0===Ie(this.J).Hb)w.info("Waiting for VAPID key from server config before subscribing to push."),lf(this.J,function(){d.subscribe(a,b,c)});else{var f=this.Gb();kf(function(){f||d.Fa.Sd("opted_in");df(d).then(function(g){null==g?(w.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to false or ensure that your service worker is registered before calling registerAppboyPushMessages."),
"function"===typeof c&&c()):g.pushManager.getSubscription().then(function(h){var k=null;d.J&&null!=Ie(d.J).ra&&(k=pa.Oh(Ie(d.J).ra));if(h){var l=null,m=null,r=R(d.b,M.ec);if(r&&!Da(r)){try{var q=(new bf(r.e,Ma(r.c),r.p,r.u,r.v)).Ve}catch(v){q=null}null==q||isNaN(q.getTime())||0===q.getTime()||(l=q,m=new Date(l),m.setMonth(l.getMonth()+6))}null!=k&&h.options&&h.options.applicationServerKey&&h.options.applicationServerKey.byteLength&&0<h.options.applicationServerKey.byteLength&&!Ia(k,new Uint8Array(h.options.applicationServerKey))?
(12<h.options.applicationServerKey.byteLength?w.info("Device was already subscribed to push using a different VAPID provider, creating new subscription."):w.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."),ef(d,h,g,k,b,c)):h.expirationTime&&new Date(h.expirationTime)<=(new Date).valueOf()?(w.info("Push subscription is expired, creating new subscription."),ef(d,h,g,k,b,
c)):r&&Da(r)?ef(d,h,g,k,b,c):null==m?(w.info("No push subscription creation date found, creating new subscription."),ef(d,h,g,k,b,c)):m<=(new Date).valueOf()?(w.info("Push subscription older than 6 months, creating new subscription."),ef(d,h,g,k,b,c)):(w.info("Device already subscribed to push, sending existing subscription to backend."),gf(d,h,b,l))}else ff(d,g,k,b,c)}).catch(function(h){w.error("Error checking current push subscriptions: "+h)})}).catch(function(g){w.error("ServiceWorker registration failed: "+
g)})},function(){var g="Permission for push notifications was ignored.";d.Ka()&&(g+=" The browser has automatically blocked further permission requests for a period (probably 1 week).");w.info(g);"function"===typeof c&&c(!0)},function(){w.info("Permission for push notifications was denied.");"function"===typeof c&&c(!1)})}}else this.td&&(null==a||""===a?w.error("You must supply the safariWebsitePushId argument in order to use registerAppboyPushMessages on Safari"):(e=window.safari.pushNotification.permission(a),
jf(this,a,e,b,c)));else w.info(this.bd)};
p.unsubscribe=function(a,b){var c=this;this.qa()?this.rc?navigator.serviceWorker.getRegistration().then(function(d){d&&d.pushManager.getSubscription().then(function(e){e&&(c.Fa.Mb(!0),e.unsubscribe().then(function(f){f?(w.info("Device successfully unsubscribed from push."),"function"===typeof a&&a()):(w.error("Failed to unsubscribe device from push."),"function"===typeof b&&b());c.pd||(d.unregister(),w.info("Service worker successfully unregistered."))}).catch(function(f){w.error("Push unsubscription error: "+f);
"function"===typeof b&&b()}))}).catch(function(e){w.error("Error unsubscribing from push: "+e);"function"===typeof b&&b()})}):this.td&&(this.Fa.Mb(!0),w.info("Device unsubscribed from push."),"function"===typeof a&&a()):w.info(this.bd)};function Je(a,b,c,d,e,f,g){this.Hb=a||0;this.Ze=b||[];this.Re=c||[];this.hf=d||[];this.Jd=e;if(null==e||""===e)this.Jd=null;this.ra=f||null;this.Cb=g||{}}Je.prototype.A=function(){return{s:"3.4.0",l:this.Hb,e:this.Ze,a:this.Re,p:this.hf,m:this.Jd,v:this.ra,c:this.Cb}};function mf(a){this.b=a;this.vd=new Nb;this.we=new Nb;this.qc=null}function Ie(a){if(null==a.qc){var b=R(a.b,M.qe);if(null!=b){var c=b.l;"3.4.0"!==b.s&&(c=0);b=new Je(c,b.e,b.a,b.p,b.m,b.v,b.c)}else b=new Je;a.qc=b}return a.qc}function lf(a,b){b=Ob(a.vd,b);a.xe&&a.vd.N(a.xe);a.xe=b}function nf(a,b){Ob(a.we,b)}function jb(a,b){return-1!==Ie(a).Re.indexOf(b)};function of(a,b,c,d){this.b=a;this.f=b;this.J=c;this.yb=1E3;d=parseFloat(d);isNaN(d)&&(d=1800);d<this.yb/1E3&&(w.info("Specified session timeout of "+d+"s is too small, using the minimum session timeout of "+this.yb/1E3+"s instead."),d=this.yb/1E3);this.Hg=d}function Te(a,b,c){return new E(a.f.o(),x.ug,b,c.ia,{d:Ja(b-c.Db)})}of.prototype.Cd=function(){var a=Ab(this.b,Cb.Ta);return null==a?null:a.ia};
function He(a){var b=(new Date).valueOf(),c=Ie(a.J).Jd,d=R(a.b,M.bc);if(null!=d&&null==c)return!1;(c=null==d||b-d>1E3*c)&&O(a.b,M.bc,b);return c}
function bb(a){var b=(new Date).valueOf(),c=b+1E3*a.Hg,d=Ab(a.b,Cb.Ta);if(null==d||(b-d.Db<a.yb?0:d.zd<b)){var e="Generating session start event with time "+b;if(null!=d){var f=d.Ib;f-d.Db<a.yb&&(f=d.Db+a.Uh);d=Te(a,f,d);null==d||cb(a.b,[d]);e+=" (old session ended "+f+")"}e+=". Will expire "+c.valueOf();w.info(e);c=new Pa(qa.Ia(),c);e=new E(a.f.o(),x.re,b,c.ia);null==e||cb(a.b,[e]);yb(a.b,Cb.Ta,c);null==R(a.b,M.bc)&&O(a.b,M.bc,b);return c.ia}d.Ib=b;d.zd=c;yb(a.b,Cb.Ta,d);return d.ia};function pf(a,b){var c=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(M.gd,!0),localStorage.getItem(M.gd)&&(localStorage.removeItem(M.gd),c=!0)}catch(e){if(("QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0<localStorage.length)c=!0;else throw e;}}catch(e){w.info("Local Storage not supported!")}var d=navigator.cookieEnabled||"cookie"in document&&(0<document.cookie.length||-1<(document.cookie="test").indexOf.call(document.cookie,"test"));b=new Mb(a,d&&!b,
c);return new xb(b,c?new Hb(a):new Lb)};function qf(a,b){this.J=a;this.b=b}qf.prototype.o=function(){var a=Ab(this.b,Cb.hc);if(null==a)return null;var b=a.ia,c=Qa(b);if(997<c){for(;997<c;)b=b.slice(0,b.length-1),c=Qa(b);a.ia=b;yb(this.b,Cb.hc,a)}return b};qf.prototype.Qd=function(a,b){if(jb(this.J,a))return w.info('Custom Attribute "'+a+'" is blocklisted, ignoring.'),!1;var c={};c[a]=b;return db(this,"custom",c)};function db(a,b,c){return Fb(a.b,a.o(),b,c)}
qf.prototype.Nd=function(a,b,c,d,e){db(this,"push_token",a);db(this,"custom_push_public_key",c);db(this,"custom_push_user_auth",d);db(this,"custom_push_vapid_public_key",e);var f=Aa.ga,g=new ra(f);O(this.b,M.ec,(new bf(a,b,c,d,e)).A());g.setItem(f.H.ed,f.fc,!0)};
qf.prototype.Mb=function(a){db(this,"push_token",null);db(this,"custom_push_public_key",null);db(this,"custom_push_user_auth",null);db(this,"custom_push_vapid_public_key",null);if(a){a=Aa.ga;var b=new ra(a);O(this.b,M.ec,!1);b.setItem(a.H.ed,a.fc,!1)}};function rf(a,b,c){this.b=a;this.zb=b||!1;this.ve=c;this.rd=new Nb;this.ue=1}rf.prototype.Lc=function(a){var b=R(this.b,M.tb);O(this.b,M.tb,a);var c=Aa.ga;(new ra(c)).setItem(c.H.oe,this.ue,a);b!==a&&Pb(this.rd)};rf.prototype.Vd=function(a){return Ob(this.ve,a)};function ze(a,b){Ob(a.rd,b)};function sf(){}sf.prototype.Fb=function(){};sf.prototype.$a=function(){};sf.prototype.clearData=function(){};function tf(a,b,c,d,e){this.ha=a;this.G=b;this.b=c;this.J=d;this.Ag=e;this.Aa=this.Da=0;this.Ga()}oa(tf,sf);p=tf.prototype;p.Ga=function(){for(var a=R(this.b,M.sb)||[],b=[],c=0;c<a.length;c++){var d=nc(a[c]);null!=d&&b.push(d)}this.B=uf(this,vf(this,b,!1));this.Da=R(this.b,M.Wb)||this.Da;this.Aa=R(this.b,M.Vb)||this.Aa};
p.Fb=function(a){if(wf(this)&&null!=a&&a.cards){var b=a.full_sync;b||this.Ga();var c=a.cards,d=a.last_full_sync_at;a=a.last_card_updated_at;if(b){var e=[];for(var f=ba(this.B),g=f.next();!g.done;g=f.next())g=g.value,g.test&&e.push(g)}else e=this.B.slice();for(f=0;f<c.length;f++){g=c[f];for(var h=null,k=0;k<this.B.length;k++)if(g.id===this.B[k].id){h=this.B[k];break}if(b)g=hc(g),null!=h&&h.viewed&&(g.viewed=!0),null!=g&&e.push(g);else if(null==h)g=hc(g),null!=g&&e.push(g);else if(!fc(h,g))for(h=0;h<
e.length;h++)if(g.id===e[h].id){e.splice(h,1);break}}this.B=uf(this,vf(this,e,b));this.uc();this.Da=d||0;O(this.b,M.Wb,this.Da);this.Aa=a||0;O(this.b,M.Vb,this.Aa);Pb(this.ha,this.mb(!0))}};
function xf(a,b){if(wf(a)){a.Ga();var c=a.B.slice();a.G.ob().o(function(d){for(var e=0;e<b.length;e++)if(d===b[e].userId||null==d&&null==b[e].userId){for(var f=b[e].card,g=null,h=0;h<a.B.length;h++)if(f.id===a.B[h].id){g=a.B[h];break}if(null==g)f=hc(f),null!=f&&c.push(f);else if(!fc(g,f))for(g=0;g<c.length;g++)if(f.id===c[g].id){c.splice(g,1);break}}a.B=uf(a,vf(a,c,!1));a.uc();Pb(a.ha,a.mb(!0))})}}
function vf(a,b,c){for(var d=R(a.b,M.gb)||{},e=R(a.b,M.hb)||{},f=R(a.b,M.ua)||{},g={},h={},k={},l=0;l<b.length;l++)d[b[l].id]&&(b[l].clicked=!0,g[b[l].id]=!0),e[b[l].id]&&(b[l].viewed=!0,h[b[l].id]=!0),f[b[l].id]&&(b[l].dismissed=!0,k[b[l].id]=!0);c&&(O(a.b,M.gb,g),O(a.b,M.hb,h),O(a.b,M.ua,k));return b}
function uf(a,b){for(var c=[],d=new Date,e=R(a.b,M.ua)||{},f=!1,g=0;g<b.length;g++){var h=b[g].url;!a.Ag&&h&&sd(h)?w.error('Card with url "'+h+'" will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for appboy.initialize to enable this card.'):(null==b[g].expiresAt||b[g].expiresAt>=d)&&!b[g].dismissed?c.push(b[g]):f=e[b[g].id]=!0}f&&O(a.b,M.ua,e);return c}p.uc=function(){for(var a=[],b=0;b<this.B.length;b++)a.push(this.B[b].A());O(this.b,M.sb,a)};
p.Na=function(a,b){if(wf(this))return this.G.Na(this.Da,this.Aa,this.Fb.bind(this),a,b)};p.mb=function(a){a||this.Ga();a=uf(this,this.B);a.sort(function(c,d){return c.pinned&&!d.pinned?-1:d.pinned&&!c.pinned?1:c.updated>d.updated?-1:d.updated>c.updated?1:0});var b=Math.max(this.Aa||0,this.Da||0);0===b&&(b=void 0);return new Ad(a,Ka(b))};
p.$a=function(a){a||(this.B=[],Pb(this.ha,new Ad(this.B.slice(),null)),S(this.b,M.sb),S(this.b,M.gb),S(this.b,M.hb),S(this.b,M.ua));this.Aa=this.Da=0;S(this.b,M.Wb);S(this.b,M.Vb)};p.clearData=function(a){this.Aa=this.Da=0;this.B=[];Pb(this.ha,new Ad(this.B.slice(),null));a&&(S(this.b,M.sb),S(this.b,M.gb),S(this.b,M.hb),S(this.b,M.ua),S(this.b,M.Wb),S(this.b,M.Vb))};function wf(a){return Ie(a.J).Cb.enabled?!0:(0!==Ie(a.J).Hb&&(Pb(a.ha,new Ad([],(new Date).valueOf())),S(a.b,M.sb)),!1)};function yf(a,b){this.ha=a;this.b=b;this.Ga()}oa(yf,sf);p=yf.prototype;p.Ga=function(){for(var a=R(this.b,M.ad)||[],b=[],c=0;c<a.length;c++){var d=nc(a[c]);null!=d&&b.push(d)}this.B=b;this.jb=Ma(R(this.b,M.Zc))};p.uc=function(){for(var a=[],b=0;b<this.B.length;b++)a.push(this.B[b].A());O(this.b,M.ad,a)};
p.Fb=function(a){if(null!=a&&a.feed){this.Ga();a=a.feed;for(var b=[],c,d=R(this.b,M.rb)||{},e={},f=0;f<a.length;f++){c=a[f];var g=c.id,h=c.type,k=c.viewed,l=c.title,m=c.image,r=c.description,q=Ka(c.created),v=Ka(c.updated),t=c.categories,A=Ka(c.expires_at),H=c.url,z=c.domain,F=c.aspect_ratio;c=c.extras;g=h===ic.te||h===ic.cc?new jc(g,k,l,m,r,q,v,t,A,H,z,F,c,!1,!1):h===ic.Tb?new kc(g,k,l,m,r,q,v,t,A,H,z,F,c,!1,!1):h===ic.Sb?new lc(g,k,m,q,v,t,A,H,z,F,c,!1,!1):null;null!=g&&(d[g.id]&&(g.viewed=!0,e[g.id]=
!0),b.push(g))}O(this.b,M.rb,e);this.B=b;this.uc();this.jb=new Date;O(this.b,M.Zc,this.jb);Pb(this.ha,new wd(this.B.slice(),this.jb))}};p.Bc=function(){this.Ga();for(var a=[],b=new Date,c=0;c<this.B.length;c++)(null==this.B[c].expiresAt||this.B[c].expiresAt>=b)&&a.push(this.B[c]);return new wd(a,this.jb)};p.clearData=function(a){null==a&&(a=!1);this.B=[];this.jb=null;a&&(S(this.b,M.ad),S(this.b,M.Zc));Pb(this.ha,new wd(this.B.slice(),this.jb))};function zf(a,b,c,d,e){this.Pa=a;this.vf=b;this.uf=c;this.Ac=d;this.Oa=e}function Af(a,b,c,d,e){return null==a||null==a.trigger_id?null:new zf(a.trigger_id,b,c,d,e)};function Bf(a,b,c,d){this.Eg=a;this.ha=b;this.b=c;this.G=d;this.kc=[];this.na=[];this.Ba=null;this.L={};this.X={};Cf(this);Df(this)}oa(Bf,sf);function Ef(a){a.Ba=R(a.b,M.Yc)||a.Ba;a.L=R(a.b,M.vb)||a.L;a.X=R(a.b,M.ac)||a.X;for(var b=0;b<a.T.length;b++){var c=a.T[b];null!=a.X[c.id]&&(c.Ca=a.X[c.id])}}function Cf(a){a.ud=R(a.b,M.jd)||0;for(var b=R(a.b,M.hd)||[],c=[],d=0;d<b.length;d++)c.push(ue(b[d]));a.T=c;Ef(a)}
function Df(a){function b(H,z,F,I,D){return function(){Ff(a,H,z,F,I,D)}}for(var c={},d=0;d<a.T.length;d++)c[a.T[d].id]=a.T[d];d=!1;for(var e=0;e<a.T.length;e++){var f=a.T[e];if(null!=a.L[f.id]){for(var g=a.L[f.id],h=[],k=0;k<g.length;k++){var l=g[k],m=Math.max(l.Ac+1E3*f.ab-(new Date).valueOf(),0);if(0<m){h.push(l);var r=void 0,q=void 0;null!=l.sf&&(r=l.sf);null!=l.wd&&Na(l.wd)&&(q=Oa(l.wd));var v=[];if(Da(l.Ad))for(var t=0;t<l.Ad.length;t++){var A=c[l.Ad[t]];null!=A&&v.push(A)}a.na.push(setTimeout(b(f,
l.Ac,r,q,v),m))}}a.L[f.id].length>h.length&&(a.L[f.id]=h,d=!0,0===a.L[f.id].length&&delete a.L[f.id])}}d&&O(a.b,M.vb,a.L)}
Bf.prototype.Fb=function(a){var b=!1;if(null!=a&&a.triggers){Ef(this);var c={},d={};this.T=[];for(var e=0;e<a.triggers.length;e++){for(var f=a.triggers[e],g=f.id,h=[],k=0;k<f.trigger_condition.length;k++)h.push(he(f.trigger_condition[k]));k=Ka(f.start_time);var l=Ka(f.end_time),m=f.priority,r=f.type,q=f.delay,v=f.re_eligibility,t=f.timeout,A=f.data;f=f.min_seconds_since_last_trigger;g=Ba(ve,r,"Could not construct Trigger from server data","Trigger.Types")?new re(g,h,k,l,m,r,A,q,v,t,f):null;null!=
this.X[g.id]&&(g.Ca=this.X[g.id],c[g.id]=this.X[g.id]);null!=this.L[g.id]&&(d[g.id]=this.L[g.id]);for(h=0;h<g.lb.length;h++)if(fe(g.lb[h],de.V,null)){b=!0;break}null!=g&&this.T.push(g)}Ia(this.X,c)||(this.X=c,O(this.b,M.ac,this.X));Ia(this.L,d)||(this.L=d,O(this.b,M.vb,this.L));a=[];for(c=0;c<this.T.length;c++)a.push(this.T[c].A());this.ud=(new Date).valueOf();O(this.b,M.hd,a);O(this.b,M.jd,this.ud);b&&(w.info("Trigger with test condition found, firing test."),this.pa(de.V));this.pa(de.OPEN);b=this.kc;
this.kc=[];for(a=0;a<b.length;a++)this.pa.apply(this,b[a])}};
function Ff(a,b,c,d,e,f){function g(){Ef(a);var l=f.pop();if(null!=l)if(Gf(a,l,c,d,e,f),te(l,c)){var m="Server aborted in-app message display, but the timeout on fallback trigger "+l.id+"has already elapsed.";0<f.length&&(m+=" Continuing to fall back.");w.info(m);a.G.M(l.id,dd.fe);g()}else w.info("Server aborted in-app message display. Falling back to lower priority "+l.type+" trigger action "+l.id),m=1E3*l.ab-((new Date).valueOf()-c),0<m?a.na.push(setTimeout(function(){Ff(a,l,c,d,e,f)},m)):Ff(a,
l,c,d,e,f)}function h(l){Ef(a);var m=(new Date).valueOf();te(b,c)?b.type===ve.se?a.G.M(b.id,dd.ub):a.G.M(b.id,dd.fe):!1===navigator.onLine&&b.type===ve.Uc&&l.imageUrl?(w.info("Not showing "+b.type+" trigger action "+b.id+" due to offline state."),a.G.M(b.id,dd.Rf)):(null==b.Ca||b.Lb!==se&&m-b.Ca>=1E3*b.Lb)&&Hf(a,b,m,d)?(Pb(a.ha,[l]),Ef(a),b.Ca=m,a.Ba=m,O(a.b,M.Yc,m),a.X[b.id]=m,O(a.b,M.ac,a.X)):w.info("Not displaying trigger "+b.id+" because display time fell outside of the acceptable time window.")}
switch(b.type){case ve.Uc:var k=Ec(b.data);if(null==k){w.error("Could not parse trigger data for trigger "+b.id+", ignoring.");a.G.M(b.id,dd.wb);break}h(k);break;case ve.se:k=Af(b.data,h,g,c,b.Oa);if(null==k){w.error("Could not parse trigger data for trigger "+b.id+", ignoring.");a.G.M(b.id,dd.wb);break}Pe(a.G,k,d,e);break;default:w.error("Trigger "+b.id+" was of unexpected type "+b.type+", ignoring."),a.G.M(b.id,dd.wb)}}
Bf.prototype.pa=function(a,b,c){var d=this;if(Ba(de,a,"Cannot fire trigger action.","TriggerEvents"))if(0<this.G.ib)w.info("Trigger sync is currently in progress, awaiting sync completion before firing trigger event."),this.kc.push(arguments);else{(R(this.b,M.jd)||0)>this.ud?Cf(this):Ef(this);for(var e=(new Date).valueOf(),f=e-this.Ba,g=!0,h=!0,k=[],l=0;l<this.T.length;l++){var m=this.T[l],r=e+1E3*m.ab;if((null==m.Ca||m.Lb!==se&&r-m.Ca>=1E3*m.Lb)&&(null==m.startTime||m.startTime<=e)&&(null==m.endTime||
m.endTime>=e)){for(var q=!1,v=0;v<m.lb.length;v++)if(fe(m.lb[v],a,b)){q=!0;break}q&&(g=!1,Hf(this,m,r,a)&&(h=!1,k.push(m)))}}if(g)w.info("Trigger event "+a+" did not match any trigger conditions.");else if(h)w.info("Ignoring "+a+" trigger event because a trigger was displayed "+f/1E3+"s ago.");else{k.sort(function(A,H){return A.priority-H.priority});var t=k.pop();null!=t&&(w.info("Firing "+t.type+" trigger action "+t.id+" from trigger event "+a+"."),Gf(this,t,e,a,c,k),0===t.ab?Ff(this,t,e,a,c,k):
this.na.push(setTimeout(function(){Ff(d,t,e,a,c,k)},1E3*t.ab)))}}};Bf.prototype.$a=function(a){this.T=[];S(this.b,M.hd);if(!a){this.kc=[];this.Ba=null;this.X={};this.L={};for(a=0;a<this.na.length;a++)clearTimeout(this.na[a]);this.na=[];S(this.b,M.Yc);S(this.b,M.ac);S(this.b,M.vb);S(this.b,M.dg);S(this.b,M.cg);S(this.b,M.eg)}};Bf.prototype.clearData=function(){this.T=[];this.Ba=null;this.X={};this.L={};for(var a=0;a<this.na.length;a++)clearTimeout(this.na[a]);this.na=[]};
function Hf(a,b,c,d){if(null==a.Ba)return!0;if(d===de.V)return w.info("Ignoring minimum interval between trigger because it is a test type."),!0;b=b.ff;null==b&&(b=a.Eg);return c-a.Ba>=1E3*b}function Gf(a,b,c,d,e,f){Ef(a);a.L[b.id]=a.L[b.id]||[];var g={};g.Ac=c;g.sf=d;var h;null!=e&&(h=e.A());g.wd=h;c=[];for(d=0;d<f.length;d++)c.push(f[d].id);g.Ad=c;a.L[b.id].push(g);O(a.b,M.vb,a.L)};"undefined"===typeof console&&(window.console={log:function(){}});var If=window.Element.prototype;"function"!==typeof If.matches&&(If.matches=If.msMatchesSelector||If.mozMatchesSelector||If.webkitMatchesSelector||function(a){a=(this.document||this.ownerDocument).querySelectorAll(a);for(var b=0;a[b]&&a[b]!==this;)++b;return!!a[b]});
Element.prototype.closest||(Element.prototype.closest=function(a){var b=this;if(!document.documentElement.contains(b))return null;do{if(b.matches(a))return b;b=b.parentElement||b.parentNode}while(null!==b&&1===b.nodeType);return null});
if("function"!==typeof window.CustomEvent){var Jf=function(a,b){b=b||{bubbles:!1,cancelable:!1,detail:null};var c=document.createEvent("CustomEvent");c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail);return c};Jf.prototype=window.Event.prototype;window.CustomEvent=Jf};var Kf;"object"===typeof module&&module.exports?Kf=module.exports:(window.appboy||(window.appboy={}),Kf=window.appboy);var Lf=Kf;var Y=new function(a){function b(n,u,y){n="The '"+n+"' "+u+" is deprecated.";y&&(n+=" Please use '"+y+"' instead.");w.warn(n)}function c(){w.Eb();X&&(Pb(G),G.K(),t.clearData(!1),t=null,z.clearData(!1),z=null,v.K(),v=null,F.K(),F=null,A.K(),A=null,r.K(),r=null,l.Eb(),I=l=null,af(D),m=f=h=D=null,N=[],k=null);ha=X=!1}function d(){if(ha)return!1;if(!X)throw Error("Appboy must be initialized before calling methods.");return!0}var e={Qg:function(n,u,y){return new rf(n,u,y)},Sg:function(n,u){return new Ze(n,
u)},Wg:function(n,u,y,B,P,Q,W,Db,Wa,Qf){null==P&&(P={});var De=new qf(Wa,W),Rf=new of(W,De,Wa,P[C.tg]);return new ye(n,y,B,P[C.yf],u,Rf,Db,De,Wa,W,Q,Qf)},xc:function(){return new Nb},Tg:function(n,u){return new yf(n,u)},Rg:function(n,u,y,B){return new tf(n,u,y,B)},Xg:function(n,u,y,B){return new Bf(n,u,y,B)},Vg:function(n,u,y,B,P,Q,W){null==P&&(P={});return new cf(n,u,y,B+"/safari/"+u,P[C.sg],P[C.qg],Q,P[C.ig],P[C.Sf],W)},Ug:function(n){return new $e(n)}};null==a&&(a=e);var f,g,h,k,l,m,r,q,v,t,A,
H,z,F,I,D,K=new Nb,G=new Nb,N=[],X=!1,ha=!1;return{Hh:function(n){return Ob(K,n)},Gh:function(n){return Ob(G,n)},Fd:function(n,u){if(X)return w.info("Braze has already been initialized with an API key."),!0;w.Ed(null!=u&&u[C.Uf]);if(null==n||""===n||"string"!==typeof n)return w.error("Braze requires a valid API key to be initialized."),!1;f=n;h=u||{};if(wb.fh&&!h[C.wf])return w.info("Ignoring activity from crawler bot "+navigator.userAgent),ha=!0,!1;g=u=pf(n,h[C.jg]||!1);var y=new Ib(null,!0);if(y.Z("ab.optOut"))return w.info("Ignoring all activity due to previous opt out"),
y.store("ab.optOut","This-cookie-will-expire-in-"+Jb(y)),ha=!0,!1;y=ba(Ha(h));for(var B=y.next();!B.done;B=y.next())B=B.value,-1===Ca(C).indexOf(B)&&w.warn("Ignoring unknown initialization option '"+B+"'.");y=["mparticle","wordpress","tealium"];null!=h[C.pe]&&(B=h[C.pe],-1!==y.indexOf(B)?k=B:w.error("Invalid sdk flavor passed: "+B));var P=[];v=a.xc();N.push(v);t=a.Tg(v,u);P.push(t);F=a.xc();N.push(F);y=h[C.Oc];if(null==y||""===y||"string"!==typeof y)return w.error("Braze requires a valid SDK Endpoint to be initialized. Please set the 'baseUrl' initialization option to the value of your SDK Endpoint."),
!1;y=y.replace(/(\.[a-z]+)[^\.]*$/i,"$1/api/v3");0!==y.indexOf("http")&&(y="https://"+y);B=h[C.be]||h[C.Sc];h[C.Sc]&&b(C.Sc,"initialization option",C.be);if(null!=B)if(Da(B)){for(var Q=[],W=0;W<B.length;W++)Ba(Xe,B[W],"devicePropertyAllowlist contained an invalid value.","DeviceProperties")&&Q.push(B[W]);B=Q}else w.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),B=null;q=a.Sg(u,B);B=new mf(u);r=a.xc();m=a.Qg(u,h[C.Vf],r);N.push(r);l=a.Wg(f,y,"3.4.0",k,h,
function(Db){if(X)for(var Wa=0;Wa<P.length;Wa++)P[Wa].Fb(Db)},u,q,B,m);Q=h[C.Xf];null==Q&&(Q=30);z=a.Xg(Q,F,u,l);P.push(z);Q=!0===h[C.Xd]||!0===h[C.ce];null!=h.enableHtmlInAppMessages&&b("enableHtmlInAppMessages","initialization option","allowUserSuppliedJavascript");A=a.xc();N.push(A);H=a.Rg(A,l,u,B,Q);P.push(H);nf(B,function(){H.Na()});Se(l,function(){H.Na()});l.Fd();I=a.Vg(l.ob(),f,q,y,h,B,u);D=a.Ug(l.ob());u="Initialized ";h&&h[C.Oc]&&(u+='for the Braze backend at "'+h[C.Oc]+'" ');w.info(u+('with API key "'+
n+'".'));n=wb.language;u=!1;h&&(h[C.Xc]&&(b(C.Xc,"initialization option",C.$c),n=h[C.Xc],u=!0),h[C.$c]&&(n=h[C.$c],u=!0));td(n,u);Pb(K,h);return X=!0},Eb:function(){w.info("Destroying appboy instance");g=null;c()},$g:function(n){d()&&(null==n&&w.error("getDeviceId must be supplied with a callback. e.g., appboy.getDeviceId(function(deviceId) {console.log('the device id is ' + deviceId)})"),"function"===typeof n&&n(Be(q).id))},Wd:function(){w.Wd()},Rd:function(n){w.Rd(n)},Hc:function(){if(d()){l.Hc(I);
var n=Aa.ga,u=new ra(n);va(u,n.H.me,function(y,B){function P(){z.pa(de.le,[W],Db)}var Q=B.lastClick,W=B.trackingString;w.info("Firing push click trigger from "+W+" push click at "+Q);var Db=We(l,Q,W);Ue(l,P,P);wa(u,n.H.me,y)});xa(u,n.H.Af,function(y){xf(H,y)});xa(u,n.H.ke,function(y){var B=l;y=ba(y);for(var P=y.next();!P.done;P=y.next())if(P=P.value,P.api_key!==B.Y){var Q=Aa.ga;(new ra(Q)).setItem(Q.H.ke,qa.Ia(),P)}else Ee(B,P)})}},$a:function(n,u){if(d())if(null==n||0===n.length||n!==n)w.error("changeUser requires a non-empty userId.");
else if(997<Qa(n))w.error('Rejected user id "'+n+'" because it is longer than 997 bytes.');else{if(null!=u&&!Ra(u,"set signature for new user","signature",!1))return!1;l.$a(n.toString(),[t,H,z],I,u)}},ob:function(){if(d())return l.ob()},bh:function(){if(d())return h[C.$d]},Nb:function(n){d()&&l.Nb(n)},Jc:function(){d()&&l.Jc()},qf:function(n){if(d())return Ob(v,n)},Bc:function(){if(d())return t.Bc()},Na:function(n,u){if(d())return H.Na(n,u)},nf:function(n){if(d())return Ob(A,n)},mb:function(){if(d())return H.mb(!1)},
Ih:function(n){if(d())return b("subscribeToNewInAppMessages","method","subscribeToInAppMessage"),Ob(F,n)},rf:function(n){if(d())return"function"!==typeof n?null:Ob(F,function(u){n(u[0]);return u.slice(1)})},Kb:function(n){if(d())return n instanceof V||n instanceof Fc?l.Kb(n).h:(w.error("inAppMessage must be an InAppMessage object"),!1)},Fc:function(n){if(d()){if(!(n instanceof V))return w.error("inAppMessage must be an InAppMessage object"),!1;var u=l.Fc(n);if(u.h)for(var y=0;y<u.j.length;y++)z.pa(de.$b,
[n.triggerId],u.j[y]);return u.h}},Ec:function(n,u){if(d()){if(!(n instanceof Gc))return w.error("button must be an InAppMessageButton object"),!1;if(!(u instanceof V))return w.error("inAppMessage must be an InAppMessage object"),!1;var y=l.Ec(n,u);if(y.h)for(var B=0;B<y.j.length;B++)z.pa(de.$b,[u.triggerId,n.id],y.j[B]);return y.h}},Jb:function(n,u,y){if(d()){if(!(n instanceof Qc))return w.error("inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object."),!1;y=l.Jb(n,u,y);
if(y.h)for(var B=0;B<y.j.length;B++)z.pa(de.$b,[n.triggerId,u],y.j[B]);return y.h}},M:function(n,u){if(d())return n instanceof V||n instanceof Fc?Ba(dd,u,u+" is not a valid in-app message display failure","InAppMessage.DisplayFailures")?l.M(n.triggerId,u).h:!1:(w.error("inAppMessage must be an InAppMessage object"),!1)},Ma:function(n,u){if(d()){if(!Da(n))return w.error("cards must be an array"),!1;for(var y=0;y<n.length;y++)if(!(n[y]instanceof cc))return w.error("Each card in cards must be a Card object"),
!1;return l.Ma(n,u).h}},La:function(n,u){if(d())return n instanceof cc?l.La(n,u).h:(w.error("card must be a Card object"),!1)},Dc:function(n){if(d())return n instanceof cc?l.Dc(n).h:(w.error("card must be a Card object"),!1)},ef:function(){if(d())return Ve(l,za.Wf).h},df:function(){if(d())return Ve(l,za.Gf).h},N:function(n){if(d()){for(var u=ba(N),y=u.next();!y.done;y=u.next())y.value.N(n);K.N(n);G.N(n)}},K:function(){if(d())for(var n=ba(N),u=n.next();!u.done;u=n.next())u.value.K()},Hd:function(n,
u){if(d()){if(null==n||0>=n.length)return w.error('logCustomEvent requires a non-empty eventName, got "'+n+'". Ignoring event.'),!1;if(!Sa(n,"log custom event","the event name"))return!1;var y=ba(Ua(u,"logCustomEvent","eventProperties",'log custom event "'+n+'"',"event")),B=y.next().value;y=y.next().value;if(!B)return!1;B=l.Hd(n,y);if(B.h)for(w.info('Logged custom event "'+n+'".'),y=0;y<B.j.length;y++)z.pa(de.Qc,[n,u],B.j[y]);return B.h}},Id:function(n,u,y,B,P){if(d()){null==y&&(y="USD");null==B&&
(B=1);if(null==n||0>=n.length)return w.error('logPurchase requires a non-empty productId, got "'+n+'", ignoring.'),!1;if(!Sa(n,"log purchase","the purchase name"))return!1;var Q=parseFloat(u);if(isNaN(Q))return w.error("logPurchase requires a numeric price, got "+u+", ignoring."),!1;Q=Q.toFixed(2);u=parseInt(B);if(isNaN(u))return w.error("logPurchase requires an integer quantity, got "+B+", ignoring."),!1;if(1>u||100<u)return w.error("logPurchase requires a quantity >1 and <100, got "+u+", ignoring."),
!1;y=y.toUpperCase();if(-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".split(" ").indexOf(y))return w.error("logPurchase requires a valid currencyCode, got "+
y+", ignoring."),!1;var W=ba(Ua(P,"logPurchase","purchaseProperties",'log purchase "'+n+'"',"purchase"));B=W.next().value;W=W.next().value;if(!B)return!1;B=l.Id(n,Q,y,u,W);if(B.h)for(w.info("Logged "+u+" purchase"+(1<u?"s":"")+' of "'+n+'" for '+y+" "+Q+"."),y=0;y<B.j.length;y++)z.pa(de.dd,[n,P],B.j[y]);return B.h}},qa:function(){if(d())return I.qa()},Ka:function(){if(d())return I.Ka()},Gd:function(n,u,y){d()&&(b("isPushGranted","method","isPushPermissionGranted"),I.Gd(n,u,y))},Gb:function(){if(d())return I.Gb()},
ih:function(n,u,y){if(d())return I.subscribe(y,function(B,P,Q){l.Nb();"function"===typeof n&&n(B,P,Q)},u)},Nh:function(n,u){if(d())return I.unsubscribe(n,u)},Lc:function(n){if(d()){if(""===n||!Ra(n,"set signature","signature",!1))return!1;m.Lc(n);return!0}},Vd:function(n){if(d())return m.Vd(n)},Lh:function(){d()&&(b("trackLocation","method"),D.watchPosition())},Fh:function(){null!=l&&l.Nb();var n=new Ib(null,!0);n.store("ab.optOut","This-cookie-will-expire-in-"+Jb(n));n=Aa.ga;(new ra(n)).setItem(n.H.cd,
n.fc,!0);c();ha=!0},nh:function(){(new Ib(null,!0)).remove("ab.optOut");var n=Aa.ga;wa(new ra(n),n.H.cd,n.fc);c()},Qh:function(){if(null==g)throw Error("Appboy must be initialized before calling methods.");g.clearData();for(var n=Ha(Aa),u=0;u<n.length;u++)(new ra(Aa[n[u]])).clearData();X&&(t.clearData(!0),z.clearData(!0))}}},Z={},Mf;for(Mf in J)Z[Mf]=J[Mf];Z.initialize=Y.Fd;Z.destroy=Y.Eb;Z.getDeviceId=Y.$g;Z.toggleAppboyLogging=Y.Wd;Z.setLogger=Y.Rd;Z.openSession=Y.Hc;Z.changeUser=Y.$a;
Z.getUser=Y.ob;Z.requestImmediateDataFlush=Y.Nb;Z.requestFeedRefresh=Y.Jc;Z.getCachedFeed=Y.Bc;Z.subscribeToFeedUpdates=Y.qf;Z.requestContentCardsRefresh=Y.Na;Z.getCachedContentCards=Y.mb;Z.subscribeToContentCardsUpdates=Y.nf;Z.logCardImpressions=Y.Ma;Z.logCardClick=Y.La;Z.logCardDismissal=Y.Dc;Z.logFeedDisplayed=Y.ef;Z.logContentCardsDisplayed=Y.df;Z.logInAppMessageImpression=Y.Kb;Z.logInAppMessageClick=Y.Fc;Z.logInAppMessageButtonClick=Y.Ec;Z.logInAppMessageHtmlClick=Y.Jb;
Z.subscribeToNewInAppMessages=Y.Ih;Z.subscribeToInAppMessage=Y.rf;Z.removeSubscription=Y.N;Z.removeAllSubscriptions=Y.K;Z.logCustomEvent=Y.Hd;Z.logPurchase=Y.Id;Z.isPushSupported=Y.qa;Z.isPushBlocked=Y.Ka;Z.isPushGranted=Y.Gd;Z.isPushPermissionGranted=Y.Gb;Z.registerAppboyPushMessages=Y.ih;Z.unregisterAppboyPushMessages=Y.Nh;Z.setSdkAuthenticationSignature=Y.Lc;Z.subscribeToSdkAuthenticationFailures=Y.Vd;Z.trackLocation=Y.Lh;Z.stopWebTracking=Y.Fh;Z.resumeWebTracking=Y.nh;Z.wipeData=Y.Qh;
for(var Nf in Z)"object"===typeof appboyInterface?appboyInterface[Nf]=Z[Nf]:Lf[Nf]=Z[Nf];var Of="object"===typeof appboyInterface?appboyInterface:Lf,Pf=new function(a,b){var c=!1,d=!1,e=!1,f=!1,g=null,h=null,k=null,l=null;a.Hh(function(m){function r(v){if(27===v.keyCode&&!e&&0<document.querySelectorAll(".ab-modal-interactions").length){v=document.getElementsByClassName("ab-html-message");for(var t=!1,A=0;A<v.length;A++){var H=v[A].contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0];null!=H&&(Ub(H),t=!0)}t||(v=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0],
null!=v&&Ub(v))}}c=m[C.lg]||!1;d=m[C.kg]||m[C.mg]||!1;e=m[C.pg]||!1;f=m[C.ce]||!1;!0===m[C.Xd]&&(f=!0);g=null;k=m[C.$d]||null;l=m[C.Yf]||null;m[C.Tf]||null!==document.querySelector('link[rel=stylesheet][href="https://use.fontawesome.com/7f85a56ba4.css"]')||(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("href","https://use.fontawesome.com/7f85a56ba4.css"),document.getElementsByTagName("head")[0].appendChild(m));m="ab-css-definitions-"+"3.4.0".replace(/\./g,
"-");if(null==document.getElementById(m)){var q=document.createElement("style");q.innerHTML=qd.We;q.id=m;null!=k&&q.setAttribute("nonce",k);document.getElementsByTagName("head")[0].appendChild(q)}e||(document.addEventListener("keydown",r,!1),a.Gh(function(){document.removeEventListener("keydown",r)}))});return{Pg:function(){null==g&&(g=a.rf(function(m){a.display.mf(m)}));return g},mf:function(m,r,q){if(null==m)return!1;if(m instanceof Fc)return w.info("User received control for a multivariate test, logging to Braze servers."),
a.Kb(m),!0;if(!(m instanceof V))return!1;var v=m instanceof Qc;if(v&&!m.Mh&&!f)return w.error('HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for appboy.initialize to enable these messages.'),a.M(m,dd.ee),!1;null==r&&(r=document.body);if(m.Ja()&&0<r.querySelectorAll(".ab-modal-interactions").length)return w.info("Cannot show in-app message '"+m.message+"' because another message is being shown."),a.M(m,dd.xf),!1;if(bc.gh()){var t=bc.ah();if(t===bc.Sa.dc&&m.orientation===
Zc||t===bc.Sa.Wc&&"PORTRAIT"===m.orientation)return w.info("Not showing "+("PORTRAIT"===m.orientation?"portrait":"landscape")+" in-app message '"+m.message+"' because the screen is currently "+(t===bc.Sa.dc?"portrait":"landscape")),a.M(m,dd.ng),!1}if(!f){t=!1;if(m.buttons&&0<m.buttons.length)for(var A=m.buttons,H=0;H<A.length;H++)A[H].clickAction===$c&&(t=sd(A[H].uri));else m.clickAction===$c&&(t=sd(m.uri));if(t)return w.error('Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for appboy.initialize to enable these actions.'),
a.M(m,dd.ee),!1}var z=document.createElement("div");z.className="ab-iam-root v3";z.className+=m.oa();z.setAttribute("role","complementary");Bc(m)&&(z.id=m.htmlId);l&&(z.style.zIndex=l+1);r.appendChild(z);Cc(m)&&(r=document.createElement("style"),r.innerHTML=m.css,r.id=Dc(m),null!=k&&r.setAttribute("nonce",k),document.getElementsByTagName("head")[0].appendChild(r));var F=m instanceof Nc;r=m.$(a,b,function(){a.display.Td()},function(I){if(m.Ja()&&m.tf()){var D=document.createElement("div");D.className=
"ab-page-blocker";Cc(m)||(D.style.backgroundColor=sc(m.frameColor));l&&(D.style.zIndex=l);z.appendChild(D);if(!e){var K=(new Date).valueOf();D.onclick=function(X){200<(new Date).valueOf()-K&&(Wc(m,I),X.stopPropagation())}}z.appendChild(I);I.focus();m.Gc(z)}else if(F){var G=document.querySelectorAll(".ab-slideup");D=null;for(var N=G.length-1;0<=N;N--)if(G[N]!==I){D=G[N];break}"TOP"===m.slideFrom?(G=0,null!=D&&(G=D.offsetTop+D.offsetHeight),I.style.top=Math.max(G,0)+"px"):(G=0,null!=D&&(G=(window.innerHeight||
document.documentElement.clientHeight)-D.offsetTop),I.style.bottom=Math.max(G,0)+"px")}else v&&!e&&I.contentWindow.addEventListener("keydown",function(X){27===X.keyCode&&m.Ue()});a.Kb(m);m.dismissType===xc&&setTimeout(function(){z.contains(I)&&Wc(m,I)},m.duration);"function"===typeof q&&q()},c,l);if(v||F)z.appendChild(r),m.Gc(z);return!0},Td:function(m,r,q){function v(D){for(var K=D.querySelectorAll(".ab-feed"),G=null,N=0;N<K.length;N++)K[N].parentNode===D&&(G=K[N]);null!=G?(xd(a,G),G.parentNode.replaceChild(F,
G)):D.appendChild(F);setTimeout(function(){F.className=F.className.replace("ab-hide","ab-show")},0);A&&F.focus();a.ef();Bd(z,a,F)}function t(D,K){if(null==K)return D;for(var G=[],N=0;N<K.length;N++)G.push(K[N].toLowerCase());K=[];for(N=0;N<D.length;N++){for(var X=[],ha=0;ha<D[N].categories.length;ha++)X.push(D[N].categories[ha].toLowerCase());0<Ga(X,G).length&&K.push(D[N])}return K}var A=!1;null==m&&(m=document.body,A=!0);var H=!1,z=null;null==r?(z=a.Bc(),Fd(z,t(z.cards,q),z.lastUpdated,null,a,d),
H=!0):z=new wd(t(r,q),new Date);var F=z.$(a,d);if(H){if(null==z.lastUpdated||6E4<(new Date).valueOf()-z.lastUpdated.valueOf())w.info("Cached feed was older than max TTL of 60000 ms, requesting an update from the server."),Cd(z,a,F);var I=(new Date).valueOf();r=a.qf(function(D){var K=F.querySelectorAll(".ab-refresh-button")[0];if(null!=K){var G=500,N=parseInt(F.getAttribute(Dd));G=isNaN(N)?G-((new Date).valueOf()-I):G-((new Date).valueOf()-N);setTimeout(function(){K.className=K.className.replace(/fa-spin/g,
"")},Math.max(G,0))}Fd(z,t(D.cards,q),D.lastUpdated,F,a,d)});F.setAttribute(yd,r)}null!=m?v(m):window.onload=function(D){return function(){"function"===typeof D&&D();v(document.body)}}(window.onload)},Xe:function(){for(var m=document.querySelectorAll(".ab-feed"),r=0;r<m.length;r++)xd(a,m[r])},Kh:function(m,r,q){0<document.querySelectorAll(".ab-feed").length?a.display.Xe():a.display.Td(m,r,q)},lf:function(m,r){function q(F){for(var I=F.querySelectorAll(".ab-feed"),D=null,K=0;K<I.length;K++)I[K].parentNode===
F&&(D=I[K]);null!=D?(xd(a,D),D.parentNode.replaceChild(A,D)):F.appendChild(A);setTimeout(function(){A.className=A.className.replace("ab-hide","ab-show")},0);v&&A.focus();a.df();Bd(t,a,A)}var v=!1;null==m&&(m=document.body,v=!0);var t=null;t=a.mb();"function"===typeof r&&Fd(t,r(t.cards.slice()),t.lastUpdated,null,a,d);var A=t.$(a,d);(null==t.lastUpdated||6E4<(new Date).valueOf()-t.lastUpdated.valueOf())&&(null==h||6E4<(new Date).valueOf()-h.valueOf())&&(w.info("Cached content cards were older than max TTL of 60000 ms, requesting a sync from the server."),
Cd(t,a,A),h=(new Date).valueOf());var H=(new Date).valueOf(),z=a.nf(function(F){var I=A.querySelectorAll(".ab-refresh-button")[0];if(null!=I){var D=500,K=parseInt(A.getAttribute(Dd));D=isNaN(K)?D-((new Date).valueOf()-H):D-((new Date).valueOf()-K);setTimeout(function(){I.className=I.className.replace(/fa-spin/g,"")},Math.max(D,0))}D=F.cards;"function"===typeof r&&(D=r(D.slice()));Fd(t,D,F.lastUpdated,A,a,d)});A.setAttribute(yd,z);null!=m?q(m):window.onload=function(F){return function(){"function"===
typeof F&&F();q(document.body)}}(window.onload)},cf:function(m){for(var r=document.querySelectorAll(".ab-feed"),q=0;q<r.length;q++)(null==m||null!=m&&r[q].parentNode===m)&&xd(a,r[q])},Jh:function(m,r){0<document.querySelectorAll(".ab-feed").length?a.display.cf():a.display.lf(m,r)}}}(Y,Of);Of.display={};Of.display.automaticallyShowNewInAppMessages=Pf.Pg;Of.display.showInAppMessage=Pf.mf;Of.display.showFeed=Pf.Td;Of.display.destroyFeed=Pf.Xe;Of.display.toggleFeed=Pf.Kh;Of.display.showContentCards=Pf.lf;
Of.display.hideContentCards=Pf.cf;Of.display.toggleContentCards=Pf.Jh;Y.display=Pf;return appboyInterface});}).call(window);