!function(){"use strict";var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=u.ERROR&&(e._log("ERROR",t),e.increment("ERROR"))},warn:function(t){e.logLevel>=u.WARN&&(e._log("WARN",t),e.increment("WARN"))},info:function(t){e.logLevel>=u.INFO&&(e._log("INFO",t),e.increment("INFO"))},debug:function(t){e.logLevel>=u.DEBUG&&(e._log("DEBUG",t),e.increment("DEBUG"))}},e}(),p=function(){function e(){}return e.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}},e}(),l=function(){function e(){}return e.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();case"boolean":return e?"true":"false";default:return}},e.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},e.asBoolean=function(e){switch(typeof e){case"boolean":return e;case"string":switch(e){case"true":return!0;case"false":return!1;default:return}default:return}},e.asActualNumber=function(e){return!isNaN(e)&&isFinite(e)?e:void 0},e}(),h=c.log,f=function(){function e(){}return e.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},e.isEquals=function(e,t){if(null==t)return!1;var r=Object.keys(e);return r.length===Object.keys(t).length&&r.every((function(r){return e[r]===t[r]}))},e.sanitize=function(e){var t={};if(s.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r0&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},e.sanitizeValue=function(e){return"string"==typeof e&&e.length>0&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},e.MAX_IDENTIFIER_TYPE_LENGTH=128,e.MAX_IDENTIFIER_VALUE_LENGTH=512,e}(),d=c.log,v=function(){function e(){}return e.sanitize=function(e){var t={};if(s.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r=this.MAX_PROPERTIES_COUNT){d.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(o,", ").concat(a,"]"));break}if(this.isValidKey(o)){var u=this.sanitizeValue(o,a);s.isNullOrUndefined(u)?d.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(a,"]")):t[o]=u}else d.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(o,"]"))}return t},e.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},e.isValidKey=function(e){return s.isNotNullOrUndefined(e)&&"string"==typeof e&&e.length>0&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},e.sanitizeValue=function(e,t){var r=this;return"string"==typeof e&&e.startsWith(this.SYSTEM_PROPERTY_KEY_PREFIX)?t:this.isValidValue(t)?Array.isArray(t)?t.filter((function(e){return r.isValidElement(e)})):t:null},e.isValidValue=function(e){return!s.isNullOrUndefined(e)&&("string"==typeof e?e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e?!isNaN(e)&&isFinite(e):"boolean"==typeof e||Array.isArray(e))},e.isValidElement=function(e){return!s.isNullOrUndefined(e)&&("string"==typeof e?e.length>0&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},e.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},e.SYSTEM_PROPERTY_KEY_PREFIX="$",e.MAX_PROPERTIES_COUNT=128,e.MAX_PROPERTY_KEY_LENGTH=128,e.MAX_PROPERTY_VALUE_LENGTH=1024,e}(),y=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],g=["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],m=function(){function e(){}return e.nanosToUnit=function(t,r){switch(r){case"nanoseconds":return t;case"microseconds":return t/(e.C1/e.C0);case"milliseconds":return t/(e.C2/e.C0);case"seconds":return t/(e.C3/e.C0);case"minutes":return t/(e.C4/e.C0);case"hours":return t/(e.C5/e.C0);case"days":return t/(e.C6/e.C0)}},e.microsToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C1/e.C0);case"milliseconds":return t/(e.C2/e.C1);case"microseconds":return t;case"seconds":return t/(e.C3/e.C1);case"minutes":return t/(e.C4/e.C1);case"hours":return t/(e.C5/e.C1);case"days":return t/(e.C6/e.C1)}},e.millisToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C2/e.C0);case"microseconds":return t*(e.C2/e.C1);case"milliseconds":return t;case"seconds":return t/(e.C3/e.C2);case"minutes":return t/(e.C4/e.C2);case"hours":return t/(e.C5/e.C2);case"days":return t/(e.C6/e.C2)}},e.secondsToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C3/e.C0);case"microseconds":return t*(e.C3/e.C1);case"milliseconds":return t*(e.C3/e.C2);case"seconds":return t;case"minutes":return t/(e.C4/e.C3);case"hours":return t/(e.C5/e.C3);case"days":return t/(e.C6/e.C3)}},e.minutesToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C4/e.C0);case"microseconds":return t*(e.C4/e.C1);case"milliseconds":return t*(e.C4/e.C2);case"seconds":return t*(e.C4/e.C3);case"minutes":return t;case"hours":return t/(e.C5/e.C4);case"days":return t/(e.C6/e.C4)}},e.hoursToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C5/e.C0);case"microseconds":return t*(e.C5/e.C1);case"milliseconds":return t*(e.C5/e.C2);case"seconds":return t*(e.C5/e.C3);case"minutes":return t*(e.C5/e.C4);case"hours":return t;case"days":return t/(e.C6/e.C5)}},e.daysToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C6/e.C0);case"microseconds":return t*(e.C6/e.C1);case"milliseconds":return t*(e.C6/e.C2);case"seconds":return t*(e.C6/e.C3);case"minutes":return t*(e.C6/e.C4);case"hours":return t*(e.C6/e.C5);case"days":return t}},e.dayOfWeek=function(e){var t=new Date(e).getUTCDay();return g[(t+6)%7]},e.midnight=function(e){var t=new Date(e);return Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},e.C0=1,e.C1=1e3*e.C0,e.C2=1e3*e.C1,e.C3=1e3*e.C2,e.C4=60*e.C3,e.C5=60*e.C4,e.C6=24*e.C5,e.converter={nanoseconds:e.nanosToUnit,microseconds:e.microsToUnit,milliseconds:e.millisToUnit,seconds:e.secondsToUnit,minutes:e.minutesToUnit,hours:e.hoursToUnit,days:e.daysToUnit},e}(),E=function(){function e(){}return e.prototype.tick=function(){return 1e3*Date.now()},e.prototype.currentMillis=function(){return Date.now()},e.instance=new e,e}(),w=function(){function e(){this.parameters={}}return e.prototype.get=function(e,t){return t},e}(),b=function(){function e(e){this.parameters=e}return e.prototype.get=function(e,t){var r=this.parameters[e];return s.isNullOrUndefined(r)?t:s.isNullOrUndefined(t)||typeof r==typeof t?r:t},e}(),T="X-HACKLE-SDK-KEY",I="X-HACKLE-SDK-NAME",A="X-HACKLE-SDK-VERSION",N="X-HACKLE-SDK-TIME",_="11.56.0",O="_hackle_hid",M="_hackle_id",P=18e5,S="_hackle_session_id",C="_hackle_last_event_ts",R=-1,U=6e4,k="_hackle_uid",x="_hackle_did",D="_hackle_mkt",L="hackle-workspace-config",F=864e5,V=c.log;function K(e,t){var r=e.find((function(e){return e===t||e.toLowerCase()===t.toLowerCase()}));return r||V.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),r}function B(e,t){if(!s.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n0)}(i)?i:null},ie=function(){function e(e){this.conditions=e}return e.fromJson=function(t,r){return new e(a.mapNotNullOrUndefined(t.conditions,(function(e){return oe.fromJson(e,r)})))},e.prototype.toJson=function(){return{conditions:this.conditions.map((function(e){return e.toJson()}))}},e}(),oe=function(){function e(e,t){this.key=e,this.match=t}return e.fromJson=function(t,r){var n=se.fromJson(t.key);if(n&&r.supports(n.type)){var i=ae.fromJson(t.match);return i&&new e(n,i)}},e.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}},e}(),se=function(){function e(e,t){this.type=e,this.name=t}return e.fromJson=function(t){var r=K(Ne,t.type);return r&&new e(r,t.name)},e.prototype.toJson=function(){return{type:this.type,name:this.name}},e}(),ae=function(){function e(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}return e.fromJson=function(t){var r=K(be,t.type),n=K(Ie,t.operator),i=K(Te,t.valueType);return r&&n&&i&&new e(r,n,i,t.values)},e.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}},e}(),ue=function(){function e(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}return e.fromJson=function(t){var r=K(Ae,t.type);return r&&new e(r,t.variationId,t.bucketId)},e}(),ce=function(){function e(e,t){this.target=e,this.action=t}return e.fromJson=function(t,r){var n=ie.fromJson(t.target,r),i=ue.fromJson(t.action);return n&&i&&new e(n,i)},e}(),pe=function(){function e(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}return e.fromJson=function(t){var r=K(_e,t.type);return r&&new e(t.id,t.key,r,a.mapNotNullOrUndefined(t.targets,(function(e){return ie.fromJson(e,Oe.SEGMENT)})))},e}(),le=function(){function e(e,t,r){this.id=e,this.bucketId=t,this.groups=r}return e.fromJson=function(t){return new e(t.id,t.bucketId,t.groups.map((function(e){return he.fromJson(e)})))},e.prototype.getGroupOrNull=function(e){return this.groups.find((function(t){return t.id===e}))},e}(),he=function(){function e(e,t){this.id=e,this.experiments=t}return e.fromJson=function(t){return new e(t.id,t.experiments)},e}(),fe=function(){function e(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}return e.fromJson=function(t){var r=K(Te,t.type),n=a.mapNotNullOrUndefined(t.targetRules,(function(e){return de.fromJson(e,Oe.PROPERTY)})),i=ve.fromJson(t.defaultValue);return r&&new e(t.id,t.key,r,t.identifierType,n,i)},e}(),de=function(){function e(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}return e.fromJson=function(t,r){var n=ie.fromJson(t.target,r);return n&&new e(t.key,t.name,n,t.bucketId,ve.fromJson(t.value))},e}(),ve=function(){function e(e,t){this.id=e,this.rawValue=t}return e.fromJson=function(t){return new e(t.id,t.value)},e}();function ye(e,t){return e-t}var ge,me=function(){function e(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}return e.tryParse=function(t){if(t instanceof e)return t;var r=e.regExp.exec(t);if(r){r[0];var n=r[1],i=r[2],o=void 0===i?"0":i,s=r[3],a=void 0===s?"0":s,u=r[4],c=r[5];return new e(new Ee(parseInt(n,10),parseInt(o,10),parseInt(a,10)),we.parse(u),we.parse(c))}},e.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},e.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},e.prototype.isGreaterThan=function(e){return this.compareTo(e)>0},e.prototype.isGreaterThanOrEqualTo=function(e){return this.compareTo(e)>=0},e.prototype.isLessThan=function(e){return this.compareTo(e)<0},e.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},e.regExp=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,e}(),Ee=function(){function e(e,t,r){this.major=e,this.minor=t,this.patch=r}return e.prototype.compareTo=function(e){return ye(this.major,e.major)||ye(this.minor,e.minor)||ye(this.patch,e.patch)},e}(),we=function(){function e(e){this.identifiers=e}return e.parse=function(t){return t?new e(t.split(".")):e.EMPTY},e.prototype.isEmpty=function(){return 0===this.identifiers.length},e.prototype.isNotEmpty=function(){return!this.isEmpty()},e.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},e.prototype.compareIdentifiers=function(t){for(var r=Math.min(this.identifiers.length,t.identifiers.length),n=0;n=e})),(function(e){return e.count}))},e}(),Nt=function(){function e(e){this.name=e,this._tags={},this.name=e}return e.prototype.tags=function(e){var t=this;return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t._tags[r]=n})),this},e.prototype.tag=function(e,t){return this._tags[e]=t,this},e.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},e}(),_t=function(){function e(e){this._clock=e,this.startTime=this._clock.tick()}return e.start=function(t){return void 0===t&&(t=e.defaultClock),new e(t)},e.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},e.defaultClock=new E,e}();var Ot,Mt=function(){function e(e){this.name=e,this._tags={}}return e.prototype.tags=function(e){var t=this;return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t._tags[r]=n})),this},e.prototype.tag=function(e,t){return this._tags[e]=t,this},e.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})},e}();var Pt=new Uint8Array(16);function St(){if(!Ot&&!(Ot="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ot(Pt)}var Ct=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Rt(e){return"string"==typeof e&&Ct.test(e)}for(var Ut=[],kt=0;kt<256;++kt)Ut.push((kt+256).toString(16).substr(1));function xt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Ut[e[t+0]]+Ut[e[t+1]]+Ut[e[t+2]]+Ut[e[t+3]]+"-"+Ut[e[t+4]]+Ut[e[t+5]]+"-"+Ut[e[t+6]]+Ut[e[t+7]]+"-"+Ut[e[t+8]]+Ut[e[t+9]]+"-"+Ut[e[t+10]]+Ut[e[t+11]]+Ut[e[t+12]]+Ut[e[t+13]]+Ut[e[t+14]]+Ut[e[t+15]]).toLowerCase();if(!Rt(r))throw TypeError("Stringified UUID is invalid");return r}function Dt(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(n),s.set(e,n.length),(s=r(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return xt(s)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function Lt(e){return 14+(e+64>>>9<<4)+1}function Ft(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function Vt(e,t,r,n,i,o){return Ft((s=Ft(Ft(t,e),Ft(n,o)))<<(a=i)|s>>>32-a,r);var s,a}function Kt(e,t,r,n,i,o,s){return Vt(t&r|~t&n,e,t,i,o,s)}function Bt(e,t,r,n,i,o,s){return Vt(t&n|r&~n,e,t,i,o,s)}function Ht(e,t,r,n,i,o,s){return Vt(t^r^n,e,t,i,o,s)}function Gt(e,t,r,n,i,o,s){return Vt(r^(t|~n),e,t,i,o,s)}function jt(e,t,r){var n=(e=e||{}).random||(e.rng||St)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return xt(n)}function Wt(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function Yt(e,t){return e<>>32-t}Dt("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r>5]>>>i%32&255,s=parseInt(n.charAt(o>>>4&15)+n.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<>>0;E=m,m=g,g=Yt(y,30)>>>0,y=v,v=T}r[0]=r[0]+v>>>0,r[1]=r[1]+y>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+E>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}));var Jt=function(){function e(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}return e.prototype.values=function(){return Array.from(this.data.values())},e.prototype.keys=function(){return Array.from(this.data.keys())},e.prototype.get=function(e){var t=this,r=this.keys().find((function(r){return t.compareFn(r,e)}));return r?this.data.get(r):void 0},e.prototype.has=function(e){return void 0!==this.get(e)},e.prototype.add=function(e,t){var r=t;return r||(r=e),this.data.set(e,r),this},e.prototype.delete=function(e){if(this.has(e)){var t=this.get(e);return this.data.delete(e),t}},e.prototype.forEach=function(e){this.data.forEach(e)},e.prototype.filter=function(t){for(var r=new e(this.compareFn),n=0,i=this.entries();n0)},e}(),lr=function(){function e(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}return e.builder=function(){return new hr},e.get=function(t){return e.builder().url(t).build()},e.prototype.toBuilder=function(){return new hr(this)},e}(),hr=function(){function e(e){var t,r,n,i,o,s,a;this._url=null!==(t=null==e?void 0:e.url)&&void 0!==t?t:null,this._method=null!==(r=null==e?void 0:e.method)&&void 0!==r?r:"GET",this._body=null!==(n=null==e?void 0:e.body)&&void 0!==n?n:null,this._headers=null!==(o=null===(i=null==e?void 0:e.headers)||void 0===i?void 0:i.toBuilder())&&void 0!==o?o:dr.builder(),this._timeoutMillis=null!==(a=null===(s=null==e?void 0:e.options)||void 0===s?void 0:s.timeoutMillis)&&void 0!==a?a:null}return e.prototype.url=function(e){return this._url=e,this},e.prototype.method=function(e){return this._method=e,this},e.prototype.body=function(e){return this._body=e,this},e.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},e.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},e.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new lr(this._url,this._method,this._body,this._headers.build(),e)},e}(),fr=function(){function e(e,t,r){this.statusCode=e,this.body=t,this.headers=r}return e.ok=function(t,r){return e.of(200,t,r)},e.of=function(t,r,n){return new e(t,null!=r?r:null,null!=n?n:dr.empty())},e.prototype.isSuccessful=function(){return this.statusCode>=200&&this.statusCode<300},e.prototype.isClientError=function(){return this.statusCode>=400&&this.statusCode<500},e.prototype.isNotModified=function(){return 304===this.statusCode},e}(),dr=function(){function e(e){this.headers=e}return e.empty=function(){return new e(new Map)},e.builder=function(){return new vr(new Map)},e.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t0},r.prototype.dispatch=function(e,t){var r=this.createRequest(e);this.execute(r,t).catch((function(e){return c.log.debug("Failed to flushing metrics: ".concat(e))}))},r.prototype.createRequest=function(e){return lr.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},r.prototype.execute=function(e,t){return t?this.synchronousTransport.send(e):this.transport.send(e)},r.prototype.batch=function(e){return{metrics:e.map((function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:s.fromMap(a.associate(e.measure(),(function(e){return[e.field,e.value]})))}}))}},r.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.publish(!0);case"visible":case"pageshow":case"blur":case"locationChange":case"focus":return}},r}(rr),gr=function(){function e(){}return e.experiment=function(e,t,r){var n=cr.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(n)},e.featureFlag=function(e,t,r){var n=cr.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(n)},e.remoteConfig=function(e,t,r){var n=cr.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(n)},e}(),mr=function(){function e(){}return e.record=function(t,r,n){var i=cr.timer("api.call",{operation:t,success:e.success(n)});r.stop(i)},e.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())},e}(),Er=function(){function e(){}return e.decide=function(e,t,r,n){if(s.isNullOrUndefined(r))return this.decision(e,t,"NULL",r,n);switch(typeof r){case"string":return this.decision(e,t,"STRING",r,n);case"number":return this.decision(e,t,"NUMBER",r,n);case"boolean":return this.decision(e,t,"BOOLEAN",r,n);default:return this.decision(e,t,"UNKNOWN",r,n)}},e.decision=function(e,t,r,n,i){return s.isNullOrUndefined(t)?H.of(n,J.INVALID_INPUT):e.remoteConfig(t,i,r,n)},e}(),wr=c.log,br=function(){function e(e,t,r){this.core=e,this.userManager=t,this.user=r}return e.prototype.get=function(e,t){var r,n=_t.start();try{r=this.decide(e,t)}catch(n){wr.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=H.of(t,J.EXCEPTION)}return gr.remoteConfig(n,e,r),r.value},e.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Er.decide(this.core,e,t,r)},e}(),Tr=function(){function e(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}return e.prototype.contains=function(e){return this._properties.has(e)},e.prototype.remove=function(e){var t=this;return e instanceof Map&&e.forEach((function(e,r){t.remove(r)})),"string"==typeof e&&this._properties.delete(e),this},e.prototype.compute=function(e,t){var r=this._properties.get(e),n=t(r);null!==n?this.add(e,n):(null!==r||this.contains(e))&&this.remove(e)},e.prototype.add=function(e,t,r){if(void 0===r&&(r=!1),r&&this.contains(e))return this;if(this._properties.size>=this.MAX_PROPERTIES_COUNT)return this;if("string"==typeof e&&e.length>this.MAX_PROPERTY_KEY_LENGTH)return this;var n=v.sanitizeValue(e,t);return s.isNullOrUndefined(n)||this._properties.set(e,n),this},e.prototype.addProperties=function(e,t){var r=this;return void 0===t&&(t=!1),e.forEach((function(e,n){r.add(n,e,t)})),this},e.prototype.build=function(){return this._properties},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.UNSET="$unset",e.INCREMENT="$increment",e.APPEND="$append",e.APPEND_ONCE="$appendOnce",e.PREPEND="$prepend",e.PREPEND_ONCE="$prependOnce",e.REMOVE="$remove",e.CLEAR_ALL="$clearAll"}(or||(or={}));var Ir=function(){function e(){}return e.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Tr).addProperties(e).addProperties(t).build()},e}(),Ar=function(){function e(){}return e.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Tr).addProperties(e).addProperties(t,!0).build()},e}(),Nr=function(){function e(){}return e.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new Tr).addProperties(e).remove(t).build()},e}(),_r=function(){function e(){}return e.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new Tr;return n.addProperties(e),t.forEach((function(e,t){n.compute(t,(function(t){return r.increment(t,e)}))})),n.build()},e.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},e}(),Or=function(){function e(){}return e.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new Tr;return n.addProperties(e),t.forEach((function(e,t){n.compute(t,(function(t){return r.compute(t,e)}))})),n.build()},e.prototype.compute=function(e,t){var r=this.toArray(e),n=this.toArray(t);return this.operateArray(r,n)},e.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},e.prototype.contains=function(e,t){return e.includes(t)},e.prototype.prepend=function(e,t,r){return void 0===r&&(r=!1),r&&this.contains(t,e)?t:o([e],t,!0)},e.prototype.append=function(e,t,r){return void 0===r&&(r=!1),r&&this.contains(e,t)?e:o(o([],e,!0),[t],!1)},e}(),Mr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.operateArray=function(e,t){var r=this;return t.reduce((function(e,t){return r.append.bind(r)(e,t)}),e)},r}(Or),Pr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},r.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},r}(Or),Sr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.operateArray=function(e,t){var r=this;return t.reduceRight((function(e,t){return r.prepend.bind(r)(t,e)}),e)},r}(Or),Cr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.operateArray=function(e,t){var r=this;return t.reduce(this.appendOnce.bind(this),[]).reduceRight((function(e,t){return r.prependOnce.bind(r)(t,e)}),e)},r.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},r.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},r}(Or),Rr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},r.prototype.remove=function(e,t){return e.filter((function(e){return e!==t}))},r}(Or),Ur=function(){function e(){}return e.prototype.operate=function(e,t){return new Map},e}(),kr=function(){function e(){}return e.get=function(e){switch(e){case or.SET:return new Ir;case or.SET_ONCE:return new Ar;case or.UNSET:return new Nr;case or.INCREMENT:return new _r;case or.APPEND:return new Mr;case or.APPEND_ONCE:return new Pr;case or.PREPEND:return new Sr;case or.PREPEND_ONCE:return new Cr;case or.CLEAR_ALL:return new Ur;case or.REMOVE:return new Rr}},e}(),xr=function(){function e(){this.operations=new Map}return e.prototype.set=function(e,t){return this.add(or.SET,e,t)},e.prototype.setOnce=function(e,t){return this.add(or.SET_ONCE,e,t)},e.prototype.unset=function(e){return this.add(or.UNSET,e,"-")},e.prototype.increment=function(e,t){return this.add(or.INCREMENT,e,t)},e.prototype.append=function(e,t){return this.add(or.APPEND,e,t)},e.prototype.appendOnce=function(e,t){return this.add(or.APPEND_ONCE,e,t)},e.prototype.prepend=function(e,t){return this.add(or.PREPEND,e,t)},e.prototype.prependOnce=function(e,t){return this.add(or.PREPEND_ONCE,e,t)},e.prototype.remove=function(e,t){return this.add(or.REMOVE,e,t)},e.prototype.clearAll=function(){return this.add(or.CLEAR_ALL,"clearAll","-")},e.prototype.build=function(){var e=Array.from(this.operations.entries()).map((function(e){return[e[0],e[1].build()]}));return new Dr(new Map(e))},e.prototype.containsKey=function(e){return Array.from(this.operations.entries()).some((function(t){return t[0],t[1].contains(e)}))},e.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new Tr);var n=this.operations.get(e);return null==n||n.add(t,r),this},e}(),Dr=function(){function e(e){this.operations=null!=e?e:new Map}return e.prototype.operate=function(e){var t=e;return this.operations.forEach((function(e,r){t=kr.get(r).operate(t,e)})),t},e.prototype.toEvent=function(){var e={key:"$properties"};return this.operations.forEach((function(t,n){var i,o;e.properties=r(r({},e.properties),((i={})[n]=r(r({},null===(o=e.properties)||void 0===o?void 0:o[n]),v.sanitize(s.fromMap(t))),i))})),e},e.prototype.toSecuredEvent=function(){var e={key:"$secured_properties"};return this.operations.forEach((function(t,n){var i,o;e.properties=r(r({},e.properties),((i={})[n]=r(r({},null===(o=e.properties)||void 0===o?void 0:o[n]),v.sanitize(s.fromMap(t))),i))})),e},e.prototype.toRecord=function(){var e={};return this.operations.forEach((function(t,r){var n={};t.forEach((function(e,t){n[t]=e})),e[r]=n})),e},e}(),Lr=function(){function e(){}return e.timeout=function(e,t){return new Promise((function(r,n){setTimeout((function(){return n(new Error("timeout (".concat(t,"ms)")))}),t),e.then(r,n)}))},e}(),Fr=function(){function e(e,t,r,n,i,o,s,a,u){void 0===e&&(e=""),void 0===t&&(t=""),void 0===r&&(r=""),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a=""),void 0===u&&(u={}),this.pagePath=e,this.host=t,this.hostname=r,this.url=n,this.referrer=i,this.queryParameter=o,this.protocol=s,this.pageName=a,this.properties=u}return e.prototype.isEquals=function(e){return this.url===e.url},e.createWithCurrentPage=function(t,r){return"undefined"==typeof window||"undefined"==typeof document?new e:new e(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol,null!=t?t:window.document.title,null!=r?r:{})},e}(),Vr=function(){function e(e){this.value=e}return e.create=function(t){return new e(t)},e.prototype.getValue=function(){return this.value},e}(),Kr=function(){function e(){}return e.toPublic=function(e){return{key:e.key}},e}(),Br=function(){function e(){}return e.toPublic=function(e){return{close:e.close.bind(e),inAppMessage:Kr.toPublic(e.context.inAppMessage)}},e}(),Hr=["LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE","WEB_LINK"],Gr=["CLOSE","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW_AND_CLOSE"],jr=["LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE"],Wr=["LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Yr=function(){function e(){}return e.toPublic=function(e){var t,r=e.type,n=Hr.some((function(e){return e===r})),i=Gr.some((function(e){return e===r})),o=jr.some((function(e){return e===r})),s=Wr.some((function(e){return e===r}));return{type:n?"LINK":"CLOSE",close:i?{hideDurationMillis:e.hideDurationMillis}:void 0,link:n?{url:null!==(t=e.value)&&void 0!==t?t:"",target:s?"NEW_WINDOW":o?"NEW_TAB":"CURRENT",shouldCloseAfterLink:i}:void 0}},e.toInternalActionType=function(e){var t;return"CLOSE"===e.type?s.isNotNullOrUndefined(null===(t=e.close)||void 0===t?void 0:t.hideDurationMillis)?"HIDDEN":"CLOSE":e.link?"NEW_WINDOW"===e.link.target?e.link.shouldCloseAfterLink?"LINK_NEW_WINDOW_AND_CLOSE":"LINK_NEW_WINDOW":"NEW_TAB"===e.link.target?e.link.shouldCloseAfterLink?"LINK_NEW_TAB_AND_CLOSE":"LINK_NEW_TAB":e.link.shouldCloseAfterLink?"LINK_AND_CLOSE":"WEB_LINK":"WEB_LINK"},e.getActionValue=function(e){var t,r,n;return"LINK"===e.type?null===(t=e.link)||void 0===t?void 0:t.url:"CLOSE"===e.type?null===(n=null===(r=e.close)||void 0===r?void 0:r.hideDurationMillis)||void 0===n?void 0:n.toString():void 0},e.toInternal=function(t){return new dt("CLICK",e.toInternalActionType(t),e.getActionValue(t))},e}(),Jr=c.log,zr=function(){function e(e,t,r,n,i,o,s,a,u,c){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.piiEventManager=i,this.fetchThrottler=o,this.pageManager=s,this.inAppMessageUi=a,this.optOutManager=u,this.devTools=c,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.setCurrentPage=this.setCurrentPage.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.bind(this),this.isOptOutTracking=this.isOptOutTracking.bind(this),this.setOptOutTracking=this.setOptOutTracking.bind(this),this.initialization=this.initialize()}return e.prototype.initialize=function(){return n(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,3,4]),Jr.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return t.sent(),Jr.debug("HackleClient initialized"),[3,4];case 2:throw e=t.sent(),Jr.error("HackleClient initialize failed: ".concat(e)),e;case 3:return this.initialized=!0,[7];case 4:return[2]}}))}))},e.prototype.getSessionId=function(){return this.sessionManager.sessionId},e.prototype.getUser=function(){return this.userManager.currentUser},e.prototype.setUser=function(e){try{var t=ne(e);if(!t)return Jr.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch((function(){}))}catch(e){return Jr.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},e.prototype.setUserId=function(e){try{var t=void 0;if(s.isNullOrUndefined(e))t=this.userManager.setUserId(void 0);else{var r=f.sanitizeValue(e);if(!r)return Jr.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch((function(){}))}catch(e){return Jr.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},e.prototype.setDeviceId=function(e){try{var t=f.sanitizeValue(e);if(!t)return Jr.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch((function(){}))}catch(e){return Jr.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},e.prototype.setUserProperty=function(e,t){var r=(new xr).set(e,t).build();return this.updateUserProperties(r)},e.prototype.setUserProperties=function(e){try{var t=v.sanitize(e),r=new xr;return Object.entries(t).forEach((function(e){var t=e[0],n=e[1];r.set(t,n)})),this.updateUserProperties(r.build())}catch(e){return Jr.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},e.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),this.core.flush(!1),Promise.resolve()}catch(e){return Jr.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},e.prototype.updatePushSubscriptions=function(e){try{var t=e.toEvent("$push_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Jr.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},e.prototype.updateSmsSubscriptions=function(e){try{var t=e.toEvent("$sms_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Jr.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},e.prototype.updateKakaoSubscriptions=function(e){try{var t=e.toEvent("$kakao_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Jr.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},e.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new xr).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch((function(){}))}catch(e){return Jr.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},e.prototype.setPhoneNumber=function(e){try{if("string"!=typeof e)return Jr.error("Invalid value ".concat(e,": phoneNumber value type must be string.")),Promise.resolve();var t=Vr.create(e),r=E.instance.currentMillis();return this.piiEventManager.setPhoneNumber(t,r),this.core.flush(!1),Promise.resolve()}catch(e){return Jr.error("Unexpected exception occurred while setting phone number: ".concat(e)),Promise.resolve()}},e.prototype.unsetPhoneNumber=function(){try{var e=E.instance.currentMillis();return this.piiEventManager.unsetPhoneNumber(e),this.core.flush(!1),Promise.resolve()}catch(e){return Jr.error("Unexpected exception occurred while unsetting phone number: ".concat(e)),Promise.resolve()}},e.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},e.prototype.variationDetail=function(e,t,r){var n=r||"A",i=_t.start(),o=function(r){try{var i=r.userManager.resolve(t);return r.core.experiment(e,i,n)}catch(t){return Jr.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(n,"] : ").concat(t)),G.of(n,J.EXCEPTION)}}(this);return gr.experiment(i,e,o),o},e.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},e.prototype.featureFlagDetail=function(e,t){var r=_t.start(),n=function(r){try{var n=r.userManager.resolve(t);return r.core.featureFlag(e,n)}catch(t){return Jr.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),j.off(J.EXCEPTION)}}(this);return gr.featureFlag(r,e,n),n},e.prototype.track=function(e,t){try{Jr.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Jr.error("Unexpected exception while tracking event: ".concat(e))}},e.prototype.trackPageView=function(e){Jr.warn("trackPageView is deprecated and do nothing.")},e.prototype.setCurrentPage=function(e){var t=Fr.createWithCurrentPage(e.pageName,e.properties);this.pageManager.setCurrentPage(t)},e.prototype.remoteConfig=function(e){return new br(this.core,this.userManager,e)},e.prototype.onReady=function(e,t){void 0===t&&(t=3e3),this.onInitialized({timeout:t}).finally((function(){return e()}))},e.prototype.getExperiment=function(e){try{return this.core.getExperiment(e)}catch(t){return void Jr.error('"Unexpected exception while get experiment['.concat(e,"]"))}},e.prototype.onInitialized=function(e){var t;return n(this,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:if(this.initialized)return[2,{success:!0}];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Lr.timeout(this.initialization,null!==(t=null==e?void 0:e.timeout)&&void 0!==t?t:3e3)];case 2:return n.sent(),[2,{success:!0}];case 3:return r=n.sent(),Jr.error("Failed to onInitialized: ".concat(r)),[2,{success:!1}];case 4:return[2]}}))}))},e.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},e.prototype.showUserExplorer=function(){var e;(null===(e=this.devTools)||void 0===e?void 0:e.userExplorer)?(Jr.debug("UserExplorer opened."),cr.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Jr.error("UserExplorer is not provided")},e.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Jr.warn("There is no active HackleDevtools.")},e.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute((function(){return e.synchronizer.sync()}),(function(){return Promise.resolve()}))},e.prototype.setInAppMessageListener=function(e){this.inAppMessageUi.setListener(e)},e.prototype.getDisplayedInAppMessageView=function(){return this.inAppMessageUi.currentMessageView?Br.toPublic(this.inAppMessageUi.currentMessageView):null},e.prototype.isOptOutTracking=function(){try{return this.optOutManager.isOptOutTracking}catch(e){return Jr.error("Unexpected exception while get optOutTracking: ".concat(e)),!1}},e.prototype.setOptOutTracking=function(e){try{this.optOutManager.setOptOutTracking(e)}catch(e){Jr.error("Unexpected exception while set optOutTracking: ".concat(e))}},e.prototype.close=function(){Jr.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},e}(),qr=c.log,Xr=function(){function e(e,t,r){this.invocationProcessor=e,this.user=t,this.browserPropertyProvider=r}return e.prototype.get=function(e,t){var r=typeof t;try{var n={command:"remoteConfig",parameters:{defaultValue:t,key:e,valueType:r,user:this.user},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(r){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(r){return qr.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(r)),t}},e}(),$r=function(){function e(){}return e.tryParse=function(e){try{return new URL(e)}catch(e){return}},e.removePathnameTrailingSlash=function(t){var r=t instanceof URL?t:e.tryParse(t);if(!r)return String(t);if(r.pathname.endsWith("/")){r.pathname=r.pathname.replace(/\/+$/,"")}return r.href},e.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},e.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},e.decodeURIOrOriginal=function(e){try{return decodeURI(e)}catch(t){return e}},e.decodeURIComponentOrOriginal=function(e){try{return decodeURIComponent(e)}catch(t){return e}},e}(),Zr=function(){function e(e){void 0===e&&(e={days:0,isCrossSubdomain:!1,isSecure:!1}),this.options=e}return e.extractDomain=function(e){var t=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,r=e.split("."),n=r[r.length-1];(n.length>4||"com"===n||"org"===n)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i);var i=e.match(t);return i?i[0]:""},e.prototype.getItem=function(e){for(var t,r=e+"=",n=document.cookie.split(";"),i=0;i0&&Nn[0]<4?1:+(Nn[0]+Nn[1])),!_n&&ii&&(!(Nn=ii.match(/Edge\/(\d+)/))||Nn[1]>=74)&&(Nn=ii.match(/Chrome\/(\d+)/))&&(_n=+Nn[1]);var ci=_n,pi=ci,li=vn,hi=!!Object.getOwnPropertySymbols&&!li((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&pi&&pi<41})),fi=hi&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,di=ei,vi=zn,yi=ti,gi=Object,mi=fi?function(e){return"symbol"==typeof e}:function(e){var t=di("Symbol");return vi(t)&&yi(t.prototype,gi(e))},Ei=String,wi=function(e){try{return Ei(e)}catch(e){return"Object"}},bi=zn,Ti=wi,Ii=TypeError,Ai=function(e){if(bi(e))return e;throw Ii(Ti(e)+" is not a function")},Ni=Ai,_i=function(e,t){var r=e[t];return null==r?void 0:Ni(r)},Oi=wn,Mi=zn,Pi=Xn,Si=TypeError,Ci={exports:{}},Ri=fn,Ui=Object.defineProperty,ki=function(e,t){try{Ui(Ri,e,{value:t,configurable:!0,writable:!0})}catch(r){Ri[e]=t}return t},xi=ki,Di="__core-js_shared__",Li=fn[Di]||xi(Di,{}),Fi=Li;(Ci.exports=function(e,t){return Fi[e]||(Fi[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Vi=jn,Ki=Object,Bi=function(e){return Ki(Vi(e))},Hi=Bi,Gi=Un({}.hasOwnProperty),ji=Object.hasOwn||function(e,t){return Gi(Hi(e),t)},Wi=Un,Yi=0,Ji=Math.random(),zi=Wi(1..toString),qi=function(e){return"Symbol("+(void 0===e?"":e)+")_"+zi(++Yi+Ji,36)},Xi=fn,$i=Ci.exports,Zi=ji,Qi=qi,eo=hi,to=fi,ro=$i("wks"),no=Xi.Symbol,io=no&&no.for,oo=to?no:no&&no.withoutSetter||Qi,so=function(e){if(!Zi(ro,e)||!eo&&"string"!=typeof ro[e]){var t="Symbol."+e;eo&&Zi(no,e)?ro[e]=no[e]:ro[e]=to&&io?io(t):oo(t)}return ro[e]},ao=wn,uo=Xn,co=mi,po=_i,lo=function(e,t){var r,n;if("string"===t&&Mi(r=e.toString)&&!Pi(n=Oi(r,e)))return n;if(Mi(r=e.valueOf)&&!Pi(n=Oi(r,e)))return n;if("string"!==t&&Mi(r=e.toString)&&!Pi(n=Oi(r,e)))return n;throw Si("Can't convert object to primitive value")},ho=TypeError,fo=so("toPrimitive"),vo=function(e,t){if(!uo(e)||co(e))return e;var r,n=po(e,fo);if(n){if(void 0===t&&(t="default"),r=ao(n,e,t),!uo(r)||co(r))return r;throw ho("Can't convert object to primitive value")}return void 0===t&&(t="number"),lo(e,t)},yo=mi,go=function(e){var t=vo(e,"string");return yo(t)?t:t+""},mo=Xn,Eo=fn.document,wo=mo(Eo)&&mo(Eo.createElement),bo=function(e){return wo?Eo.createElement(e):{}},To=bo,Io=!yn&&!vn((function(){return 7!=Object.defineProperty(To("div"),"a",{get:function(){return 7}}).a})),Ao=yn,No=wn,_o=bn,Oo=On,Mo=Jn,Po=go,So=ji,Co=Io,Ro=Object.getOwnPropertyDescriptor;dn.f=Ao?Ro:function(e,t){if(e=Mo(e),t=Po(t),Co)try{return Ro(e,t)}catch(e){}if(So(e,t))return Oo(!No(_o.f,e,t),e[t])};var Uo={},ko=yn&&vn((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xo=Xn,Do=String,Lo=TypeError,Fo=function(e){if(xo(e))return e;throw Lo(Do(e)+" is not an object")},Vo=yn,Ko=Io,Bo=ko,Ho=Fo,Go=go,jo=TypeError,Wo=Object.defineProperty,Yo=Object.getOwnPropertyDescriptor,Jo="enumerable",zo="configurable",qo="writable";Uo.f=Vo?Bo?function(e,t,r){if(Ho(e),t=Go(t),Ho(r),"function"==typeof e&&"prototype"===t&&"value"in r&&qo in r&&!r.writable){var n=Yo(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:zo in r?r.configurable:n.configurable,enumerable:Jo in r?r.enumerable:n.enumerable,writable:!1})}return Wo(e,t,r)}:Wo:function(e,t,r){if(Ho(e),t=Go(t),Ho(r),Ko)try{return Wo(e,t,r)}catch(e){}if("get"in r||"set"in r)throw jo("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Xo=Uo,$o=On,Zo=yn?function(e,t,r){return Xo.f(e,t,$o(1,r))}:function(e,t,r){return e[t]=r,e},Qo={exports:{}},es=yn,ts=ji,rs=Function.prototype,ns=es&&Object.getOwnPropertyDescriptor,is=ts(rs,"name"),os={EXISTS:is,PROPER:is&&"something"===function(){}.name,CONFIGURABLE:is&&(!es||es&&ns(rs,"name").configurable)},ss=zn,as=Li,us=Un(Function.toString);ss(as.inspectSource)||(as.inspectSource=function(e){return us(e)});var cs,ps,ls,hs=as.inspectSource,fs=zn,ds=hs,vs=fn.WeakMap,ys=fs(vs)&&/native code/.test(ds(vs)),gs=Ci.exports,ms=qi,Es=gs("keys"),ws=function(e){return Es[e]||(Es[e]=ms(e))},bs={},Ts=ys,Is=fn,As=Un,Ns=Xn,_s=Zo,Os=ji,Ms=Li,Ps=ws,Ss=bs,Cs="Object already initialized",Rs=Is.TypeError,Us=Is.WeakMap;if(Ts||Ms.state){var ks=Ms.state||(Ms.state=new Us),xs=As(ks.get),Ds=As(ks.has),Ls=As(ks.set);cs=function(e,t){if(Ds(ks,e))throw new Rs(Cs);return t.facade=e,Ls(ks,e,t),t},ps=function(e){return xs(ks,e)||{}},ls=function(e){return Ds(ks,e)}}else{var Fs=Ps("state");Ss[Fs]=!0,cs=function(e,t){if(Os(e,Fs))throw new Rs(Cs);return t.facade=e,_s(e,Fs,t),t},ps=function(e){return Os(e,Fs)?e[Fs]:{}},ls=function(e){return Os(e,Fs)}}var Vs={set:cs,get:ps,has:ls,enforce:function(e){return ls(e)?ps(e):cs(e,{})},getterFor:function(e){return function(t){var r;if(!Ns(t)||(r=ps(t)).type!==e)throw Rs("Incompatible receiver, "+e+" required");return r}}},Ks=vn,Bs=zn,Hs=ji,Gs=yn,js=os.CONFIGURABLE,Ws=hs,Ys=Vs.enforce,Js=Vs.get,zs=Object.defineProperty,qs=Gs&&!Ks((function(){return 8!==zs((function(){}),"length",{value:8}).length})),Xs=String(String).split("String"),$s=Qo.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Hs(e,"name")||js&&e.name!==t)&&(Gs?zs(e,"name",{value:t,configurable:!0}):e.name=t),qs&&r&&Hs(r,"arity")&&e.length!==r.arity&&zs(e,"length",{value:r.arity});try{r&&Hs(r,"constructor")&&r.constructor?Gs&&zs(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Ys(e);return Hs(n,"source")||(n.source=Xs.join("string"==typeof t?t:"")),e};Function.prototype.toString=$s((function(){return Bs(this)&&Js(this).source||Ws(this)}),"toString");var Zs=zn,Qs=Uo,ea=Qo.exports,ta=ki,ra=function(e,t,r,n){n||(n={});var i=n.enumerable,o=void 0!==n.name?n.name:t;if(Zs(r)&&ea(r,o,n),n.global)i?e[t]=r:ta(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Qs.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},na={},ia=Math.ceil,oa=Math.floor,sa=Math.trunc||function(e){var t=+e;return(t>0?oa:ia)(t)},aa=function(e){var t=+e;return t!=t||0===t?0:sa(t)},ua=aa,ca=Math.max,pa=Math.min,la=function(e,t){var r=ua(e);return r<0?ca(r+t,0):pa(r,t)},ha=aa,fa=Math.min,da=function(e){return e>0?fa(ha(e),9007199254740991):0},va=function(e){return da(e.length)},ya=Jn,ga=la,ma=va,Ea=function(e){return function(t,r,n){var i,o=ya(t),s=ma(o),a=ga(n,s);if(e&&r!=r){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},wa={includes:Ea(!0),indexOf:Ea(!1)},ba=ji,Ta=Jn,Ia=wa.indexOf,Aa=bs,Na=Un([].push),_a=function(e,t){var r,n=Ta(e),i=0,o=[];for(r in n)!ba(Aa,r)&&ba(n,r)&&Na(o,r);for(;t.length>i;)ba(n,r=t[i++])&&(~Ia(o,r)||Na(o,r));return o},Oa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ma=_a,Pa=Oa.concat("length","prototype");na.f=Object.getOwnPropertyNames||function(e){return Ma(e,Pa)};var Sa={};Sa.f=Object.getOwnPropertySymbols;var Ca=ei,Ra=na,Ua=Sa,ka=Fo,xa=Un([].concat),Da=Ca("Reflect","ownKeys")||function(e){var t=Ra.f(ka(e)),r=Ua.f;return r?xa(t,r(e)):t},La=ji,Fa=Da,Va=dn,Ka=Uo,Ba=function(e,t,r){for(var n=Fa(t),i=Ka.f,o=Va.f,s=0;ss;)Ou.f(e,r=i[s++],n[r]);return e};var Cu,Ru=ei("document","documentElement"),Uu=Fo,ku=bu,xu=Oa,Du=bs,Lu=Ru,Fu=bo,Vu=ws("IE_PROTO"),Ku=function(){},Bu=function(e){return"