1 line
67 KiB
Plaintext
1 line
67 KiB
Plaintext
!function(){var n={21:function(n,r,t){var e;n.exports=(e=e||function(n,r){var e;if("undefined"!=typeof window&&window.crypto&&(e=window.crypto),"undefined"!=typeof self&&self.crypto&&(e=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(e=globalThis.crypto),!e&&"undefined"!=typeof window&&window.msCrypto&&(e=window.msCrypto),!e&&void 0!==t.g&&t.g.crypto&&(e=t.g.crypto),!e)try{e=t(477)}catch(n){}var i=function(){if(e){if("function"==typeof e.getRandomValues)try{return e.getRandomValues(new Uint32Array(1))[0]}catch(n){}if("function"==typeof e.randomBytes)try{return e.randomBytes(4).readInt32LE()}catch(n){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function n(){}return function(r){var t;return n.prototype=r,t=new n,n.prototype=null,t}}(),u={},a=u.lib={},f=a.Base={extend:function(n){var r=o(this);return n&&r.mixIn(n),r.hasOwnProperty("init")&&this.init!==r.init||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);n.hasOwnProperty("toString")&&(this.toString=n.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=f.extend({init:function(n,t){n=this.words=n||[],this.sigBytes=t!=r?t:4*n.length},toString:function(n){return(n||v).stringify(this)},concat:function(n){var r=this.words,t=n.words,e=this.sigBytes,i=n.sigBytes;if(this.clamp(),e%4)for(var o=0;o<i;o++){var u=t[o>>>2]>>>24-o%4*8&255;r[e+o>>>2]|=u<<24-(e+o)%4*8}else for(var a=0;a<i;a+=4)r[e+a>>>2]=t[a>>>2];return this.sigBytes+=i,this},clamp:function(){var r=this.words,t=this.sigBytes;r[t>>>2]&=4294967295<<32-t%4*8,r.length=n.ceil(t/4)},clone:function(){var n=f.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){for(var r=[],t=0;t<n;t+=4)r.push(i());return new c.init(r,n)}}),l=u.enc={},v=l.Hex={stringify:function(n){for(var r=n.words,t=n.sigBytes,e=[],i=0;i<t;i++){var o=r[i>>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){for(var r=n.length,t=[],e=0;e<r;e+=2)t[e>>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new c.init(t,r/2)}},s=l.Latin1={stringify:function(n){for(var r=n.words,t=n.sigBytes,e=[],i=0;i<t;i++){var o=r[i>>>2]>>>24-i%4*8&255;e.push(String.fromCharCode(o))}return e.join("")},parse:function(n){for(var r=n.length,t=[],e=0;e<r;e++)t[e>>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new c.init(t,r)}},d=l.Utf8={stringify:function(n){try{return decodeURIComponent(escape(s.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return s.parse(unescape(encodeURIComponent(n)))}},y=a.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(n){"string"==typeof n&&(n=d.parse(n)),this._data.concat(n),this._nDataBytes+=n.sigBytes},_process:function(r){var t,e=this._data,i=e.words,o=e.sigBytes,u=this.blockSize,a=o/(4*u),f=(a=r?n.ceil(a):n.max((0|a)-this._minBufferSize,0))*u,l=n.min(4*f,o);if(f){for(var v=0;v<f;v+=u)this._doProcessBlock(i,v);t=i.splice(0,f),e.sigBytes-=l}return new c.init(t,l)},clone:function(){var n=f.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0}),m=(a.Hasher=y.extend({cfg:f.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(n){return this._append(n),this._process(),this},finalize:function(n){return n&&this._append(n),this._doFinalize()},blockSize:16,_createHelper:function(n){return function(r,t){return new n.init(t).finalize(r)}},_createHmacHelper:function(n){return function(r,t){return new m.HMAC.init(n,t).finalize(r)}}}),u.algo={});return u}(Math),e)},956:function(n,r,t){var e;n.exports=(e=t(21),e.enc.Hex)},9:function(n,r,t){var e;n.exports=(e=t(21),function(n){var r=e,t=r.lib,i=t.WordArray,o=t.Hasher,u=r.algo,a=[],f=[];!function(){function r(r){for(var t=n.sqrt(r),e=2;e<=t;e++)if(!(r%e))return!1;return!0}function t(n){return 4294967296*(n-(0|n))|0}for(var e=2,i=0;i<64;)r(e)&&(i<8&&(a[i]=t(n.pow(e,.5))),f[i]=t(n.pow(e,1/3)),i++),e++}();var c=[],l=u.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(n,r){for(var t=this._hash.words,e=t[0],i=t[1],o=t[2],u=t[3],a=t[4],l=t[5],v=t[6],s=t[7],d=0;d<64;d++){if(d<16)c[d]=0|n[r+d];else{var y=c[d-15],m=(y<<25|y>>>7)^(y<<14|y>>>18)^y>>>3,h=c[d-2],p=(h<<15|h>>>17)^(h<<13|h>>>19)^h>>>10;c[d]=m+c[d-7]+p+c[d-16]}var b=e&i^e&o^i&o,w=(e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22),g=s+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&v)+f[d]+c[d];s=v,v=l,l=a,a=u+g|0,u=o,o=i,i=e,e=g+(w+b)|0}t[0]=t[0]+e|0,t[1]=t[1]+i|0,t[2]=t[2]+o|0,t[3]=t[3]+u|0,t[4]=t[4]+a|0,t[5]=t[5]+l|0,t[6]=t[6]+v|0,t[7]=t[7]+s|0},_doFinalize:function(){var r=this._data,t=r.words,e=8*this._nDataBytes,i=8*r.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=n.floor(e/4294967296),t[15+(i+64>>>9<<4)]=e,r.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var n=o.clone.call(this);return n._hash=this._hash.clone(),n}});r.SHA256=o._createHelper(l),r.HmacSHA256=o._createHmacHelper(l)}(Math),e.SHA256)},87:function(n,r,t){"use strict";function e(n){var r=this.constructor;return this.then(function(t){return r.resolve(n()).then(function(){return t})},function(t){return r.resolve(n()).then(function(){return r.reject(t)})})}function i(n){return new this(function(r,t){if(!n||void 0===n.length)return t(new TypeError(typeof n+" "+n+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(n);if(0===e.length)return r([]);var i=e.length;function o(n,t){if(t&&("object"==typeof t||"function"==typeof t)){var u=t.then;if("function"==typeof u)return void u.call(t,function(r){o(n,r)},function(t){e[n]={status:"rejected",reason:t},0===--i&&r(e)})}e[n]={status:"fulfilled",value:t},0===--i&&r(e)}for(var u=0;u<e.length;u++)o(u,e[u])})}function o(n,r){this.name="AggregateError",this.errors=n,this.message=r||""}function u(n){var r=this;return new r(function(t,e){if(!n||void 0===n.length)return e(new TypeError("Promise.any accepts an array"));var i=Array.prototype.slice.call(n);if(0===i.length)return e();for(var u=[],a=0;a<i.length;a++)try{r.resolve(i[a]).then(t).catch(function(n){u.push(n),u.length===i.length&&e(new o(u,"All promises were rejected"))})}catch(n){e(n)}})}o.prototype=Error.prototype;var a=setTimeout;function f(n){return Boolean(n&&void 0!==n.length)}function c(){}function l(n){if(!(this instanceof l))throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(n,this)}function v(n,r){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,l._immediateFn(function(){var t=1===n._state?r.onFulfilled:r.onRejected;if(null!==t){var e;try{e=t(n._value)}catch(n){return void d(r.promise,n)}s(r.promise,e)}else(1===n._state?s:d)(r.promise,n._value)})):n._deferreds.push(r)}function s(n,r){try{if(r===n)throw new TypeError("A promise cannot be resolved with itself.");if(r&&("object"==typeof r||"function"==typeof r)){var t=r.then;if(r instanceof l)return n._state=3,n._value=r,void y(n);if("function"==typeof t)return void h((e=t,i=r,function(){e.apply(i,arguments)}),n)}n._state=1,n._value=r,y(n)}catch(r){d(n,r)}var e,i}function d(n,r){n._state=2,n._value=r,y(n)}function y(n){2===n._state&&0===n._deferreds.length&&l._immediateFn(function(){n._handled||l._unhandledRejectionFn(n._value)});for(var r=0,t=n._deferreds.length;r<t;r++)v(n,n._deferreds[r]);n._deferreds=null}function m(n,r,t){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof r?r:null,this.promise=t}function h(n,r){var t=!1;try{n(function(n){t||(t=!0,s(r,n))},function(n){t||(t=!0,d(r,n))})}catch(n){if(t)return;t=!0,d(r,n)}}l.prototype.catch=function(n){return this.then(null,n)},l.prototype.then=function(n,r){var t=new this.constructor(c);return v(this,new m(n,r,t)),t},l.prototype.finally=e,l.all=function(n){return new l(function(r,t){if(!f(n))return t(new TypeError("Promise.all accepts an array"));var e=Array.prototype.slice.call(n);if(0===e.length)return r([]);var i=e.length;function o(n,u){try{if(u&&("object"==typeof u||"function"==typeof u)){var a=u.then;if("function"==typeof a)return void a.call(u,function(r){o(n,r)},t)}e[n]=u,0===--i&&r(e)}catch(n){t(n)}}for(var u=0;u<e.length;u++)o(u,e[u])})},l.any=u,l.allSettled=i,l.resolve=function(n){return n&&"object"==typeof n&&n.constructor===l?n:new l(function(r){r(n)})},l.reject=function(n){return new l(function(r,t){t(n)})},l.race=function(n){return new l(function(r,t){if(!f(n))return t(new TypeError("Promise.race accepts an array"));for(var e=0,i=n.length;e<i;e++)l.resolve(n[e]).then(r,t)})},l._immediateFn="function"==typeof setImmediate&&function(n){setImmediate(n)}||function(n){a(n,0)},l._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)};var p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t.g)return t.g;throw new Error("unable to locate global object")}();"function"!=typeof p.Promise?p.Promise=l:(p.Promise.prototype.finally||(p.Promise.prototype.finally=e),p.Promise.allSettled||(p.Promise.allSettled=i),p.Promise.any||(p.Promise.any=u))},477:function(){}},r={};function t(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return n[e].call(o.exports,o,o.exports,t),o.exports}t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,{a:r}),r},t.d=function(n,r){for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),t.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},function(){"use strict";t(87);var n="https://ads.reddit.com",r="https://www.redditstatic.com/campaign-management/",e="_rdt_cid",i="_rdt_em",o="_rdt_pn",u="_rdt_uuid",a=":",f="reddit",c="gtm",l="init",v="enableFirstPartyCookies",s="track",d="disableFirstPartyCookies",y="value",m="valueDecimal",h="transactionId",p="customEventName",b="products",w="conversionId",g=["itemCount","value","valueDecimal","currency","transactionId","customEventName","products","conversionId"],E=["itemCount","value","valueDecimal","currency","transactionId"],S=5e3,T=50,A={TRIGGER_TYPE:{CLICK:"CLICK",URL:"URL"},TRIGGER_SELECTOR_TYPE:{CLICK_CSS:"CLICK_CSS",CLICK_TEXT:"CLICK_TEXT",URL_CONTAINS:"URL_CONTAINS",URL_EXACT:"URL_EXACT",CSS:"METADATA_CSS",TEXT:"METADATA_TEXT"},METADATA_EXTRACTOR_TYPE:{FIXED:"FIXED",SELECTOR:"SELECTOR"}},O=.05,I=.25,_=500,j=1e4,N=["support","help","contact","info","admin","sales","billing","careers","webmaster","helpdesk","inquiry","marketing","pr","feedback"],x='[class*="email"], [id*="email"], [aria-label*="email"], [name*="email"], [title*="email"]',C=":",P=5,R=",",M={t:.05,i:.25,u:500,l:1e4,h:5,S:"|",T:"~",A:["terms","privacy","policy"],O:'[class*="phone-number"], [class*="phone"], [id*="phone-number"], [id*="phone"], [aria-label*="phone-number"], [aria-label*="phone"], [name*="phone-number"], [name*="phone"], [title*="phone-number"], [title*="phone"], [type="tel"]',I:["2fa","otp","verify","verification","challenge","security","authenticate","authentication","two-factor","one-time-password"],_:["phone","contact","support","customer","service"]},D="0000000000000000000000000000000000000000000000000000000000000000",k="0000000000000000000000000000000000000000000000000000000000000001",G="0000000000000000000000000000000000000000000000000000000000000002";function U(n){return!!n&&n!==D&&n!==k}function F(n){return!!n&&n!==G&&n!==k}var L=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function z(n){return n.replace(L,"")}function H(n,r){return Boolean(n&&-1!==n.indexOf(r))}function X(){return self&&self.crypto&&"function"==typeof self.crypto.randomUUID?self.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=16*Math.random()|0;return("x"===n?r:3&r|8).toString(16)})}function B(){return function(n){return(new Date).getTime()+"."+n}(X())}function Z(n){for(var r=document.cookie.split(";"),t=0;t<r.length;t++){var e=r[t].split("=");if(e.length>1){var i=z(e[0]),o=e[1];if(i===n&&o.length)return o}}return null}function $(){var n,r,t,e,o="config"in rdt?rdt.config.em:void 0,u="config"in rdt?rdt.config.auto_em:void 0,a=Z(i),f=!!o,c=!!u;if(!!a&&a){var l=a.split(C);1==l.length?r=a:2==l.length&&(r=l[0],t=l[1])}(rdt.config=null!==(n=rdt.config)&&void 0!==n?n:{},r&&!f&&(rdt.emailFromCookie=!0,rdt.config.em=r),t&&!c&&(rdt.autoEmailsFromCookie=!0,rdt.config.auto_em=t),rdt.config.em||rdt.config.auto_em)&&(rdt.config.em&&(e=rdt.config.em),rdt.config.auto_em&&(e=(e||"")+C+rdt.config.auto_em),Y(i,null!=e?e:"",90))}function K(){var n;rdt.config=null!==(n=rdt.config)&&void 0!==n?n:{};var r=Z(o);if(r){var t="config"in rdt?rdt.config.pn:null,e="config"in rdt?rdt.config.auto_pn:null,i=r.split(":");if(2==i.length){var u=i[0],a=i[1];u&&!t&&(rdt.phoneNumberFromCookie=!0,rdt.config.pn=u),a&&!e&&(rdt.autoPhoneNumbersFromCookie=!0,rdt.config.auto_pn=a)}}if(rdt.config.pn||rdt.config.auto_pn){var f,c,l=(null!==(f=rdt.config.pn)&&void 0!==f?f:"")+":"+(null!==(c=rdt.config.auto_pn)&&void 0!==c?c:"");Y(o,l,90)}}function W(n,r,t,e){var i=n+"="+r+";domain=."+t+";expires="+e+";path=/;samesite=strict";return"https:"===window.location.protocol&&(i+=";secure"),document.cookie=i,document.cookie.indexOf(n+"="+r)>=0}function Y(n,r,t){if(!1!==rdt.enableFirstPartyCookies){var e=new Date,i=24*t*60*60;e.setTime(e.getTime()+1e3*i);var o=e.toUTCString(),u=window.location.hostname;J(n,u="."==u.slice(-1)?u.slice(0,-1):u);var a,f=u.split(".");if(1==f.length||(a=f[f.length-1],""+Number(a)===a))return W(n,r,u,o),u;for(u=f.pop(),u=f.pop()+"."+u;!W(n,r,u,o)&&f.length;)u=f.pop()+"."+u;return u}}function J(n,r){for(var t=(r=r||window.location.hostname).split(".");W(n,"",t.join("."),"Thu, 01 Jan 1970 00:00:00 GMT")&&t.length;)t.shift();return t.join(".")}var V=t(9),q=t.n(V),Q=t(956),nn=t.n(Q);function rn(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return tn(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?tn(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function tn(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}var en="<AAID-HERE>",on="<EMAIL-HERE>",un="<PHONE-NUMBER-HERE>",an="<EXTERNAL-ID-HERE>",fn="<IDFA-HERE>",cn=["ext","x","anexo","#","poste","int"],ln=function(n,r){return n.split(r).join("")},vn=function(n,r){return n.length==r&&!isNaN(Number("0x"+n))},sn=function(n){var r=ln(n,"-");return vn(r,32)&&"00000000000000000000000000000000"!==r};function dn(n){var r,t;if(n===on)return k;var e=n.split("@");if(2!=e.length)return"";var i=null!==(r=e[0])&&void 0!==r?r:"";return e[0]=null!==(t=ln(i,".").split("+")[0])&&void 0!==t?t:"",e.join("@").toLowerCase()}"undefined"!=typeof window&&(window.redditNormalizeEmail=dn);var yn=function(n){return n};function mn(n){if(n===un)return k;var r="";(n=n.trim()).length>0&&"+"===n[0]&&(r="+",n=n.substring(1)),n=n.toLowerCase();var t,e=rn(cn);try{for(e.s();!(t=e.n()).done;){var i=t.value,o=n.indexOf(i);if(-1!==o){n=n.substring(0,o);break}}}catch(n){e.e(n)}finally{e.f()}var u,a=r,f=rn(n);try{for(f.s();!(u=f.n()).done;){var c=u.value;c>="0"&&c<="9"&&(a+=c)}}catch(n){f.e(n)}finally{f.f()}return a}var hn=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,pn=/^(?:\+)?\d{4,18}$/;function bn(n){return n===on||hn.test(n)}function wn(n){return n===k||pn.test(n)}function gn(n){return vn(n,64)}function En(n){return!0}var Sn=["aaid","email","phoneNumber","externalId","idfa","transactionId","conversionId"],Tn=function(n){for(var r=0;r<Sn.length;r++)if(n===Sn[r])return!0;return!1},An={aaid:function(n){return n===en?k:n.toLowerCase()},email:dn,phoneNumber:mn,externalId:function(n){return n===an?k:yn(n)},idfa:function(n){return n===fn?k:n.toUpperCase()},transactionId:yn,conversionId:yn},On={aaid:function(n){return n===en||sn(n)},email:bn,phoneNumber:wn,externalId:En,idfa:function(n){return n===fn||sn(n)},transactionId:En,conversionId:En};function In(n,r){if(!n||"string"!=typeof n||!Tn(r))return"";if(gn(n))return n.toLowerCase();if(!(0,On[r])(n))return"email"===r?D:"";var t=(0,An[r])(n);return t===k?t:nn().stringify(q()(t))}function _n(n,r){if(!n||"string"!=typeof n||!Tn(r))return"";if(gn(n))return n.toLowerCase();var t=(0,An[r])(n);return(0,On[r])(t)?t===k?k:nn().stringify(q()(t)):"email"===r?D:"phoneNumber"===r?G:""}var jn="undefined"!=typeof window&&window.console?window.console:{},Nn={error:"Reddit Pixel Error",warn:"Reddit Pixel Warning",info:"Reddit Pixel Info"},xn=function(n){return function(r){window.rdt&&window.rdt.debug&&n in jn&&n in Nn&&jn[n](Nn[n]+":"+r)}},Cn={error:xn("error"),warn:xn("warn"),info:xn("info")};function Pn(n){"undefined"!=typeof window&&"postMessage"in window&&postMessage(n,"*")}function Rn(r){if(r.origin===n&&"MOUNT_EST"===r.data&&r.source===window.opener){try{Mn()}catch(n){console.error("Failed to inject EST script. Error: ",n)}removeEventListener("message",Rn)}}function Mn(){fetch(n+"/public/estManifest").then(function(n){return n.json()}).then(function(n){var t=n.assets;fetch(r+t["estStyles.css"]).then(function(n){n.text().then(function(n){var r=document.createElement("style");r.innerText=n,document.head.append(r)})});var e=document.createElement("script");e.src=r+t["estStyles.js"];var i=document.createElement("script");i.src=r+t["eventSetupTool.js"],document.body.append(e,i)})}function Dn(){window.location.search.indexOf("reddit_open_est=true")>-1&&!window.opener&&"append"in document.body?Mn():null!==window.opener&&void 0!==window.opener&&"postMessage"in window.opener!=!1&&"append"in document.body!=!1&&(window.opener.postMessage("PIXEL_READY",n),window.addEventListener("message",Rn))}function kn(n){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},kn(n)}function Gn(n){return"string"==typeof n&&(n=parseFloat(n)),"number"==typeof n&&!isNaN(n)&&isFinite(n)}function Un(n){return"string"==typeof n}function Fn(n){return"[object Array]"===Object.prototype.toString.call(n)}function Ln(n){return"object"===kn(n)&&null!==n}function zn(n){return Ln(n)||Un(n)}function Hn(n){return Boolean(n)?String(n):""}function Xn(n){return Un(n)?n:""}function Bn(n){return Ln(n)?n:{}}function Zn(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return $n(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$n(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function $n(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}var Kn=function(n,r,t){n in t&&(r[n]=t[n])},Wn=function(n,r,t){if(n in t){var e=Vn(n);e&&e(t[n])&&(r[n]=t[n])}},Yn=function(n){if(y in n){var r=n[y],t=rdt.useDecimalCurrencyValues?m:y;rdt.useDecimalCurrencyValues&&delete n[y],n[t]=r}h in n&&(n[h]=In(n[h],h)),w in n&&(n[w]=In(n[w],w));var e=p;n[e]=function(n){if(!n)return"";var r=0,t=0,e=n.length;for(;r<e&&t<128;){var i=n.charCodeAt(r);if(t+=1,r+=1,i>=55296&&i<=56319&&r<e)56320==(64512&n.charCodeAt(r))&&(r+=1)}return n.slice(0,r)}(n[e]);var i=b;n[i]=Jn(n[i]);var o,u={},a=Zn(g);try{for(a.s();!(o=a.n()).done;){var f=o.value;u[f]=f in n?n[f]:""}}catch(n){a.e(n)}finally{a.f()}return u},Jn=function(n){if(!n)return"";if(Un(n))try{n=JSON.parse(n)}catch(n){return""}Fn(n)||(n=[n]);for(var r=[],t=0;t<n.length;t++){var e=n[t],i={};for(var o in e.id&&(Gn(e.id)?i.id=e.id.toString():Un(e.id)&&(i.id=e.id)),e.name&&Un(e.name)&&(i.name=e.name),e.category&&Un(e.category)&&(i.category=e.category),e.quantity&&Gn(e.quantity)&&(i.quantity=e.quantity),e.itemPrice&&Gn(e.itemPrice)&&(i.itemPrice=e.itemPrice),i){r.push(i);break}}return 0!==r.length?JSON.stringify(r):""};var Vn=function(n){return{products:zn}[n]};function qn(n){return n?tr(n)||er(n)?(n.value||"").trim():ir(n)?-1===n.selectedIndex?"":((null===(r=n.options[n.selectedIndex])||void 0===r?void 0:r.text)||"").trim():(n.textContent||"").trim():"";var r}function Qn(n){return n?tr(n)||er(n)?(n.value||"").trim():ir(n)?-1===n.selectedIndex?"":((null===(r=n.options[n.selectedIndex])||void 0===r?void 0:r.text)||"").trim():(n.innerText||n.textContent||"").trim():"";var r}var nr=["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","animation","audio","canvas","circle","clipPath","color-profile","cursor","defs","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","handler","hkern","iframe","image","line","linearGradient","listener","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","script","set","solidColor","stop","style","svg","switch","symbol","tbreak","textPath","tref","unknown","use","video","view","vkern"];function rr(n){return n&&n.tagName?n.tagName.toLowerCase():""}function tr(n){return"input"===rr(n)}function er(n){return"textarea"===rr(n)}function ir(n){return"select"===rr(n)}function or(n){return"script"===rr(n)}function ur(n){return"style"===rr(n)}function ar(n){var r=rr(n);return-1!==nr.indexOf(r)}function fr(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return cr(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?cr(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function cr(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}var lr,vr=A.METADATA_EXTRACTOR_TYPE,sr=A.TRIGGER_SELECTOR_TYPE,dr=A.TRIGGER_TYPE;function yr(n,r){var t=hr(n.metadata,"ITEM_COUNT"),e=hr(n.metadata,"VALUE"),i=hr(n.metadata,"CURRENCY");return{metadataArgs:mr({itemCount:br(pr(t)),value:br(pr(e)),currency:pr(i),triggerId:r.id,customEventName:n.eventConfigName}),method:s,eventName:n.trackingType}}function mr(n){for(var r in n)n.hasOwnProperty(r)&&void 0===n[r]&&delete n[r];return n}function hr(n,r){if(n){var t,e=fr(n);try{for(e.s();!(t=e.n()).done;){var i=t.value;if(i.metadataType===r)return i}}catch(n){e.e(n)}finally{e.f()}}}function pr(n){if(n){if(n.metadataExtractorType===vr.FIXED)return n.metadataFixedValue;if(n.metadataExtractorType===vr.SELECTOR&&n.metadataSelectorType===sr.CSS){var r=document.querySelector(n.metadataSelectorValue);if(r)return qn(r)}}}function br(n){return n&&"string"==typeof n?n.replace(/[^0-9\.]/gi,""):n}function wr(n){return!(!n.triggers||0===n.triggers.length)&&n.triggers[0].triggerType===dr.CLICK}function gr(n){return!(!n.triggers||0===n.triggers.length)&&n.triggers[0].triggerType===dr.URL}function Er(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return Sr(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Sr(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function Sr(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}function Tr(){lr=document.body.querySelectorAll("*")}function Ar(n){Tr();for(var r=0;r<n.length;r++){var t=n[r];if(t){var e=null!==t.target,i=document.body.contains(t.target);if(!e||!i){var o=Or(t.config,t.trigger);n[r]=o}}}}function Or(n,r){var t=Ir(r);function e(t){var e=yr(n,r);window.rdt.sendEvent(e.method,e.eventName,e.metadataArgs)}return null!==t&&t.addEventListener("click",e,!0),{config:n,trigger:r,listener:e,target:t}}function Ir(n){var r=null;if(n.triggerSelectorType===A.TRIGGER_SELECTOR_TYPE.CLICK_CSS&&(r=document.querySelector(n.triggerSelectorValue)),n.triggerSelectorType===A.TRIGGER_SELECTOR_TYPE.CLICK_TEXT&&n.triggerSelectorValue)for(var t=0;t<lr.length;t++){var e=lr[t];if(e)if(qn(e)===n.triggerSelectorValue.trim()){r=e;break}}return r}function _r(n,r,t){if(n!==t.path)return!1;var e=xr(r);return t.params.every(function(n){return-1!==e.indexOf(n)})}function jr(n,r,t,e){for(var i=n+r+t,o=[],u=0;u<e.keywords.length;u++){var a=e.keywords[u];if(a){for(var f=[],c=i.indexOf(a);-1!==c;c=i.indexOf(a,c+1))f.push(c);if(0===f.length)return null;o.push(f)}}return o}function Nr(n){var r=function(n){var r=document.createElement("a");return r.href=n,{hash:r.hash,host:r.host,hostname:r.hostname,href:r.href,origin:r.origin,pathname:r.pathname,port:r.port,protocol:r.protocol,search:r.search}}(n.triggerSelectorValue),t=xr(r.search);return{type:"EXACT",path:r.pathname,params:t}}function xr(n){var r=[];return n.length>0&&(r=n.split(/[?&]/).filter(function(n){return""!==n})),r}function Cr(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return Pr(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Pr(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function Pr(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}window.rdt.updatePageElementsList=Tr,window.rdt.queryClickTriggerTarget=Ir,window.rdt.getRenderedText=qn,window.rdt.getBestAvailableText=Qn;var Rr=location.hostname,Mr=location.pathname,Dr=location.search,kr=location.hostname,Gr=location.pathname,Ur=location.search;function Fr(n,r,t,e){var i=n.triggers[0];if(!i)return null;var o=Hr(i,r,t,e),u=o.hasMatched,a=o.matches,f=o.matcher;if(u){var c=yr(n,i);window.rdt.sendEvent(c.method,c.eventName,c.metadataArgs)}return{config:n,hasMatched:u,matcher:f,matches:a}}function Lr(n){if(Mr!==location.pathname||Dr!==location.search){kr=Rr,Gr=Mr,Ur=Dr,Rr=location.hostname,Mr=location.pathname,Dr=location.search;for(var r=0;r<n.length;r++){var t=n[r];t&&(n[r]=zr(t))}}}function zr(n){var r=n.config.triggers[0];if(!r)return{config:n.config,hasMatched:!1,matcher:n.matcher,matches:void 0};var t=n.matcher,e=!1,i=void 0;if("EXACT"===t.type&&(e=_r(Mr,Dr,t)),"KEYWORDS"===t.type){var o=jr(Rr,Mr,Dr,t);e=null!==o,i=o||void 0}if(function(n,r,t){if(!r)return!1;if(!n.hasMatched)return!0;if("KEYWORDS"===n.matcher.type&&t&&n.matches){if(Mr!==Gr)return!0;for(var e=Mr+Dr,i=kr+Gr+Ur,o=0;o<t.length;o++){var u=t[o],a=n.matches[o];if(u&&a){if(u.length!==a.length)return!0;for(var f=0;f<u.length;f++){var c=u[f],l=a[f];if(void 0!==c&&void 0!==l){if(c!==l)return!0;if(e.substring(0,c)!==i.substring(0,l))return!0}}}}}return!1}(n,e,i)){var u=yr(n.config,r);window.rdt.sendEvent(u.method,u.eventName,u.metadataArgs)}return{config:n.config,hasMatched:e,matcher:t,matches:i}}function Hr(n,r,t,e){var i,o=!1,u=void 0;if(n.triggerSelectorType===A.TRIGGER_SELECTOR_TYPE.URL_EXACT)o=_r(t,e,i=Nr(n));else if(n.triggerSelectorType===A.TRIGGER_SELECTOR_TYPE.URL_CONTAINS){i=function(n){return{type:"KEYWORDS",keywords:JSON.parse(n.triggerSelectorValue)}}(n);var a=jr(r,t,e,i);o=null!==a,u=a||void 0}else i={type:"EXACT",path:"",params:[]};return{hasMatched:o,matches:u,matcher:i}}function Xr(n){var r=n.filter(wr),t=n.filter(gr);if(0!==r.length){var e=function(n){Tr();var r,t=[],e=Er(n);try{for(e.s();!(r=e.n()).done;){var i,o=r.value,u=Er(o.triggers);try{for(u.s();!(i=u.n()).done;){var a=i.value;t.push(Or(o,a))}}catch(n){u.e(n)}finally{u.f()}}}catch(n){e.e(n)}finally{e.f()}return t}(r);setInterval(Ar,S,e)}if(0!==t.length){var i=function(n){var r,t=[],e=Cr(n);try{for(e.s();!(r=e.n()).done;){var i=Fr(r.value,Rr,Mr,Dr);i&&t.push(i)}}catch(n){e.e(n)}finally{e.f()}return t}(t);setInterval(Lr,T,i)}}window.rdt.matchURLTrigger=Hr,window.rdt.matchURLTriggerVersion="2";var Br="undefined"!=typeof performance&&performance&&"now"in performance;function Zr(){return Br?performance.now():Date.now()}var $r={};function Kr(n){n in $r||($r[n]={cpuTime:0,startTimestamp:void 0,lastStopTimestamp:void 0,subtaskStartTimestamp:void 0})}function Wr(n){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(n){var t=$r[n];t&&(t.cpuTime=0,t.startTimestamp=void 0,t.lastStopTimestamp=void 0,t.subtaskStartTimestamp=void 0,r&&Yr(n))}}function Yr(n){if(n){var r=$r[n];if(r){var t=Zr();void 0===r.startTimestamp&&(r.startTimestamp=t),void 0===r.subtaskStartTimestamp&&(r.subtaskStartTimestamp=t)}}}function Jr(n){if(n){var r=Zr(),t=$r[n];t&&(void 0!==t.subtaskStartTimestamp&&(t.cpuTime+=r-t.subtaskStartTimestamp,t.subtaskStartTimestamp=void 0),void 0!==t.startTimestamp&&(t.lastStopTimestamp=r))}}function Vr(n){return n.startTimestamp?n.lastStopTimestamp?n.lastStopTimestamp-n.startTimestamp:Zr()-n.startTimestamp:0}function qr(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,t=arguments.length>2?arguments[2]:void 0;return function(e,i){var o=arguments.length>1,u=Qr(n);if(u===n.length)return o?Promise.resolve(i):Promise.reject(new TypeError("Reduce of empty array with no initial value"));var a=o?u:Qr(n,u+1),f=o?i:n[u];return new Promise(function(i){var o,u=a;function c(){for(var t=u+r;u<t;u++)if(u in n&&(f=e(f,n[u],u,n)),u===n.length)return i(f),void clearInterval(o)}if(void 0===t){var l,v;o=setInterval(c)}else{var s=(l=t,v=c,function(){Yr(l);var n=v.apply(null,arguments);return Jr(l),n});o=setInterval(s)}})}}function Qr(n){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r<n.length&&!(r in n);)r++;return r}function nt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,t="function"==typeof Symbol?Symbol:{},e=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function o(t,e,i,o){var f=e&&e.prototype instanceof a?e:a,c=Object.create(f.prototype);return rt(c,"_invoke",function(t,e,i){var o,a,f,c=0,l=i||[],v=!1,s={p:0,n:0,v:n,a:d,f:d.bind(n,4),d:function(r,t){return o=r,a=0,f=n,s.n=t,u}};function d(t,e){for(a=t,f=e,r=0;!v&&c&&!i&&r<l.length;r++){var i,o=l[r],d=s.p,y=o[2];t>3?(i=y===e)&&(f=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=n):o[0]<=d&&((i=t<2&&d<o[1])?(a=0,s.v=e,s.n=o[1]):d<y&&(i=t<3||o[0]>e||e>y)&&(o[4]=t,o[5]=e,s.n=y,a=0))}if(i||t>1)return u;throw v=!0,e}return function(i,l,y){if(c>1)throw TypeError("Generator is already running");for(v&&1===l&&d(l,y),a=l,f=y;(r=a<2?n:f)||!v;){o||(a?a<3?(a>1&&(s.n=-1),d(a,f)):s.n=f:s.v=f);try{if(c=2,o){if(a||(i="next"),r=o[i]){if(!(r=r.call(o,f)))throw TypeError("iterator result is not an object");if(!r.done)return r;f=r.value,a<2&&(a=0)}else 1===a&&(r=o.return)&&r.call(o),a<2&&(f=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=n}else if((r=(v=s.n<0)?f:t.call(e,s))!==u)break}catch(r){o=n,a=1,f=r}finally{c=1}}return{value:r,done:v}}}(t,i,o),!0),c}var u={};function a(){}function f(){}function c(){}r=Object.getPrototypeOf;var l=[][e]?r(r([][e]())):(rt(r={},e,function(){return this}),r),v=c.prototype=a.prototype=Object.create(l);function s(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,c):(n.__proto__=c,rt(n,i,"GeneratorFunction")),n.prototype=Object.create(v),n}return f.prototype=c,rt(v,"constructor",c),rt(c,"constructor",f),f.displayName="GeneratorFunction",rt(c,i,"GeneratorFunction"),rt(v),rt(v,i,"Generator"),rt(v,e,function(){return this}),rt(v,"toString",function(){return"[object Generator]"}),(nt=function(){return{w:o,m:s}})()}function rt(n,r,t,e){var i=Object.defineProperty;try{i({},"",{})}catch(n){i=0}rt=function(n,r,t,e){function o(r,t){rt(n,r,function(n){return this._invoke(r,t,n)})}r?i?i(n,r,{value:t,enumerable:!e,configurable:!e,writable:!e}):n[r]=t:(o("next",0),o("throw",1),o("return",2))},rt(n,r,t,e)}function tt(n){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tt(n)}function et(n,r){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);r&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,e)}return t}function it(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return ot(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ot(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function ot(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}function ut(n,r,t,e,i,o,u){try{var a=n[o](u),f=a.value}catch(n){return void t(n)}a.done?r(f):Promise.resolve(f).then(e,i)}function at(n,r){for(var t=0;t<r.length;t++){var e=r[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,ct(e.key),e)}}function ft(n,r,t){return(r=ct(r))in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}function ct(n){var r=function(n,r){if("object"!=tt(n)||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var e=t.call(n,r||"default");if("object"!=tt(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(n)}(n,"string");return"symbol"==tt(r)?r:r+""}var lt=/(?=[+\d()\[\] \t\-.]*\d)[+\d()\[\] \t\-.]{6,}/g,vt=400,st=300,dt=250,yt=200,mt=150,ht=100,pt=70,bt=50,wt=20,gt=50,Et=25,St=25,Tt=50,At=function(){return n=function n(){!function(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}(this,n),ft(this,"cache",{})},(r=[{key:"isCached",value:function(n){return!!this.cache[n]}},{key:"isCachedAndInvalid",value:function(n){return this.isCached(n)&&-1===this.get(n).score}},{key:"get",value:function(n){return this.isCached(n)?this.cache[n]:{score:-1,originalPhoneNumber:n,normalizedPhoneNumber:"",element:null}}},{key:"set",value:function(n,r){var t=this;if(n){this.cache[n]=r;var e=Object.keys(this.cache);e.length>1e3&&e.slice(0,200).forEach(function(n){return delete t.cache[n]})}}}])&&at(n.prototype,r),t&&at(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,t}(),Ot=null;function It(){return Ot||(Ot=new At),Ot}function _t(n){return jt.apply(this,arguments)}function jt(){var n;return n=nt().m(function n(r){var t,e,i,o,u,a,f,c;return nt().w(function(n){for(;;)switch(n.n){case 0:for(t=document.body.querySelectorAll("*"),e=[],i=0;i<t.length;i++)(o=t[i])&&e.push(o);return Jr(r),n.n=1,qr(e,100,r)(Nt,{});case 1:for(f in u=n.v,Yr(r),a=[],u)u.hasOwnProperty(f)&&(null===(c=u[f])||void 0===c||c.forEach(function(n){a.push(n)}));return n.a(2,zt(a))}},n)}),jt=function(){var r=this,t=arguments;return new Promise(function(e,i){var o=n.apply(r,t);function u(n){ut(o,e,i,u,a,"next",n)}function a(n){ut(o,e,i,u,a,"throw",n)}u(void 0)})},jt.apply(this,arguments)}function Nt(n,r){if(or(r)||ur(r)||ar(r))return n;var t=r,e=function(n,r){if(n.length>Ft)return[];var t=n.match(lt);if(!t)return[];var e,i=[],o=it(t);try{for(o.s();!(e=o.n()).done;){var u=e.value;if(It().isCached(u)){var a=It().get(u);if(It().isCachedAndInvalid(u))continue;i.push({normalizedPhoneNumber:a.normalizedPhoneNumber||"",originalPhoneNumber:a.originalPhoneNumber||""})}else if(Lt(u).isInvalid)It().set(u,{score:-1,originalPhoneNumber:u,normalizedPhoneNumber:"",element:null});else{var f=mn(u)||"";!wn(f)||Gt(u)||Mt(u)||Ht(r)||Xt(r)||Ut(f)||Rt(u)||Pt(window.location.pathname||"",document.title||"")||Dt(n,u)||kt(n,u)||Ct(window.location.pathname||"",document.title||"")||xt(f)||i.push({normalizedPhoneNumber:f,originalPhoneNumber:u})}}}catch(n){o.e(n)}finally{o.f()}return i}(Qn(t),t);if(0==e.length)return n;var i,o=it(e);try{for(o.s();!(i=o.n()).done;){var u=i.value,a=u.normalizedPhoneNumber,f={element:t,originalPhoneNumber:u.originalPhoneNumber,normalizedPhoneNumber:a,score:0},c=n[a];if(!c)return n[a]=[f],n;for(var l=c.length-1;l>=0;l--){var v,s=c[l];null!=s&&null!==(v=s.element)&&void 0!==v&&v.contains(t)&&c.splice(l,1)}return c.push(f),n[a]=c,n}}catch(n){o.e(n)}finally{o.f()}return n}function xt(n){return function(n){if(n.length<13||n.length>16)return!1;for(var r=0,t=n.length%2==0,e=0;e<n.length;e++){var i=Number(n[e]);if(isNaN(i))return!1;if(e%2==0===t){var o=2*i;r+=o>9?o-9:o}else r+=i}return r%10==0}(n)}function Ct(n,r){var t=M.I,e=function(n){return Boolean(n&&t.some(function(r){return H(n,r)}))};return e(n)||e(r)}function Pt(n,r){var t=M._,e=function(n){return Boolean(n&&t.some(function(r){return H(n,r)}))};return e(n)||e(r)}function Rt(n){var r=z(n).split(".");if(4!==r.length)return!1;for(var t=0;t<r.length;t++){var e=r[t];if(!e||!/^\d+$/.test(e)||e.length>1&&"0"===e[0])return!1;if(parseInt(e,10)>255)return!1}return!0}function Mt(n){var r=z(n).split("-");if(2!==r.length||isNaN(Number(r[0]))||isNaN(Number(r[1])))return!1;var t=r[0].length,e=r[1].length;return 5===t&&4===e||5===t&&3===e||3===t&&4===e}function Dt(n,r){var t,e,i=n.indexOf(r);return!(-1===i||0===i||null!==(t=r[0])&&void 0!==t&&t.match(/\s/))&&!(null===(e=n[i-1])||void 0===e||!e.match(/[a-zA-Z]/))}function kt(n,r){var t,e,i=n.indexOf(r);return!(-1===i||i+r.length>=n.length||null!==(t=r[r.length-1])&&void 0!==t&&t.match(/\s/))&&!(null===(e=n[i+r.length])||void 0===e||!e.match(/[a-zA-Z]/))}function Gt(n){if(-1===n.indexOf("-"))return!1;var r=Date.parse(n);if(isNaN(r))return!1;var t=new Date(r),e=(new Date).getFullYear(),i=e-80,o=e+5,u=t.getFullYear();return u>=i&&u<=o}function Ut(n){var r="";if("+"===n[0]&&"1"===n[1]?r="+1":"1"===n[0]&&(r="1"),n.length!==10+r.length)return!1;for(var t=["800","888","877","866","855","844","833","822","811"],e=0;e<t.length;e++){var i=r+t[e];if(0===n.indexOf(i))return!0}return!1}var Ft=1e4;function Lt(n){var r,t=z(n),e=0,i={"+":0,"(":0,")":0,"[":0,"]":0,"-":0,".":0," ":0},o=!1,u=it(t);try{for(u.s();!(r=u.n()).done;){var a=r.value;a>="0"&&a<="9"?e++:(")"===a&&(i["("]||0)-(i[")"]||0)!==1&&(o=!0),"]"===a&&(i["["]||0)-(i["]"]||0)!==1&&(o=!0),void 0!==i[a]&&(i[a]=(i[a]||0)+1))}}catch(n){u.e(n)}finally{u.f()}return(i["("]||0)===(i[")"]||0)&&(i["["]||0)===(i["]"]||0)||(o=!0),{numberOfDigits:e,numberOfSpecialCharacters:i,invalidParentheses:o,isInvalid:o||e<7||e>15||1===(i["."]||0)||(i["+"]||0)>1||1===(i["+"]||0)&&"+"!==t[0]}}function zt(n){return 0===n.length?[]:(n.forEach(function(n){var r=n.originalPhoneNumber,t=n.normalizedPhoneNumber,e=n.score,i=It().get(r);if(It().isCached(r)&&i.score>0&&i.element===n.element)n.score=i.score;else{var o=n.element,u=null!==o&&tr(o),a=u&&o?Bt(o,"LABEL"):null;if(u&&o&&tr(o)&&"tel"===o.type)e+=vt;else if(u&&o&&Zt(o))e+=st;else if(u&&a&&Zt(a,!0))e+=dt;else if(u)e+=yt;else if(o){var f,c=function(n){for(;n&&1===n.nodeType;){if(Zt(n))return n;n=n.parentElement||n.parentNode}return null}(o),l=(null===(f=o.parentNode)||void 0===f?void 0:f.querySelector(M.O))||null;e+=c||l?mt:ht}var v=Lt(r),s=v.numberOfDigits,d=v.numberOfSpecialCharacters;1===(d["+"]||0)&&"+"===t[0]&&(e+=pt),1===(d["("]||0)&&(e+=bt),1===(d["["]||0)&&(e+=wt);var y=(d["-"]||0)+(d["."]||0)+(d[" "]||0);y>0&&y===Math.max(d["-"]||0,d["."]||0,d[" "]||0)&&(e+=gt),e+=s<=8?Et:s>=12?St:Tt,n.score=e,It().set(r,function(n){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?et(Object(t),!0).forEach(function(r){ft(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):et(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}({},n))}}),n)}function Ht(n){return Bt(n,"FOOTER","footer")}function Xt(n){return Bt(n,"HEADER","header")}function Bt(n,r){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n&&1===n.nodeType;){if(r&&n.tagName.toUpperCase()===r.toUpperCase()||t&&n.id===t)return n;n=n.parentElement||n.parentNode}return null}function Zt(n){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&H(qn(n),"phone"))||["class","id","aria-label","name","title","placeholder"].some(function(r){return H(n.getAttribute(r),"phone")})}function $t(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];e&&r.push(Kt(e))}return r}function Kt(n){if(!n||isNaN(Number(n.score))||!n.normalizedPhoneNumber)return"";var r=_n(n.normalizedPhoneNumber||"","phoneNumber");return(n.score||0)+M.T+(r||"")}function Wt(n){if("string"!=typeof n)return null;var r=n.split(M.T);return 2===r.length&&r[0]&&r[1]?{score:isNaN(Number(r[0]))?0:Number(r[0]),phoneNumber:r[1]}:null}function Yt(n){return n&&0!==n.length?n.sort(function(n,r){var t,e,i=(null===(t=Wt(n))||void 0===t?void 0:t.score)||0;return((null===(e=Wt(r))||void 0===e?void 0:e.score)||0)-i}):[]}function Jt(n){var r=function(){var n=Z(o);if(!n)return"";var r=n.split(a);if(2==r.length&&r[1])return r[1];return""}();if(!r)return n;var t,e=r.split(M.S),i={},u=it(n.concat(e));try{for(u.s();!(t=u.n()).done;){var f,c=t.value,l=Wt(c);if(l&&l.phoneNumber){var v=l.phoneNumber,s=l.score;(!i[v]||s>((null===(f=i[v])||void 0===f?void 0:f.score)||0))&&(i[v]={score:s,originalString:c})}}}catch(n){u.e(n)}finally{u.f()}var d=[];for(var y in i)if(i.hasOwnProperty(y)){var m=i[y];m&&d.push(m.originalString)}return d}function Vt(n){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vt(n)}function qt(n){if(null!=n){var r=n["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],t=0;if(r)return r.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length))return{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}throw new TypeError(Vt(n)+" is not iterable")}function Qt(n){var r=Object(n),t=[];for(var e in r)t.unshift(e);return function n(){for(;t.length;)if((e=t.pop())in r)return n.value=e,n.done=!1,n;return n.done=!0,n}}function ne(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,t="function"==typeof Symbol?Symbol:{},e=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function o(t,e,i,o){var f=e&&e.prototype instanceof a?e:a,c=Object.create(f.prototype);return re(c,"_invoke",function(t,e,i){var o,a,f,c=0,l=i||[],v=!1,s={p:0,n:0,v:n,a:d,f:d.bind(n,4),d:function(r,t){return o=r,a=0,f=n,s.n=t,u}};function d(t,e){for(a=t,f=e,r=0;!v&&c&&!i&&r<l.length;r++){var i,o=l[r],d=s.p,y=o[2];t>3?(i=y===e)&&(f=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=n):o[0]<=d&&((i=t<2&&d<o[1])?(a=0,s.v=e,s.n=o[1]):d<y&&(i=t<3||o[0]>e||e>y)&&(o[4]=t,o[5]=e,s.n=y,a=0))}if(i||t>1)return u;throw v=!0,e}return function(i,l,y){if(c>1)throw TypeError("Generator is already running");for(v&&1===l&&d(l,y),a=l,f=y;(r=a<2?n:f)||!v;){o||(a?a<3?(a>1&&(s.n=-1),d(a,f)):s.n=f:s.v=f);try{if(c=2,o){if(a||(i="next"),r=o[i]){if(!(r=r.call(o,f)))throw TypeError("iterator result is not an object");if(!r.done)return r;f=r.value,a<2&&(a=0)}else 1===a&&(r=o.return)&&r.call(o),a<2&&(f=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=n}else if((r=(v=s.n<0)?f:t.call(e,s))!==u)break}catch(r){o=n,a=1,f=r}finally{c=1}}return{value:r,done:v}}}(t,i,o),!0),c}var u={};function a(){}function f(){}function c(){}r=Object.getPrototypeOf;var l=[][e]?r(r([][e]())):(re(r={},e,function(){return this}),r),v=c.prototype=a.prototype=Object.create(l);function s(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,c):(n.__proto__=c,re(n,i,"GeneratorFunction")),n.prototype=Object.create(v),n}return f.prototype=c,re(v,"constructor",c),re(c,"constructor",f),f.displayName="GeneratorFunction",re(c,i,"GeneratorFunction"),re(v),re(v,i,"Generator"),re(v,e,function(){return this}),re(v,"toString",function(){return"[object Generator]"}),(ne=function(){return{w:o,m:s}})()}function re(n,r,t,e){var i=Object.defineProperty;try{i({},"",{})}catch(n){i=0}re=function(n,r,t,e){function o(r,t){re(n,r,function(n){return this._invoke(r,t,n)})}r?i?i(n,r,{value:t,enumerable:!e,configurable:!e,writable:!e}):n[r]=t:(o("next",0),o("throw",1),o("return",2))},re(n,r,t,e)}function te(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return ee(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ee(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function ee(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}function ie(n,r,t,e,i,o,u){try{var a=n[o](u),f=a.value}catch(n){return void t(n)}a.done?r(f):Promise.resolve(f).then(e,i)}var oe=/[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+/g;function ue(n){return ae.apply(this,arguments)}function ae(){var n;return n=ne().m(function n(r){var t,e,i,o,u,a,f,c,l,v;return ne().w(function(n){for(;;)switch(n.n){case 0:for(t=document.body.querySelectorAll("*"),e=[],i=0;i<t.length;i++)(o=t[i])&&e.push(o);return Jr(r),n.n=1,qr(e,100,r)(fe,{});case 1:u=n.v,Yr(r),a=[],f=ne().m(function n(r){var t;return ne().w(function(n){for(;;)switch(n.n){case 0:u.hasOwnProperty(r)&&(t=u[r])&&t.forEach(function(n){a.push({email:r,element:n})});case 1:return n.a(2)}},n)}),l=Qt(u);case 2:if((v=l()).done){n.n=4;break}return c=v.value,n.d(qt(f(c)),3);case 3:n.n=2;break;case 4:return n.a(2,le(a))}},n)}),ae=function(){var r=this,t=arguments;return new Promise(function(e,i){var o=n.apply(r,t);function u(n){ie(o,e,i,u,a,"next",n)}function a(n){ie(o,e,i,u,a,"throw",n)}u(void 0)})},ae.apply(this,arguments)}function fe(n,r){if(or(r)||ur(r)||ar(r))return n;var t=r,e=function(n){if(n.length>ye)return[];var r=n.match(oe);if(!r)return[];for(var t=[],e=0;e<r.length;e++){var i=r[e];i&&bn(i)&&t.push(i)}return t}(Qn(t));if(0==e.length)return n;var i,o=te(e);try{for(o.s();!(i=o.n()).done;){var u=dn(i.value);if(ce(u)||Ht(t))return n;var a=n[u];if(!a)return n[u]=[t],n;for(var f=a.length-1;f>=0;f--){var c=a[f];c&&c.contains(t)&&a.splice(f,1)}return a.push(t),n[u]=a,n}}catch(n){o.e(n)}finally{o.f()}return n}function ce(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=function(n){var r=n.split("@"),t=r[0]||"",e=r[1]||"";return[t,e]}(n),e=t[0],i=t[1],o=r||window.location.hostname;0===o.indexOf("www.")&&(o=o.substring(4));for(var u=!1,a=0;a<N.length;a++)if(N[a]===e){u=!0;break}return u||-1!==o.indexOf(i)||-1!==i.indexOf(o)}function le(n){if(0===n.length)return[];var r=[],t=[],e=[];return n.forEach(function(n){var i=n.element,o=tr(i);if(o&&"email"===i.type)r.unshift(n);else if(o)r.push(n);else{var u=function(n){var r=n;for(;r&&1===r.nodeType;){if(ve(r))return r;r=r.parentElement||r.parentNode}return null}(i),a=i.parentNode,f=a?a.querySelector(x):null;u||f?t.push(n):e.push(n)}}),r.concat(t,e)}function ve(n){return["class","id","aria-label","name","title"].some(function(r){var t=n.getAttribute(r);return!!t&&-1!==t.indexOf("email")})}var se,de,ye=1e4;function me(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];if(e){var i=In(e.email,"email");r.push(i)}}return r}function he(n){var r=[],t=function(){var n=Z(i);if(!n)return"";var r=n.split(C);return 2==r.length&&r[1]?r[1]:""}();if(!t)return n;for(var e=t.split(R),o=0;o<e.length;o++){var u=e[o];u&&-1===n.indexOf(u)&&r.push(u)}return n.concat(r)}function pe(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,t="function"==typeof Symbol?Symbol:{},e=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function o(t,e,i,o){var f=e&&e.prototype instanceof a?e:a,c=Object.create(f.prototype);return be(c,"_invoke",function(t,e,i){var o,a,f,c=0,l=i||[],v=!1,s={p:0,n:0,v:n,a:d,f:d.bind(n,4),d:function(r,t){return o=r,a=0,f=n,s.n=t,u}};function d(t,e){for(a=t,f=e,r=0;!v&&c&&!i&&r<l.length;r++){var i,o=l[r],d=s.p,y=o[2];t>3?(i=y===e)&&(f=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=n):o[0]<=d&&((i=t<2&&d<o[1])?(a=0,s.v=e,s.n=o[1]):d<y&&(i=t<3||o[0]>e||e>y)&&(o[4]=t,o[5]=e,s.n=y,a=0))}if(i||t>1)return u;throw v=!0,e}return function(i,l,y){if(c>1)throw TypeError("Generator is already running");for(v&&1===l&&d(l,y),a=l,f=y;(r=a<2?n:f)||!v;){o||(a?a<3?(a>1&&(s.n=-1),d(a,f)):s.n=f:s.v=f);try{if(c=2,o){if(a||(i="next"),r=o[i]){if(!(r=r.call(o,f)))throw TypeError("iterator result is not an object");if(!r.done)return r;f=r.value,a<2&&(a=0)}else 1===a&&(r=o.return)&&r.call(o),a<2&&(f=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=n}else if((r=(v=s.n<0)?f:t.call(e,s))!==u)break}catch(r){o=n,a=1,f=r}finally{c=1}}return{value:r,done:v}}}(t,i,o),!0),c}var u={};function a(){}function f(){}function c(){}r=Object.getPrototypeOf;var l=[][e]?r(r([][e]())):(be(r={},e,function(){return this}),r),v=c.prototype=a.prototype=Object.create(l);function s(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,c):(n.__proto__=c,be(n,i,"GeneratorFunction")),n.prototype=Object.create(v),n}return f.prototype=c,be(v,"constructor",c),be(c,"constructor",f),f.displayName="GeneratorFunction",be(c,i,"GeneratorFunction"),be(v),be(v,i,"Generator"),be(v,e,function(){return this}),be(v,"toString",function(){return"[object Generator]"}),(pe=function(){return{w:o,m:s}})()}function be(n,r,t,e){var i=Object.defineProperty;try{i({},"",{})}catch(n){i=0}be=function(n,r,t,e){function o(r,t){be(n,r,function(n){return this._invoke(r,t,n)})}r?i?i(n,r,{value:t,enumerable:!e,configurable:!e,writable:!e}):n[r]=t:(o("next",0),o("throw",1),o("return",2))},be(n,r,t,e)}function we(n,r,t,e,i,o,u){try{var a=n[o](u),f=a.value}catch(n){return void t(n)}a.done?r(f):Promise.resolve(f).then(e,i)}function ge(n){return function(){var r=this,t=arguments;return new Promise(function(e,i){var o=n.apply(r,t);function u(n){we(o,e,i,u,a,"next",n)}function a(n){we(o,e,i,u,a,"throw",n)}u(void 0)})}}function Ee(n,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1/0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,u=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=void 0,f=!0;return function c(){var l=function(n){if(n){var r=$r[n];if(r)return{totalTime:Vr(r),cpuTime:r.cpuTime}}}(r);if(l){var v=function(n,r,t,e){var i=n.cpuTimePercentage?r.cpuTime/n.cpuTimePercentage:0,o=n.totalTimePercentage?r.totalTime/n.totalTimePercentage:0;return u=Math.max(i,o),a=t,f=e,Math.min(f,Math.max(a,u));var u,a,f}(t,l,e,i),s=f?o:Math.max(v-l.totalTime,0);f=!1,a=setTimeout(ge(pe().m(function r(){return pe().w(function(r){for(;;)switch(r.n){case 0:if(u){r.n=1;break}n(),r.n=2;break;case 1:return r.n=2,n();case 2:c();case 3:return r.a(2)}},r)})),s)}}(),function(){clearTimeout(a)}}function Se(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,t="function"==typeof Symbol?Symbol:{},e=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function o(t,e,i,o){var f=e&&e.prototype instanceof a?e:a,c=Object.create(f.prototype);return Te(c,"_invoke",function(t,e,i){var o,a,f,c=0,l=i||[],v=!1,s={p:0,n:0,v:n,a:d,f:d.bind(n,4),d:function(r,t){return o=r,a=0,f=n,s.n=t,u}};function d(t,e){for(a=t,f=e,r=0;!v&&c&&!i&&r<l.length;r++){var i,o=l[r],d=s.p,y=o[2];t>3?(i=y===e)&&(f=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=n):o[0]<=d&&((i=t<2&&d<o[1])?(a=0,s.v=e,s.n=o[1]):d<y&&(i=t<3||o[0]>e||e>y)&&(o[4]=t,o[5]=e,s.n=y,a=0))}if(i||t>1)return u;throw v=!0,e}return function(i,l,y){if(c>1)throw TypeError("Generator is already running");for(v&&1===l&&d(l,y),a=l,f=y;(r=a<2?n:f)||!v;){o||(a?a<3?(a>1&&(s.n=-1),d(a,f)):s.n=f:s.v=f);try{if(c=2,o){if(a||(i="next"),r=o[i]){if(!(r=r.call(o,f)))throw TypeError("iterator result is not an object");if(!r.done)return r;f=r.value,a<2&&(a=0)}else 1===a&&(r=o.return)&&r.call(o),a<2&&(f=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=n}else if((r=(v=s.n<0)?f:t.call(e,s))!==u)break}catch(r){o=n,a=1,f=r}finally{c=1}}return{value:r,done:v}}}(t,i,o),!0),c}var u={};function a(){}function f(){}function c(){}r=Object.getPrototypeOf;var l=[][e]?r(r([][e]())):(Te(r={},e,function(){return this}),r),v=c.prototype=a.prototype=Object.create(l);function s(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,c):(n.__proto__=c,Te(n,i,"GeneratorFunction")),n.prototype=Object.create(v),n}return f.prototype=c,Te(v,"constructor",c),Te(c,"constructor",f),f.displayName="GeneratorFunction",Te(c,i,"GeneratorFunction"),Te(v),Te(v,i,"Generator"),Te(v,e,function(){return this}),Te(v,"toString",function(){return"[object Generator]"}),(Se=function(){return{w:o,m:s}})()}function Te(n,r,t,e){var i=Object.defineProperty;try{i({},"",{})}catch(n){i=0}Te=function(n,r,t,e){function o(r,t){Te(n,r,function(n){return this._invoke(r,t,n)})}r?i?i(n,r,{value:t,enumerable:!e,configurable:!e,writable:!e}):n[r]=t:(o("next",0),o("throw",1),o("return",2))},Te(n,r,t,e)}function Ae(n,r,t,e,i,o,u){try{var a=n[o](u),f=a.value}catch(n){return void t(n)}a.done?r(f):Promise.resolve(f).then(e,i)}function Oe(n){return function(){var r=this,t=arguments;return new Promise(function(e,i){var o=n.apply(r,t);function u(n){Ae(o,e,i,u,a,"next",n)}function a(n){Ae(o,e,i,u,a,"throw",n)}u(void 0)})}}var Ie="aam-em",_e="aam-pn";function je(){Kr(Ie),se&&se(),se=Ee(Pe,Ie,{totalTimePercentage:I,cpuTimePercentage:O},_,j,0,!0)}function Ne(){Kr(_e),de&&de(),de=Ee(Me,_e,{totalTimePercentage:M.i,cpuTimePercentage:M.t},M.u,M.l,0,!0)}function xe(){se&&se(),se=void 0}function Ce(){de&&de(),de=void 0}function Pe(){return Re.apply(this,arguments)}function Re(){return(Re=Oe(Se().m(function n(){var r,t,e;return Se().w(function(n){for(;;)switch(n.n){case 0:return Wr(Ie),n.n=1,ue(Ie);case 1:r=n.v,0!==(t=me(r)).length&&(e=he(t),rdt.config.auto_em=e.slice(0,P).join(R),!1!==rdt.enableFirstPartyCookies&&$()),Jr(Ie);case 2:return n.a(2)}},n)}))).apply(this,arguments)}function Me(){return De.apply(this,arguments)}function De(){return(De=Oe(Se().m(function n(){var r,t,e,i;return Se().w(function(n){for(;;)switch(n.n){case 0:return Wr(_e),n.n=1,_t(_e);case 1:r=n.v,0!==(t=$t(r)).length&&(e=Jt(t),i=Yt(e),rdt.config.auto_pn=i.slice(0,M.h).join(M.S),!1!==rdt.enableFirstPartyCookies&&K()),Jr(_e);case 2:return n.a(2)}},n)}))).apply(this,arguments)}function ke(n){var r,t;("pixelEventConfigs"in n&&n.pixelEventConfigs&&Xr(n.pixelEventConfigs),"aam"in n&&n.aam)&&(rdt.aam={email:null!==(r=n.aam.email)&&void 0!==r?r:null,phoneNumber:null!==(t=n.aam.phone_number)&&void 0!==t?t:null},rdt.aam.email?je():xe(),rdt.aam.phoneNumber?Ne():Ce())}function Ge(n){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ge(n)}function Ue(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return Fe(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Fe(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function Fe(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}function Le(n,r){for(var t=0;t<r.length;t++){var e=r[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,ze(e.key),e)}}function ze(n){var r=function(n,r){if("object"!=Ge(n)||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var e=t.call(n,r||"default");if("object"!=Ge(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(n)}(n,"string");return"symbol"==Ge(r)?r:r+""}var He=function(){return n=function n(){var r,t,e;!function(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}(this,n),r=this,e=void 0,(t=ze(t="params"))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,this.params={},this.params.ts=(new Date).valueOf()},(r=[{key:"addParams",value:function(n){for(var r in n){var t=n[r];void 0!==t&&(this.isMetadata(r)?this.params["m."+r]=t:this.params[r]=t)}return this}},{key:"isMetadata",value:function(n){var r,t=Ue(g);try{for(t.s();!(r=t.n()).done;)if(n===r.value)return!0}catch(n){t.e(n)}finally{t.f()}return!1}},{key:"toQueryString",value:function(){var n=[];for(var r in this.params){var t=this.params[r];if(void 0!==t){var e="undefined";try{e=Array.isArray(t)?encodeURIComponent(t.join(",")):encodeURIComponent(t)}catch(n){Cn.warn("unsupported value type for "+r)}n.push(encodeURIComponent(r)+"="+e)}}return"?"+n.join("&")}}])&&Le(n.prototype,r),t&&Le(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,t}();function Xe(n){(new Image).src="https://alb.reddit.com/rp.gif"+n}var Be="[0-9a-fA-F]{1,4}";new RegExp("^(?:"+"(?:".concat(Be,":){7}").concat(Be)+"|(?:".concat(Be,":){1,6}(?::").concat(Be,"){1,6}")+"|(?:".concat(Be,":){1,7}:")+"|::(?:".concat(Be,":){0,6}").concat(Be)+")$");function Ze(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return $e(n,r);var t={}.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$e(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){a=!0,o=n},f:function(){try{u||null==t.return||t.return()}finally{if(a)throw o}}}}function $e(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=Array(r);t<r;t++)e[t]=n[t];return e}var Ke=["rdt_cid","utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_name"];function We(){try{return Ye(rdt.context.window.location)}catch(n){}try{return Ye(rdt.context.document.location)}catch(n){}try{if(self.top)return Ye(self.top.location)}catch(n){}try{return Ye(self.location)}catch(n){}try{return Ye(window.location)}catch(n){return""}}function Ye(n){return(n.protocol+"//"+n.host+n.pathname+function(n){if(!n)return"";var r,t=[],e=Ze(n.slice(1).split("&"));try{for(e.s();!(r=e.n()).done;){var i=r.value,o=i.split("=")[0];void 0!==o&&-1!==Ke.indexOf(o)&&t.push(i)}}catch(n){e.e(n)}finally{e.f()}if(0===t.length)return"";return"?"+t.join("&")}(n.search)).slice(0,2048)}var Je=window.rdt;Je||(Cn.error("Pixel was not initialized.Please ensure you have included the correct pixel script in your head tag"),Pn({type:"Error",exceptionName:"PixelWasNotInitialised",args:[],timestamp:(new Date).valueOf()}));var Ve=function(){if(!1!==Je.enableFirstPartyCookies){var n,r,t=function(){for(var n=document.cookie.split(";"),r="",t=1/0,e=0;e<n.length;e++){var i=n[e].split("=");if(i.length>1&&z(i[0])===u){var o=i[1].split(".");if(o.length>1){var a=parseInt(o[0],10);!isNaN(a)&&a<t&&(t=a,r=i[1])}}}return r}()||B();Y(u,t,90),Je.uuid=(r=(n=t).split(".")).length<2?n:r[1],function(){if(rdt.clickId)Y(e,rdt.clickId,90);else{var n=Z(e);n&&(rdt.clickIdFromCookie=!0,rdt.clickId=n,Y(e,n,90))}}(),$(),K(),Je.enableFirstPartyCookies=!0}},qe=function(){J(u),J(e),J(i),J(o),Je.enableFirstPartyCookies=!1,delete Je.uuid,Je.emailFromCookie&&delete Je.config.em,Je.autoEmailsFromCookie&&delete Je.config.auto_em,Je.phoneNumberFromCookie&&delete Je.config.pn,Je.autoPhoneNumbersFromCookie&&delete Je.config.auto_pn,Je.clickIdFromCookie&&delete Je.clickId};function Qe(){var n=function(n,r){if(!n)return"";var t,e=Ue(n.slice(1).split("&"));try{for(e.s();!(t=e.n()).done;){var i,o=t.value.split("=");if(o[0]===r)return null!==(i=o[1])&&void 0!==i?i:""}}catch(n){e.e(n)}finally{e.f()}return""}(window.location.search,"rdt_cid");n&&(Je.clickId=n)}function ni(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];var i,o,u,a,y,h,g,S,T,A=void 0,O=void 0;switch(t[0]){case l:Je.pixelId=String(t[1]);var I=Bn(t[2]);Je.debug=!0===I.debug;var _=(S=1*window.screen.width,T=1*window.screen.height,{sh:Math.max(S,T),sw:Math.min(S,T)}),j=(y=I.dpm,h=I.dpcc,g=I.dprc,Un(y)?-1!==y.indexOf(",")&&(y=y.split(",")):Fn(y)||(y=""),{dpm:y,dpcc:Xn(h),dprc:Xn(g)});if(A=In(I.email,"email"),O=_n(I.phoneNumber,"phoneNumber"),Je.config={aaid:In(I.aaid,"aaid"),external_id:In(I.externalId,"externalId"),idfa:In(I.idfa,"idfa"),integration:(a=I.integration,a===c?c:f),partner:Hn(I.partner),partner_version:Hn(I.partner_version),opt_out:I.optOut?1:0,sh:_.sh,sw:_.sw,v:"rdt_afb90018",dpm:j.dpm,dpcc:j.dpcc,dprc:j.dprc},U(A)&&(Je.config.em=A),F(O)&&(Je.config.pn=O),Je.useDecimalCurrencyValues=!("useDecimalCurrencyValues"in I)||!!I.useDecimalCurrencyValues,Je.aam=null!==(n=Je.aam)&&void 0!==n?n:{},Qe(),I.disableFirstPartyCookies?qe():Ve(),Je.aam.email?je():xe(),Je.aam.phoneNumber?Ne():Ce(),function(n,r){Pn({type:"Init",config:n,args:r})}(Je.config,t),!Je.isESListenerMounted)if(Je.isESListenerMounted=!0,Dn(),Je._serverConfig)ke(Je._serverConfig);else try{i=Je.pixelId,o="".concat("https://pixel-config.reddit.com/pixels","/").concat(i,"/config"),(u=new XMLHttpRequest).open("GET",o),u.onreadystatechange=function(){if(u.readyState===XMLHttpRequest.DONE&&200===u.status&&""!==u.response)try{ke(JSON.parse(u.response))}catch(n){Cn.error("Malformed JSON response: ".concat(u.response))}},u.send()}catch(n){Cn.error("Pixel Config error: ".concat(n))}return;case v:return Je.enableFirstPartyCookies=!0,void Ve();case d:return void qe();case s:var N=String(t[1]),x=Bn(t[2]);if("email"in x&&(A=In(x.email,"email"),delete x.email,U(A)&&(Je.config.em=A,$())),"phoneNumber"in x&&(O=_n(x.phoneNumber,"phoneNumber"),delete x.phoneNumber,F(O)&&(Je.config.pn=O,K())),"externalId"in x){var C=In(x.externalId,"externalId");delete x.externalId,C&&(Je.config.external_id=C)}if("idfa"in x){var P=In(x.idfa,"idfa");delete x.idfa,P&&(Je.config.idfa=P)}if("aaid"in x){var R=In(x.aaid,"aaid");delete x.aaid,R&&(Je.config.aaid=R)}var M="";"triggerId"in x&&(M=Hn(x.triggerId),delete x.triggerId);var D="";"partner_version"in x&&(D=Hn(x.partner_version),delete x.partner_version);var k=function(n){var r,t={},e=Zn(E);try{for(e.s();!(r=e.n()).done;){var i=r.value;i!==m&&Kn(i,t,n)}}catch(n){e.e(n)}finally{e.f()}return Kn(p,t,n),Kn(w,t,n),Wn(b,t,n),Yn(t)}(x),G=(new He).addParams({id:Je.pixelId,event:N}).addParams(k);return M&&G.addParams({trigger_id:M}),Je.clickId&&Je.clickId.length&&G.addParams({click_id:Je.clickId}),Je.uuid&&Je.uuid.length&&G.addParams({uuid:Je.uuid}),G.addParams(Je.config),A&&G.addParams({em:A}),O&&G.addParams({pn:O}),D&&G.addParams({partner_version:D}),G.addParams({esurl:We()}),Xe(G.toQueryString()),void function(n,r){Pn({type:"EventData",eventData:n,args:r})}(G.params,t)}}for(Je.sendEvent=ni;Je.callQueue.length;){var ri=Je.callQueue.shift();ri&&ni.apply(Je,ri)}}()}(); |